platform/kernel/linux-rpi.git
21 months agoASoC: wmxxxx: Revert old "ASoC: wmxxxx: Fix PM disable depth imbalance in wmxxxx_probe"
Mark Brown [Mon, 10 Oct 2022 14:33:47 +0000 (15:33 +0100)]
ASoC: wmxxxx: Revert old "ASoC: wmxxxx: Fix PM disable depth imbalance in wmxxxx_probe"

Merge series from Zhang Qilong <zhangqilong3@huawei.com>:

Both the old and new patch have been applied, it will resulted in
redundant calling of pm_runtime_disable when error returns. We Just
revert the old three patches to fix it.

21 months agoASoC: cx2072x: fix spelling typo in comment
Jiangshan Yi [Sun, 9 Oct 2022 07:48:16 +0000 (15:48 +0800)]
ASoC: cx2072x: fix spelling typo in comment

Fix spelling typo in comment.

Reported-by: k2ci <kernel-bot@kylinos.cn>
Signed-off-by: Jiangshan Yi <yijiangshan@kylinos.cn>
Link: https://lore.kernel.org/r/20221009074816.2641162-1-13667453960@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: mt6660: Keep the pm_runtime enables before component stuff in mt6660_i2c_probe
Zhang Qilong [Sat, 8 Oct 2022 14:05:22 +0000 (22:05 +0800)]
ASoC: mt6660: Keep the pm_runtime enables before component stuff in mt6660_i2c_probe

It would be better to keep the pm_runtime enables before the
IRQ and component stuff. Both of those could start triggering
PM runtime events.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20221008140522.134912-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: codec: tlv320adc3xxx: add GPIOLIB dependency
Randy Dunlap [Thu, 6 Oct 2022 23:58:22 +0000 (16:58 -0700)]
ASoC: codec: tlv320adc3xxx: add GPIOLIB dependency

Fix build errors when CONFIG_GPIOLIB is not enabled:

../sound/soc/codecs/tlv320adc3xxx.c: In function 'adc3xxx_i2c_probe':
../sound/soc/codecs/tlv320adc3xxx.c:1352:28: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'devm_gpio_free'? [-Werror=implicit-function-declaration]
 1352 |         adc3xxx->rst_pin = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
../sound/soc/codecs/tlv320adc3xxx.c:1352:57: error: 'GPIOD_OUT_LOW' undeclared (first use in this function); did you mean 'GPIOF_INIT_LOW'?
 1352 |         adc3xxx->rst_pin = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
  CC      lib/dynamic_debug.o
../sound/soc/codecs/tlv320adc3xxx.c:1400:9: error: implicit declaration of function 'gpiod_set_value_cansleep'; did you mean 'gpio_set_value_cansleep'? [-Werror=implicit-function-declaration]
 1400 |         gpiod_set_value_cansleep(adc3xxx->rst_pin, 1);

Fixes: e9a3b57efd28 ("ASoC: codec: tlv320adc3xxx: New codec driver")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kernel test robot <lkp@intel.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Ricard Wanderlof <ricardw@axis.com>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org
Link: https://lore.kernel.org/r/20221006235822.30074-1-rdunlap@infradead.org
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: wm8997: Revert "ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe"
Zhang Qilong [Mon, 10 Oct 2022 11:48:52 +0000 (19:48 +0800)]
ASoC: wm8997: Revert "ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe"

This reverts commit 41a736ac20602f64773e80f0f5b32cde1830a44a.

The pm_runtime_disable is redundant when error returns in
wm8997_probe, we just revert the old patch to fix it.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221010114852.88127-4-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: wm5110: Revert "ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe"
Zhang Qilong [Mon, 10 Oct 2022 11:48:51 +0000 (19:48 +0800)]
ASoC: wm5110: Revert "ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe"

This reverts commit 86b46bf1feb83898d89a2b4a8d08d21e9ea277a7.

The pm_runtime_disable is redundant when error returns in
wm5110_probe, we just revert the old patch to fix it.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221010114852.88127-3-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: wm5102: Revert "ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe"
Zhang Qilong [Mon, 10 Oct 2022 11:48:50 +0000 (19:48 +0800)]
ASoC: wm5102: Revert "ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe"

This reverts commit fcbb60820cd3008bb44334a0395e5e57ccb77329.

The pm_runtime_disable is redundant when error returns in
wm5102_probe, we just revert the old patch to fix it.

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20221010114852.88127-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoRevert "ASoC: soc-component: using pm_runtime_resume_and_get instead of pm_runtime_ge...
Peter Ujfalusi [Tue, 4 Oct 2022 11:51:21 +0000 (14:51 +0300)]
Revert "ASoC: soc-component: using pm_runtime_resume_and_get instead of pm_runtime_get_sync"

This reverts commit 08fc2a7448afc1660ec2f1b5c437fcd14155a7ee.

The reverted commit causes the following warnigs:
Runtime PM usage count underflow!

This is due to the fact that the pm_runtime_resume_and_get() is calling
pm_runtime_put_noidle() in case of < 0 return value of
pm_runtime_get_sync() which includes the -EACCES.
The change is wrong as -EACCES is returned in case of 'nested' get_sync()
and it is a valid use of PM runtime.

Fixes: 08fc2a7448af ("ASoC: soc-component: using pm_runtime_resume_and_get instead of pm_runtime_get_sync")

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20221004115121.26180-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
Zhang Qilong [Thu, 29 Sep 2022 15:06:52 +0000 (23:06 +0800)]
ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by calling
pm_runtime_disable when error returns.

Fixes:93e8791dd34ca ("ASoC: wm5102: Initial driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220929150653.63845-4-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
Zhang Qilong [Thu, 29 Sep 2022 15:06:51 +0000 (23:06 +0800)]
ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by calling
pm_runtime_enable when error returns.

Fixes:5c6af635fd772 ("ASoC: wm5110: Add audio CODEC driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220929150653.63845-3-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
Zhang Qilong [Thu, 29 Sep 2022 15:06:50 +0000 (23:06 +0800)]
ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by calling
pm_runtime_disable when error returns.

Fixes:40843aea5a9bd ("ASoC: wm8997: Initial CODEC driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220929150653.63845-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: rockchip: i2s: use regmap_read_poll_timeout_atomic to poll I2S_CLR
Judy Hsiao [Fri, 30 Sep 2022 15:15:46 +0000 (15:15 +0000)]
ASoC: rockchip: i2s: use regmap_read_poll_timeout_atomic to poll I2S_CLR

1. Uses regmap_read_poll_timeout_atomic to poll I2S_CLR as it is called
   within a spin lock.

2. Fixes the typo of break condition in regmap_read_poll_timeout_atomic.

Fixes: fbb0ec656ee5 ("ASoC: rockchip: i2s: use regmap_read_poll_timeout to poll I2S_CLR")
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Link: https://lore.kernel.org/r/20220930151546.2017667-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: dt-bindings: Document audio OF graph dai-tdm-slot-num dai-tdm-slot-width props
Marek Vasut [Tue, 27 Sep 2022 18:53:59 +0000 (20:53 +0200)]
ASoC: dt-bindings: Document audio OF graph dai-tdm-slot-num dai-tdm-slot-width props

Document dai-tdm-slot-num and dai-tdm-slot-width props as those are
parsed by simple graph card and may therefore appear in audio OF graph
node.

Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220927185359.294322-1-marex@denx.de
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: qcom: fix unmet direct dependencies for SND_SOC_QDSP6
Srinivas Kandagatla [Fri, 30 Sep 2022 10:53:47 +0000 (11:53 +0100)]
ASoC: qcom: fix unmet direct dependencies for SND_SOC_QDSP6

SND_SOC_QDSP6 already has COMPILE_TEST so remove that from
SND_SOC_SC8280XP and also add QCOM_APR dependencies to
SND_SOC_SC8280XP like other Qualcomm machine drivers.

This should also fix below warning:
on x86_64, when QCOM_APR is not set and COMPILE_TEST=y:

WARNING: unmet direct dependencies detected for SND_SOC_QDSP6
  Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=y]
&& SND_SOC_QCOM [=y] && QCOM_APR [=n] && COMMON_CLK [=y]
  Selected by [y]:
  - SND_SOC_SC8280XP [=y] && SOUND [=y] && !UML && SND [=y] && SND_SOC [=y]
&& SND_SOC_QCOM [=y] && (QCOM_APR [=n] || COMPILE_TEST [=y]) &&
 SOUNDWIRE [=y] && COMMON_CLK [=y]

Fixes: 295aeea6646a ("ASoC: qcom: add machine driver for sc8280xp")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220930105347.41127-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: mediatek: mt8192-mt6359: Set the driver name for the card
Nícolas F. R. A. Prado [Thu, 29 Sep 2022 20:54:53 +0000 (16:54 -0400)]
ASoC: mediatek: mt8192-mt6359: Set the driver name for the card

The ASoC core automatically populates the driver name field in the card
from the card name if left unset. However, since the driver name can be
at most 16 characters long, wrapping will happen if the card name is
longer, which is the case for the mt8192-mt6359 driver.

Explicitly set the driver name for the card in order to avoid said
wrapping and have a readable driver name exposed to userspace.

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/20220929205453.1144142-1-nfraprado@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: Intel: sof_rt5682: remove SOF_RT1015_SPEAKER_AMP_100FS flag
Brent Lu [Tue, 13 Sep 2022 07:49:06 +0000 (15:49 +0800)]
ASoC: Intel: sof_rt5682: remove SOF_RT1015_SPEAKER_AMP_100FS flag

This flag could be removed since we now have API to query bclk
fequency setting in the topology. The dai link structure itself also
provides DAI format information instead of figuring it out with fs
number.

Signed-off-by: Brent Lu <brent.lu@intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220913074906.926774-1-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: nau8825: Add TDM support
David Lin [Fri, 30 Sep 2022 07:28:05 +0000 (15:28 +0800)]
ASoC: nau8825: Add TDM support

Support TDM format for NAU88L25.

Signed-off-by: David Lin <CTLIN0@nuvoton.com>
Link: https://lore.kernel.org/r/20220930072804.2524352-1-CTLIN0@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoFix PM disable depth imbalance in probe
Mark Brown [Fri, 30 Sep 2022 08:15:58 +0000 (09:15 +0100)]
Fix PM disable depth imbalance in probe

Merge series from Zhang Qilong <zhangqilong3@huawei.com>:

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of probe.

Zhang Qilong (4):
  ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
  ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
  ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
  ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe

 sound/soc/codecs/mt6660.c | 8 ++++++--
 sound/soc/codecs/wm5102.c | 6 +++---
 sound/soc/codecs/wm5110.c | 6 +++---
 sound/soc/codecs/wm8997.c | 6 +++---
 4 files changed, 15 insertions(+), 11 deletions(-)

--
2.25.1

21 months agoASoC: core: clarify the driver name initialization
Jaroslav Kysela [Thu, 29 Sep 2022 14:37:54 +0000 (16:37 +0200)]
ASoC: core: clarify the driver name initialization

The driver field in the struct snd_ctl_card_info is a valid
user space identifier. Actually, many ASoC drivers do not care
and let to initialize this field using a standard wrapping method.
Unfortunately, in this way, this field becomes unusable and
unreadable for the drivers with longer card names. Also,
there is a possibility to have clashes (driver field has
only limit of 15 characters).

This change will print an error when the wrapping is used.
The developers of the affected drivers should fix the problem.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe
Zhang Qilong [Wed, 28 Sep 2022 16:01:16 +0000 (00:01 +0800)]
ASoC: mt6660: Fix PM disable depth imbalance in mt6660_i2c_probe

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of mt6660_i2c_probe.

Fixes:f289e55c6eeb4 ("ASoC: Add MediaTek MT6660 Speaker Amp Driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220928160116.125020-5-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe
Zhang Qilong [Wed, 28 Sep 2022 16:01:15 +0000 (00:01 +0800)]
ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of wm5102_probe.

Fixes:93e8791dd34ca ("ASoC: wm5102: Initial driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220928160116.125020-4-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe
Zhang Qilong [Wed, 28 Sep 2022 16:01:14 +0000 (00:01 +0800)]
ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of wm5110_probe.

Fixes:5c6af635fd772 ("ASoC: wm5110: Add audio CODEC driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220928160116.125020-3-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe
Zhang Qilong [Wed, 28 Sep 2022 16:01:13 +0000 (00:01 +0800)]
ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of wm8997_probe

Fixes:40843aea5a9bd ("ASoC: wm8997: Initial CODEC driver")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Link: https://lore.kernel.org/r/20220928160116.125020-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: mediatek: mt8186: Fix spelling mistake "slect" -> "select"
Colin Ian King [Wed, 28 Sep 2022 22:04:17 +0000 (23:04 +0100)]
ASoC: mediatek: mt8186: Fix spelling mistake "slect" -> "select"

There are some spelling mistakes in dev_err messages. Fix them.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220928220417.66799-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: mediatek: mt8195: update audio tuner settings
Trevor Wu [Tue, 27 Sep 2022 15:11:41 +0000 (23:11 +0800)]
ASoC: mediatek: mt8195: update audio tuner settings

Audio tuner is used to handle clock drift between 26M and APLL domain.

It's expected when abs(chg_cnt) equals to upper bound, tuner updates pcw
setting automatically, and then abs(chg_cnt) decreases.
In the stress test, we found abs(chg_cnt) possibly equals to 2 at the
unexpected timing. This results in wrong pcw updating.
Finally, abs(chg_cnt) will always be larger than upper bound,

As a result, we update the upper bound to 3 to handle the corner case.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://lore.kernel.org/r/20220927151141.11846-1-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoFix PM disable depth imbalance in stm32 probe
Mark Brown [Tue, 27 Sep 2022 18:58:57 +0000 (19:58 +0100)]
Fix PM disable depth imbalance in stm32 probe

Merge series from Zhang Qilong <zhangqilong3@huawei.com>:

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced. We fix it by moving pm_runtime_enable to the
endding of probe.

21 months agoASoC: stm: Fix PM disable depth imbalance in stm32_i2s_probe
Zhang Qilong [Tue, 27 Sep 2022 14:26:40 +0000 (22:26 +0800)]
ASoC: stm: Fix PM disable depth imbalance in stm32_i2s_probe

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of stm32_i2s_probe.

Fixes:32a956a1fadf ("ASoC: stm32: i2s: add pm_runtime support")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20220927142640.64647-1-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: stm32: spdifrx: Fix PM disable depth imbalance in stm32_spdifrx_probe
Zhang Qilong [Tue, 27 Sep 2022 14:26:01 +0000 (22:26 +0800)]
ASoC: stm32: spdifrx: Fix PM disable depth imbalance in stm32_spdifrx_probe

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of stm32_spdifrx_probe.

Fixes:ac5e3efd55868 ("ASoC: stm32: spdifrx: add pm_runtime support")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20220927142601.64266-3-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: stm32: dfsdm: Fix PM disable depth imbalance in stm32_adfsdm_probe
Zhang Qilong [Tue, 27 Sep 2022 14:26:00 +0000 (22:26 +0800)]
ASoC: stm32: dfsdm: Fix PM disable depth imbalance in stm32_adfsdm_probe

The pm_runtime_enable will increase power disable depth. Thus
a pairing decrement is needed on the error handling path to
keep it balanced according to context. We fix it by moving
pm_runtime_enable to the endding of stm32_adfsdm_probe.

Fixes:98e500a12f934 ("ASoC: stm32: dfsdm: add pm_runtime support for audio")

Signed-off-by: Zhang Qilong <zhangqilong3@huawei.com>
Reviewed-by: Olivier Moysan <olivier.moysan@foss.st.com>
Link: https://lore.kernel.org/r/20220927142601.64266-2-zhangqilong3@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: cs42l42: Fallback to headphones for type detect
Stefan Binding [Tue, 27 Sep 2022 12:14:40 +0000 (13:14 +0100)]
ASoC: cs42l42: Fallback to headphones for type detect

After tip sense detects a jack insertion, if automatic
type detection, and manual type detection fails, then
fall back to assume the jack connected belongs to
headphones.

Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220927121440.2506632-1-sbinding@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: apple: mca: Adjust timing of component unregister
Martin Povišer [Tue, 27 Sep 2022 11:34:26 +0000 (13:34 +0200)]
ASoC: apple: mca: Adjust timing of component unregister

On removal of the driver, the ASoC component should be unregistered
first, before we start releasing any of the other resources.

Fixes: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220927113426.49724-3-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: apple: mca: Remove stale release of DMA channels
Martin Povišer [Tue, 27 Sep 2022 11:34:25 +0000 (13:34 +0200)]
ASoC: apple: mca: Remove stale release of DMA channels

The commit 4ec8179c212f ("ASoC: apple: mca: Postpone requesting of DMA
channels") shuffled around with the requesting and releasing of DMA
channels. It left behind stale release calls from within
apple_mca_release, remove those now.

Fixes: 4ec8179c212f ("ASoC: apple: mca: Postpone requesting of DMA channels")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220927113426.49724-2-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: apple: mca: Trigger, not deassert, the peripheral reset
Martin Povišer [Tue, 27 Sep 2022 11:34:24 +0000 (13:34 +0200)]
ASoC: apple: mca: Trigger, not deassert, the peripheral reset

Replace the deassertion of the peripheral's shared reset with the
triggering of a pulse on it. This is what we should have been using all
along as the platform's custom is not leaving the reset asserted on
unused peripherals.

Fixes: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver")
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Link: https://lore.kernel.org/r/20220927113426.49724-1-povik+lin@cutebit.org
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: Intel: Skylake: Replace zero-length arrays with DECLARE_FLEX_ARRAY() helper
Gustavo A. R. Silva [Mon, 26 Sep 2022 22:58:17 +0000 (17:58 -0500)]
ASoC: Intel: Skylake: Replace zero-length arrays 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/226
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>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://lore.kernel.org/r/YzIuiUul2CwPlkKh@work
Signed-off-by: Mark Brown <broonie@kernel.org>
21 months agoASoC: st,stm32-sai: Document audio OF graph port
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>
21 months agoASoC: SOF: control.h: Replace zero-length array with DECLARE_FLEX_ARRAY() helper
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>
21 months agoASoC: SOF: mediatek: mt8195: Add dsp_ops callback
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.

21 months agoASoC: MAINTAINERS: add bindings and APR to Qualcomm Audio entry
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>
21 months agoASoC: codecs: wcd934x: Fix Kconfig dependency
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>
21 months agoASoC: SOF: mediatek: mt8195: Add pcm_pointer callback
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>
21 months agoASoC: SOF: mediatek: mt8195: Add pcm_hw_params callback
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>
21 months agoASoC: SOF: ipc4/Intel: Improve and enable IPC error dump
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.

21 months agoASoC: codecs: qcom add support for SM8450 and SC8280XP
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.

21 months agoASoC: ssm2518: switch to using gpiod API
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>
21 months agoASoC: ssm2518: drop support for platform data
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>
21 months agoASoC: Intel: skylake: remove unnecessary dev_set_drvdata()
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>
21 months agoASoC: da7219: Fix an error handling path in da7219_register_dai_clks()
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>
21 months agoASoC: fsl_asrc_dma: fully initialize structs
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>
21 months agoASoC: soc-component: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
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>
21 months agoASoC: SOF: Intel: MTL: Fixes for suspend/resume
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.

21 months agoASoC: mediatek: Allow separate handling of headphone and headset mic jack
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

21 months agoASoC: SOF: ipc4: Call snd_sof_handle_fw_exception() in case of timeout
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>
21 months agoASoC: SOF: Intel: hda: Only dump firmware registers for IPC3
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>
21 months agoASoC: SOF: Intel: mtl: Print relevant register in ipc_dump
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>
21 months agoASoC: SOF: Intel: skl: Use the ipc4 version of the ipc_dump
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>
21 months agoASoC: SOF: Intel: hda: Add separate ops for ipc_dump for IPC4
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>
21 months agoASoC: SOF: Intel: cnl: Add separate ops for ipc_dump for IPC4
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>
21 months agoASoC: codecs: va-macro: add support for sm8450 and sc8280xp
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>
21 months agoASoC: codecs: va-macro: clear the frame sync counter before enabling
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>
21 months agoASoC: codecs: rx-macro: add support for sm8450 and sc8280xp
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>
21 months agoASoC: codecs: tx-macro: add support for sm8450 and sc8280xp
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>
21 months agoASoC: codecs: wsa-macro: add support for sm8450 and sc8280xp
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>
21 months agoASoC: qcom: dt-bindings: add sm8450 and sc8280xp compatibles
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>
21 months agoASoC: codecs: wsa883x: add clock stop support
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>
21 months agoASoC: codecs: tx-macro: fix kcontrol put
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>
21 months agoASoC: codecs: tx-macro: fix active_decimator array
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>
21 months agoASoC: codecs: tx-macro: handle swr_reset correctly
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>
21 months agoASoC: codecs: rx-macro: handle swr_reset correctly
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>
21 months agoASoC: codecs: wsa-macro: handle swr_reset correctly
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>
21 months agoASoC: Intel: sof_da7219_mx98360a: Access num_codecs through dai_link
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>
21 months agoASoC: fsl: Remove unused inline function imx_pcm_dma_params_init_data()
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>
21 months agoASoC: mediatek: mt8195-mt6359: Use snd_soc_pm_ops instead of custom ops
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>
21 months agoASoC: SOF: Intel: MTL: remove the unnecessary snd_sof_dsp_read()
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>
21 months agoASoC: SOF: Intel: MTL: reuse the common ops for PM
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>
21 months agoASoC: SOF: Intel: HDA: use IPC version-specific ops
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>
21 months agoASoC: SOF: Intel: MTL: define and set the disable_interrupts op
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>
21 months agoASoC: SOF: Intel: define and set the disable_interrupts op for cavs platforms
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>
21 months agoASoC: SOF: Intel: Add a new op for disabling interrupts
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>
21 months agoASoC: SOF: Intel: use power_down_dsp op in hda_dsp_remove
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>
21 months agoASoC: SOF: Intel: mtl: define and set power_down_dsp op
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>
21 months agoASoC: SOF: Intel: define and set power_down_dsp op for HDA platforms
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>
21 months agoASoC: SOF: Intel: introduce new op to handle dsp power down
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>
21 months agoASoC: mediatek: mt8186-rt5682: Expose individual headset jack pins
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>
21 months agoASoC: mediatek: mt8186-rt5682: Add headset widgets with switches
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>
21 months agoASoC: mediatek: mt8186-da7219: Expose individual headset jack pins
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>
21 months agoASoC: mediatek: mt8186-da7219: Add headset widgets with switches
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>
21 months agoASoC: mediatek: mt8195: Expose individual headset jack pins
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>
21 months agoASoC: mediatek: mt8192-mt6359: Expose individual headset jack pins
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>
21 months agoASoC: SOF: pci-tgl: add missing PCI IDs for RPL
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>
21 months agoASoC: SOF: Intel: pci-tgl: reorder PCI IDs
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>
21 months agoASoC: SOF: mediatek: add pcm_pointer callback for mt8186
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>
21 months agoASoC: ts3a227e control debounce times
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.

21 months agoASoC: SOF: ipc4-topology: Free the ida when IPC fails in sof_ipc4_widget_setup()
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>
21 months agoASoC: sunxi: fix declaration compile error
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>
21 months agoASoC: ti,ts3a227e: add control of debounce
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>
21 months agoASoC: ti,ts3a227e: convert to yaml
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>
21 months agoASoC: ts3a227e: add parameters to control debounce times
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>
21 months agoASoC: SOF: Add SKL/KBL support for IPC4 CI tests
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.

21 months agoADD SOF support for rembrandt platform
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

21 months agoAdd some models into acp6x quirk list
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.