Commit Graph

23391 Commits

Author SHA1 Message Date
Yang Yingliang
50484d14ac
ASoC: jz4740-i2s: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135627.1665168-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:48 +01:00
Yang Yingliang
942f2671c5
ASoC: img-spdif-out: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135200.1661695-5-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:47 +01:00
Yang Yingliang
c481f3838a
ASoC: img-spdif-in: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135200.1661695-4-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:46 +01:00
Yang Yingliang
a444a902b0
ASoC: img-parallel-out: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135200.1661695-3-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:45 +01:00
Yang Yingliang
ef43f463dd
ASoC: img-i2s-out: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135200.1661695-2-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:44 +01:00
Yang Yingliang
e43805c28d
ASoC: img-i2s-in: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615135200.1661695-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:43 +01:00
Yang Yingliang
1f65c9bdd6
ASoC: dwc: dwc-i2s: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210615132933.1372463-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:42 +01:00
Srinivas Kandagatla
b90d9398d6
ASoC: codecs: wcd938x: remove incorrect module interdependency
For some reason we ended up with cyclic dependency between snd_soc_wcd938x
and snd_soc_wcd938x_sdw modules.

Remove this cyclic dependency by handling them in respective modules.
Without this below error is reported during make modules_install

depmod: ERROR: Cycle detected: snd_soc_wcd938x -> snd_soc_wcd938x_sdw -> snd_soc_wcd938x
depmod: ERROR: Found 2 modules in dependency cycles!

Fixes: 0454422288 ("ASoC: codecs: wcd938x: add audio routing and Kconfig")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210615132829.23067-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:41 +01:00
Gabriel David
35f78d0277
ASoC: qdsp6: q6routing: Add Quinary MI2S ports
This patch adds MI2S mixers to Quinary ports

Signed-off-by: Gabriel David <ultracoolguy@disroot.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210605022206.13226-5-ultracoolguy@disroot.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:40 +01:00
Gabriel David
98e80779ff
ASoC: qdsp6: q6afe-dai: Add Quinary MI2S ports
This patch adds support to Quinary MI2S ports supported in AFE.

Signed-off-by: Gabriel David <ultracoolguy@disroot.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210605022206.13226-4-ultracoolguy@disroot.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:39 +01:00
Gabriel David
d0293e2aa6
ASoC: qdsp6: q6afe: Add Quinary MI2S ports
This patch adds support for the Quinary MI2S ports on LPASS.

Signed-off-by: Gabriel David <ultracoolguy@disroot.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210605022206.13226-3-ultracoolguy@disroot.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 16:39:38 +01:00
Pu Lehui
355af6c0c0
ASoC: codecs: wcd938x: constify static struct snd_soc_dai_ops
The snd_soc_dai_ops structures is only stored in the ops field of a
snd_soc_dai_driver structure, so make the snd_soc_dai_ops structure
const to allow the compiler to put it in read-only memory.

Signed-off-by: Pu Lehui <pulehui@huawei.com>
Link: https://lore.kernel.org/r/20210615113324.238837-1-pulehui@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 12:51:50 +01:00
Dmitry Osipenko
8c1b3b1593
ASoC: tegra: Squash utils into common machine driver
There no users left of the utils other than the new common machine driver.
Squash the utils into the common machine driver in order to simplify code.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210529154649.25936-5-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 11:43:12 +01:00
Dmitry Osipenko
c16aab8ddc
ASoC: tegra: Specify components string for each card
Specify components string for each card of each supported device. It's
a free form string that describes audio hardware configuration. This
information is useful for ALSA UCM rules. It allows to generalize UCM
rules, potentially removing a need to add new UCM rule for each device.

Acked-by: Jaroslav Kysela <perex@perex.cz>
Suggested-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210529154649.25936-4-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 11:43:11 +01:00
Dmitry Osipenko
cc8f70f560
ASoC: tegra: Unify ASoC machine drivers
Squash all machine drivers into a single-universal one. This reduces
code duplication, eases addition of a new drivers and upgrades older
code to a modern Linux kernel APIs.

Suggested-by: Jonathan Hunter <jonathanh@nvidia.com>
Co-developed-by: Ion Agorria <ion@agorria.com>
Signed-off-by: Ion Agorria <ion@agorria.com>
Co-developed-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210529154649.25936-3-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 11:43:10 +01:00
Dmitry Osipenko
f6eb84fa59
ASoC: tegra: Set driver_name=tegra for all machine drivers
The driver_name="tegra" is now required by the newer ALSA UCMs, otherwise
Tegra UCMs don't match by the path/name.

All Tegra machine drivers are specifying the card's name, but it has no
effect if model name is specified in the device-tree since it overrides
the card's name. We need to set the driver_name to "tegra" in order to
get a usable lookup path for the updated ALSA UCMs. The new UCM lookup
path has a form of driver_name/card_name.

The old lookup paths that are based on driver module name continue to
work as before. Note that UCM matching never worked for Tegra ASoC drivers
if they were compiled as built-in, this is fixed by supporting the new
naming scheme.

Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210529154649.25936-2-digetx@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-15 11:43:09 +01:00
Shengjiu Wang
28108d71ee
ASoC: fsl_spdif: Fix error handler with pm_runtime_enable
There is error message when defer probe happens:

fsl-spdif-dai 2dab0000.spdif: Unbalanced pm_runtime_enable!

Fix the error handler with pm_runtime_enable and add
fsl_spdif_remove() for pm_runtime_disable.

Fixes: 9cb2b3796e ("ASoC: fsl_spdif: Add pm runtime function")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1623392318-26304-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 15:01:55 +01:00
Tan Zhongjun
2e8a8adb96
ASoC: fsl_spdif: Remove superfluous error message around platform_get_irq()
The platform_get_irq() prints error message telling that interrupt is
missing, hence there is no need to duplicated that message.

Signed-off-by: Tan Zhongjun <tanzhongjun@yulong.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20210610040037.1064-1-hbut_tan@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 15:01:08 +01:00
Yang Yingliang
92570939c8
ASoC: atmel-pdmic: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210611035351.3878091-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 15:01:07 +01:00
Yang Yingliang
3814c41778
ASoC: bcm: cygnus_ssp: Use devm_platform_ioremap_resource_byname()
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210611050235.4182746-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 15:01:06 +01:00
Srinivasa Rao Mandadapu
c223f41c1a
ASoC: qcom: Add four speaker support on MI2S secondary
Add four speaker support on MI2S secondary block
by using I2S SD1 line on gpio52 pin, and add channel map
control support in the lpass-cpu audio driver.

Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210609133039.4648-1-srivasam@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 15:01:05 +01:00
Martin Blumenstingl
08c56cab30
ASoC: rt5640: Make codec selectable
The Realtek rt5640 codec driver can be used with the generic sound card
drivers, so it should be selectable. For example, with the addition
of #sound-dai-cells = <0> property in DT, it can be used with simple and
graph card drivers.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20210612200650.1301661-1-martin.blumenstingl@googlemail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 15:01:04 +01:00
Yang Yingliang
39175acd69
ASoC: atmel-i2s: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210611034122.3871022-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 15:01:03 +01:00
Yang Yingliang
1b7f94dd20
ASoC: axi-i2s: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210610132705.138706-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 15:01:03 +01:00
Tan Zhongjun
4d5f3a096f
ASoC: fsl_easrc: Remove superfluous error message around platform_get_irq()
Clean up the check for irq.dev_err is superfluous as platform_get_irq()
already prints an error.Remove curly braces to confirm to styling
requirements.

Signed-off-by: Tan Zhongjun <tanzhongjun@yulong.com>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20210610125052.1280-1-hbut_tan@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 15:00:57 +01:00
Jaroslav Kysela
12ffd72682
ASoC: soc-pcm: fix the return value in dpcm_apply_symmetry()
In case, where the loops are not executed for a reason, the uninitialized
variable 'err' is returned to the caller. Make code fully predictible
and assign zero in the declaration.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Cc: Mark Brown <broonie@kernel.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/20210614071746.1787072-1-perex@perex.cz
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 14:59:17 +01:00
Yang Yingliang
68912ebf4d
ASoC: axi-spdif: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210610133120.141405-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 14:59:16 +01:00
Yang Yingliang
9494d05997
ASoC: atmel-classd: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210611022115.3583765-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 14:59:15 +01:00
Yang Yingliang
be374dc0b5
ASoC: mchp-i2s-mcc: Use devm_platform_get_and_ioremap_resource()
Use devm_platform_get_and_ioremap_resource() to simplify
code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210611044256.3899583-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 14:59:14 +01:00
Mark Brown
a918e29174
Merge series "ASoC: codecs: add wcd938x support" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:
This patchset adds support for Qualcomm WCD938X codec.

Qualcomm WCD9380/WCD9385 Codec is a standalone Hi-Fi audio codec IC
connected over SoundWire. This device has two SoundWire devices, RX and
TX respectively supporting 4 x ADCs, ClassH, Ear, Aux PA, 2xHPH,
7 x TX diff inputs, 8 DMICs and MBHC.

Eventhough this device has two SoundWire devices, only tx device has
access to main codec Control/Status Registers!

For codec driver to be functional it would need both tx and rx Soundwire devices
to be up and this is taken care by using device component framework and device-links
are used to ensure proper pm dependencies. Ex tx does not enter suspend
before rx or codec is suspended.

This patchset along with other SoundWire patches on the list
have been tested on SM8250 MTP device.

Thanks,
srini

Changes since v8:
 - moved Kconfig and Makefile changes to last patch as suggested by Mark
 - removed array of enums and used static entries instead. Suggested by Mark
 - return true if put succeeds, Suggested by Mark
 - removed some unneeded semi-colons in switch

Srinivas Kandagatla (9):
  ASoC: dt-bindings: wcd938x: add bindings for wcd938x
  ASoC: codecs: wcd-clsh: add new version support
  ASoC: codecs: wcd938x: add basic driver
  ASoC: dt-bindings: wcd938x-sdw: add bindings for wcd938x-sdw
  ASoC: codecs: wcd938x-sdw: add SoundWire driver
  ASoC: codecs: wcd938x: add basic controls
  ASoC: codecs: wcd938x: add playback dapm widgets
  ASoC: codecs: wcd938x: add capture dapm widgets
  ASoC: codecs: wcd938x: add audio routing and Kconfig

 .../bindings/sound/qcom,wcd938x-sdw.yaml      |   70 +
 .../bindings/sound/qcom,wcd938x.yaml          |  146 +
 sound/soc/codecs/Kconfig                      |   14 +
 sound/soc/codecs/Makefile                     |    4 +
 sound/soc/codecs/wcd-clsh-v2.c                |  348 +-
 sound/soc/codecs/wcd-clsh-v2.h                |   16 +
 sound/soc/codecs/wcd938x-sdw.c                |  315 ++
 sound/soc/codecs/wcd938x.c                    | 3753 +++++++++++++++++
 sound/soc/codecs/wcd938x.h                    |  720 ++++
 9 files changed, 5376 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x-sdw.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,wcd938x.yaml
 create mode 100644 sound/soc/codecs/wcd938x-sdw.c
 create mode 100644 sound/soc/codecs/wcd938x.c
 create mode 100644 sound/soc/codecs/wcd938x.h

--
2.21.0
2021-06-14 14:58:52 +01:00
Srinivas Kandagatla
0454422288
ASoC: codecs: wcd938x: add audio routing and Kconfig
This patch adds audio routing for both playback and capture and
Makefile and Kconfigs changes for wcd938x

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210609090943.7896-10-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 11:14:43 +01:00
Srinivas Kandagatla
d5add08fcb
ASoC: codecs: wcd938x: add capture dapm widgets
This patch adds required dapm widgets for capture path.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210609090943.7896-9-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 11:14:42 +01:00
Srinivas Kandagatla
8da9db0cd6
ASoC: codecs: wcd938x: add playback dapm widgets
This patch adds required dapm widgets for playback.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210609090943.7896-8-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 11:14:41 +01:00
Srinivas Kandagatla
e8ba1e05bd
ASoC: codecs: wcd938x: add basic controls
This patch adds basic controls found in wcd938x codec.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210609090943.7896-7-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 11:14:40 +01:00
Srinivas Kandagatla
16572522ae
ASoC: codecs: wcd938x-sdw: add SoundWire driver
This patch adds support to SoundWire devices on WCD9380/WCD9385 Codec

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210609090943.7896-6-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 11:14:39 +01:00
Srinivas Kandagatla
8d78602aa8
ASoC: codecs: wcd938x: add basic driver
This patch adds basic SoundWire codec driver to support for
WCD938X TX and RX devices.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210609090943.7896-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 11:14:37 +01:00
Srinivas Kandagatla
19c5d1f6a0
ASoC: codecs: wcd-clsh: add new version support
From WCD937X Class H controller has changed significantly, so add support
to this new version for WCD937X and WCD938X Codecs.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210609090943.7896-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 11:14:36 +01:00
Yang Li
03c0cbd946
ASoC: codecs: wcd: Remove unneeded semicolon
Eliminate the following coccicheck warning:
./sound/soc/codecs/wcd-mbhc-v2.c:990:2-3: Unneeded semicolon.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1623221171-105359-1-git-send-email-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 11:14:23 +01:00
Srinivasa Rao Mandadapu
da0363f7bf
ASoC: qcom: Fix for DMA interrupt clear reg overwriting
The DMA interrupt clear register overwritten during
simultaneous playback and capture in lpass platform
interrupt handler. It's causing playback or capture stuck
in similtaneous plaback on speaker and capture on dmic test.
Update appropriate reg fields of corresponding channel instead
of entire register write.

Fixes: commit c5c8635a04 ("ASoC: qcom: Add LPASS platform driver")

Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210609072310.26099-1-srivasam@codeaurora.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-14 11:14:22 +01:00
Mark Brown
116b1e12b7 Improvements to the hdmi-codec driver and ALSA infrastructure around it
to support the HDMI Channel Mapping and IEC958 controls
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCYMHitQAKCRDj7w1vZxhR
 xQ40AP49z0mUifkpbyUvYwdmrUVlg2JEWSTOWaH3tp0kke/dBQEA1vYxdMimhFu3
 SYKXxgtvlT7vL48vNYBxGbNuGQvzJw4=
 =IWna
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmDHK+QACgkQJNaLcl1U
 h9DGHAf/ZhveHulV/2ysiFroyNxcp0PLT49/I/2AAyPhglREmbrXhWCALLcVf0ur
 UqN2OlvdaiiozXHqsLrm5i1qKvz86659FPv8kEBpLyOgvCpsOu+HnjYk+EEJ2nDf
 u8YDbXc5HZQ6bLD2cz/KRKPs7HlTtzq5yCn1tPsaNvcnOQ3/XnyeDo7XegIiah46
 ts3mnOHTvYDujMehxIxMW0oe29pz6qibHynG4iNiEkVw0ZlBvHC4d0MWunSP8GpV
 wrHt62K0xgrI5UU4ilpIXozUiFZGiFm9grPwZ6sXFGEvtSVLRUJebnCGe5ccgXQ5
 4iNE9EClQHYZZm/vYpB4YxTPis1+bQ==
 =k79R
 -----END PGP SIGNATURE-----

Merge tag 'asoc-hdmi-codec-improvements-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into asoc-5.14

Improvements to the hdmi-codec driver and ALSA infrastructure around it
to support the HDMI Channel Mapping and IEC958 controls
2021-06-14 11:13:53 +01:00
Greg Kroah-Hartman
99289bf1a7 Linux 5.13-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmDGe+4eHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG/IUH/iyHVulAtAhL9bnR
 qL4M1kWfcG1sKS2TzGRZzo6YiUABf89vFP90r4sKxG3AKrb8YkTwmJr8B/sWwcsv
 PpKkXXTobbDfpSrsXGEapBkQOE7h2w739XeXyBLRPkoCR4UrEFn68TV2rLjMLBPS
 /EIZkonXLWzzWalgKDP4wSJ7GaQxi3LMx3dGAvbFArEGZ1mPHNlgWy2VokFY/yBf
 qh1EZ5rugysc78JCpTqfTf3fUPK2idQW5gtHSMbyESrWwJ/3XXL9o1ET3JWURYf1
 b0FgVztzddwgULoIGWLxDH5WWts3l54sjBLj0yrLUlnGKA5FjrZb12g9PdhdywuY
 /8KfjeE=
 =JfJm
 -----END PGP SIGNATURE-----

Merge tag 'v5.13-rc6' into tty-next

We want the tty fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-14 09:14:43 +02:00
Greg Kroah-Hartman
68afbd8459 Linux 5.13-rc6
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmDGe+4eHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiG/IUH/iyHVulAtAhL9bnR
 qL4M1kWfcG1sKS2TzGRZzo6YiUABf89vFP90r4sKxG3AKrb8YkTwmJr8B/sWwcsv
 PpKkXXTobbDfpSrsXGEapBkQOE7h2w739XeXyBLRPkoCR4UrEFn68TV2rLjMLBPS
 /EIZkonXLWzzWalgKDP4wSJ7GaQxi3LMx3dGAvbFArEGZ1mPHNlgWy2VokFY/yBf
 qh1EZ5rugysc78JCpTqfTf3fUPK2idQW5gtHSMbyESrWwJ/3XXL9o1ET3JWURYf1
 b0FgVztzddwgULoIGWLxDH5WWts3l54sjBLj0yrLUlnGKA5FjrZb12g9PdhdywuY
 /8KfjeE=
 =JfJm
 -----END PGP SIGNATURE-----

Merge tag 'v5.13-rc6' into driver-core-next

We need the driver core fix in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-14 09:07:45 +02:00
Linus Torvalds
fd2cd569a4 sound fixes for 5.13-rc6
A bit more commits than expected at this time, but likely it's the
 last shot before the final.  Many of changes are device-specific
 fix-ups for various ASoC drivers, while a few usual HD-audio
 quirks and a FireWire fix, as well as a couple of ALSA / ASoC
 core fixes.  All look nice and small, and nothing to scare much.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmDDHh0OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE/kQRAApGxRpgcZtFC1BXyF1OgMR+eRfiQ3nI2XHtwx
 UQTtzubKnKWG+NqpKwSumWTxyVoULMowR5GxsYu4p5iix0a2w00gfz2vpxaPyAD0
 JtRHMQtp/FUCErzf7Goa3a8C0CtUY1kSfBOeRd3Mlo+Njpn081XDNIpLBXpoVoDg
 mUV7kfr8grtYxtfCGCTMTz11Tr65/hPUHstksOR72hypR/5NeGMW9cKvTCSFIsBW
 +WoWNyeg14RFOj2B0BMcTtS9DM6Vt+aMTGFW2FVNK0Sh8Ga1cEBkgfzSgE4m7Vao
 afpuRzXlG1zt1RO8CTqEUadIjQKtFuRcGZ3/wLX52xtXZTFdj+rEoYw37xAamgER
 +DW4c2pIIq42J6C6R0HFDqaLA6s778cuRepUm+/FxRDSGptD8forExF6OsniZwLI
 vKlffUSZ2e8PMIxEhqfASaxBbmecwVktoftheFjNJ9lDQv51yGjFX6ZjrQjIW5Zn
 NLKK3n8JKBz+QdMGDThLESK1LmvJQcxDgaSWx2ZUfoiVIF6KTNL+XpWOsGqXwPYl
 upbbgTYmT4mluW2LeifFTvN8RxhKH0806MPT0K8E8EtvqHZVvYVhR7ZMtUas6KNw
 DaxuEWXtErLzmvzlbrT8q1Hxyw3iQe0wagdYuwRLEUWJ8Gi3if1goSaeL0PEQ0np
 E8KvjwU=
 =ksfP
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A bit more commits than expected at this time, but likely it's the
  last shot before the final.

  Many of changes are device-specific fix-ups for various ASoC drivers,
  while a few usual HD-audio quirks and a FireWire fix, as well as a
  couple of ALSA / ASoC core fixes.

  All look nice and small, and nothing to scare much"

* tag 'sound-5.13-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: seq: Fix race of snd_seq_timer_open()
  ALSA: hda/realtek: fix mute/micmute LEDs for HP ZBook Power G8
  ALSA: hda/realtek: headphone and mic don't work on an Acer laptop
  ASoC: qcom: lpass-cpu: Fix pop noise during audio capture begin
  ALSA: firewire-lib: fix the context to call snd_pcm_stop_xrun()
  ALSA: hda/realtek: fix mute/micmute LEDs for HP EliteBook 840 Aero G8
  ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP EliteBook x360 1040 G8
  ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Elite Dragonfly G2
  ASoC: rt5682: Fix the fast discharge for headset unplugging in soundwire mode
  ASoC: tas2562: Fix TDM_CFG0_SAMPRATE values
  ASoC: meson: gx-card: fix sound-dai dt schema
  ASoC: AMD Renoir: Remove fix for DMI entry on Lenovo 2020 platforms
  ASoC: AMD Renoir - add DMI entry for Lenovo 2020 AMD platforms
  ASoC: SOF: reset enabled_cores state at suspend
  ASoC: fsl-asoc-card: Set .owner attribute when registering card.
  ASoC: topology: Fix spelling mistake "vesion" -> "version"
  ASoC: rt5659: Fix the lost powers for the HDA header
  ASoC: core: Fix Null-point-dereference in fmt_single_name()
2021-06-11 10:47:10 -07:00
Maxime Ripard
2fef64eec2
ASoC: hdmi-codec: Add a prepare hook
The IEC958 status bit is usually set by the userspace after hw_params
has been called, so in order to use whatever is set by the userspace, we
need to implement the prepare hook. Let's add it to the hdmi_codec_ops,
and mandate that either prepare or hw_params is implemented.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210525132354.297468-6-maxime@cerno.tech
2021-06-10 11:48:56 +02:00
Maxime Ripard
7a8e1d4421
ASoC: hdmi-codec: Add iec958 controls
The IEC958 status bits can be exposed and modified by the userspace
through dedicated ALSA controls.

This patch implements those controls for the hdmi-codec driver. It
relies on a default value being setup at probe time that can later be
overridden by the control put.

The hw_params callback is then called with a buffer filled with the
proper bits for the current parameters being passed on so the underlying
driver can just reuse those bits as is.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210525132354.297468-5-maxime@cerno.tech
2021-06-10 11:48:49 +02:00
Mark Brown
916cccb507
ASoC: rt5645: Avoid upgrading static warnings to errors
One of the fixes reverted as part of the UMN fallout was actually fine,
however rather than undoing the revert the process that handled all this
stuff resulted in a patch which attempted to add extra error checks
instead.  Unfortunately this new change wasn't really based on a good
understanding of the subsystem APIs and bypassed the usual patch flow
without ensuring it was reviewed by people with subsystem knowledge and
was merged as a fix rather than during the merge window.

The effect of the new fix is to upgrade what were previously warnings on
static data in the code to hard errors on that data.  If this actually
happens then it would break existing systems, if it doesn't happen then
the change has no effect so this was not a safe change to apply as a fix
to the release candidates.  Since the new code has not been tested and
doesn't in practice improve error handling revert it instead, and also
drop the original revert since the original fix was fine.  This takes
the driver back to what it was in -rc1.

Fixes: 5e70b8e22b ("ASoC: rt5645: add error checking to rt5645_probe function")
Fixes: 1e0ce84215 ("Revert "ASoC: rt5645: fix a NULL pointer dereference")
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Phillip Potter <phil@philpotter.co.uk>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20210608160713.21040-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-09 11:54:36 +01:00
Mark Brown
c441bfb5f2 Linux 5.13-rc3
-----BEGIN PGP SIGNATURE-----
 
 iQFSBAABCAA8FiEEq68RxlopcLEwq+PEeb4+QwBBGIYFAmCqzFgeHHRvcnZhbGRz
 QGxpbnV4LWZvdW5kYXRpb24ub3JnAAoJEHm+PkMAQRiGIgQH/3nAV/fYbUCubEQe
 RXUcjMGznIpdHeMiY/hPezObYnpBI3UAi2JwHCvQfoE8ckbx4tq8Xp+TUWebsdaf
 zpDhKXDj2jHha1f5AixHCn1UFxiqOSn3d2muY2Bh1Nhg7iJuzU8xjIMCcOdss+fp
 8e4wqidOHkpWvGJ96CQ5zCNxeXI+/f7VX2IgdJ+RCDwzbqJlIvvXwAkg1KrguUEz
 EPmhpODqjPbVVc/mhtguMLMWl78WKCTBOSHCcYBolatXfm2ojsnX1hXprypWY4Mg
 vKXxF/91AS8InCC08Jw+puz+fXDBx1jtNmFFhDOFTyz/TvwPaKZiWbAeXOZFJA2Z
 Wm4su7g=
 =cqxg
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmDAnXkACgkQJNaLcl1U
 h9Co7Qf+O2ajcRpjU5T3KkSqCcVF/T2vjfwWVzh11FXqdkwYbCEFrJD/h6YL1Sx/
 o66dRfJYdqiAZDu0ifk1vtBcXvoPg/+w8TEoLHHE+sovgsOAJPM7ucuBfs4mtaY0
 ek3SKsNBENvivOPCAzWYbK74m7eR4hDr0i7BVsdarduwf5ZtFgJp+eYgKCMroiSa
 OWgWn29/OYSJSNmsFuhwBMDzEr/xkYYYLTUzGeoDmX+rlQos1weW6r12KKDmGoKh
 FlxGroHrBPjTThu+gL0XiOS/GdgQtWHTTaLix0CDTUZWAcfkxC4sd3d45569p+E4
 4GOBEVOhGr8/uyYWffGVh0OlZfZYFA==
 =6IBw
 -----END PGP SIGNATURE-----

Merge tag 'v5.13-rc3' into asoc-5.13

Linux 5.13-rc3
2021-06-09 11:52:35 +01:00
Maxime Ripard
366b45b974
ASoC: hdmi-codec: Rework to support more controls
We're going to add more controls to support the IEC958 output, so let's
rework the control registration a bit to support more of them.

Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Acked-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20210525132354.297468-4-maxime@cerno.tech
2021-06-08 17:05:47 +02:00
Arnd Bergmann
2f4574dd6d clkdev: remove CONFIG_CLKDEV_LOOKUP
This option is now synonymous with CONFIG_HAVE_CLK, so use
the latter globally. Any out-of-tree platform ports that
still use a private clk_get()/clk_put() implementation should
move to CONFIG_COMMON_CLK.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2021-06-08 17:00:09 +02:00
Takashi Iwai
a0309c3448 ASoC: Fixes for v5.13
A collection of fixes and device ID updates that have come up in the
 past few -rcs, none of which stand out particularly.
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmC/aSwACgkQJNaLcl1U
 h9DNXAf+O+fzbVOkXxp/r3yUa2VF0Zdit0R8xIcUh0k7vd+MqYECaGaKqX9sAKbn
 nQFNvzcdRjkiFFgmKpy6x2kJ/OXBJbRCvC5FfAAj2cJvzw4eN03wkqaa9JuEZX1e
 uJ+Ny1PELMglHqmWNC9bWnudEJoaYxpssI14u+FjOWJPzIxXSxWSGQknIG4d8/Rh
 BtifoTxWxsYIbKiiNhX6Ui5zdzRl5CeTLuKoKXBQRM0ivRwPuX0Y+VW/tsNiLUBT
 yN/CEEuu+GZevdHRvWEW3FwK8y7W36gueEYe7o+SFQVgyyjESnhCRdhRvo7uvzrx
 e1yVEe4ky0wbyhmBR+69SugYKqd1/A==
 =tHOl
 -----END PGP SIGNATURE-----

Merge tag 'asoc-fix-v5.13-rc4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v5.13

A collection of fixes and device ID updates that have come up in the
past few -rcs, none of which stand out particularly.
2021-06-08 16:59:19 +02:00
Wan Jiabing
3ea8a74598
ASoC: remove unneeded semicolons in wcd934x.c
Fix following coccicheck warning:
./sound/soc/codecs/wcd934x.c:5136:2-3: Unneeded semicolon
./sound/soc/codecs/wcd934x.c:2466:2-3: Unneeded semicolon
./sound/soc/codecs/wcd934x.c:2527:2-3: Unneeded semicolon

Signed-off-by: Wan Jiabing <wanjiabing@vivo.com>
Link: https://lore.kernel.org/r/20210608030656.24052-1-wanjiabing@vivo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:48 +01:00
Kuninori Morimoto
640eac4c84
ASoC: soc-core: don't use discriminatory terms on snd_soc_runtime_get_dai_fmt()
snd_soc_runtime_get_dai_fmt() is using discriminatory terms.
This patch fixup it.

Fixes: ba9e82a1c8 ("ASoC: soc-core: add snd_soc_runtime_get_dai_fmt()")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/874ke9dxkp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:47 +01:00
Christophe JAILLET
b6052c3c7a
ASoC: mediatek: mtk-btcvsd: Fix an error handling path in 'mtk_btcvsd_snd_probe()'
If an error occurs after a successful 'of_iomap()' call, it must be undone
by a corresponding 'iounmap()' call, as already done in the remove
function.

While at it, remove the useless initialization of 'ret' at the beginning of
the function.

Fixes: 4bd8597dc3 ("ASoC: mediatek: add btcvsd driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/0c2ba562c3364e61bfbd5b3013a99dfa0d9045d7.1622989685.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:46 +01:00
Bard Liao
bcc0f0c078
ASoC: rt711-sdca: handle mbq_regmap in rt711_sdca_io_init
We currently only hangle rt711->regmap in rt711_sdca_io_init(), and
rt711->mbq_regmap is missing.

Fixes: 7ad4d237e7 ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver')
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/20210607222239.582139-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:40 +01:00
Bard Liao
5ad1ba99e4
ASoC: rt711-sdca-sdw: add readable for SDW_SDCA_CTL() registers
SDW_SDCA_CTL() registers are used but are not set to readable.

Fixes: 7ad4d237e7 ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver')
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/20210607222239.582139-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:39 +01:00
Bard Liao
c0372bc873
ASoC: rt5682-sdw: set regcache_cache_only false before reading RT5682_DEVICE_ID
RT5682_DEVICE_ID is a volatile register, we can not read it in cache
only mode.

Fixes: 03f6fc6de9 ("ASoC: rt5682: Add the soundwire support")
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/20210607222239.582139-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:39 +01:00
Oder Chiou
9266d95405
ASoC: rt5682: Fix a problem with error handling in the io init function of the soundwire
The device checking error should be a jump to pm_runtime_put_autosuspend()
as done before returning value.

Fixes: 867f8d18df ('ASoC: rt5682: fix getting the wrong device id when the suspend_stress_test')
Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:38 +01:00
Jack Yu
e343d34a9c
ASoC: rt715-sdca: fix clock stop prepare timeout issue
Fix clock stop prepare timeout issue (#2853).
The trigger of internal circuit which belong to
“SDCA preset stuffs” was not set correctly in previous driver,
which could block clock_stop_preparation state.
Add the correct register setting to fix it.

Fixes: 20d17057f0 ('ASoC: rt715-sdca: Add RT715 sdca vendor-specific driver')
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:37 +01:00
Pierre-Louis Bossart
dbc07517ab
ASoC: rt715-sdw: use first_hw_init flag on resume
The intent of the status check on resume was to verify if a SoundWire
peripheral reported ATTACHED before waiting for the initialization to
complete. This is required to avoid timeouts that will happen with
'ghost' devices that are exposed in the platform firmware but are not
populated in hardware.

Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to
another error, the resume operation never timed out, but the volume
settings were not properly restored.

BugLink: https://github.com/thesofproject/linux/issues/2908
BugLink: https://github.com/thesofproject/linux/issues/2637
Fixes: d1ede0641b ('ASoC: rt715: add RT715 codec driver')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-11-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:36 +01:00
Pierre-Louis Bossart
d34d0897a7
ASoC: rt715-sdca-sdw: use first_hw_init flag on resume
The intent of the status check on resume was to verify if a SoundWire
peripheral reported ATTACHED before waiting for the initialization to
complete. This is required to avoid timeouts that will happen with
'ghost' devices that are exposed in the platform firmware but are not
populated in hardware.

Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to
another error, the resume operation never timed out, but the volume
settings were not properly restored.

This patch renames the status flag to 'first_hw_init' for consistency
with other drivers (was 'first_init')

BugLink: https://github.com/thesofproject/linux/issues/2908
BugLink: https://github.com/thesofproject/linux/issues/2637
Fixes: 20d17057f0 ('ASoC: rt715-sdca: Add RT715 sdca vendor-specific driver')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:35 +01:00
Pierre-Louis Bossart
a0897ebca6
ASoC: rt711-sdw: use first_hw_init flag on resume
The intent of the status check on resume was to verify if a SoundWire
peripheral reported ATTACHED before waiting for the initialization to
complete. This is required to avoid timeouts that will happen with
'ghost' devices that are exposed in the platform firmware but are not
populated in hardware.

Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to
another error, the resume operation never timed out, but the volume
settings were not properly restored.

BugLink: https://github.com/thesofproject/linux/issues/2908
BugLink: https://github.com/thesofproject/linux/issues/2637
Fixes: 320b8b0d13 ('ASoC: rt711: add rt711 codec driver')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:34 +01:00
Pierre-Louis Bossart
b32cab0970
ASoC: rt711-sdca-sdw: use first_hw_init flag on resume
The intent of the status check on resume was to verify if a SoundWire
peripheral reported ATTACHED before waiting for the initialization to
complete. This is required to avoid timeouts that will happen with
'ghost' devices that are exposed in the platform firmware but are not
populated in hardware.

Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to
another error, the resume operation never timed out, but the volume
settings were not properly restored.

BugLink: https://github.com/thesofproject/linux/issues/2908
BugLink: https://github.com/thesofproject/linux/issues/2637
Fixes: 7ad4d237e7 ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:33 +01:00
Pierre-Louis Bossart
a9e54e5fbe
ASoC: rt700-sdw: use first_hw_init flag on resume
The intent of the status check on resume was to verify if a SoundWire
peripheral reported ATTACHED before waiting for the initialization to
complete. This is required to avoid timeouts that will happen with
'ghost' devices that are exposed in the platform firmware but are not
populated in hardware.

Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to
another error, the resume operation never timed out, but the volume
settings were not properly restored.

BugLink: https://github.com/thesofproject/linux/issues/2908
BugLink: https://github.com/thesofproject/linux/issues/2637
Fixes: 7d2a5f9ae4 ('ASoC: rt700: add rt700 codec driver')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:32 +01:00
Pierre-Louis Bossart
5361a42114
ASoC: rt5682-sdw: use first_hw_init flag on resume
The intent of the status check on resume was to verify if a SoundWire
peripheral reported ATTACHED before waiting for the initialization to
complete. This is required to avoid timeouts that will happen with
'ghost' devices that are exposed in the platform firmware but are not
populated in hardware.

Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to
another error, the resume operation never timed out, but the volume
settings were not properly restored.

BugLink: https://github.com/thesofproject/linux/issues/2908
BugLink: https://github.com/thesofproject/linux/issues/2637
Fixes: 03f6fc6de9 ('ASoC: rt5682: Add the soundwire support')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:31 +01:00
Pierre-Louis Bossart
ebe2ef60ed
ASoC: rt1316-sdw: use first_hw_init flag on resume
The intent of the status check on resume was to verify if a SoundWire
peripheral reported ATTACHED before waiting for the initialization to
complete. This is required to avoid timeouts that will happen with
'ghost' devices that are exposed in the platform firmware but are not
populated in hardware.

Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to
another error, the resume operation never timed out, but the volume
settings were not properly restored.

BugLink: https://github.com/thesofproject/linux/issues/2908
BugLink: https://github.com/thesofproject/linux/issues/2637
Fixes: 2b719fd20f ('ASoC: rt1316: Add RT1316 SDCA vendor-specific driver')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:30 +01:00
Pierre-Louis Bossart
30e102dab5
ASoC: rt1308-sdw: use first_hw_init flag on resume
The intent of the status check on resume was to verify if a SoundWire
peripheral reported ATTACHED before waiting for the initialization to
complete. This is required to avoid timeouts that will happen with
'ghost' devices that are exposed in the platform firmware but are not
populated in hardware.

Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to
another error, the resume operation never timed out, but the volume
settings were not properly restored.

BugLink: https://github.com/thesofproject/linux/issues/2908
BugLink: https://github.com/thesofproject/linux/issues/2637
Fixes: a87a6653a2 ('ASoC: rt1308-sdw: add rt1308 SdW amplifier driver')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:29 +01:00
Pierre-Louis Bossart
bf88117031
ASoC: max98373-sdw: use first_hw_init flag on resume
The intent of the status check on resume was to verify if a SoundWire
peripheral reported ATTACHED before waiting for the initialization to
complete. This is required to avoid timeouts that will happen with
'ghost' devices that are exposed in the platform firmware but are not
populated in hardware.

Unfortunately we used 'hw_init' instead of 'first_hw_init'. Due to
another error, the resume operation never timed out, but the volume
settings were not properly restored.

This patch renames the status flag to 'first_hw_init' for consistency
with other drivers.

BugLink: https://github.com/thesofproject/linux/issues/2637
Fixes: 56a5b7910e ('ASoC: codecs: max98373: add SoundWire support')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:26 +01:00
Pierre-Louis Bossart
468a272ca4
ASoC: max98373-sdw: add missing memory allocation check
We forgot to test that devm_kcalloc doesn't return NULL.

Fixes: 349dd23931 ('ASoC: max98373: don't access volatile registers in bias level off')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Link: https://lore.kernel.org/r/20210607222239.582139-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-08 13:36:25 +01:00
Takashi Iwai
0280e07bbd Merge branch 'for-linus' into for-next 2021-06-08 14:02:06 +02:00
Mark Brown
d08c5b76b2
Merge series "ASoC: adds new .auto_selectable_formats support" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

These are v3 of "ASoC: adds new .get_fmt support",
but renamed Subject.

This is a little bit challenging patch-set.
The idea/code is almost same as v1 / v2.
v3 has "priority" support.

We need to set dai_link->dai_fmt to select CPU/Codec settings,
and it is selected by Sound Card Driver, today.

Because of it, Sound Card user need to know both CPU / Codec
available dai_fmt, and needs to select it.
For example simple-card / audio-graph case, it is selected by
"format" and "bitclock/frame-master/inversion" on DT.

But, it can be automatically selected if both CPU and Codec drivers
indicate it to ALSA SoC Framework, somehow.

By this patch, dai_fmt can be automatically selected from each
driver if both CPU / Codec driver had .auto_selectable_formats.
Automatically selectable *field* is depends on each drivers.

For example, some driver want to select format "automatically",
but want to select other fields "manually", because of complex limitation.
Or other example, in case of both CPU and Codec are possible to be
clock provider, but the quality was different.
In these case, user need/want to *manually* select each fields
from Sound Card driver.

It uses Sound Card specified fields preferentially, and try to select
non-specific fields from CPU and Codec driver settings if driver had
.auto_selectable_formats.
In other words, we can select all dai_fmt via Sound Card driver
same as before.

Select dai_fmt 100% automatically is very difficult and will be very complex,
but select automatically some fields only is very easy, I guess.
This patch-set is based on such assumption.

v1 -> v2
	- Add more detail explanation on git-log, code, comment.
	- Possible to be Clock/Frame provider is depends on driver's situation.

v2 -> v3
	- has priority
	- tidyup function explanation for snd_soc_dai_get_fmt()
	- Each driver don't try to have SND_SOC_DAIFMT_CBx_CFx to avoid confusion

Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com

Kuninori Morimoto (7):
  ASoC: soc-core: move snd_soc_runtime_set_dai_fmt() to upside
  ASoC: soc-core: add snd_soc_runtime_get_dai_fmt()
  ASoC: ak4613: add .auto_selectable_formats support
  ASoC: pcm3168a: add .auto_selectable_formats support
  ASoC: rsnd: add .auto_selectable_formats support
  ASoC: fsi: add .auto_selectable_formats support
  ASoC: hdmi-codec: add .auto_selectable_formats support

 include/sound/soc-dai.h       |  55 +++++++
 sound/soc/codecs/ak4613.c     |  11 ++
 sound/soc/codecs/hdmi-codec.c |  21 +++
 sound/soc/codecs/pcm3168a.c   |  26 +++
 sound/soc/sh/fsi.c            |  15 ++
 sound/soc/sh/rcar/core.c      |  31 +++-
 sound/soc/soc-core.c          | 288 ++++++++++++++++++++++++++--------
 sound/soc/soc-dai.c           |  63 ++++++++
 sound/soc/soc-utils.c         |  29 ++++
 9 files changed, 475 insertions(+), 64 deletions(-)

--
2.25.1
2021-06-07 19:53:01 +01:00
Colin Ian King
d50b86b3f6
ASoC: rk817: remove redundant assignment to pointer node, add missing of_node_put
The pointer node is being initialized with a value that is never read and
it is being updated later with a new value.  The initialization is
redundant and can be removed.

The function is missing a of_node_put on node, fix this by adding the call
before returning.

Addresses-Coverity: ("Unused value")
Fixes: 0d6a04da9b ("ASoC: Add Rockchip rk817 audio CODEC support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Tested-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20210603113659.82031-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 16:20:03 +01:00
Jiapeng Chong
54f6731394
ASoC: rk817: Remove unneeded semicolon
Fix the following coccicheck warnings:

./sound/soc/codecs/rk817_codec.c:49:2-3: Unneeded semicolon.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/1622802209-45031-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 16:20:02 +01:00
Mark Brown
b9de77d0bc Immutable branch between MFD and ASoC due for the v5.14 merge window
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCgAdFiEEdrbJNaO+IJqU8IdIUa+KL4f8d2EFAmC3UjQACgkQUa+KL4f8
 d2FOXRAArFhjSte5NR6lSI46znDRXVGTsw9VXfJO/7K8uFnHM1aSU0ViyVmtGqba
 z6QHazztq9J0EP99Q8Ikgk4vrlUEpnAut9pS5qjfvrTTl3e7YHhJ+Gl+Z7Vhyo47
 AlrzfXAO0lFsH/96vFPuPv3mlXBW/bDuI/vL05uMp9vV+VGYqh9f9nO1P6LxD40w
 bmxHNeqJ8fooc/w0ZU7wLfUL2orSkwN2kFoBBDHUndUXu7lmeBq50XfX4h/kPN7Y
 33GiRRN3OdJ8qG46cAhoj5Xu88bh8Wp1SvqI32gAkFYfwYHMBFUIqwd847UAnUCq
 xxQNLJ97zzwO6Qh9Aldu3EFrOqN1SFUIPO337DIeHet1gwS7EdDXM6JxTUKOWHV5
 ICQOYbvB0U/0Pdp2khSGaYF4djs0Hc6p3JRNmBcttfzAbEL9uxvCZSgVQF1sr/Eu
 kr08mHomj8AQgqoT0RoZkACB3a4K1yczjj6zj9Kp9f1r2p7zppFrSXHCNSGG6w3h
 EQcXjBfsMcDs2HiH7Xd/ZHV5LXu4cdqOPPnQelPKLOfvDMhBv7yhtSkhS8oynT07
 Pkd/bQ6cAURRjhNszS8B36Nh6TL8DHYXRob8pA7v1lWz9QNRpIxPxEwBNKiDrPoR
 Rhako+wV6+6bA7UpLU7whYmh7T41rQ18lWU6ccnMjxdsetWICS0=
 =bG7Q
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmC+OL0ACgkQJNaLcl1U
 h9AnAAf/RfUSaZtJYG5stsBRYf9AYxkGfbSTtfI1xjAtdt5uwCZd+RHvkBVJ1tXu
 gVayIfnEQQ7f+rWWPkpAsxd7/e42Myi3PIBMu5vMWBQZhlnvOm4cehN7gUxlVXH0
 OlTdsZzpc4UJfysqxI8gcVzFrIMprFaB7K9glUurY949sdIb7VjFWCJdXX4FIYTo
 0htYoo2LAXtCIIabEyiwcIeP3feQkBcnzcQeT0GaLYkjtD3b0vuGJ061bwCfxDC/
 ZlvbgtfxSiqrj8eLwjJq6zUNWV2dj74dAWQhZlEsS8h94ROsObH/h7e7dQfT6kuv
 E0MgIZk/PRoglRNr26KF1Q1tBsA3UQ==
 =O8/h
 -----END PGP SIGNATURE-----

Merge tag 'tb-mfd-asoc-v5.14-1' of https://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd into asoc-5.14

Immutable branch between MFD and ASoC due for the v5.14 merge window
2021-06-07 16:18:18 +01:00
Kuninori Morimoto
68d8b7ba36
ASoC: hdmi-codec: add .auto_selectable_formats support
By this patch, DAI format might be automatically selected
(Depends on paired DAI).

Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6ognc5i.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 15:55:17 +01:00
Kuninori Morimoto
af69f47df1
ASoC: fsi: add .auto_selectable_formats support
By this patch, DAI format might be automatically selected
(Depends on paired DAI).

Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87bl8wnc5x.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 15:55:16 +01:00
Kuninori Morimoto
0292176522
ASoC: rsnd: add .auto_selectable_formats support
By this patch, DAI format might be automatically selected
(Depends on paired DAI).

Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87cztcnc6k.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 15:55:15 +01:00
Kuninori Morimoto
bea63e8bbe
ASoC: pcm3168a: add .auto_selectable_formats support
By this patch, DAI format might be automatically selected
(Depends on paired DAI).

Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87eedsnc6z.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 15:55:14 +01:00
Kuninori Morimoto
c50f381afc
ASoC: ak4613: add .auto_selectable_formats support
By this patch, DAI format might be automatically selected
(Depends on paired DAI).

Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87fsy8nc7o.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 15:55:13 +01:00
Kuninori Morimoto
ba9e82a1c8
ASoC: soc-core: add snd_soc_runtime_get_dai_fmt()
ASoC is using dai_link which specify DAI format (= dai_link->dai_fmt),
and it is selected by "Sound Card" driver in corrent implementation.
In other words, Sound Card *needs* to setup it.
But, it should be possible to automatically selected from CPU and
Codec driver settings.

This patch adds new .auto_selectable_formats support
at snd_soc_dai_ops.

By this patch, dai_fmt can be automatically selected from each
driver if both CPU / Codec driver had it.
Automatically selectable *field* is depends on each drivers.

For example, some driver want to select format "automatically",
but want to select other fields "manually", because of complex limitation.
Or other example, in case of both CPU and Codec are possible to be
clock provider, but the quality was different.
In these case, user need/want to *manually* select each fields
from Sound Card driver.

This .auto_selectable_formats can set priority.
For example, no limitaion format can be HI priority,
supported but has picky limitation format can be next priority, etc.

It uses Sound Card specified fields preferentially, and try to select
non-specific fields from CPU and Codec driver automatically
if all drivers have .auto_selectable_formats.

In other words, we can select all dai_fmt via Sound Card driver
same as before.

Link: https://lore.kernel.org/r/871rb3hypy.wl-kuninori.morimoto.gx@renesas.com
Link: https://lore.kernel.org/r/871racbx0w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87h7ionc8s.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 15:55:12 +01:00
Kuninori Morimoto
4d1a98b5f1
ASoC: soc-core: move snd_soc_runtime_set_dai_fmt() to upside
This patch moves snd_soc_runtime_set_dai_fmt() to upside.
This is prepare to support snd_soc_runtime_get_dai_fmt().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87im34nc9r.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 15:55:11 +01:00
Srinivasa Rao Mandadapu
c8a4556d98
ASoC: qcom: lpass-cpu: Fix pop noise during audio capture begin
This patch fixes PoP noise of around 15ms observed during audio
capture begin.
Enables BCLK and LRCLK in snd_soc_dai_ops prepare call for
introducing some delay before capture start.

(am from https://patchwork.kernel.org/patch/12276369/)
(also found at https://lore.kernel.org/r/20210524142114.18676-1-srivasam@codeaurora.org)

Co-developed-by: Judy Hsiao <judyhsiao@chromium.org>
Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210604154545.1198337-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-07 15:54:08 +01:00
Mark Brown
ffb2df66ba
Merge series "ASoC: codecs: wcd934x: add Headset and button detection support" from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:
This patchset adds support to MBHC(Multi Button Headset Control) block found in
Qualcomm WCD codecs. MBHC support headset type detection, both Mechanical and
electrical insert/removal detection along with 8 buttons detection,
Over current interrupts on HPHL/R, Impedance Measurements on HPHL/R.

Eventhough MBHC block supports things like OverCurrent detection, Currently its
reported as a kernel debug message. Should this be reported as an uevent to
userspace? like the way USB reports?
Any suggestions?

First patch adds a common mbhc driver and the second one wcd934x specific driver
changes along with sdm845 soundcard related changes.

Common wcd-mbhc-v2 driver should be reusable across multiple codecs like
WCD9335, WCD934x, WCD937x and WCD938x.

Most of the work is derived from downstream Qualcomm kernels.
Credits to various Qualcomm authors from Patrick Lai's team who have
contributed to this code.

Changes since v2:
- switched to EXPORT_SYMBOL_GPL from EXPORT_SYMBOL
- converted one of the if else to switch case.

Srinivas Kandagatla (4):
  ASoC: dt-bindings: wcd934x: add bindings for Headset Button detection
  ASoC: codecs: wcd: add multi button Headset detection support
  ASoC: codecs: wcd934x: add mbhc support
  ASoC: qcom: sdm845: add jack support for WCD934x

 .../bindings/sound/qcom,wcd934x.yaml          |   30 +
 include/linux/mfd/wcd934x/registers.h         |   57 +
 sound/soc/codecs/Kconfig                      |    4 +
 sound/soc/codecs/Makefile                     |    2 +
 sound/soc/codecs/wcd-mbhc-v2.c                | 1475 +++++++++++++++++
 sound/soc/codecs/wcd-mbhc-v2.h                |  340 ++++
 sound/soc/codecs/wcd934x.c                    |  884 +++++++++-
 sound/soc/qcom/sdm845.c                       |    8 +
 8 files changed, 2785 insertions(+), 15 deletions(-)
 create mode 100644 sound/soc/codecs/wcd-mbhc-v2.c
 create mode 100644 sound/soc/codecs/wcd-mbhc-v2.h

--
2.21.0
2021-06-04 17:26:54 +01:00
Srinivas Kandagatla
c15d4b7209
ASoC: qcom: sdm845: add jack support for WCD934x
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210604115230.23259-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-04 15:29:02 +01:00
Srinivas Kandagatla
9fb9b1690f
ASoC: codecs: wcd934x: add mbhc support
WCD934x has Multi Button Headset Control hardware to support Headset insertion,
type detection, 8 headset buttons detection, Over Current detection and Impedence
measurements.

This patch adds support for this feature via common mbhc layer.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210604115230.23259-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-04 15:29:01 +01:00
Srinivas Kandagatla
0e5c9e7ff8
ASoC: codecs: wcd: add multi button Headset detection support
Most new Qualcomm WCD codecs support MBHC(Multi Button Headset Control) via ADC.

This patchset adds support to Common parts of this MBHC support so that
WCD codecs need not duplicate them. To do that codec exposes set of
register fields and callbacks to this common driver to control it.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210604115230.23259-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-04 15:29:00 +01:00
Bertrand Jacquin
e78f36bc13
ASoC: snd-soc-lpass requires REGMAP_MMIO
With CONFIG_SND_SOC_LPASS_RX_MACRO=m and CONFIG_REGMAP_MMIO undefined,
build fails with the following error

  make -f /var/tmp/portage/sys-kernel/stable-sources-5.12.8/work/linux-5.12.8-stable/scripts/Makefile.modpost
    sed 's/\.ko$/\.o/' modules.order | scripts/mod/modpost   -E  -o modules-only.symvers -i vmlinux.symvers   -T -
  ERROR: modpost: "__devm_regmap_init_mmio_clk" [sound/soc/codecs/snd-soc-lpass-rx-macro.ko] undefined!

This does also apply to other Qualcomm Macro LPASS all making call to
devm_regmap_init_mmio()

Signed-off-by: Bertrand Jacquin <bertrand@jacquin.bzh>
Link: https://lore.kernel.org/r/20210603221816.2642402-1-bertrand@jacquin.bzh
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-04 15:27:08 +01:00
Gustavo A. R. Silva
50d790012a
ASoC: ti: davinci-mcasp: Fix fall-through warning for Clang
In preparation to enable -Wimplicit-fallthrough for Clang, fix a warning
by explicitly adding a fallthrough; statement.

Link: https://github.com/KSPP/linux/issues/115
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Acked-by: Peter Ujfalusi <peter.ujflausi@gmail.com>
Link: https://lore.kernel.org/r/20210604072714.GA244640@embeddedor
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-04 15:27:07 +01:00
Oder Chiou
49783c6f4a
ASoC: rt5682: Fix the fast discharge for headset unplugging in soundwire mode
Based on ("5a15cd7fce20b1fd4aece6a0240e2b58cd6a225d"), the setting also
should be set in soundwire mode.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Link: https://lore.kernel.org/r/20210604063150.29925-1-oder_chiou@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-04 12:54:19 +01:00
Mark Brown
f3b3bceb85
Merge series "ASoC: rsnd: tidyup adg and header" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark

I noticed that adg can be more clean code.
And rsnd.h header comment was not so good
because patch has been randomly added.

This patch tidyup these.

Kuninori Morimoto (5):
  ASoC: rsnd: adg: supply __printf(x, y) formatting for dbg_msg()
  ASoC: rsnd: adg: tidyup rsnd_adg_get_clkin/out() parameter
  ASoC: rsnd: adg: use more simple method for null_clk
  ASoC: rsnd: adg: check return value for rsnd_adg_get_clkin/out()
  ASoC: rsnd: tidyup __rsnd_mod_xxx macro comments

 sound/soc/sh/rcar/adg.c  | 139 +++++++++++++++++++++++++--------------
 sound/soc/sh/rcar/rsnd.h |  21 ++----
 2 files changed, 97 insertions(+), 63 deletions(-)

--
2.25.1
2021-06-03 19:36:04 +01:00
Yufen Yu
81aad47278
ASoC: img: Fix PM reference leak in img_i2s_in_probe()
pm_runtime_get_sync will increment pm usage counter even it failed.
Forgetting to putting operation will result in reference leak here.
Fix it by replacing it with pm_runtime_resume_and_get to keep usage
counter balanced.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yufen Yu <yuyufen@huawei.com>
Link: https://lore.kernel.org/r/20210524093521.612176-1-yuyufen@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 14:00:01 +01:00
Yang Yingliang
28b170110a
ASoC: fsl: imx-es8328: use devm_snd_soc_register_card()
Using devm_snd_soc_register_card() can make the code
shorter and cleaner.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210602133359.310647-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 14:00:00 +01:00
Colin Ian King
d66e033910
ASoC: rsnd: check for zero node count
Most callers of_get_child_count() check that "nr" is non-zero so it
causes a static checker warning when we don't do that here.  This
does not cause a problem or a crash, but having zero SSUIes does not
make sense either so let's add a check.

Addresses-Coverity: ("Unchecked return value")
Fixes: c413983eb6 ("ASoC: rsnd: adjust disabled module")
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210603110315.81146-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 13:59:59 +01:00
Yang Yingliang
b82d0759a3
ASoC: imx-audio-rpmsg: use module_rpmsg_driver to simplify the code
module_rpmsg_driver() makes the code simpler by eliminating
boilerplate code.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210602082610.3828408-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 13:59:57 +01:00
Yang Yingliang
6522a8486c
ASoC: atmel: sam9x5_wm8731: use devm_snd_soc_register_card()
Using devm_snd_soc_register_card() can make the code
shorter and cleaner.

Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Link: https://lore.kernel.org/r/20210602141619.323286-1-yangyingliang@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 13:59:56 +01:00
Kuninori Morimoto
3f4593fb4a
ASoC: rsnd: tidyup __rsnd_mod_xxx macro comments
status and __rsnd_mod_xxx were updated, but some related comments were
not. And it has verbose comments. This patch cleanup/tidyup these.

1) adds missing "D" to status sample
2) remove verbose list for "H"
3) add "needs protect" to __rsnd_mod_call_xxx

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87o8cpi1zs.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 13:56:42 +01:00
Kuninori Morimoto
d668a5e240
ASoC: rsnd: adg: check return value for rsnd_adg_get_clkin/out()
Current rsnd_adg_get_clkin/out() are void function,
thus adg->clk/clkout[i] might be NULL.

But, for_each_rsnd_clk/clkout() macros are assuming
all clks are non NULL.

Because of this mismatch, code can be complex and/or buggy.
These functions return error by this patch,
and make sure all clks are non NULL.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87pmx5i20m.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 13:56:41 +01:00
Kuninori Morimoto
cb2f97d89f
ASoC: rsnd: adg: use more simple method for null_clk
commit 965386c976 ("ASoC: rsnd: call unregister for null_hw when
removed") tried unregister null_clk, but it has some issues.

1st issue is kernel will indicate below message when unregistering,
because of its timing. unregistering should be happen after clk_disable().

	clk_unregister: unregistering prepared clock: rsnd_adg_null

2nd issue is, it is using priv->null_clk, but it should be adg->null_clk.

3rd issue is it is using very complex clk registering method.
more simple clk_register/unregister_fixed_rate() should be OK.

This patch fixes these.

Fixes: 965386c976 ("ASoC: rsnd: call unregister for null_hw when removed")
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1hli215.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 13:56:40 +01:00
Kuninori Morimoto
b48e4aa489
ASoC: rsnd: adg: tidyup rsnd_adg_get_clkin/out() parameter
set priv->adg before rsnd_adg_get_clkin/out() to be more simple code.
Nothing is changed, but is preparation for
next "ASoC: rsnd: adg: use more simple method for null_clk" patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87sg21i21j.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 13:56:39 +01:00
Kuninori Morimoto
2cdfe6520c
ASoC: rsnd: adg: supply __printf(x, y) formatting for dbg_msg()
Fixes the following W=1 kernel build warning(s):

sound/soc/sh/rcar/adg.c: In function 'dbg_msg':
sound/soc/sh/rcar/adg.c:594:2: warning: function 'dbg_msg' might \
 be a candidate for 'gnu_printf' format attribute\
 [-Wsuggest-attribute=format]

Fixes: 1f9c82b5ab ("ASoC: rsnd: add debugfs support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tumhi21r.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 13:56:38 +01:00
Richard Weinberger
8bef925e37
ASoC: tas2562: Fix TDM_CFG0_SAMPRATE values
TAS2562_TDM_CFG0_SAMPRATE_MASK starts at bit 1, not 0.
So all values need to be left shifted by 1.

Signed-off-by: Richard Weinberger <richard@nod.at>
Link: https://lore.kernel.org/r/20210530203446.19022-1-richard@nod.at
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 13:55:21 +01:00
Mark Pearson
320232caf1
ASoC: AMD Renoir: Remove fix for DMI entry on Lenovo 2020 platforms
Unfortunately the previous patch to fix issues using the AMD ACP bridge
has the side effect of breaking the dmic in other cases and needs to be
reverted.

Removing the changes while we revisit the fix and find something better.
Apologies for the churn.

Suggested-by: Gabriel Craciunescu <unix.or.die@gmail.com>
Signed-off-by: Mark Pearson <markpearson@lenovo.com>
Link: https://lore.kernel.org/r/20210602171251.3243-1-markpearson@lenovo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-03 13:55:19 +01:00
YueHaibing
ae624a38be
ASoC: Intel: Skylake: use DEVICE_ATTR_RO macro
Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20210524115506.35724-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-02 12:03:33 +01:00
Vincent Knecht
8e5607e994
ASoC: codecs: tfa989x: Add support for optional vddd-supply
Allow specifying Vddd regulator/supply to be enabled on I2C probing.

Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20210528105101.508254-4-vincent.knecht@mailoo.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-02 12:03:32 +01:00
Vincent Knecht
1ba1d69d8a
ASoC: codecs: tfa989x: Add support for tfa9897
Add specific init function to poke needed registers & values for this IC

Signed-off-by: Vincent Knecht <vincent.knecht@mailoo.org>
Reviewed-by: Stephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20210528105101.508254-2-vincent.knecht@mailoo.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-02 12:03:30 +01:00
Shaokun Zhang
f34cd5eb2c
ASoC: sigmadsp: Remove the repeated declaration
Function 'sigmadsp_reset' is declared twice, so remove the repeated
declaration.

Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Link: https://lore.kernel.org/r/1622279690-3740-1-git-send-email-zhangshaokun@hisilicon.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-02 12:03:28 +01:00
Mark Pearson
19a0aa9b04
ASoC: AMD Renoir - add DMI entry for Lenovo 2020 AMD platforms
More laptops identified where the AMD ACP bridge needs to be blocked
or the microphone will not work when connected to HDMI.

Use DMI to block the microphone PCM device for these platforms.

Suggested-by: Gabriel Craciunescu <nix.or.die@gmail.com>
Signed-off-by: Mark Pearson <markpearson@lenovo.com>
Link: https://lore.kernel.org/r/20210531145502.6079-1-markpearson@lenovo.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-02 12:03:19 +01:00
Hans de Goede
33d550701b mfd: arizona: Allow building arizona MFD-core as module
There is no reason why the arizona core,irq and codec model specific
regmap bits cannot be build as a module. All they do is export symbols
which are used by the arizona-spi/i2c and arizona-codec modules, which
themselves can be built as module.

Change the Kconfig and Makefile arizona bits so that the arizona MFD-core
can be built as a module.

This is especially useful on x86 platforms with a WM5102 codec, this
allows the arizona MFD driver necessary for the WM5102 codec to be
enabled in generic distro-kernels without growing the base kernel-image
size.

Note this also adds an explicit "depends on MFD_ARIZONA" to all the
arizona codec Kconfig options. The codec drivers use functions from mfd
arizona-core. These new depends are necessary to disallow the codec
drivers being builtin when the arizona-core is build as a module,
otherwise we end up with missing symbol errors when building vmlinuz.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-02 10:50:04 +01:00
Chris Morgan
ef7570b675 ASoC: rk817: fix a warning in rk817_probe()
The return value of snd_soc_component_write() is stored but not
evaluated and this results in a warning when W=1 is set. Stop storing
the return value to be consistent with all other calls of
snd_soc_component_write() and to remove the warning.

Fixes: 0d6a04da9b ("ASoC: Add Rockchip rk817 audio CODEC support")

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-02 08:05:23 +01:00
Mark Brown
26bf457b4a
Merge series "ASoC: Constify snd_compress_ops" from Rikard Falkeborn <rikard.falkeborn@gmail.com>:
The only use of the static and global snd_compress_ops structs is to
assign their address to the compress_ops field in the
snd_soc_component_driver struct which is a pointer to const. Make them
const to allow the compiler to put them in read-only memory.

Rikard Falkeborn (5):
  ASoC: cs47125: Constify static struct snd_compress_ops
  ASoC: wm5102: Constify static struct snd_compress_ops
  ASoC: wm5110: Constify static struct snd_compress_ops
  ASoC: qcom: q6asm-dai: Constify static struct snd_compress_ops
  ASoC: SOF: Intel: Constify sof_probe_compressed_ops

 sound/soc/codecs/cs47l24.c       | 2 +-
 sound/soc/codecs/wm5102.c        | 2 +-
 sound/soc/codecs/wm5110.c        | 2 +-
 sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +-
 sound/soc/sof/compress.c         | 2 +-
 sound/soc/sof/compress.h         | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

--
2.31.1
2021-06-01 18:10:41 +01:00
Mark Brown
d86eb3349b
Merge series "ASoC: rsnd: adjust disabled module for R-Car D3" from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:
Hi Mark, Geert

Renesas Sound driver is assuming that all SSI/SRC
are connected.
But some SSI/SRC are not connected on Some Renesas SoC.
ex)
	H2	E2

	SRC0	      <=
	SRC1	SRC1
	SRC2	SRC2
	...	...

We accepted it by using "status = disabled" on DT before.

ex)
	rcar_sound,src {
		src-0 {
=>			status = "disabled";
		};
		src1: src-1 {
			...
		};
		...

But R-Car D3 have many disabled modules (It has SSI3/SSI4, SRC5/SRC6),
and Renesas SoC maintainer don't want above style on DT.

ex)
	rcar_sound,src {
=>		src0: src-0 { status = "disabled"; };
=>		src1: src-1 { status = "disabled"; };
=>		src2: src-2 { status = "disabled"; };
=>		src3: src-3 { status = "disabled"; };
=>		src4: src-4 { status = "disabled"; };
		src5: src-5 {
			...
		};
		...

This patch-set adjust to this situation, and enables to intuitive DT settings.

	rcar_sound,src {
		src5: src-5 {
			...
		};
		src6: src-6 {
			...
		};
	};

Kuninori Morimoto (4):
  ASoC: rsnd: tidyup rsnd_parse_connect_common()
  ASoC: rsnd: tidyup rsnd_dma_request_channel()
  ASoC: rsnd: tidyup rsnd_parse_connect_xxx()
  ASoC: rsnd: adjust disabled module

 sound/soc/sh/rcar/core.c | 58 ++++++++++++++++++++++++++++++++++++++--
 sound/soc/sh/rcar/dma.c  |  8 +++---
 sound/soc/sh/rcar/dvc.c  |  2 +-
 sound/soc/sh/rcar/rsnd.h | 16 ++++++-----
 sound/soc/sh/rcar/src.c  |  6 +++--
 sound/soc/sh/rcar/ssi.c  | 12 ++++++---
 sound/soc/sh/rcar/ssiu.c | 10 ++++---
 7 files changed, 91 insertions(+), 21 deletions(-)

--
2.25.1
2021-06-01 18:10:39 +01:00
Kai Vehmanen
1f763d0388
ASoC: SOF: Intel: pci-tgl: add ADL-M support
Add PCI DID for Intel AlderLake-M.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20210528184153.18251-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:05:19 +01:00
Ranjani Sridharan
d95eca7e3b
ASoC: SOF: Intel: hda: don't print ROM status if cl_dsp_init() fails
cl_dsp_init() dumps the ROM status if it fails after max
attempts before powering off the DSP. Remove the duplicate
log to print the ROM status and error in
hda_dsp_cl_boot_firmware(). These values are invalid anyway
as the DSP is already powered off.

Co-developed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210528160551.10145-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:05:18 +01:00
Ranjani Sridharan
7ff562fed9
ASoC: SOF: Intel: hda: clean up hda_dsp_dump()
Clean up the hda_dsp_dump() function to avoid duplicating
the ROM status and error.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20210528160551.10145-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:05:17 +01:00
YueHaibing
b1b384de0a
ASoC: ti: omap-mcbsp: use DEVICE_ATTR_RW macro
Use DEVICE_ATTR_RW() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20210528063033.19904-1-yuehaibing@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:05:16 +01:00
Rikard Falkeborn
7db43da8c0
ASoC: SOF: Intel: Constify sof_probe_compressed_ops
The only usage of sof_probe_compressed_ops is to assign its address to
the compress_ops field in the snd_soc_component_driver struct, which is
a pointer to const. The assignment is done in sound/soc/sof/pcm.c. Make
it const to allow the compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210526231013.46530-6-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:05:15 +01:00
Rikard Falkeborn
a8048051d7
ASoC: qcom: q6asm-dai: Constify static struct snd_compress_ops
The snd_compress_ops structs are only stored in the compress_ops field
of a snd_soc_component_driver struct, so make it const to allow the
compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20210526231013.46530-5-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:05:14 +01:00
Rikard Falkeborn
4127a3a541
ASoC: wm5110: Constify static struct snd_compress_ops
The snd_compress_ops structs are only stored in the compress_ops field
of a snd_soc_component_driver struct, so make it const to allow the
compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210526231013.46530-4-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:05:13 +01:00
Rikard Falkeborn
b6f5d62e7a
ASoC: wm5102: Constify static struct snd_compress_ops
The snd_compress_ops structs are only stored in the compress_ops field
of a snd_soc_component_driver struct, so make it const to allow the
compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210526231013.46530-3-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:05:12 +01:00
Rikard Falkeborn
44b9f90705
ASoC: cs47125: Constify static struct snd_compress_ops
The snd_compress_ops structs are only stored in the compress_ops field
of a snd_soc_component_driver struct, so make it const to allow the
compiler to put it in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210526231013.46530-2-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:05:11 +01:00
Kuninori Morimoto
c413983eb6
ASoC: rsnd: adjust disabled module
In general Renesas SoC's SSI/SRC are all enabled, but some SoC is not.

	H2	E2

	SRC0	      <=
	SRC1	SRC1
	SRC2	SRC2
	...	...

Renesas Sound driver is assuming that *all* modules are
enabled, and thus it is using *data array* to access each modules.
Because of it, we have been using "status = disabled" at DT,
and using *full size* array but avoiding disabled module.

ex)
	rcar_sound,src {
		src-0 {
=>			status = "disabled";
		};
		src1: src-1 {
			...
		};
		...

But R-Car D3 have many disabled modules (It has SSI3/SSI4, SRC5/SRC6),
and Renesas SoC maintainer don't want above style on DT.

ex)
	rcar_sound,src {
=>		src0: src-0 { status = "disabled"; };
=>		src1: src-1 { status = "disabled"; };
=>		src2: src-2 { status = "disabled"; };
=>		src3: src-3 { status = "disabled"; };
=>		src4: src-4 { status = "disabled"; };
		src5: src-5 {
			...
		};
		src6: src-6 {
			...
		};
	};

	rcar_sound,ssi {
=>		ssi0: ssi-0 { status = "disabled"; };
=>		ssi1: ssi-1 { status = "disabled"; };
=>		ssi2: ssi-2 { status = "disabled"; };
		ssi3: ssi-3 {
			...
		};
		ssi4: ssi-4 {
			...
		};
	};

To adjust it, it needs to care about related for_each_child_of_node()
loop on rsnd driver, and it is used from...

	> grep -l for_each_child_of_node sound/soc/sh/rcar/*
	sound/soc/sh/rcar/core.c
	sound/soc/sh/rcar/ctu.c
	sound/soc/sh/rcar/dma.c
	sound/soc/sh/rcar/dvc.c
	sound/soc/sh/rcar/mix.c
	sound/soc/sh/rcar/src.c
	sound/soc/sh/rcar/ssi.c
	sound/soc/sh/rcar/ssiu.c

This patch adjust to this situation.
By this patch, we can avoid disabled modules on DT

	rcar_sound,src {
		src5: src-5 {
			...
		};
		src6: src-6 {
			...
		};
	};

	rcar_sound,ssi {
		ssi3: ssi-3 {
			...
		};
		ssi4: ssi-4 {
			...
		};
	};

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875yyzk017.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:04:15 +01:00
Kuninori Morimoto
73919dbe48
ASoC: rsnd: tidyup rsnd_parse_connect_xxx()
This patch tidyup rsnd_parse_connect_xxx() style.
Nothing is changed, but is preparation for
next "ASoC: rsnd: adjust disabled module" patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/877djfk01l.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:04:15 +01:00
Kuninori Morimoto
039f2ccc64
ASoC: rsnd: tidyup rsnd_dma_request_channel()
This patch adds "char *name" to rsnd_dma_request_channel().
It is not yet used so far, but is preparation for
next "ASoC: rsnd: adjust disabled module" patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/878s3vk01q.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:04:14 +01:00
Kuninori Morimoto
ec02b5a1d1
ASoC: rsnd: tidyup rsnd_parse_connect_common()
This patch adds "char *name" to rsnd_parse_connect_common().
It is not yet used so far, but is preparation for
next "ASoC: rsnd: adjust disabled module" patch

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87a6obk01v.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:04:13 +01:00
Kai Vehmanen
b640e8a4bd
ASoC: SOF: reset enabled_cores state at suspend
The recent changes to use common code to power up/down DSP cores also
removed the reset of the core state at suspend. It turns out this is
still needed. When the firmware state is reset to
SOF_FW_BOOT_NOT_STARTED, also enabled_cores should be reset, and
existing DSP drivers depend on this.

BugLink: https://github.com/thesofproject/linux/issues/2824
Fixes: 42077f08b3 ("ASoC: SOF: update dsp core power status in common APIs")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20210528144330.2551-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:03:01 +01:00
Nicolas Cavallari
a8437f0538
ASoC: fsl-asoc-card: Set .owner attribute when registering card.
Otherwise, when compiled as module, a WARN_ON is triggered:

WARNING: CPU: 0 PID: 5 at sound/core/init.c:208 snd_card_new+0x310/0x39c [snd]
[...]
CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.10.39 #1
Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)
Workqueue: events deferred_probe_work_func
[<c0111988>] (unwind_backtrace) from [<c010c8ac>] (show_stack+0x10/0x14)
[<c010c8ac>] (show_stack) from [<c092784c>] (dump_stack+0xdc/0x104)
[<c092784c>] (dump_stack) from [<c0129710>] (__warn+0xd8/0x114)
[<c0129710>] (__warn) from [<c0922a48>] (warn_slowpath_fmt+0x5c/0xc4)
[<c0922a48>] (warn_slowpath_fmt) from [<bf0496f8>] (snd_card_new+0x310/0x39c [snd])
[<bf0496f8>] (snd_card_new [snd]) from [<bf1d7df8>] (snd_soc_bind_card+0x334/0x9c4 [snd_soc_core])
[<bf1d7df8>] (snd_soc_bind_card [snd_soc_core]) from [<bf1e9cd8>] (devm_snd_soc_register_card+0x30/0x6c [snd_soc_core])
[<bf1e9cd8>] (devm_snd_soc_register_card [snd_soc_core]) from [<bf22d964>] (fsl_asoc_card_probe+0x550/0xcc8 [snd_soc_fsl_asoc_card])
[<bf22d964>] (fsl_asoc_card_probe [snd_soc_fsl_asoc_card]) from [<c060c930>] (platform_drv_probe+0x48/0x98)
[...]

Signed-off-by: Nicolas Cavallari <nicolas.cavallari@green-communications.fr>
Acked-by: Shengjiu Wang <shengjiu.wang@gmail.com>
Link: https://lore.kernel.org/r/20210527163409.22049-1-nicolas.cavallari@green-communications.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:03:00 +01:00
Colin Ian King
ce1f25718b
ASoC: topology: Fix spelling mistake "vesion" -> "version"
There are spelling mistakes in comments. Fix them.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20210601103506.9477-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-06-01 14:02:59 +01:00
Chris Morgan
0d6a04da9b ASoC: Add Rockchip rk817 audio CODEC support
Add support for the Rockchip rk817 audio codec integrated into the
rk817 PMIC. This is based on the sources provided by Rockchip from
their BSP kernel.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Tested-by: Maciej Matuszczyk <maccraft123mc@gmail.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
2021-06-01 13:40:32 +01:00
Greg Kroah-Hartman
910cc95373 Merge 5.13-rc4 into tty-next
We need the tty/serial fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-31 09:44:28 +02:00
Greg Kroah-Hartman
92722bac5f Merge 5.13-rc4 into driver-core-next
We need the driver core fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-31 09:10:03 +02:00
Linus Torvalds
fc683f967a sound fixes for 5.12-rc4
A slightly high volume at this time due to pending ASoC fixes.
 While there are a few generic simple-card fixes for regressions,
 most of the changes are device-specific fixes: ASoC Intel SOF, codec
 clocks, other codec / platform fixes as well as usual HD-audio and
 USB-audio.
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAmCvcpIOHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE8tGxAArLWNZYYN+iWlj/Ag1uIryLYAWi7/rXM3P6hF
 2fyvjHq405I80V47EsfQJc4N4WglHuOTatl0U7+OYqgvg1PqwUVgwGUj1zRjXdfS
 JN8waSfsd5F9+7UaLNzwx3FRl/mkm58ATtDfbvOg4qVxRWxBMVOQR/1NY0BwyGkO
 nZHe9BH7GrwucqGnjyy2Uoc1hMkoUZ27rLhqfGDbyRGPoy3k6ovvo+DnHIord9FO
 hyXJpWZyuxGdj9KBSREDRu0Xu2BZVw9t5YOl6o+0Y9AHKlA0vnjASpA/vC1u5tOO
 XG2uEUq2eKJkFj/XOdrEethNQE4rFSt4ClPGnEJFDHtmgG7tC3pqkul9o7vbpC8l
 evclr5VkhYdYCyoV5KXiXvRZRCkzm+s2LkHn8IUU3Hub+od3sZKMpf2E1ODN7RU9
 sCZ1dcHG0cKcecZOMlQ2dyQJNx6/kbhg0MGlPIZFqHX9s9VMw5VFl6BE5urXKbQX
 W8wi0NnCJ/+p3pEijTN0V+NXqmjt4i02/HRut7XZWVDt5CDAkszXCjlaMbWf+9eF
 ayttOFbFQMdKA9GsK7dQsRJVVNp7mQ548E3WrzYhRKvUeB2UDbGaa43cHSTacEmE
 YXmWUkpBFS8SCT52EMPIkk2NnG1XletzH+mc/JieOgvUG+Q/jiNuqth+BXrTu+CT
 CcxfZhA=
 =AIkz
 -----END PGP SIGNATURE-----

Merge tag 'sound-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A slightly high volume at this time due to pending ASoC fixes.

  While there are a few generic simple-card fixes for regressions, most
  of the changes are device-specific fixes: ASoC Intel SOF, codec
  clocks, other codec / platform fixes as well as usual HD-audio and
  USB-audio"

* tag 'sound-5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (37 commits)
  ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook Fury 17 G8
  ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook Fury 15 G8
  ALSA: hda/realtek: fix mute/micmute LEDs and speaker for HP Zbook G8
  ALSA: hda/realtek: fix mute/micmute LEDs for HP 855 G8
  ALSA: hda/realtek: Chain in pop reduction fixup for ThinkStation P340
  ALSA: usb-audio: scarlett2: snd_scarlett_gen2_controls_create() can be static
  ALSA: hda/realtek: the bass speaker can't output sound on Yoga 9i
  ALSA: hda/realtek: Headphone volume is controlled by Front mixer
  ALSA: usb-audio: scarlett2: Improve driver startup messages
  ALSA: usb-audio: scarlett2: Fix device hang with ehci-pci
  ALSA: usb-audio: fix control-request direction
  ASoC: qcom: lpass-cpu: Use optional clk APIs
  ASoC: cs35l33: fix an error code in probe()
  ASoC: SOF: Intel: hda: don't send DAI_CONFIG IPC for older firmware
  ASoC: fsl: fix SND_SOC_IMX_RPMSG dependency
  ASoC: cs42l52: Minor tidy up of error paths
  ASoC: cs35l32: Add missing regmap use_single config
  ASoC: cs35l34: Add missing regmap use_single config
  ASoC: cs42l73: Add missing regmap use_single config
  ASoC: cs53l30: Add missing regmap use_single config
  ...
2021-05-28 08:47:50 -10:00
Zou Wei
47c0d825b9
ASoC: imx-rpmsg: fix platform_no_drv_owner.cocci warnings
./sound/soc/fsl/imx-rpmsg.c:140:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Message-Id: <1622113652-56646-1-git-send-email-zou_wei@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 16:25:19 +01:00
Jack Yu
6308c44ed6
ASoC: rt5659: Fix the lost powers for the HDA header
The power of "LDO2", "MICBIAS1" and "Mic Det Power" were powered off after
the DAPM widgets were added, and these powers were set by the JD settings
"RT5659_JD_HDA_HEADER" in the probe function. In the codec probe function,
these powers were ignored to prevent them controlled by DAPM.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Jack Yu <jack.yu@realtek.com>
Message-Id: <15fced51977b458798ca4eebf03dafb9@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 16:24:58 +01:00
Kuninori Morimoto
0ab000e5e5
ASoC: rsnd: tidyup rsnd_ssiu_busif_err_irq_ctrl()
rsnd_ssiu_busif_err_irq_ctrl() has very similar duplicated code.
This patch merge and tidyup the code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <87sg28lwxw.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:34 +01:00
Kuninori Morimoto
cfb7b8bf1e
ASoC: rsnd: tidyup rsnd_ssiu_busif_err_status_clear()
rsnd_ssiu_busif_err_status_clear() has very similar duplicated code.
This patch merge and tidyup the code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <87tumolwy3.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:33 +01:00
Kuninori Morimoto
83b220cf8e
ASoC: rsnd: implement BUSIF related code in ssiu.c
BUSIF is SSIU feature, but its related code is
implemented at ssi.c today.
This patch moves it to ssiu.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <87v974lwy9.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:32 +01:00
Kuninori Morimoto
b43b8ae87c
ASoC: rsnd: protect mod->status
Renesas Sound uses many modules (SSI/SSIU/SRC/CTU/MIX/DVC/DMA),
and supports complex connections/path.
Thus each modules needs to save its status to correctly control it.
This status is updated when by .trigger, and .hw_params/.hw_free.

Renesas Sound is protecting modules by using lock when .trigger,
but it was not enough to protecting each modules "status" if it was
used from many paths.

1) .hw_params/.hw_free update status
2) another doesn't update status, but overwrites by same value

This patch do
1) protects .hw_params/.hw_free by lock
2) do nothing if no status update

Without this patch, protected mod->status (= .trigger) might be
overwrote by non protected mod->status (= .hw_params / .hw_free),
and in such case, CTU/MIX/DVC/SSIU/SSI which are used from
many paths might get damage.

If above issue happens, Renesas Sound will be hung (= silence)
and never be recoverd.
I could reproduce this issue by continue playing very short sound
with loop very long term (3-4 hours) through 2 inputs (= MIXer).

For updating rsnd_status_update(), this patch removes rsnd_dai_call()
debug message. Because we already have debugfs support, and is not
good match to new code.

Reported-by: Linh Phung T. Y <linh.phung.jy@renesas.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <87wnrklwyh.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:31 +01:00
Kuninori Morimoto
1f9c82b5ab
ASoC: rsnd: add debugfs support
Current rsnd supports #define DEBUG, but it is not helpful
if issue happen after 4-5 hours.
This patch adds debugfs support for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <87y2c0lwyn.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:31 +01:00
Kuninori Morimoto
1788a15201
ASoC: rsnd: incidate irq error message
Current rsnd is using dev_dbg() if irq error happen,
but it makes debug very difficult if some strange things happen.
This patch uses dev_info() for it, and rename the macro name.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <87zgwglwyv.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:30 +01:00
Kuninori Morimoto
9ff07d19fb
ASoC: rsnd: indicate unknown error at rsnd_dai_call()
Current rsnd_dai_call() doesn't indicate error message,
thus it is very difficult to know the issue
when strange things happen.
This patch indicates error for it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <871r9snbji.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:29 +01:00
Kuninori Morimoto
54e81e9446
ASoC: rsnd: check BUIF error everytime
Current ssi.c checks BUSIF when TDM mode, but it should be checked
everytime.
This patch do it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <8735u8nbjr.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:28 +01:00
Kuninori Morimoto
ab62e8a8bc
ASoC: rsnd: attach SSIU when SSI was DMA mode
SSIU is not needed if SSI was PIO mode.
This patch ignores such case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <874keonbkg.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:27 +01:00
Kuninori Morimoto
6da8f00e7a
ASoC: rsnd: ignore runtime NULL case at rsnd_runtime_channel_original_with_params()
runtime might be NULL. Let's ignore such case.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <875yz4nbkt.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:26 +01:00
Kuninori Morimoto
965386c976
ASoC: rsnd: call unregister for null_hw when removed
commit d6956a7dde ("ASoC: rsnd: add null CLOCKIN support")
added null_clk, but it is using local static valuable.
It will be leaked if rsnd driver was removed.
This patch moves it to priv, and call unregister when removing.

Fixes: d6956a7dde ("ASoC: rsnd: add null CLOCKIN support")
Link: https://lore.kernel.org/r/87tumsoe2p.wl-kuninori.morimoto.gx@renesas.com
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Message-Id: <877djknbl5.wl-kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-27 11:15:26 +01:00
YueHaibing
058efb4064
ASoC: cs42l52: use DEVICE_ATTR_WO macro
Use DEVICE_ATTR_WO() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Message-Id: <20210524114239.7960-1-yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-26 12:07:16 +01:00
David Rhodes
4e7f0ea0e2
ASoC: cs35l3x: Use neutral language in amp drivers
Revise variable names and comments in
cs35l35 and cs35l36 amp drivers.

Signed-off-by: David Rhodes <drhodes@opensource.cirrus.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Message-Id: <20210525194439.2232908-1-drhodes@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-26 12:07:16 +01:00
YueHaibing
6405941e68
ASoC: cs43130: Use DEVICE_ATTR_RO macro
Use DEVICE_ATTR_RO() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Message-Id: <20210524114017.18672-1-yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-26 12:07:15 +01:00
YueHaibing
d04260393e
ASoC: wm8962: Use DEVICE_ATTR_WO macro
Use DEVICE_ATTR_WO() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Message-Id: <20210524114753.39544-1-yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-26 12:07:14 +01:00
YueHaibing
3ef6253cd0
ASoC: cs42l56: use DEVICE_ATTR_WO macro
Use DEVICE_ATTR_WO() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Message-Id: <20210524114503.26460-1-yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2021-05-26 12:07:13 +01:00
Wei Yongjun
d5bd87e3a3
ASoC: imx-card: Make some symbols static
The sparse tool complains as follows:

sound/soc/fsl/imx-card.c:121:27: warning:
 symbol 'ak4458_fs_mul' was not declared. Should it be static?
sound/soc/fsl/imx-card.c:138:31: warning:
 symbol 'ak4458_tdm_fs_mul' was not declared. Should it be static?
sound/soc/fsl/imx-card.c:149:27: warning:
 symbol 'ak4497_fs_mul' was not declared. Should it be static?
sound/soc/fsl/imx-card.c:166:27: warning:
 symbol 'ak5558_fs_mul' was not declared. Should it be static?
sound/soc/fsl/imx-card.c:180:31: warning:
 symbol 'ak5558_tdm_fs_mul' was not declared. Should it be static?

Those symbols are not used outside of imx-card.c, so marks
them static.

Fixes: aa736700f4 ("ASoC: imx-card: Add imx-card machine driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Message-Id: <20210524133553.2366502-1-weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2021-05-25 16:45:07 +01:00
YueHaibing
2eadc04d83
ASoC: tlv320aic26: use DEVICE_ATTR_RW macro
Use DEVICE_ATTR_RW() helper instead of plain DEVICE_ATTR(),
which makes the code a bit shorter and easier to read.

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Message-Id: <20210524115131.46288-1-yuehaibing@huawei.com>
Signed-off-by: Mark Brown <broonie@sirena.org.uk>
2021-05-25 16:45:06 +01:00