Marek Vasut [Tue, 27 Sep 2022 00:20:04 +0000 (02:20 +0200)]
ASoC: st,stm32-sai: Document audio OF graph port
It is expected that the SAI subnodes would contain audio OF graph port
with endpoint to link it with the other side of audio link. Document
the port: property.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20220927002004.685108-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
Gustavo A. R. Silva [Mon, 26 Sep 2022 21:40:55 +0000 (16:40 -0500)]
ASoC: SOF: control.h: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
Zero-length arrays are deprecated and we are moving towards adopting
C99 flexible-array members, instead. So, replace zero-length arrays
declarations in anonymous union with the new DECLARE_FLEX_ARRAY()
helper macro.
This helper allows for flexible-array members in unions.
Link: https://github.com/KSPP/linux/issues/193
Link: https://github.com/KSPP/linux/issues/211
Link: https://gcc.gnu.org/onlinedocs/gcc/Zero-Length.html
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/YzIcZ11k8RiQtS2T@work
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 27 Sep 2022 11:07:27 +0000 (12:07 +0100)]
ASoC: SOF: mediatek: mt8195: Add dsp_ops callback
Merge series from Chunxu Li <chunxu.li@mediatek.com>:
Support more operations for MediaTek DSPs using SOF.
Krzysztof Kozlowski [Fri, 23 Sep 2022 20:31:40 +0000 (22:31 +0200)]
ASoC: MAINTAINERS: add bindings and APR to Qualcomm Audio entry
Extend the Qualcomm Audio maintainer entry to include sound related
bindings and the Qualcomm APR/GPR (Asynchronous/Generic Packet Router)
IPC driver, which is tightly related to the Audio DSP.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Acked-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220923203140.514730-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Ren Zhijie [Mon, 26 Sep 2022 07:40:42 +0000 (07:40 +0000)]
ASoC: codecs: wcd934x: Fix Kconfig dependency
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>
Chunxu Li [Sat, 24 Sep 2022 03:35:59 +0000 (11:35 +0800)]
ASoC: SOF: mediatek: mt8195: Add pcm_pointer callback
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>
Chunxu Li [Sat, 24 Sep 2022 03:35:58 +0000 (11:35 +0800)]
ASoC: SOF: mediatek: mt8195: Add pcm_hw_params callback
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>
Mark Brown [Fri, 23 Sep 2022 19:46:25 +0000 (20:46 +0100)]
ASoC: SOF: ipc4/Intel: Improve and enable IPC error dump
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.
Mark Brown [Fri, 23 Sep 2022 19:46:18 +0000 (20:46 +0100)]
ASoC: codecs: qcom add support for SM8450 and SC8280XP
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.
Dmitry Torokhov [Tue, 20 Sep 2022 02:58:04 +0000 (19:58 -0700)]
ASoC: ssm2518: switch to using gpiod API
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>
Dmitry Torokhov [Tue, 20 Sep 2022 02:58:03 +0000 (19:58 -0700)]
ASoC: ssm2518: drop support for platform data
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>
Yang Yingliang [Fri, 16 Sep 2022 14:07:57 +0000 (22:07 +0800)]
ASoC: Intel: skylake: remove unnecessary dev_set_drvdata()
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>
Christophe JAILLET [Thu, 22 Sep 2022 19:44:57 +0000 (21:44 +0200)]
ASoC: da7219: Fix an error handling path in da7219_register_dai_clks()
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>
Sascha Hauer [Fri, 23 Sep 2022 10:15:47 +0000 (18:15 +0800)]
ASoC: fsl_asrc_dma: fully initialize structs
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>
Zhang Qilong [Thu, 22 Sep 2022 14:58:46 +0000 (22:58 +0800)]
ASoC: soc-component: using pm_runtime_resume_and_get instead of 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>
Mark Brown [Fri, 23 Sep 2022 16:53:13 +0000 (17:53 +0100)]
ASoC: SOF: Intel: MTL: Fixes for suspend/resume
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.
Mark Brown [Fri, 23 Sep 2022 16:53:06 +0000 (17:53 +0100)]
ASoC: mediatek: Allow separate handling of headphone and headset mic jack
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
Peter Ujfalusi [Fri, 23 Sep 2022 13:36:16 +0000 (16:36 +0300)]
ASoC: SOF: ipc4: Call snd_sof_handle_fw_exception() in case of timeout
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>
Peter Ujfalusi [Fri, 23 Sep 2022 13:36:15 +0000 (16:36 +0300)]
ASoC: SOF: Intel: hda: Only dump firmware registers for IPC3
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>
Peter Ujfalusi [Fri, 23 Sep 2022 13:36:14 +0000 (16:36 +0300)]
ASoC: SOF: Intel: mtl: Print relevant register in ipc_dump
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>
Peter Ujfalusi [Fri, 23 Sep 2022 13:36:13 +0000 (16:36 +0300)]
ASoC: SOF: Intel: skl: Use the ipc4 version of the ipc_dump
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>
Peter Ujfalusi [Fri, 23 Sep 2022 13:36:12 +0000 (16:36 +0300)]
ASoC: SOF: Intel: hda: Add separate ops for ipc_dump for IPC4
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>
Peter Ujfalusi [Fri, 23 Sep 2022 13:36:11 +0000 (16:36 +0300)]
ASoC: SOF: Intel: cnl: Add separate ops for ipc_dump for IPC4
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:12 +0000 (18:01 +0100)]
ASoC: codecs: va-macro: add support for sm8450 and sc8280xp
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:11 +0000 (18:01 +0100)]
ASoC: codecs: va-macro: clear the frame sync counter before enabling
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:10 +0000 (18:01 +0100)]
ASoC: codecs: rx-macro: add support for sm8450 and sc8280xp
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:09 +0000 (18:01 +0100)]
ASoC: codecs: tx-macro: add support for sm8450 and sc8280xp
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:08 +0000 (18:01 +0100)]
ASoC: codecs: wsa-macro: add support for sm8450 and sc8280xp
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:07 +0000 (18:01 +0100)]
ASoC: qcom: dt-bindings: add sm8450 and sc8280xp compatibles
This patch adds SM8450 and SC8280XP compatible entry for LPASS TX, RX, WSA
and VA codec macros.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220906170112.1984-8-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:06 +0000 (18:01 +0100)]
ASoC: codecs: wsa883x: add clock stop support
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:05 +0000 (18:01 +0100)]
ASoC: codecs: tx-macro: fix kcontrol put
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:04 +0000 (18:01 +0100)]
ASoC: codecs: tx-macro: fix active_decimator array
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:03 +0000 (18:01 +0100)]
ASoC: codecs: tx-macro: handle swr_reset correctly
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:02 +0000 (18:01 +0100)]
ASoC: codecs: rx-macro: handle swr_reset correctly
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>
Srinivas Kandagatla [Tue, 6 Sep 2022 17:01:01 +0000 (18:01 +0100)]
ASoC: codecs: wsa-macro: handle swr_reset correctly
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>
Nathan Chancellor [Thu, 22 Sep 2022 15:37:52 +0000 (08:37 -0700)]
ASoC: Intel: sof_da7219_mx98360a: Access num_codecs through dai_link
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>
Gaosheng Cui [Fri, 23 Sep 2022 09:03:55 +0000 (17:03 +0800)]
ASoC: fsl: Remove unused inline function imx_pcm_dma_params_init_data()
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>
AngeloGioacchino Del Regno [Thu, 22 Sep 2022 10:35:02 +0000 (12:35 +0200)]
ASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops
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>
Yong Zhi [Thu, 22 Sep 2022 21:36:44 +0000 (14:36 -0700)]
ASoC: SOF: Intel: MTL: remove the unnecessary snd_sof_dsp_read()
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>
Ranjani Sridharan [Thu, 22 Sep 2022 21:36:43 +0000 (14:36 -0700)]
ASoC: SOF: Intel: MTL: reuse the common ops for PM
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>
Ranjani Sridharan [Thu, 22 Sep 2022 21:36:42 +0000 (14:36 -0700)]
ASoC: SOF: Intel: HDA: use IPC version-specific ops
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>
Ranjani Sridharan [Thu, 22 Sep 2022 21:36:41 +0000 (14:36 -0700)]
ASoC: SOF: Intel: MTL: define and set the disable_interrupts op
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>
Ranjani Sridharan [Thu, 22 Sep 2022 21:36:40 +0000 (14:36 -0700)]
ASoC: SOF: Intel: define and set the disable_interrupts op for cavs platforms
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>
Ranjani Sridharan [Thu, 22 Sep 2022 21:36:39 +0000 (14:36 -0700)]
ASoC: SOF: Intel: Add a new op for disabling interrupts
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>
Fred Oh [Thu, 22 Sep 2022 21:36:38 +0000 (14:36 -0700)]
ASoC: SOF: Intel: use power_down_dsp op in hda_dsp_remove
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>
Fred Oh [Thu, 22 Sep 2022 21:36:37 +0000 (14:36 -0700)]
ASoC: SOF: Intel: mtl: define and set power_down_dsp op
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>
Fred Oh [Thu, 22 Sep 2022 21:36:36 +0000 (14:36 -0700)]
ASoC: SOF: Intel: define and set power_down_dsp op for HDA platforms
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>
Fred Oh [Thu, 22 Sep 2022 21:36:35 +0000 (14:36 -0700)]
ASoC: SOF: Intel: introduce new op to handle dsp power down
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>
Nícolas F. R. A. Prado [Thu, 22 Sep 2022 23:59:51 +0000 (19:59 -0400)]
ASoC: mediatek: mt8186-rt5682: Expose individual headset jack pins
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>
Nícolas F. R. A. Prado [Thu, 22 Sep 2022 23:59:50 +0000 (19:59 -0400)]
ASoC: mediatek: mt8186-rt5682: Add headset widgets with switches
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>
Nícolas F. R. A. Prado [Thu, 22 Sep 2022 23:59:49 +0000 (19:59 -0400)]
ASoC: mediatek: mt8186-da7219: Expose individual headset jack pins
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>
Nícolas F. R. A. Prado [Thu, 22 Sep 2022 23:59:48 +0000 (19:59 -0400)]
ASoC: mediatek: mt8186-da7219: Add headset widgets with switches
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>
Nícolas F. R. A. Prado [Thu, 22 Sep 2022 23:59:47 +0000 (19:59 -0400)]
ASoC: mediatek: mt8195: Expose individual headset jack pins
The rt5682 codec is able to distinguish between two event types:
headphone insertion/removal and headset microphone insertion/removal.
However, currently, the mt8195 ASoC 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>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220922235951.252532-3-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Nícolas F. R. A. Prado [Thu, 22 Sep 2022 23:59:46 +0000 (19:59 -0400)]
ASoC: mediatek: mt8192-mt6359: Expose individual headset jack pins
The rt5682 codec is able to distinguish between two event types:
headphone insertion/removal and headset microphone insertion/removal.
However, currently, the mt8192-mt6359 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>
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220922235951.252532-2-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 22 Sep 2022 10:02:54 +0000 (12:02 +0200)]
ASoC: SOF: pci-tgl: add missing PCI IDs for RPL
Add IDs for RPL-M and RPL-PX
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/20220922100254.27159-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Thu, 22 Sep 2022 10:02:53 +0000 (12:02 +0200)]
ASoC: SOF: Intel: pci-tgl: reorder PCI IDs
No functionality change, just sort ADL PCI IDs by increasing order.
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/20220922100254.27159-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Chunxu Li [Wed, 21 Sep 2022 12:02:39 +0000 (20:02 +0800)]
ASoC: SOF: mediatek: add pcm_pointer callback for mt8186
add pcm_pointer callback for mt8186 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/20220921120239.31934-1-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Wed, 21 Sep 2022 16:26:56 +0000 (17:26 +0100)]
ASoC: ts3a227e control debounce times
Merge series from Astrid Rost <astrid.rost@axis.com>:
Add debounce support to the ts3a227e driver.
Peter Ujfalusi [Wed, 21 Sep 2022 11:27:51 +0000 (14:27 +0300)]
ASoC: SOF: ipc4-topology: Free the ida when IPC fails in sof_ipc4_widget_setup()
The allocated ida needs to be freed up if the IPC message fails since
next time when we try again to set up the widget we are going to try to
allocate another ID and given enough tries, we are going to run out of
unique IDs.
Fixes:
711d0427c713 ("ASoC: SOF: ipc4-topology: move ida allocate/free to widget_setup/free")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220921112751.9253-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Zeng Heng [Wed, 21 Sep 2022 03:38:19 +0000 (11:38 +0800)]
ASoC: sunxi: fix declaration compile error
Just fix compile error without any logic changes.
sound/soc/sunxi/sun50i-dmic.c:62:1: error: ‘static’ is not at beginning of declaration [-Werror=old-style-declaration]
62 | const static struct dmic_rate dmic_rate_s[] = {
| ^~~~~
Signed-off-by: Zeng Heng <zengheng4@huawei.com>
Link: https://lore.kernel.org/r/20220921033819.2188233-1-zengheng4@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Astrid Rost [Wed, 21 Sep 2022 08:18:33 +0000 (10:18 +0200)]
ASoC: ti,ts3a227e: add control of debounce
Add devicetree parameters to control the insertion, release and press
debounce times.
Signed-off-by: Astrid Rost <astrid.rost@axis.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220921081834.22009-3-astrid.rost@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Astrid Rost [Wed, 21 Sep 2022 08:18:32 +0000 (10:18 +0200)]
ASoC: ti,ts3a227e: convert to yaml
Convert from ts3a227e.txt to yaml.
Signed-off-by: Astrid Rost <astrid.rost@axis.com>
Link: https://lore.kernel.org/r/20220921081834.22009-2-astrid.rost@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Astrid Rost [Wed, 21 Sep 2022 08:18:34 +0000 (10:18 +0200)]
ASoC: ts3a227e: add parameters to control debounce times
Add devicetree parameters to control the insert, release and press
debounce times.
Signed-off-by: Astrid Rost <astrid.rost@axis.com>
Link: https://lore.kernel.org/r/20220921081834.22009-4-astrid.rost@axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Wed, 21 Sep 2022 09:19:15 +0000 (10:19 +0100)]
ASoC: SOF: Add SKL/KBL support for IPC4 CI tests
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
This patchset was submitted earlier in April 2022 as part of the
"ASoC: SOF: add INTEL_IPC4 plumbing" series. As requested the SKL/KBL
support is moved to a different series.
This update adds minor style fixes and the ops that were missing at
the time. SKL and KBL daily tests have been running for several months
and helped identify missing sequences in the SOF driver for HDaudio
links, or platform differences that the driver did not account for
(number of pipelines, etc).
Note that this capability is not recommended for any distribution, it
is ONLY for SOF IPC4 CI tests on HDaudio devices, we will not extend
this SKL/KBL support for I2S devices based on ES8336 or Chromebooks
which are ONLY supported by the AVS driver.
Mark Brown [Wed, 21 Sep 2022 09:19:01 +0000 (10:19 +0100)]
ADD SOF support for rembrandt platform
Merge series from V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>:
This series consists of
1.Make ACP core code generic for newer SOC transition
2.Add support for Rembrandt plaform
3.Adding amd HS functionality to the sof core
4.increase SRAM inbox and outbox size to 1024
Mark Brown [Wed, 21 Sep 2022 09:18:47 +0000 (10:18 +0100)]
Add some models into acp6x quirk list
Merge series from Mario Limonciello <mario.limonciello@amd.com>:
Another model from ASUS and Lenovo have been identified that
don't include anything in ACPI tables to indicate they require the
ACP6x DMIC driver to be loaded.
This series adds them both to the quirk list.
Yang Yingliang [Tue, 20 Sep 2022 15:14:13 +0000 (23:14 +0800)]
ASoC: rt5682s: simplify the return of rt5682s_probe()
After commit
bfc5e8b860ad ("ASoC: rt5682s: Reduce coupling of
Micbias and Vref2 settings"), the return of rt5682s_probe()
can be simplified. No functional changed.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20220920151413.3455255-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 20 Sep 2022 21:32:24 +0000 (22:32 +0100)]
ASoC: SOF: ipc4-topology: minor cleanup
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Two updates on warnings reported by cppcheck.
Mark Brown [Tue, 20 Sep 2022 21:32:16 +0000 (22:32 +0100)]
ASoC: SOF: sof-audio: fix prepare/unprepare
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
2 patches from Rander required to enable mixing usages with multiple
pipelines.
Mark Brown [Tue, 20 Sep 2022 21:32:09 +0000 (22:32 +0100)]
ASoC: soc.h: random cleanup
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
These are random cleanup for soc.h
Mario Limonciello [Tue, 20 Sep 2022 20:14:35 +0000 (15:14 -0500)]
ASoC: amd: yc: Add Lenovo Yoga Slim 7 Pro X to quirks table
Lenovo Yoga Slim 7 Pro X has an ACP DMIC that isn't specified in the
ASL or existing quirk list. Add it to the quirk table to let DMIC
work on these systems.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216299
Tested-by: Sebastian S <iam@decentr.al>
Reported-and-tested-by: Travis Glenn Hansen <travisghansen@yahoo.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20220920201436.19734-3-mario.limonciello@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Xiaoyan Li [Tue, 20 Sep 2022 20:14:34 +0000 (15:14 -0500)]
ASoC: amd: yc: Add ASUS UM5302TA into DMI table
ASUS Zenbook S 13 OLED (UM5302TA) needs this quirk to get the built-in
microphone working properly.
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216270
Signed-off-by: Xiaoyan Li <lxy.lixiaoyan@gmail.com>
Suggested-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20220920201436.19734-2-mario.limonciello@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
V sujith kumar Reddy [Tue, 13 Sep 2022 14:43:18 +0000 (20:13 +0530)]
ASoC: SOF: amd: increase SRAM inbox and outbox size to 1024
Increase inbox and outbox mailbox size from 512 to 1024 to
support thirdparty DTS integration ipc tx/rx messages communication.
This is done through firmware window get info.
Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220913144319.1055302-5-Vsujithkumar.Reddy@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
V sujith kumar Reddy [Tue, 13 Sep 2022 14:43:17 +0000 (20:13 +0530)]
ASoC: SOF: Adding amd HS functionality to the sof core
Add I2S HS control instance to the sof core.
This will help the amd topology to use the I2S HS Dai.
Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220913144319.1055302-4-Vsujithkumar.Reddy@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
V sujith kumar Reddy [Tue, 13 Sep 2022 14:43:16 +0000 (20:13 +0530)]
ASoC: SOF: amd: Add support for Rembrandt plaform.
Add pci driver and platform driver to enable SOF support on ACP6x
architecture based Rembrandt platform.
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220913144319.1055302-3-Vsujithkumar.Reddy@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Ajit Kumar Pandey [Tue, 13 Sep 2022 14:43:15 +0000 (20:13 +0530)]
ASoC: SOF: amd: Make ACP core code generic for newer SOC transition
Newer AMD SOC differs slightly in terms of few registers offset and
configuration. Add offsets into chip_info struct to make core ACP
code more generic and resusable on newer SOC.
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Signed-off-by: V sujith kumar Reddy <Vsujithkumar.Reddy@amd.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220913144319.1055302-2-Vsujithkumar.Reddy@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Bard Liao [Tue, 20 Sep 2022 07:46:17 +0000 (09:46 +0200)]
ASoC: Intel: soc-acpi-intel-rpl-match: add rpl_sdca_3_in_1 support
Add rpl_sdca_3_in_1 match information.
Reviewed-by: Rander Wang <rander.wang@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/20220920074617.10300-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Alexander Martinz [Tue, 20 Sep 2022 11:50:14 +0000 (13:50 +0200)]
ASoC: codecs: tfa989x: fix register access comments
Fix comments regarding register access based on review feedback[1].
[1]: https://lore.kernel.org/all/YppQ7BiqlBDMNsuc@gerhold.net/
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
Link: https://lore.kernel.org/r/20220920115014.952062-1-amartinz@shiftphones.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 20 Sep 2022 14:54:05 +0000 (16:54 +0200)]
ASoC: SOF: ipc4-topology: remove useless assignment
cppcheck warning:
sound/soc/sof/ipc4-topology.c:1533:12: style: Variable 'pipeline' is
assigned a value that is never used. [unreadVariable]
pipeline = pipe_widget->private;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Chao Song <chao.song@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220920145405.2089147-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 20 Sep 2022 14:54:04 +0000 (16:54 +0200)]
ASoC: SOF: ipc4-topology: clarify calculation precedence
cppcheck warning:
sound/soc/sof/ipc4-topology.c:334:64: style: Clarify calculation
precedence for '&' and '?'. [clarifyCalculation]
type = fw_module->man4_module_entry.type & SOF_IPC4_MODULE_DP ? 1 : 0;
^
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Chao Song <chao.song@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220920145405.2089147-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Rander Wang [Tue, 20 Sep 2022 15:01:07 +0000 (17:01 +0200)]
ASoC: SOF: don't unprepare widget used other pipelines
If multiple pipeline are mixed into one, we can't unprepare
the widget used by other pipelines. This patch checks use_count
to address this case.
Reviewed-by: Bard Liao <yung-chuan.liao@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/20220920150107.2090695-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Rander Wang [Tue, 20 Sep 2022 15:01:06 +0000 (17:01 +0200)]
ASoC: SOF: clear prepare state when widget is unprepared
Playback can't work after the first try sometimes. The reason is that
some widgets don't have ipc_unprepare ops and driver will jump
to sink_prepare so miss to set prepare state to false. Next
time these widgets will not be prepared and it will result to
error with different format of audio file since the last setting
is not applicable.
This patch makes sure that widget prepare state will be cleared
to false when it is unprepared.
Reviewed-by: Bard Liao <yung-chuan.liao@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/20220920150107.2090695-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 20 Sep 2022 13:17:00 +0000 (15:17 +0200)]
ASoC: SOF: Intel: add ops for SKL/KBL
Add ops and ops_init for SKL and KBL.
Tested on Dell XPS-13-9350 and KBL NUC.
Note: currently only SOF_IPC4_MTRACE_INTEL_CAVS_2 type is supported by
the ipc4-mtrace driver, which is used by CAVS 2.x platforms (ICL, TGL,
ADL) and ACE (MTL).
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220920131700.133103-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 20 Sep 2022 13:16:59 +0000 (15:16 +0200)]
ASoC: SOF: Intel: add initial SKL/KBL hardware support
In preparation of the IPCv4 IPC support, this patch adds
support for SkyLake and KabyLake boot and descriptors
used when probing the PCI driver.
The work was initially contributed in 2018 by Liam Girdwood and Zhu
Yingjiang, and abandoned due to firmware signature issues. With the
upcoming support of IPC v4, and hence the Intel closed-source
firmware, it's time to re-add this capability.
The SKL ops will be added in the next patch.
Tested with the IPC4 and closed-source firmware on Dell XPS 9350
and KBL NUC with HDaudio codecs. The SSP and DMIC interfaces are not
supported at this time.
Co-developed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220920131700.133103-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 20 Sep 2022 13:16:58 +0000 (15:16 +0200)]
ASoC: SOF: Intel: add SKL/KBL hardware code loader
This patch adds support for the SkyLake and KabyLake code loader on
top of the SOF IPC4.
The work was initially contributed in 2018 by Liam Girdwood and Zhu
Yingjiang, and abandoned due to firmware signature issues. With the
existing support of IPC v4, it's time to re-add this capability.
This patch uses the newly added FSR (Firmware State Register)
definitions for DSP state handling and targeting, ass well as new
state definition for SKL which indicates that the firmware has been
started (similar to FW_ENTERED on other platforms).
Co-developed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Co-developed-by: Peter Ujfalusi <peter.ujfalusi@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/20220920131700.133103-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Tue, 20 Sep 2022 13:16:57 +0000 (15:16 +0200)]
ASoC: SOF: Intel: hda-dsp: expose functions for SKL support
In preparation of the IPCv4 IPC support, this patch adds exposes
two functions required by the SKL/KBL boot and code loader.
Co-developed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220920131700.133103-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Tue, 20 Sep 2022 11:26:03 +0000 (12:26 +0100)]
Support for CS42L83 on Apple machines
Merge series from Martin Povišer <povik+lin@cutebit.org>:
there's a CS42L83 headphone jack codec found in Apple computers (in the
recent 'Apple Silicon' ones as well as in earlier models, one example
[1]). The part isn't publicly documented, but it appears almost
identical to CS42L42, for which we have a driver in kernel. This series
adapts the CS42L42 driver to the new part, and makes one change in
anticipation of a machine driver for the Apple computers.
Patch 1 adds new compatible to the cs42l42 schema.
Patches 2 to 7 are taken from Richard's recent series [2] adding
soundwire support to cs42l42. They are useful refactorings to build on
in the later patches, and also this way our work doesn't diverge.
(I fixed missing free_irq path in cs42l42_init, did
s/Soundwire/SoundWire/ in changelogs, rebased.)
Patch 8 exports some regmap-related symbols from cs42l42.c so they can
be used to create cs42l83 regmap in cs42l83-i2c.c later.
Patch 9 is the cs42l83 support proper.
Patch 10 implements 'set_bclk_ratio' on the cs42l42 core. This will be
called by the upcoming ASoC machine driver for 'Apple Silicon' Macs.
(We have touched on this change to be made in earlier discussion, see
[3] and replies.)
Patch 11 brings cs42l42-i2c.c in sync with cs42l83-i2c.c on
dev_err_probe() usage.
Mark Brown [Tue, 20 Sep 2022 11:25:56 +0000 (12:25 +0100)]
ASoC: SOF: Intel: override mclk_id for ES8336 support
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
This patchset solves a known issue with ES8336 platforms wrt MCLK
selection. Most of the devices use the MCLK0 signal, but some devices
do use the MCLK1 signal.
The MCLK is defined in the topology, it would be a nightmare to
generate more topology files just for one MCLK difference. With a
minor extension to the intel-nhlt library, the MCLK information can be
found by parsing the NHLT table, and we can override the mclk_id at
boot time.
The only known issues for this platform remain the detection of GPIO
and microphone connections, currently only possible with manual
quirks.
Thanks to Eugene J. Markow for testing this patchset.
Pierre-Louis Bossart [Mon, 19 Sep 2022 11:53:50 +0000 (13:53 +0200)]
ASoC: SOF: Intel: hda: override mclk_id after parsing NHLT SSP blob
The NHLT is already used to determine which SSP is connected to an
audio codec, we can parse the SSP blob to get the mclk_id from NHLT.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220919115350.43104-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 19 Sep 2022 11:53:49 +0000 (13:53 +0200)]
ALSA: hda: intel-nhlt: add intel_nhlt_ssp_mclk_mask()
SOF topologies hard-code the MCLK used for SSP connections. That was a
bad idea in hindsight, this information should really come from BIOS
and/or machine driver.
This patch introduces a helper to scan all SSP endpoints connected to
a codec, and all formats to see what MCLK is used. When BIT(0) of the
mdivc offset if set in the SSP blob, MCLK0 is used, and likewise when
BIT(1) is set MCLK1 is used.
The case where both MCLKs are used is possible but has never been seen
in practice so should be treated as an error by the caller.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220919115350.43104-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Sep 2022 06:32:36 +0000 (06:32 +0000)]
ASoC: soc.h: use array instead of playback/capture_widget
snd_soc_pcm_runtime has playback/capture_widget for Codec2Coddec.
The naming is unclear.
This patch names it as c2c_widget and uses array.
struct snd_soc_pcm_runtime {
...
=> struct snd_soc_dapm_widget *playback_widget;
=> struct snd_soc_dapm_widget *capture_widget;
...
}
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pmfqv9mk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Sep 2022 06:32:25 +0000 (06:32 +0000)]
ASoC: soc.h: use defined number instead of direct number
snd_soc_pcm_runtime has dpcm for Playback/Capture, but it is defined
directly "2". It should use defined number.
struct snd_soc_pcm_runtime {
...
=> struct snd_soc_dpcm_runtime dpcm[2];
...
}
This patch fixup it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r106v9mv.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Kuninori Morimoto [Tue, 20 Sep 2022 06:32:16 +0000 (06:32 +0000)]
ASoC: soc.h: remove num_cpus/codecs
Current rtd has both dai_link pointer (A) and num_cpus/codecs (B).
(A) rtd->dai_link = dai_link;
(B) rtd->num_cpus = dai_link->num_cpus;
(B) rtd->num_codecs = dai_link->num_codecs;
But, we can get num_cpus/codecs (B) via dai_link (A).
This means we don't need to keep num_cpus/codecs on rtd.
This patch removes these.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sfkmv9n3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Chunxu Li [Sat, 17 Sep 2022 02:26:10 +0000 (10:26 +0800)]
ASoC: SOF: mediatek: add pcm_hw_params callback for mt8186
add pcm_hw_params callback for mt8186 to support continue
update dma host position
Signed-off-by: Chunxu Li <chunxu.li@mediatek.com>
Link: https://lore.kernel.org/r/20220917022610.594-1-chunxu.li@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Mark Brown [Mon, 19 Sep 2022 23:07:42 +0000 (00:07 +0100)]
ASoC: SOF: start using tracing instead of dev_dbg
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Multiple maintainers have told us to start using the tracing
subsystem. Wish granted, this patchset suggested by Noah Klayman
removes a number of verbose and arguably useless dev_dbg or dev_vdbg
logs.
Beyond higher efficiency and less intrusive instrumentation, the use
of bpftrace scripts bring new functionality and helps gather
statistics on usage count on a running system, see how we can get
information on suspend/resume times with [1]
[1] https://github.com/thesofproject/sof-test/blob/main/kernel_tracing/bpftrace_scripts/suspend_resume_time.bt
Pierre-Louis Bossart [Mon, 19 Sep 2022 11:53:48 +0000 (13:53 +0200)]
ASoC: SOF: add quirk to override topology mclk_id
Some Intel-based platforms rely on a topology file that hard-codes the
use of MCLK0. This is incorrect in 10% of the cases. Rather than
generating yet another set of topology files, this patch adds a kernel
module parameter to override the topology value.
In hindsight, we should never have allowed mclks to be specified in
topology, this is a hardware-level information that should not have
been visible in the topology.
Future patches will try to set this value automagically, e.g. by
parsing the NHLT content.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220919115350.43104-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Pierre-Louis Bossart [Mon, 19 Sep 2022 11:53:47 +0000 (13:53 +0200)]
ASoC: SOF: Intel: hda: refine SSP count support
The SSP count is incorrect for TGL and MTL devices, the SSP count is
limited to 3 (I2SPC parameter in the Integration HAS).
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/20220919115350.43104-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Thu, 15 Sep 2022 09:44:44 +0000 (11:44 +0200)]
ASoC: cs42l42: Switch to dev_err_probe() helper
Replace dev_err() with dev_err_probe() in the probe path for consistency
with cs42l83-i2c.c.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220915094444.11434-12-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Thu, 15 Sep 2022 09:44:43 +0000 (11:44 +0200)]
ASoC: cs42l42: Implement 'set_bclk_ratio'
The driver wants to know the bit rate on the serial bus and takes that
to be the value set by 'set_sysclk'. The 'set_bclk_ratio' op is a better
fit for figuring out the clocking parameters of the serial bus, so
implement that and give it precedence over the prior methods.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220915094444.11434-11-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Martin Povišer [Thu, 15 Sep 2022 09:44:42 +0000 (11:44 +0200)]
ASoC: cs42l83: Extend CS42L42 support to new part
The CS42L83 part is a headphone jack codec found in recent Apple
machines. It is a publicly undocumented part but as far as can be told
it is identical to CS42L42 except for two points:
* The chip ID is different.
* Of those registers for which we have a default value in the existing
CS42L42 kernel driver, one register (MCLK_CTL) differs in its reset
value on CS42L83.
To address those two points (and only those), add to the CS42L42 driver
a separate CS42L83 front.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220915094444.11434-10-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>