summaryrefslogtreecommitdiffstats
path: root/sound/soc/intel/boards/sof_da7219_max98373.c
Commit message (Collapse)AuthorAgeFilesLines
* ASoC: Intel: sof_da7219: rename driver file and kernel optionBrent Lu2023-09-151-482/+0
| | | | | | | | | | | Rename the driver file and kernel option to be consistent with other SOF machine drivers. Signed-off-by: Brent Lu <brent.lu@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20230915124852.1696857-17-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_da7219_max98373: Map missing Line Out jack kcontrolAlper Nebi Yasak2023-08-071-0/+10
| | | | | | | | | | | | | | | Commit 2913bb1f6830 ("ASoC: Intel: sof_da7219_max98373: remap jack pins") maps kcontrols for Headphone and Headset Mic jacks for this driver so that PulseAudio and PipeWire can handle jack detection events for these peripherals. The DA7219 codec used here can also distinguish between Headphone and Line Out connections that go into the same physical port. Expose the latter to userspace as a kcontrol as well and add the necessary widgets. Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com> Link: https://lore.kernel.org/r/20230802175737.263412-11-alpernebiyasak@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Drop da7219_aad_jack_det() usageCezary Rojewski2022-11-071-2/+2
| | | | | | | | | Do not access the internal function directly, do so through component->set_jack() instead. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221031160227.2352630-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_da7219_mx98360a: Access num_codecs through dai_linkNathan Chancellor2022-09-231-1/+1
| | | | | | | | | | | | | | | | | | | After commit 3989ade2d1e7 ("ASoC: soc.h: remove num_cpus/codecs"), the following build error occurs: sound/soc/intel/boards/sof_da7219_max98373.c:198:27: error: no member named 'num_codecs' in 'struct snd_soc_pcm_runtime' for (j = 0; j < runtime->num_codecs; j++) { ~~~~~~~ ^ 1 error generated. This conversion was missed by the aforementioned change. Do it now to fix the build error. Fixes: 3989ade2d1e7 ("ASoC: soc.h: remove num_cpus/codecs") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220922153752.336193-1-nathan@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_da7219_max98373: remap jack pinsPierre-Louis Bossart2022-06-171-5/+18
| | | | | | | | | | | | | | | The card did not map jack pins to controls, which prevents PulseAudio/PipeWire from dealing with jack detection. It's likely that jack detection was only tested with the CRAS server and extensions of UCM. Suggested-by: Jaroslav Kysela <perex@perex.cz> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220616214055.134943-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: soc-card: Create jack kcontrol without pinsAkihiko Odaki2022-04-141-1/+1
| | | | | | | | | | | | | | | snd_soc_card_jack_new() allowed to create jack kcontrol without pins, but did not create kcontrols. The jack would not have kcontrols if pins were not going to be added. This renames the old snd_soc_card_jack_new() to snd_soc_card_jack_new_pins() for use when pins are provided or will be added later. The new snd_soc_card_jack_new() appropriately creates a jack for use without pins and adds a kcontrol. Signed-off-by: Akihiko Odaki <akihiko.odaki@gmail.com> Link: https://lore.kernel.org/r/20220408041114.6024-1-akihiko.odaki@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_da7219_mx98360a: fail to initialize soundcardBrent Lu2021-07-261-1/+1
| | | | | | | | | | | | | The default codec for speaker amp's DAI Link is max98373 and will be overwritten in probe function if the board id is sof_da7219_mx98360a. However, the probe function does not do it because the board id is changed in earlier commit. Fixes: 1cc04d195dc2 ("ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20 characters") Signed-off-by: Brent Lu <brent.lu@intel.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210726094525.5748-1-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: use MODULE_DEVICE_TABLE with platform_device_id tablesPierre-Louis Bossart2021-06-221-2/+0
| | | | | | | | | | | | | When we have a platform_device_id table, we can use MODULE_DEVICE_TABLE to automatically generate the modalias. As a result we can remove the manual insertion of MODULE_ALIAS. Reported-by: Hulk Robot <hulkci@huawei.com> Suggested-by: Zou Wei <zou_wei@huawei.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210621194057.21711-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_da7219_max98373: shrink platform_id below 20 charactersPierre-Louis Bossart2021-06-221-4/+4
| | | | | | | | | | | | | | | | Sparse throws the following warning: sound/soc/intel/boards/sof_da7219_max98373.c:438:25: error: too long initializer-string for array of char(no space for nul char) Fix by using 'mx' acronym for Maxim. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20210621194057.21711-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: intel/boards: add missing MODULE_DEVICE_TABLEZou Wei2021-05-141-0/+1
| | | | | | | | | | | This patch adds missing MODULE_DEVICE_TABLE definition which generates correct modalias for automatic loading of this driver when it is built as an external module. Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zou Wei <zou_wei@huawei.com> Link: https://lore.kernel.org/r/1620791647-16024-1-git-send-email-zou_wei@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: boards: handle hda-dsp-common as a modulePierre-Louis Bossart2021-05-101-0/+1
| | | | | | | | | | | hda-dsp-common.o is linked multiple times due to copy/paste and inertia. Move to a dedicated module with a namespace. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210505163705.305616-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: intel/boards: use asoc_substream_to_rtd()Kuninori Morimoto2020-07-271-1/+1
| | | | | | | | | | Now we can use asoc_substream_to_rtd() macro, let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87v9i9yddc.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: SOF/Intel: clarify SPDX license with GPL-2.0-onlyPierre-Louis Bossart2020-05-011-1/+1
| | | | | | | | | | | | Remove the ambiguity with GPL-2.0 and use an explicit GPL-2.0-only tag. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20200501145850.15178-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof-da7219-max98373: add DMIC widget and routeKeyon Jie2020-04-141-0/+10
| | | | | | | | | | | Add DMIC endpoint widget and route to make DMIC DAPM routes completed, to make DAPM Power Management works for DMIC streams. Signed-off-by: Keyon Jie <yang.jie@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20200409185827.16255-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_da7219_max98373: Add BE dailink for dmic16kYong Zhi2020-04-141-0/+11
| | | | | | | | | | | | Add dmic16k BE dailink for keyword detection support, FE is added in topology tplg file. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200409185827.16255-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: intel: use asoc_rtd_to_cpu() / asoc_rtd_to_codec() macro for DAI pointerKuninori Morimoto2020-03-271-4/+4
| | | | | | | Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/87r1xjir7a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: intel: sof_da7219_max98373: Add speaker switchYong Zhi2020-03-261-30/+37
| | | | | | | | | | | | Add "Spk Switch" and associated widget, route to max98360a speaker amp for power saving, also remove the speaker_amp_init() callback with complete separated tables for max98373 and max98360a. Signed-off-by: Bhat, Uday M <uday.m.bhat@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Yong Zhi <yong.zhi@intel.com> Link: https://lore.kernel.org/r/20200325213245.28247-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: don't use GFP_ATOMIC for machine driver contextsPierre-Louis Bossart2020-03-131-1/+1
| | | | | | | | | | | | We've removed GFP_ATOMIC in all machine drivers and somehow this keeps coming back due to copy-paste. Move to GFP_KERNEL. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20200312194859.4051-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: sof_da7219_max98373: Add support for max98360a speaker ampYong Zhi2020-03-131-7/+67
| | | | | | | | | | Add Maxim MAX98360A plug-and-play Class-D amplifier support on SSP1, new card ID is sofda7219max98360a, name sof-da7219max98360a. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200312194859.4051-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: (cosmetic) simplify structure member accessGuennadi Liakhovetski2020-03-131-1/+1
| | | | | | | | | Fix a clumsy structure member dereference in all machine drivers. Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200312194859.4051-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
* ASoC: Intel: Add machine driver for da7219_max98373Yong Zhi2019-12-181-0/+371
This patch adds sof_da7219_max98373 machine driver. Tested on JasperLake platform with SOF only. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Vani Ganji <vani.ganji@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20191218002616.7652-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>