aboutsummaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2022-09-26ASoC: codecs: wcd934x: Fix Kconfig dependencyGravatar Ren Zhijie 1-0/+1
If CONFIG_REGMAP_SLIMBUS is not set, make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-, will be failed, like this: sound/soc/codecs/wcd934x.o: In function `wcd934x_codec_probe': wcd934x.c:(.text+0x3310): undefined reference to `__regmap_init_slimbus' make: *** [vmlinux] Error 1 Add select REGMAP_SLIMBUS to config SND_SOC_WCD934X. Fixes: a61f3b4f476e ("ASoC: wcd934x: add support to wcd9340/wcd9341 codec") Signed-off-by: Ren Zhijie <renzhijie2@huawei.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20220926074042.13297-1-renzhijie2@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-26ASoC: SOF: mediatek: mt8195: Add pcm_pointer callbackGravatar Chunxu Li 1-0/+33
Add pcm_pointer callback for mt8195 to support read host position from DSP Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220924033559.26599-3-chunxu.li@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-26ASoC: SOF: mediatek: mt8195: Add pcm_hw_params callbackGravatar Chunxu Li 1-0/+11
Add pcm_hw_params callback for mt8195 to support continue update dma host position Signed-off-by: Chunxu Li <chunxu.li@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220924033559.26599-2-chunxu.li@mediatek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-26ALSA: memalloc: use __GFP_RETRY_MAYFAIL for DMA mem allocsGravatar Kai Vehmanen 1-1/+1
Use __GFP_RETRY_MAYFAIL instead of __GFP__NORETRY in snd_dma_dev_alloc(), snd_dma_wc_alloc() and friends, to allocate pages for device memory. The MAYFAIL flag retains the semantics of not triggering the OOM killer, but lowers the risk of alloc failure. MAYFAIL flag was added in commit dcda9b04713c3 ("mm, tree wide: replace __GFP_REPEAT by __GFP_RETRY_MAYFAIL with more useful semantic"). This change addresses recurring failures with SOF audio driver in test cases where a system suspend-resume stress test is run, combined with an active high memory-load use-case. The failure typically shows up as: [ 379.480229] sof-audio-pci-intel-tgl 0000:00:1f.3: booting DSP firmware [ 379.484803] sof-audio-pci-intel-tgl 0000:00:1f.3: error: memory alloc failed: -12 [ 379.484810] sof-audio-pci-intel-tgl 0000:00:1f.3: error: dma prepare for ICCMAX stream failed Multiple fixes to reduce the memory usage of DSP boot have been identified in SOF driver, but even with those fixes, debug on affected systems has shown that even a single page alloc may fail with __GFP_NORETRY. When this occurs, system is under significant load on physical memory, but a lot of reclaimable pages are available, so the system has not run out of memory. With __GFP_RETRY_MAYFAIL, the errors are not hit in these stress tests. The alloc failure is severe as audio capability is completely lost if alloc failure is hit at system resume. An alternative solution was considered where the resources for DSP boot would be kept allocated until driver is unbound. This would avoid the allocation failure, but consume memory that is only needed temporarily at probe and resume time. It seems better to not hang on to the memory, but rather work a bit harder for allocating the pages at resume. BugLink: https://github.com/thesofproject/linux/issues/3844 Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220923153501.3326041-1-kai.vehmanen@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-26ALSA: hda/hdmi: Limit the maximal count of PCM devices to 8Gravatar Jaroslav Kysela 1-3/+3
The current hardware has up to 4 converters. Save little space. The limit 8 is enough even for a more improved hardware. Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20220923082236.61024-1-perex@perex.cz Signed-off-by: Takashi Iwai <tiwai@suse.de>
2022-09-23ASoC: SOF: ipc4/Intel: Improve and enable IPC error dumpGravatar Mark Brown 10-15/+77
Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>: On Intel platforms the registers for DSP communications are used differently, the IPC dump information is not correct since important registers are not printed and existing ones are used a bit differently for IPC4. As a last step, enable the IPC timeout 'handling' and allow the printout of the now usefull IPC dump.
2022-09-23ASoC: codecs: qcom add support for SM8450 and SC8280XPGravatar Mark Brown 5-71/+112
Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>: This patchset adds support for SM8450 and SC8280XP SoC and also some of the fixes requried to get stable audio on X13s. Tested SmartSpeakers and Headset on SM8450 MTP and Lenovo Thinkpad X13s.
2022-09-23ASoC: ssm2518: switch to using gpiod APIGravatar Dmitry Torokhov 1-18/+12
This patch converts the driver to newer gpiod API, so that we can stop exporting OF-specific legacy gpio API. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20220920025804.1788667-2-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: ssm2518: drop support for platform dataGravatar Dmitry Torokhov 1-5/+1
There are currently no users of this driver's platform data in the mainline kernel, so let's drop it. Newer devices should use DT, ACPI, or static software properties to describe the hardware. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20220920025804.1788667-1-dmitry.torokhov@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: Intel: skylake: remove unnecessary dev_set_drvdata()Gravatar Yang Yingliang 1-1/+0
Remove unnecessary dev_set_drvdata() in skl_remove(), the driver_data will be set to NULL in device_unbind_cleanup() after calling ->remove(). Signed-off-by: Yang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20220916140757.681414-1-yangyingliang@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: da7219: Fix an error handling path in da7219_register_dai_clks()Gravatar Christophe JAILLET 1-2/+3
If clk_hw_register() fails, the corresponding clk should not be unregistered. To handle errors from loops, clean up partial iterations before doing the goto. So add a clk_hw_unregister(). Then use a while (--i >= 0) loop in the unwind section. Fixes: 78013a1cf297 ("ASoC: da7219: Fix clock handling around codec level probe") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/e4acceab57a0d9e477a8d5890a45c5309e553e7c.1663875789.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: fsl_asrc_dma: fully initialize structsGravatar Sascha Hauer 1-2/+1
The driver uses two statically ininitialized struct dma_slave_config, but only one of them is initialized to zero. Initialize config_be to zero as well to make sure that no fields are filled with random values. Let the compiler do this instead of explicitly calling memset() which makes it easier to read. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1663928147-10106-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: soc-component: using pm_runtime_resume_and_get instead of ↵Gravatar Zhang Qilong 1-4/+2
pm_runtime_get_sync Using the newest pm_runtime_resume_and_get is more appropriate for simplifing code here. Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com> Link: https://lore.kernel.org/r/20220922145846.114312-1-zhangqilong3@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: fsl_audmux: Fix amixer write errorsGravatar Shengjiu Wang 1-12/+4
This reverts commit 944c517b8c8388 ("ASoC: fsl_audmix: make clock and output src write only"). There is error after making clock and output src write only $amixer -c imxaudmix cset numid=1 1 amixer: Cannot read the given element from control sysdefault:3 Which is worse than before, so let's revert the change. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://lore.kernel.org/r/1662446961-20799-1-git-send-email-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: MTL: Fixes for suspend/resumeGravatar Mark Brown 10-169/+81
Merge series from Ranjani Sridharan <ranjani.sridharan@linux.intel.com>: This series includes fixes for suspend/resume and module loading/unloading for the MTL platform.
2022-09-23ASoC: mediatek: Allow separate handling of headphone and headset mic jackGravatar Mark Brown 4-8/+76
Merge series from Nícolas F. R. A. Prado <nfraprado@collabora.com>: This series allows the headphone and headset mic jack status to be handled separately by userspace on MT8192, MT8195 and MT8186. Changes based on commit d0508b4f1604 ("ASoC: rk3399_gru_sound: Add DAPM pins, kcontrols for jack detection"). Found while searching for an alternative for JackSwitch [1]. [1] https://lore.kernel.org/all/b98a8a77-7652-1995-27ba-eb7b6d30202a@gmail.com/ Nícolas F. R. A. Prado (6): ASoC: mediatek: mt8192-mt6359: Expose individual headset jack pins ASoC: mediatek: mt8195: Expose individual headset jack pins ASoC: mediatek: mt8186-da7219: Add headset widgets with switches ASoC: mediatek: mt8186-da7219: Expose individual headset jack pins ASoC: mediatek: mt8186-rt5682: Add headset widgets with switches ASoC: mediatek: mt8186-rt5682: Expose individual headset jack pins .../mt8186/mt8186-mt6366-da7219-max98357.c | 25 +++++++++++++++++-- .../mt8186/mt8186-mt6366-rt1019-rt5682s.c | 25 +++++++++++++++++-- .../mt8192/mt8192-mt6359-rt1015-rt5682.c | 17 +++++++++++-- sound/soc/mediatek/mt8195/mt8195-mt6359.c | 17 +++++++++++-- 4 files changed, 76 insertions(+), 8 deletions(-) -- 2.37.3
2022-09-23ASoC: SOF: ipc4: Call snd_sof_handle_fw_exception() in case of timeoutGravatar Peter Ujfalusi 1-0/+1
It can help debugging IPC timeout issues (like we do with IPC3) if we dump the IPC and DSP information. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20220923133616.26267-7-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: hda: Only dump firmware registers for IPC3Gravatar Peter Ujfalusi 1-1/+2
The firmware register dump is IPC3 specific, it is not available for other IPC versions. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20220923133616.26267-6-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: mtl: Print relevant register in ipc_dumpGravatar Peter Ujfalusi 1-9/+8
The use of the IPC registers are different between IPC3 and IPC4. The ipc_dump needs to use different prints depending on the used IPC protocol. The existing code was printing registers relevant for IPC3, which is not even supported on MTL. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20220923133616.26267-5-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: skl: Use the ipc4 version of the ipc_dumpGravatar Peter Ujfalusi 1-1/+1
The use of the IPC registers are different between IPC3 and IPC4. The ipc_dump needs to use different prints depending on the used IPC protocol. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20220923133616.26267-4-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: hda: Add separate ops for ipc_dump for IPC4Gravatar Peter Ujfalusi 3-1/+25
The use of the IPC registers are different between IPC3 and IPC4. The ipc_dump needs to use different prints depending on the used IPC protocol. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20220923133616.26267-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: cnl: Add separate ops for ipc_dump for IPC4Gravatar Peter Ujfalusi 4-3/+40
The use of the IPC registers are different between IPC3 and IPC4. The ipc_dump needs to use different prints depending on the used IPC protocol. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Link: https://lore.kernel.org/r/20220923133616.26267-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: va-macro: add support for sm8450 and sc8280xpGravatar Srinivas Kandagatla 1-4/+70
LPASS VA Macro now has soundwire master to deal with access to analog mic in low power island use cases. This is added after sc8280xp, add support for this. Along with this also add compatibles for sm8450 and sc8280xp. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-13-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: va-macro: clear the frame sync counter before enablingGravatar Srinivas Kandagatla 1-2/+6
Clear the frame sync counter before enabling it. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-12-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: rx-macro: add support for sm8450 and sc8280xpGravatar Srinivas Kandagatla 1-0/+2
Add compatible for sm8450 and sc8280xp. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-11-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: tx-macro: add support for sm8450 and sc8280xpGravatar Srinivas Kandagatla 1-0/+2
Add compatible for sm8450 and sc8280xp. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-10-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: wsa-macro: add support for sm8450 and sc8280xpGravatar Srinivas Kandagatla 1-0/+2
Add compatible for sm8450 and sc8280xp. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-9-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: wsa883x: add clock stop supportGravatar Srinivas Kandagatla 1-27/+1
WSA883x does support clock stop, so remove code that reset the Codec during runtime pm suspend and add flag to mark clock stop support. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-7-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: tx-macro: fix kcontrol putGravatar Srinivas Kandagatla 1-2/+11
tx_macro_tx_mixer_put() and tx_macro_dec_mode_put() currently returns zero eventhough it changes the value. Fix this, so that change notifications are sent correctly. Fixes: d207bdea0ca9 ("ASoC: codecs: lpass-tx-macro: add dapm widgets and route") Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-6-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: tx-macro: fix active_decimator arrayGravatar Srinivas Kandagatla 1-1/+5
currently active_decimator[] is unsigned long however we store negative values when there is no decimator setup -1. This is first bug, and the second bug is that we do not check if the decimator is valid before writing to register using decimator as offset in CDC_TXn_TX_PATH_CTL() Fix these both by making active_decimator as integer array and adding check in tx_macro_digital_mute() before accessing CDC_TXn_TX_PATH_CTL() register. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-5-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: tx-macro: handle swr_reset correctlyGravatar Srinivas Kandagatla 1-11/+4
Reset soundwire block on frame sync generation clock reset. Without this we are hitting read/write timeouts randomly during runtime pm. Along with this remove a swr_reset redundant flag. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-4-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: rx-macro: handle swr_reset correctlyGravatar Srinivas Kandagatla 1-11/+5
Reset soundwire block on frame sync generation clock reset. Without this we are hitting read/write timeouts randomly during runtime pm. Along with this remove a swr_reset redundant flag. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-3-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: codecs: wsa-macro: handle swr_reset correctlyGravatar Srinivas Kandagatla 1-13/+4
Reset soundwire block on frame sync generation clock reset. Without this we are hitting read/write timeouts randomly during runtime pm. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20220906170112.1984-2-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: Intel: sof_da7219_mx98360a: Access num_codecs through dai_linkGravatar Nathan Chancellor 1-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>
2022-09-23ASoC: fsl: Remove unused inline function imx_pcm_dma_params_init_data()Gravatar Gaosheng Cui 1-9/+0
The imx_pcm_dma_params_init_data() are no longer used since commit c31da0b196f9 ("ASoC: imx-ssi: Remove unused driver"), and the function is used to initialize some members of "struct imx_dma_data", it's more readable to assign the value directly, imx_pcm_dma_params_init_data is useless, so remove it. Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com> Link: https://lore.kernel.org/r/20220923090355.507648-1-cuigaosheng1@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom opsGravatar AngeloGioacchino Del Regno 1-6/+1
It is possible to use the standard snd_soc_pm_ops for this card: remove the custom mt8195_mt6359_pm_ops. Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220922103502.49981-1-angelogioacchino.delregno@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: MTL: remove the unnecessary snd_sof_dsp_read()Gravatar Yong Zhi 1-8/+0
The return val of snd_sof_dsp_read() right before polling the same register is not used, so remove the redundant call. Signed-off-by: Yong Zhi <yong.zhi@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220922213644.666315-11-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: MTL: reuse the common ops for PMGravatar Ranjani Sridharan 1-150/+0
Now that the disabling of interrupts and powering down the DSP has been abstracted, re-use the common ops for PM for MTL as well. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220922213644.666315-10-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: HDA: use IPC version-specific opsGravatar Ranjani Sridharan 1-8/+5
Use the IP-specific ops for disabling interrupts and powering down the DSP in hda_suspend. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220922213644.666315-9-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: MTL: define and set the disable_interrupts opGravatar Ranjani Sridharan 1-0/+7
Disable the IPC and SDW interrupts in the disable_interrupts op. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220922213644.666315-8-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: define and set the disable_interrupts op for cavs platformsGravatar Ranjani Sridharan 7-0/+18
Disable the IPC and SDW nterrupts in the disable_interrupts op for cavs platforms. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220922213644.666315-7-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: Add a new op for disabling interruptsGravatar Ranjani Sridharan 1-0/+1
The sequence for disabling DSP interrupts varies between different IP versions. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20220922213644.666315-6-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: use power_down_dsp op in hda_dsp_removeGravatar Fred Oh 1-3/+3
Use power_down_dsp op to differentiate power down sequences in platforms. Signed-off-by: Fred Oh <fred.oh@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220922213644.666315-5-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: mtl: define and set power_down_dsp opGravatar Fred Oh 1-0/+28
For MTL platform, dsp cores need to go power down first then dsp subsystem also need to set power down. Signed-off-by: Fred Oh <fred.oh@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220922213644.666315-4-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: define and set power_down_dsp op for HDA platformsGravatar Fred Oh 7-0/+18
hda_power_down_dsp is set for power_down_dsp op for all HDA platforms. Signed-off-by: Fred Oh <fred.oh@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220922213644.666315-3-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: SOF: Intel: introduce new op to handle dsp power downGravatar Fred Oh 1-0/+1
DSP core power down sequences are different between cavs platforms and MTL. Signed-off-by: Fred Oh <fred.oh@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://lore.kernel.org/r/20220922213644.666315-2-ranjani.sridharan@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: mediatek: mt8186-rt5682: Expose individual headset jack pinsGravatar Nícolas F. R. A. Prado 1-2/+15
The rt5682 codec is able to distinguish between two event types: headphone insertion/removal and headset microphone insertion/removal. However, currently, the mt8186-rt5682 driver exposes a single kcontrol for the headset jack, so userspace isn't able to differentiate between the two events. Add a definition for the headset jack pins, so that a separate jack kcontrol is created for each one, allowing userspace to track and handle them individually. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220922235951.252532-7-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: mediatek: mt8186-rt5682: Add headset widgets with switchesGravatar Nícolas F. R. A. Prado 1-0/+8
Add DAPM widgets for headphones and headset microphone, with matching switches, to allow toggling these paths based on the jack connection status. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220922235951.252532-6-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: mediatek: mt8186-da7219: Expose individual headset jack pinsGravatar Nícolas F. R. A. Prado 1-2/+15
The da7219 codec is able to distinguish between two event types: headphone insertion/removal and headset microphone insertion/removal. However, currently, the mt8186-da7219 driver exposes a single kcontrol for the headset jack, so userspace isn't able to differentiate between the two events. Add a definition for the headset jack pins, so that a separate jack kcontrol is created for each one, allowing userspace to track and handle them individually. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220922235951.252532-5-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-23ASoC: mediatek: mt8186-da7219: Add headset widgets with switchesGravatar Nícolas F. R. A. Prado 1-0/+8
Add DAPM widgets for headphones and headset microphone, with matching switches, to allow toggling these paths based on the jack connection status. Note that differently from others (mt8192, mt8195 and mt8186-rt5682), the widget here is named "Headphones" (with an 's'), since "Headphone Switch" was already registered by da7219. Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://lore.kernel.org/r/20220922235951.252532-4-nfraprado@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>