summaryrefslogtreecommitdiffstats
path: root/sound
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | ASoC: fsl: Fix sparse warningMark Brown2022-07-226-12/+20
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>: Fix sparse warnings in various fsl drivers.
| | | * | ASoC: imx-card: use snd_pcm_format_t type for asrc_formatShengjiu Wang2022-07-211-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix sparse warning: sound/soc/fsl/imx-card.c:653:59: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/imx-card.c:653:59: sparse: expected unsigned int [usertype] asrc_format sound/soc/fsl/imx-card.c:653:59: sparse: got restricted snd_pcm_format_t [usertype] sound/soc/fsl/imx-card.c:655:59: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/imx-card.c:655:59: sparse: expected unsigned int [usertype] asrc_format sound/soc/fsl/imx-card.c:655:59: sparse: got restricted snd_pcm_format_t [usertype] Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-6-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: fsl_easrc: use snd_pcm_format_t type for sample_formatShengjiu Wang2022-07-212-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix sparse warning: sound/soc/fsl/fsl_easrc.c:562:33: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:563:34: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:565:38: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:566:39: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:608:33: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:609:34: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:615:40: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:616:41: sparse: warning: restricted snd_pcm_format_t degrades to integer sound/soc/fsl/fsl_easrc.c:1465:51: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1465:51: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1465:51: sparse: got restricted snd_pcm_format_t [usertype] format sound/soc/fsl/fsl_easrc.c:1467:52: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1467:52: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1467:52: sparse: got restricted snd_pcm_format_t [usertype] asrc_format sound/soc/fsl/fsl_easrc.c:1470:52: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1470:52: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1470:52: sparse: got restricted snd_pcm_format_t [usertype] format sound/soc/fsl/fsl_easrc.c:1472:51: sparse: warning: incorrect type in assignment (different base types) sound/soc/fsl/fsl_easrc.c:1472:51: sparse: expected unsigned int sample_format sound/soc/fsl/fsl_easrc.c:1472:51: sparse: got restricted snd_pcm_format_t [usertype] asrc_format sound/soc/fsl/fsl_easrc.c:1484:41: sparse: warning: incorrect type in argument 2 (different base types) sound/soc/fsl/fsl_easrc.c:1484:41: sparse: expected restricted snd_pcm_format_t [usertype] *in_raw_format sound/soc/fsl/fsl_easrc.c:1484:41: sparse: got unsigned int * sound/soc/fsl/fsl_easrc.c:1485:41: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_easrc.c:1485:41: sparse: expected restricted snd_pcm_format_t [usertype] *out_raw_format sound/soc/fsl/fsl_easrc.c:1485:41: sparse: got unsigned int * sound/soc/fsl/fsl_easrc.c:1937:60: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_easrc.c:1937:60: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl_easrc.c:1937:60: sparse: got restricted snd_pcm_format_t * sound/soc/fsl/fsl_easrc.c:1943:49: sparse: warning: restricted snd_pcm_format_t degrades to integer Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-5-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: fsl-asoc-card: force cast the asrc_format typeShengjiu Wang2022-07-211-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix sparse warning: sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl-asoc-card.c:833:45: sparse: got restricted snd_pcm_format_t * Fixes: 859e364302c5 ("ASoC: fsl-asoc-card: Support new property fsl, asrc-format") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-4-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: fsl_asrc: force cast the asrc_format typeShengjiu Wang2022-07-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix sparse warning: sound/soc/fsl/fsl_asrc.c:1177:60: sparse: warning: incorrect type in argument 3 (different base types) sound/soc/fsl/fsl_asrc.c:1177:60: sparse: expected unsigned int [usertype] *out_value sound/soc/fsl/fsl_asrc.c:1177:60: sparse: got restricted snd_pcm_format_t * sound/soc/fsl/fsl_asrc.c:1200:47: sparse: warning: restricted snd_pcm_format_t degrades to integer Fixes: 4520af41fd21 ("ASoC: fsl_asrc: Support new property fsl,asrc-format") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-3-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: fsl_sai: Don't use plain integer as NULL pointerShengjiu Wang2022-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix sparse warning: sound/soc/fsl/fsl_sai.c:64:39: sparse: warning: Using plain integer as NULL pointer Fixes: b4ee8a913e61 ("ASoc: fsl_sai: Add pinctrl operation for PDM and DSD") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1658399393-28777-2-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: audio-graph-card: Add of_node_put() in fail pathLiang He2022-07-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In asoc_simple_parse_dai(), we should call of_node_put() for the reference returned by of_graph_get_port_parent() in fail path. Fixes: ae30a694da4c ("ASoC: simple-card-utils: add asoc_simple_card_parse_dai()") Signed-off-by: Liang He <windhl@126.com> Link: https://lore.kernel.org/r/20220721144308.1301587-1-windhl@126.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: amd: enable RPL Platform acp drivers buildSyed Saba Kareem2022-07-213-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RPL Platform drivers can be built by selecting necessary kernel config option. The patch enables build support of the same. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220721061035.91139-5-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: amd: add RPL Platform pci driver pm-opsSyed Saba Kareem2022-07-212-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add RPL Platform ACP PCI driver pm ops. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220721061035.91139-4-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: amd: add RPL Platform init/de-init functionsSyed Saba Kareem2022-07-211-0/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add RPL Platform ACP init/de-init functions. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220721061035.91139-3-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: amd: add ACP PCI driver for RPL platformSyed Saba Kareem2022-07-212-0/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ACP is a PCI audio device. This patch adds PCI driver to bind to this device and get PCI resources. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220721061035.91139-2-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: amd: add RPL Platform acp header fileSyed Saba Kareem2022-07-211-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add ACP register header file for RPL platform. Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220721061035.91139-1-Syed.SabaKareem@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: amd: acp: Add error handling casesVenkata Prasad Potturu2022-07-211-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add error handling in acp pci driver probe function. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220721062043.3016985-5-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: amd: acp: Modify const resource struct variable to genericVenkata Prasad Potturu2022-07-211-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change platform specific constant resource structure variable to generic name. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220721062043.3016985-4-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: amd: acp: Drop superfluous mmap callbackVenkata Prasad Potturu2022-07-211-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove mmap callback as ASoC AMD drivers just call the standard mmap handler. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220721062043.3016985-2-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: amd: acp: Modify local variables name to genericVenkata Prasad Potturu2022-07-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change local variables name to be generic in irq handler. Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://lore.kernel.org/r/20220721062043.3016985-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: qcom: q6dsp: Fix an off-by-one in q6adm_alloc_copp()Christophe JAILLET2022-07-211-1/+1
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | find_first_zero_bit() returns MAX_COPPS_PER_PORT at max here. So 'idx' should be tested with ">=" or the test can't match. Fixes: 7b20b2be51e1 ("ASoC: qdsp6: q6adm: Add q6adm driver") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/0fca3271649736053eb9649d87e1ca01b056be40.1658394124.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: mediatek: Add support for MT8186 SoCMark Brown2022-07-2112-2/+5574
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Jiaxin Yu <jiaxin.yu@mediatek.com>: This series of patches adds support for Mediatek AFE of MT8186 Soc.
| | | * | ASoC: mediatek: mt8186: add machine driver with mt6366, rt1019 and rt5682sJiaxin Yu2022-07-203-0/+995
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for mt8186 board with mt6366, rt1019 and rt5682s. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220718162204.26238-8-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: mediatek: mt8186: add machine driver with mt6366, da7219 and max98357Jiaxin Yu2022-07-203-0/+1019
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for mt8186 board with mt6366, da7219 and max98357. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220718162204.26238-6-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: mediatek: mt8186: add mt8186-mt6366 common driverJiaxin Yu2022-07-203-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mt8186-mt6366 common driver for mt8186 series machine. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220718162204.26238-4-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: mediatek: mt8186: add platform driverJiaxin Yu2022-07-208-2/+3485
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mt8186 platform and affiliated driver. Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220718162204.26238-3-jiaxin.yu@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: jz4740-i2s: Remove unused 'mem' resourceAidan MacDonald2022-07-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This isn't used and doesn't need to be in the private data struct. Signed-off-by: Aidan MacDonald <aidanmacdonald.0x0@gmail.com> Reviewed-by: Paul Cercueil <paul@crapouillou.net> Link: https://lore.kernel.org/r/20220708160244.21933-3-aidanmacdonald.0x0@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: Makefile: Fix simultaneous build of KUNIT testsAmadeusz Sławiński2022-07-201-2/+2
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using obj-$() := instead of obj-$() += leads to the latter assignment overwriting earlier value. Fix this by using incremental assignment to add additional objects to build. Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220720125115.1785426-1-amadeuszx.slawinski@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | ASoC: SOF: Intel: updates and cleanupsMark Brown2022-07-1911-90/+250
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Set of updates for IPC3, IPC4, MTL support and cleanups for the topology filename override which was broken for HDaudio platforms.
| | | * | ASoC: SOF: Intel: hda-stream: test DMA buffer first in hw_paramsPierre-Louis Bossart2022-07-151-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should be consistent and always test that the DMA buffer is allocated before continuing with the hw_params setup. 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/20220715145216.277003-12-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: probes: rename assign/free callbacks as startup/shutdownPierre-Louis Bossart2022-07-153-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | assign/free are not well aligned to usual conventions and specifically not to the compressed ops that make use of the probe callbacks. Use the more common startup/shutdown. No functional change beyond renaming. 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/20220715145216.277003-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: Intel: hda: only fixup topology name if not set alreadyPierre-Louis Bossart2022-07-151-22/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do all kinds of renaming tricks that get in the way of kernel parameter and DMI quirk overrides at a higher level. Tested on UpExtreme board with options snd-sof-pci tplg_filename=sof-hda-generic.tplg Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220715145216.277003-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: Intel: hda: don't set fw_filenamePierre-Louis Bossart2022-07-151-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fw_filename is now set at a higher level and can be overridden by kernel parameters or DMI quirks. Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220715145216.277003-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: Intel: atom: don't keep a temporary string in fixup_tplg_namePeter Ujfalusi2022-07-151-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixup_tplg_name() doesn't need to keep the string, allocated for filename - it's temporary. Inspired by similar change for hda: commit b9088535e102 ("ASoC: SOF: Intel: HDA: don't keep a temporary variable") Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220715145216.277003-8-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: ipc3-loader: Print out the non matching ext_man magic numberPeter Ujfalusi2022-07-151-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Print out the found extended manifest magic number in case it is not matching with the expected one (0x6e614d58) in debug level. It is fairly unlikely that the firmware does not have ext_man section and the found value in place of the magic number can help rootcausing boot related issues. Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220715145216.277003-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: ipc4-topology: set domain bit based on dp domain typeRander Wang2022-07-152-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the domain bit in ipc msg for module initialization is set to lp (low power) mode for pipeline. This is not correct since it is for module domain type: ll domain or dp domain which are for scheduler in fw. If the domain bit is set to 1 fw will process the module in dp domain or deal it with ll domain. So set domain bit based on dp domain setting. Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220715145216.277003-6-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: add ipc4 SRC module supportRander Wang2022-07-152-1/+127
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SRC module only needs two parameters : base module config and sink rate. This patch adds prepare and setup for SRC widgets. Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220715145216.277003-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: ipc4-pcm: set pcm rate to dai settingRander Wang2022-07-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dsp converts pcm rate to the one defined by dai. When SRC is used, the pcm runtime rate is different with dai rate and we need to fix it up for BE components. Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220715145216.277003-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: ipc4-topology: move ida allocate/free to widget_setup/freeBard Liao2022-07-151-20/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing code allocate/release instance_id in widget ipc_prepare/ ipc_unprepare callbacks and creating widget with the instance_id in tplg widget_setup callback. In the case of multiple widgets connecting to one widget, the ipc_unprepare will be invoked for all the widgets in the path including the widget which is still in use. As a result, the instance_id is released in the ipc_unprepare callback, but the widget is still in use and the instance_id will be reused by a new widget when we start the PCM again. Moving the ida work from ipc_prepare/ipc_unprepare to widget_setup/free can avoid such problem. Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220715145216.277003-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | ASoC: SOF: Intel: MTL: remove redundant snd_sof_dsp_read() callYong Zhi2022-07-151-12/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop redundant CPA bit check after polling the same condition. Fixes: 064520e8aeaa ("ASoC: SOF: Intel: Add support for MeteorLake (MTL)") Reviewed-by: Chao Song <chao.song@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> 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/20220715145216.277003-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: SOF: mediatek: fix boot sequencesMark Brown2022-07-191-4/+9
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: Changes to DSP_RESET_SW need extra care.
| | | * | | ASoC: SOF: mediatek: fix mt8195 StatvectorSel wrong settingYC Hung2022-07-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix StatVectorSel wrong setting. Fixes: b7f6503830 ("ASoC: SOF: mediatek: Add fw loader and mt8195 dsp ops to load firmware") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: YC Hung <yc.hung@mediatek.com> Reviewed-by: Li-Yu Yu <afg984@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: KuanHsun Cheng <Allen-KH.Cheng@mediatek.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220708203904.29214-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | ASoC: SOF: mediatek: Revise mt8195 boot flowYC Hung2022-07-111-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Revise hifixdsp shutdown flow to pull runstall high then reset high. 2. Add 1 us delay between D/BRESET high and low for 10 DSP cycles(26M) based on IP vendor's suggestion. Signed-off-by: YC Hung <yc.hung@mediatek.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Li-Yu Yu <afg984@gmail.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: KuanHsun Cheng <Allen-KH.Cheng@mediatek.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220708203904.29214-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | ASoC: nau8821: Don't unconditionally free interruptMark Brown2022-07-191-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The remove() operation unconditionally frees the interrupt for the device but we may not actually have an interrupt so there might be nothing to free. Since the interrupt is requested after all other resources we don't need the explicit free anyway, unwinding is guaranteed to be safe, so just delete the remove() function and let devm take care of things. Reported-by: Zheyu Ma <zheyuma97@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org> Tested-by: Zheyu Ma <zheyuma97@gmail.com> Link: https://lore.kernel.org/r/20220718140405.57233-1-broonie@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | ASoC: amd: yc: Decrease level of error messageMario Limonciello2022-07-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On a number of platforms that contain acp3x controller a new ERR level message is showing up: `acp6x pci device not found` This is because ACP3x and ACP6x share same PCI ID but can be identified by PCI revision. As this is expected behavior for a system with ACP3x decrease message to debug. Fixes: b1630fcbfde6c ("ASoC: amd: yc: add new YC platform varaint support") Cc: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Link: https://lore.kernel.org/r/20220718213402.19497-1-mario.limonciello@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | ASoC: nau8821: add new widget to control system clockWallace Lin2022-07-191-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new widget to control system clock for power saving. Signed-off-by: Wallace Lin <savagecin0@gmail.com> Signed-off-by: Wallace Lin <sjlin0@nuvoton.com> Link: https://lore.kernel.org/r/20220719084047.11572-1-savagecin@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | ASoC: mediatek: mt8195: extract SOF common codeChunxu Li2022-07-185-183/+301
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The functions related to SOF can be reused in different machine drivers, such as mt8195 or mt8186, so extract the common code to avoid duplication. Set mtk_soc_card_data which include machine private data and SOF private data as card drvdata, then the difference between machine private can be ignored such as mt8195_mt6359_priv or mt8186_mt6366_priv, at the same time the SOF related code can be reused in different machine drivers. Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Link: https://lore.kernel.org/r/20220715085903.7796-1-chunxu.li@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | ASoC: SOF: Intel: add support for SoundWire-based HP Omen16Mark Brown2022-07-155-4/+48
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>: This device exposes a headset codec on link0 and an amplifier on link3. This is a very unusual pin-muxing, usually the microphones are pin-muxed with link2/link3. This resulted in a problematic error handling leading to a kernel oops, and invalidated a hard-coded assumption. Full support for this device requires a DMI quirk shared separately ("soundwire: dmi-quirks: add remapping for HP Omen 16-k0005TX").
| | | * | | ASoC: SOF: Intel: enable dmic handling with 2 or fewer SoundWire linksPierre-Louis Bossart2022-07-151-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When PCH-attached DMICs are used on a SoundWire-based platform, all known devices pin-mux SoundWire link2 and link3 with DMIC, and only use link0 and link1 for SoundWire. The HP Omen16 is the first exception to the rule, with SoundWire using link0 and link3. Rather than using a fixed mask, let's count the number of SoundWire links used. BugLink: https://github.com/thesofproject/sof/issues/5966 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220715144144.274770-5-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | ASoC: Intel: sof_sdw: add quirk for HP Omen 16-k0005TXPierre-Louis Bossart2022-07-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The JD2 jack detection was selected based on similar settings from other platforms based on RT711-SDCA. BugLink: https://github.com/thesofproject/sof/issues/5955 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220715144144.274770-4-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | ASoC: Intel: soc-acpi: add table for HP Omen 16-k0005TXPierre-Louis Bossart2022-07-151-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device has an RT711-SDCA headset codec on link0 and an RT1316 amplifier on link3. BugLink: https://github.com/thesofproject/sof/issues/5955 Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220715144144.274770-3-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | | * | | ASoC: Intel: sof_sdw: avoid oops in error handlingPierre-Louis Bossart2022-07-152-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While tinkering with ACPI work-arounds for the HP Omen 16 support, we identified a corner case where the headset codec device properties are not set in the codec .init when -EPROBE_DEFER is returned, but released unconditionally in the .exit(). This leads to a kernel oops [ 4.186891] sof_sdw sof_sdw: snd_soc_register_card failed -517 [ 4.186896] BUG: kernel NULL pointer dereference, address: 00000000000003f0 [ 4.186914] Oops: 0000 [#1] PREEMPT SMP NOPTI [ 4.186926] RIP: 0010:dev_fwnode+0x5/0x20 [ 4.186974] device_remove_software_node+0x10/0x80 [ 4.186982] sof_sdw_rt711_exit+0x19/0x30 [snd_soc_sof_sdw] [ 4.186990] mc_dailink_exit_loop+0x94/0xc0 [snd_soc_sof_sdw] [ 4.186996] ? rt711_rtd_init+0x170/0x170 [snd_soc_sof_sdw] A similar error case can occur if the addition of the device property fails. We need to test if the property was successfully added before removing it. BugLink: https://github.com/thesofproject/linux/issues/3727 Fixes: 768ad6d80db2d ("ASoC: Intel: sof_sdw: handle errors on card registration") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220715144144.274770-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
| | * | | | ASoC: Intel: Mark BE DAIs as nonatomic for hsw andMark Brown2022-07-154-0/+4
| | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE DAIs. This patchset iterates the change over all HSW and BDW related machine board drivers.
| | | * | | | ASoC: Intel: bdw_rt5677: Mark BE DAI as nonatomicCezary Rojewski2022-07-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Address the warning: "Codec: dpcm_be_connect: FE is nonatomic but BE is not, forcing BE as nonatomic" by marking BE DAI as nonatomic. Aligns with what is already done for FE ones. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220624134317.3656128-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>