platform/kernel/linux-starfive.git
2 years agoASoC: max98095: Use modern ASoC DAI format terminology
Mark Brown [Tue, 22 Feb 2022 23:40:18 +0000 (23:40 +0000)]
ASoC: max98095: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the max98095 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: max98088: Use modern ASoC DAI format terminology
Mark Brown [Tue, 22 Feb 2022 23:40:17 +0000 (23:40 +0000)]
ASoC: max98088: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the max98088 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222234026.712070-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: uda134x: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:34:09 +0000 (00:34 +0000)]
ASoC: uda134x: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the uda134x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223003409.1820405-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ml26124: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:16:36 +0000 (00:16 +0000)]
ASoC: ml26124: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the ml26124 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223001636.1321505-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pcm512x: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 01:48:46 +0000 (01:48 +0000)]
ASoC: pcm512x: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the pcm512x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014846.2765382-4-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pcm3168a: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 01:48:45 +0000 (01:48 +0000)]
ASoC: pcm3168a: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the pcm3168a driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014846.2765382-3-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pcm186x: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 01:48:44 +0000 (01:48 +0000)]
ASoC: pcm186x: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the pcm186x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014846.2765382-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pcm1681: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 01:48:43 +0000 (01:48 +0000)]
ASoC: pcm1681: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the pcm1681 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014846.2765382-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pcm3060: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 01:47:31 +0000 (01:47 +0000)]
ASoC: pcm3060: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the pcm3060 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223014731.2765283-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: fsl: Drop unused argument from imx_pcm_dma_init()
Sascha Hauer [Wed, 23 Feb 2022 13:06:25 +0000 (14:06 +0100)]
ASoC: fsl: Drop unused argument from imx_pcm_dma_init()

Since 70d435ba1cd ("ASoC: imx-pcm-dma: simplify pcm_config") the size
argument to imx_pcm_dma_init() is unused, so drop it. Also remove the
now unused defines that the users of imx_pcm_dma_init() used to pass the
size argument

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.kernel.org/r/20220223130625.3430589-1-s.hauer@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8195: Remove unnecessary print function dev_err()
Yang Li [Thu, 24 Feb 2022 01:10:46 +0000 (09:10 +0800)]
ASoC: mediatek: mt8195: Remove unnecessary print function dev_err()

The print function dev_err() is redundant because platform_get_irq()
already prints an error.

Eliminate the follow coccicheck warning:
./sound/soc/mediatek/mt8195/mt8195-afe-pcm.c:3126:2-9: line 3126 is
redundant because platform_get_irq() already prints an error

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://lore.kernel.org/r/20220224011046.76904-1-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: ti: davinci-i2s: Add check for clk_enable()
Jiasheng Jiang [Mon, 28 Feb 2022 03:15:40 +0000 (11:15 +0800)]
ASoC: ti: davinci-i2s: Add check for clk_enable()

As the potential failure of the clk_enable(),
it should be better to check it and return error
if fails.

Fixes: 5f9a50c3e55e ("ASoC: Davinci: McBSP: add device tree support for McBSP")
Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20220228031540.3571959-1-jiasheng@iscas.ac.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mc13783: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:14:16 +0000 (00:14 +0000)]
ASoC: mc13783: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the mc13783 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223001416.1235951-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: isabelle: Use modern ASoC DAI format terminology
Mark Brown [Tue, 22 Feb 2022 22:50:14 +0000 (22:50 +0000)]
ASoC: isabelle: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the isabelle driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222225014.3691208-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dt-bindings: renesas,rz-ssi: Document RZ/V2L SoC
Lad Prabhakar [Sun, 27 Feb 2022 22:56:32 +0000 (22:56 +0000)]
ASoC: dt-bindings: renesas,rz-ssi: Document RZ/V2L SoC

Document RZ/V2L SSI bindings. RZ/V2L SSI is identical to one found
on the RZ/G2L SoC. No driver changes are required as generic compatible
string "renesas,rz-ssi" will be used as a fallback.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Biju Das <biju.das.jz@bp.renesas.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Link: https://lore.kernel.org/r/20220227225633.28829-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: vangogh: fix uninitialized symbol warning in machine driver
Vijendar Mukunda [Fri, 25 Feb 2022 19:30:25 +0000 (01:00 +0530)]
ASoC: amd: vangogh: fix uninitialized symbol warning in machine driver

Fixed below smatch static checker warning.
sound/soc/amd/vangogh/acp5x-mach.c:190 acp5x_cs35l41_hw_params()
error: uninitialized symbol 'ret'.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220225193054.24916-4-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: vg: remove warnings and errors pointed out by checkpatch pl
Vijendar Mukunda [Fri, 25 Feb 2022 19:30:24 +0000 (01:00 +0530)]
ASoC: amd: vg: remove warnings and errors pointed out by checkpatch pl

Fix checkpatch pl errors and warnings in vangogh machine driver.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220225193054.24916-3-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: vg: update DAI link name
Vijendar Mukunda [Fri, 25 Feb 2022 19:30:23 +0000 (01:00 +0530)]
ASoC: amd: vg: update DAI link name

Update DAI link name as "acp5x-8821-play".

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220225193054.24916-2-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: vg: fix for pm resume callback sequence
Vijendar Mukunda [Fri, 25 Feb 2022 19:30:22 +0000 (01:00 +0530)]
ASoC: amd: vg: fix for pm resume callback sequence

The previous condition is used to cross check only the active
stream status for I2S HS instance playback and capture use cases.

Modified logic to invoke sequence for two i2s controller instances.

This also fixes warnings reported by kernel robot:
"warning: variable 'frmt_val' set but not used"
"warning: variable 'reg_val' set but not used"

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20220225193054.24916-1-Vijendar.Mukunda@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: es8328: Use modern ASoC DAI format terminology
Mark Brown [Tue, 22 Feb 2022 22:35:34 +0000 (22:35 +0000)]
ASoC: es8328: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the es8328 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222223534.3212743-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: inno_rk3036: Use modern ASoC DAI format terminology
Mark Brown [Tue, 22 Feb 2022 22:48:16 +0000 (22:48 +0000)]
ASoC: inno_rk3036: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the inno_rk3036 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222224816.3636987-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: es8316: Use modern ASoC DAI format terminology
Mark Brown [Tue, 22 Feb 2022 22:34:53 +0000 (22:34 +0000)]
ASoC: es8316: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the es8316 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222223453.3190333-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wl1273: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:38:10 +0000 (00:38 +0000)]
ASoC: wl1273: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the wl1273 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223003810.1947495-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: es7134: Use modern ASoC DAI format terminology
Mark Brown [Tue, 22 Feb 2022 22:27:15 +0000 (22:27 +0000)]
ASoC: es7134: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the es7134 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222222715.2994339-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: twl4030: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:30:46 +0000 (00:30 +0000)]
ASoC: twl4030: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the twl4030 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20220223003046.1697784-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: uda1334: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:32:07 +0000 (00:32 +0000)]
ASoC: uda1334: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the uda1334 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223003207.1748248-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: uda1380: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:37:07 +0000 (00:37 +0000)]
ASoC: uda1380: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the uda1380 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223003707.1903798-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: si476x: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:17:37 +0000 (00:17 +0000)]
ASoC: si476x: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the si476x driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223001737.1360028-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: sti-sas: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:25:02 +0000 (00:25 +0000)]
ASoC: sti-sas: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the sti-sas driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223002502.1451015-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt
Meng Tang [Sun, 27 Feb 2022 05:09:28 +0000 (13:09 +0800)]
ASoC: amd: pcm-dma: Use platform_get_irq() to get the interrupt

platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypassed the hierarchical setup and messed up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq().

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Link: https://lore.kernel.org/r/20220227050928.32270-1-tangmeng@uniontech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tscs454: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:27:51 +0000 (00:27 +0000)]
ASoC: tscs454: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the tscs454 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223002751.1574345-2-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tscs42xx: Use modern ASoC DAI format terminology
Mark Brown [Wed, 23 Feb 2022 00:27:50 +0000 (00:27 +0000)]
ASoC: tscs42xx: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the tscs42xx driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223002751.1574345-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: lm49453: Use modern ASoC DAI format terminology
Mark Brown [Tue, 22 Feb 2022 22:51:35 +0000 (22:51 +0000)]
ASoC: lm49453: Use modern ASoC DAI format terminology

As part of moving to remove the old style defines for the bus clocks update
the lm49453 driver to use more modern terminology for clocking.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220222225135.3726158-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: add pm runtime support for Qualcomm codecs
Mark Brown [Fri, 25 Feb 2022 17:01:44 +0000 (17:01 +0000)]
ASoC: codecs: add pm runtime support for Qualcomm codecs

Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:

This patchset adds support for runtime pm on tx/rx/wsa/wcd lpass macro,
wsa881x and wcd938x codecs that are wired up on SoundWire bus.  During
pm testing it was also found that soundwire clks enabled by lpass macros
are not enabling all the required clocks correctly, so last 3 patches
corrects them.

Tested this on SM8250 MTP along SoundWire In band Headset Button wakeup
interrupts.

2 years agoASoC: codecs: wcd-mbhc: add runtime pm support
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:18 +0000 (11:17 +0000)]
ASoC: codecs: wcd-mbhc: add runtime pm support

under low power state a SoundWire Wake IRQ could trigger MBHC interrupts
so make sure that codec is not in suspended state when this happens.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-17-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: wcd938x: add simple clk stop support
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:17 +0000 (11:17 +0000)]
ASoC: codecs: wcd938x: add simple clk stop support

mark WCD938x as clock stop capable.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-16-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: tx-macro: add runtime pm support
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:15 +0000 (11:17 +0000)]
ASoC: codecs: tx-macro: add runtime pm support

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-14-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: rx-macro: add runtime pm support
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:14 +0000 (11:17 +0000)]
ASoC: codecs: rx-macro: add runtime pm support

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-13-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: wsa-macro: add runtime pm support
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:13 +0000 (11:17 +0000)]
ASoC: codecs: wsa-macro: add runtime pm support

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-12-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: va-macro: add runtime pm support
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:12 +0000 (11:17 +0000)]
ASoC: codecs: va-macro: add runtime pm support

Add pm runtime support to VA Macro.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-11-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: rx-macro: setup soundwire clks correctly
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:11 +0000 (11:17 +0000)]
ASoC: codecs: rx-macro: setup soundwire clks correctly

For SoundWire Frame sync to be generated correctly we need both MCLK
and MCLKx2 (npl). Without pm runtime enabled these two clocks will remain on,
however after adding pm runtime support its possible that NPl clock could be
turned off even when SoundWire controller is active.

Fix this by enabling mclk and npl clk when SoundWire clks are enabled.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-10-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: tx-macro: setup soundwire clks correctly
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:10 +0000 (11:17 +0000)]
ASoC: codecs: tx-macro: setup soundwire clks correctly

For SoundWire Frame sync to be generated correctly we need both MCLK
and MCLKx2 (npl). Without pm runtime enabled these two clocks will remain on,
however after adding pm runtime support its possible that NPl clock could be
turned off even when SoundWire controller is active.

Fix this by enabling mclk and npl clk when SoundWire clks are enabled.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-9-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: wsa-macro: setup soundwire clks correctly
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:09 +0000 (11:17 +0000)]
ASoC: codecs: wsa-macro: setup soundwire clks correctly

For SoundWire Frame sync to be generated correctly we need both MCLK
and MCLKx2 (npl). Without pm runtime enabled these two clocks will remain on,
however after adding pm runtime support its possible that NPl clock could be
turned off even when SoundWire controller is active.

Fix this by enabling mclk and npl clk when SoundWire clks are enabled.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-8-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: wsa-macro: move to individual clks from bulk
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:08 +0000 (11:17 +0000)]
ASoC: codecs: wsa-macro: move to individual clks from bulk

Using bulk clocks and referencing them individually using array index is
not great for readers.
So move them to individual clocks handling and also remove some unnecessary
error handling in the code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-7-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: tx-macro: move to individual clks from bulk
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:07 +0000 (11:17 +0000)]
ASoC: codecs: tx-macro: move to individual clks from bulk

Using bulk clocks and referencing them individually using array index is
not great for readers.
So move them to individual clocks handling and also remove some unnecessary
error handling in the code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-6-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: rx-macro: move to individual clks from bulk
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:06 +0000 (11:17 +0000)]
ASoC: codecs: rx-macro: move to individual clks from bulk

Using bulk clocks and referencing them individually using array index is
not great for readers.
So move them to individual clocks handling and also remove some unnecessary
error handling in the code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-5-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: tx-macro: move clk provider to managed variants
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:05 +0000 (11:17 +0000)]
ASoC: codecs: tx-macro: move clk provider to managed variants

move clk provider registration to managed api variants, this should help
with some code tidyup.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-4-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: rx-macro: move clk provider to managed variants
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:04 +0000 (11:17 +0000)]
ASoC: codecs: rx-macro: move clk provider to managed variants

move clk provider registration to managed api variants, this should help
with some code tidyup.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codecs: va-macro: move to individual clks from bulk
Srinivas Kandagatla [Thu, 24 Feb 2022 11:17:03 +0000 (11:17 +0000)]
ASoC: codecs: va-macro: move to individual clks from bulk

Using bulk clocks and referencing them individually using array index is
not great for readers.
So move them to individual clocks handling and also remove some unnecessary
error handling in the code.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220224111718.6264-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: lpass-platform: Update warning print to control excess logging
Srinivasa Rao Mandadapu [Fri, 25 Feb 2022 12:42:23 +0000 (18:12 +0530)]
ASoC: qcom: lpass-platform: Update warning print to control excess logging

Update dev_warn to dev_warn_ratelimit to control excess xrun logging
in lpass platform driver.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1645792943-24845-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: acp: check the return value of devm_kzalloc() in acp_legacy_dai_links_create()
Jia-Ju Bai [Fri, 25 Feb 2022 13:16:45 +0000 (05:16 -0800)]
ASoC: acp: check the return value of devm_kzalloc() in acp_legacy_dai_links_create()

The function devm_kzalloc() in acp_legacy_dai_links_create() can fail,
so its return value should be checked.

Fixes: d4c750f2c7d4 ("ASoC: amd: acp: Add generic machine driver support for ACP cards")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20220225131645.27556-1-baijiaju1990@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: rt5663: check the return value of devm_kzalloc() in rt5663_parse_dp()
Jia-Ju Bai [Fri, 25 Feb 2022 13:10:30 +0000 (05:10 -0800)]
ASoC: rt5663: check the return value of devm_kzalloc() in rt5663_parse_dp()

The function devm_kzalloc() in rt5663_parse_dp() can fail, so its return
value should be checked.

Fixes: 457c25efc592 ("ASoC: rt5663: Add the function of impedance sensing")
Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>
Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Link: https://lore.kernel.org/r/20220225131030.27248-1-baijiaju1990@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: sof-priv: Drop duplicate sof_compressed_ops declaration
Peter Ujfalusi [Fri, 25 Feb 2022 12:00:34 +0000 (14:00 +0200)]
ASoC: SOF: sof-priv: Drop duplicate sof_compressed_ops declaration

Other commit added the declaration of the sof_compressed_ops, drop the
instance which added it as Platform specific ops, which the
sof_compressed_ops is not.

76cdd90b27b4e ("ASoC: SOF: pcm: Add compress_ops for SOF platform component driver")

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220225120034.11028-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: Use platform_get_irq_byname() to get the interrupt
Meng Tang [Fri, 25 Feb 2022 11:23:58 +0000 (19:23 +0800)]
ASoC: amd: Use platform_get_irq_byname() to get the interrupt

platform_get_resource_byname(pdev, IORESOURCE_IRQ, ..) relies on static
allocation of IRQ resources in DT core code, this causes an issue
when using hierarchical interrupt domains using "interrupts" property
in the node as this bypasses the hierarchical setup and messes up the
irq chaining.

In preparation for removal of static setup of IRQ resource from DT core
code use platform_get_irq_byname().

Signed-off-by: Meng Tang <tangmeng@uniontech.com>
Link: https://lore.kernel.org/r/20220225112358.19403-1-tangmeng@uniontech.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoAdd support for audio on SC7280 based targets
Mark Brown [Thu, 24 Feb 2022 22:55:41 +0000 (22:55 +0000)]
Add support for audio on SC7280 based targets

Merge series from Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>:

This patch set is to add support for Audio over wcd codec,
digital mics, through digital codecs and without ADSP.

Changes Since V15:
    -- Bisect patches to avoid build failure in other architectures.
    -- Remove redundant variables lpass variant structure.
Changes Since V14:
    -- Split common wrapper function to separate wrapper for each handle in platform driver.
    -- Update cdc dma buffer handling with memremap with ioremap.
    -- Remove redundant error prints.
    -- Update irq flag.
Changes Since V13:
    -- Change bulk cdc clock voting to individual clock voting.
    -- Remove redundant code, conditional check and prints.
    -- Fix typo errors.
Changes Since V12:
    -- Fix arguments type mismatch.
Changes Since V11:
    -- Fix kernel robot issue on arguments type mismatch.
Changes Since V10:
    -- Split bulk clock voting to individual clock voting as per use case in cdc-dma driver.
    -- Add missing codec dma clocks.
    -- Update rxtx lpm buffer size.
Changes Since V9:
    -- Change individual clock voting to bulk clock voting of lpass-sc7280 platform driver.
    -- Remove redundant clocks in lpass variant structure.
    -- Add mclk for MI2S based headset path.
    -- Remove unused lpass variant structure members in lpass header.
Changes Since V8:
    -- Fix errors in sc7280 lpass cpu dt-bindings.
    -- Move to quicinc domain email id's.
Changes Since V7:
    -- Fix indentation errors.
    -- Bisect patches to avoid interdependency.
Changes Since V6:
    -- Split cdc dma regmap config macros.
    -- Add write dma reg fields for i2s path.
    -- Add helper function to distinguish rxtx and va dma ports.
    -- Optimizing clock and reg name in cpu dt-bindings.
    -- Update buffer management for cdc dma path.
    -- Remove Kconfig fields of machine driver.
Changes Since V5:
    -- Include MI2S primary node to snd_soc_dai_driver in lpass-sc7280 platform driver.
    -- Move dependency patch list to corresponding patch.
    -- Add support for missing cdc-dma ports.
    -- Change if/else conditional statements to switch cases.
    -- Add missing error handlings.
    -- Typo errors fix.
Changes Since V4:
    -- Remove unused variable in lpass-sc7280 platform driver.
Changes Since V3:
    -- Remove redundant power domain controls. As power domains can be configured from dtsi.
Changes Since V2:
    -- Split lpass sc7280 cpu driver patch and create regmap config patch.
    -- Create patches based on latest kernel tip.
    -- Add helper function to get dma control and lpaif handle.
    -- Remove unused variables.
Changes Since V1:
    -- Typo errors fix
    -- CPU driver readable/writable apis optimization.
    -- Add Missing config patch
    -- Add Common api for repeated dmactl initialization.
Srinivasa Rao Mandadapu (9):
  ASoC: qcom: Move lpass_pcm_data structure to lpass header
  ASoC: qcom: lpass: Add dma fields for codec dma lpass interface
  ASoC: qcom: Add helper function to get dma control and lpaif handle
  ASoC: qcom: Add register definition for codec rddma and wrdma
  ASoC: qcom: Add regmap config support for codec dma driver
  ASoC: qcom: Add support for codec dma driver
  ASoC: qcom: Add lpass CPU driver for codec dma control
  ASoC: dt-bindings: Add SC7280 lpass cpu bindings
  ASoC: qcom: lpass-sc7280: Add platform driver for lpass audio

 .../devicetree/bindings/sound/qcom,lpass-cpu.yaml  |  75 ++-
 sound/soc/qcom/Kconfig                             |  11 +
 sound/soc/qcom/Makefile                            |   4 +
 sound/soc/qcom/lpass-cdc-dma.c                     | 301 ++++++++++
 sound/soc/qcom/lpass-cpu.c                         | 253 ++++++++-
 sound/soc/qcom/lpass-lpaif-reg.h                   | 127 ++++-
 sound/soc/qcom/lpass-platform.c                    | 628 ++++++++++++++++++---
 sound/soc/qcom/lpass-sc7280.c                      | 438 ++++++++++++++
 sound/soc/qcom/lpass.h                             | 141 +++++
 9 files changed, 1890 insertions(+), 88 deletions(-)
 create mode 100644 sound/soc/qcom/lpass-cdc-dma.c
 create mode 100644 sound/soc/qcom/lpass-sc7280.c

--
2.7.4

2 years agoASoC: SOF: Declare sof_compress_ops in sof-priv.h
Peter Ujfalusi [Thu, 24 Feb 2022 17:23:24 +0000 (19:23 +0200)]
ASoC: SOF: Declare sof_compress_ops in sof-priv.h

Fix the following sparse error:
sound/soc/sof/compress.c:310:25: error: symbol 'sof_compressed_ops' was not declared. Should it be static?

Do not enable set the pd->compress_ops yet as it is not a valid assumption
that real compress support really works when CONFIG_SND_SOC_SOF_COMPRESS
is set as the HDA Probes support also selects it, but compressed audio
is not supported (yet) on Intel platforms.

Fixes: 6324cf901e14c ("ASoC: SOF: compr: Add compress ops implementation")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20220224172324.17976-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: lpass-sc7280: Add platform driver for lpass audio
Srinivasa Rao Mandadapu [Thu, 24 Feb 2022 15:33:48 +0000 (21:03 +0530)]
ASoC: qcom: lpass-sc7280: Add platform driver for lpass audio

Add platform driver for configuring sc7280 lpass core I2S and
DMA configuration to support playback & capture to external codecs
connected over secondary MI2S interface and soundwire interface.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-10-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: dt-bindings: Add SC7280 lpass cpu bindings
Srinivasa Rao Mandadapu [Thu, 24 Feb 2022 15:33:47 +0000 (21:03 +0530)]
ASoC: dt-bindings: Add SC7280 lpass cpu bindings

Add bindings for sc7280 lpass cpu driver which supports
audio over i2s based speaker, soundwire based headset, msm dmics
and HDMI Port.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1645716828-15305-9-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: Add lpass CPU driver for codec dma control
Srinivasa Rao Mandadapu [Thu, 24 Feb 2022 15:33:46 +0000 (21:03 +0530)]
ASoC: qcom: Add lpass CPU driver for codec dma control

Add lpass cpu driver to support audio over codec dma for
ADSP bypass usecase.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-8-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: Add support for codec dma driver
Srinivasa Rao Mandadapu [Thu, 24 Feb 2022 15:33:45 +0000 (21:03 +0530)]
ASoC: qcom: Add support for codec dma driver

Upadate lpass cpu and platform driver to support audio over codec dma
in ADSP bypass use case.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/1645716828-15305-7-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: Add regmap config support for codec dma driver
Srinivasa Rao Mandadapu [Thu, 24 Feb 2022 15:33:44 +0000 (21:03 +0530)]
ASoC: qcom: Add regmap config support for codec dma driver

Update regmap configuration for supporting headset playback and
capture and DMIC capture using codec dma interface

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-6-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: Add register definition for codec rddma and wrdma
Srinivasa Rao Mandadapu [Thu, 24 Feb 2022 15:33:43 +0000 (21:03 +0530)]
ASoC: qcom: Add register definition for codec rddma and wrdma

Add register definitions for codec read dma and write dma
lpass interface.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-5-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: Add helper function to get dma control and lpaif handle
Srinivasa Rao Mandadapu [Thu, 24 Feb 2022 15:33:42 +0000 (21:03 +0530)]
ASoC: qcom: Add helper function to get dma control and lpaif handle

Add support function to get dma control and lpaif handle to avoid
repeated code in platform driver

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-4-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: lpass: Add dma fields for codec dma lpass interface
Srinivasa Rao Mandadapu [Thu, 24 Feb 2022 15:33:41 +0000 (21:03 +0530)]
ASoC: qcom: lpass: Add dma fields for codec dma lpass interface

Add lpass interface memebers to support audio path over codec dma.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-3-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: qcom: Move lpass_pcm_data structure to lpass header
Srinivasa Rao Mandadapu [Thu, 24 Feb 2022 15:33:40 +0000 (21:03 +0530)]
ASoC: qcom: Move lpass_pcm_data structure to lpass header

Declare lpass_pcm_data structure in lpass header file instead of
platform source file to make common use of it by other drivers

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/1645716828-15305-2-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: acp: Add DMIC machine driver ops
Ajit Kumar Pandey [Tue, 22 Feb 2022 12:42:13 +0000 (18:12 +0530)]
ASoC: amd: acp: Add DMIC machine driver ops

Add dmic ops and startup callback to add snd_pcm_hw_constraint for
pdm related device node.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20220222124213.721224-4-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: acp-legacy: Add legacy card support for new machines
Ajit Kumar Pandey [Tue, 22 Feb 2022 12:42:12 +0000 (18:12 +0530)]
ASoC: amd: acp-legacy: Add legacy card support for new machines

We have newer renoir platforms with different codecs combinations.
Add struct in legacy machine driver and add to list of supported
renoir machine to support sound card registration on platform with
rt5682s as primary headset codec and max98360 and rt1019 as speaker
amp codec.

This also fixes error reported by kernel robot:
"error: 'EN_SPKR_GPIO_DW' undeclared here"

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20220222124213.721224-3-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: amd: acp: Change card name for Guybrush Machine
Ajit Kumar Pandey [Tue, 22 Feb 2022 12:42:11 +0000 (18:12 +0530)]
ASoC: amd: acp: Change card name for Guybrush Machine

Change sound card name for guybrush machine with rt5682 as primary
codec and rt1019 amp to align with names given in UCM config.

Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20220222124213.721224-2-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: pcm: Add compress_ops for SOF platform component driver
Daniel Baluta [Wed, 23 Feb 2022 15:38:49 +0000 (17:38 +0200)]
ASoC: SOF: pcm: Add compress_ops for SOF platform component driver

Now that sof_compressed_ops initial implementation was merged
we can enable it in SOF platform component driver.

This partially reverts commit
8a720724589e ("ASoC: SOF: pcm: Remove non existent CONFIG_SND_SOC_SOF_COMPRESS reference")

Reported-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220223153849.84471-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: sc7280: Really depends on SOUNDWIRE
Mark Brown [Wed, 23 Feb 2022 01:19:12 +0000 (01:19 +0000)]
ASoC: sc7280: Really depends on SOUNDWIRE

The sc7280 driver really does depend on SOUNDWIRE since it calls various
sdw_ functions (eg, sdw_enable_stream(), sdw_prepare_stream()) which do
not have stubs when that is disabled so we can't build with COMPILE_TEST.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220223011913.2753938-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: mediatek: mt8195: enable apll tuner
Trevor Wu [Mon, 21 Feb 2022 05:57:16 +0000 (13:57 +0800)]
ASoC: mediatek: mt8195: enable apll tuner

Normally, the clock source of audio module is either 26M or APLL1/APLL2,
but APLL1/APLL2 are not the multiple of 26M.

In the patch, APLL1 and APLL2 tuners are enabled to handle sample rate
mismatch when the data path crosses two different clock domains.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220221055716.18580-1-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Intel: Add topology overwrite for Felwinter
Ajye Huang [Fri, 18 Feb 2022 08:27:41 +0000 (16:27 +0800)]
ASoC: SOF: Intel: Add topology overwrite for Felwinter

The Felwinter uses four max98360a amplifiers on corresponding CH0~CH3.
There are four amps on the board connecting to headphone to SSP0 port,
amp to SSP1,and the DAI format would be DSP_A,8-slots, 32 bit slot-width.

CH0: L(Woofer), CH1:R(Woofer), CH2:L(Tweeter), CH3:R(Tweeter)

Signed-off-by: Ajye Huang <ajye_huang@compal.corp-partner.google.com>
Signed-off-by: Brent Lu <brent.lu@intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Curtis Malainey <cujomalainey@chromium.org>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220218082741.1707209-1-brent.lu@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: sof_es8336: add quirk for Huawei D15 2021
Mauro Carvalho Chehab [Fri, 24 Dec 2021 13:09:50 +0000 (14:09 +0100)]
ASoC: Intel: sof_es8336: add quirk for Huawei D15 2021

Huawei D15 uses SSP_CODEC(0).

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Link: https://lore.kernel.org/r/d560a1c76edb633c37acf04a9a82518b6233a719.1640351150.git.mchehab@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Replace zero-length array with flexible-array member
Stephen Kitt [Thu, 17 Feb 2022 13:27:55 +0000 (14:27 +0100)]
ASoC: SOF: Replace zero-length array with flexible-array member

There is a regular need in the kernel to provide a way to declare having
a dynamically sized set of trailing elements in a structure. Kernel code
should always use "flexible array members"[1] for these cases. The older
style of one-element or zero-length arrays should no longer be used[2].

This helps with the ongoing efforts to globally enable -Warray-bounds
and get us closer to being able to tighten the FORTIFY_SOURCE routines
on memcpy().

[1] https://en.wikipedia.org/wiki/Flexible_array_member
[2] https://www.kernel.org/doc/html/latest/process/deprecated.html#zero-length-and-one-element-arrays

Link: https://github.com/KSPP/linux/issues/78
Link: https://github.com/KSPP/linux/issues/180
Suggested-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Signed-off-by: Stephen Kitt <steve@sk2.org>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20220217132755.1786130-1-steve@sk2.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: core: unregister clients and machine drivers in .shutdown
Pierre-Louis Bossart [Wed, 16 Feb 2022 13:32:41 +0000 (15:32 +0200)]
ASoC: SOF: core: unregister clients and machine drivers in .shutdown

On a platform shutdown, the expectation for most drivers is that
userspace tasks will release all resources. When those sequences do
not complete, it can be the case that PCM devices exposed by ALSA
cards are used *after* the DSP shutdown completes, leading to a
platform hang.

When the clients and machine drivers provide an _unregister callback,
let's invoke it in the shutdown sequence.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20220216133241.3990281-1-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codec: wcd938x: Update CTIA/OMTP switch control
Srinivasa Rao Mandadapu [Wed, 16 Feb 2022 13:24:52 +0000 (18:54 +0530)]
ASoC: codec: wcd938x: Update CTIA/OMTP switch control

Convert gpio api's to gpio descriptor api's in CTIA/OMTP switch control.
Remove redundant NULL checks in swap_gnd_mic function.

Fixes: 013cc2aea0f6 ("ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset")

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1645017892-12522-1-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: soc-core: skip zero num_dai component in searching dai name
Shengjiu Wang [Thu, 10 Feb 2022 11:19:12 +0000 (19:19 +0800)]
ASoC: soc-core: skip zero num_dai component in searching dai name

In the case like dmaengine which's not a dai but as a component, the
num_dai is zero, dmaengine component has the same component_of_node
as cpu dai, when cpu dai component is not ready, but dmaengine component
is ready, try to get cpu dai name, the snd_soc_get_dai_name() return
-EINVAL, not -EPROBE_DEFER, that cause below error:

asoc-simple-card <card name>: parse error -22
asoc-simple-card: probe of <card name> failed with error -22

The sound card failed to probe.

So this patch fixes the issue above by skipping the zero num_dai
component in searching dai name.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://lore.kernel.org/r/1644491952-7457-1-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tegra20: spdif: make const array rates static
Colin Ian King [Mon, 14 Feb 2022 21:32:23 +0000 (21:32 +0000)]
ASoC: tegra20: spdif: make const array rates static

Don't populate the read-only const array rates on the stack but
instead it static. Also makes the object code a little smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220214213223.65780-1-colin.i.king@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Makefile: Fix randconfig sof-client build when SND_SOC_SOF=y
Peter Ujfalusi [Mon, 14 Feb 2022 07:13:30 +0000 (09:13 +0200)]
ASoC: SOF: Makefile: Fix randconfig sof-client build when SND_SOC_SOF=y

Intel's kernel test robot found the following randconfig combination:
SND_SOC_SOF=y
SND_SOC_SOF_CLIENT=m

In this the sof-client object is not going to be built into the snd-sof.o
and we will have undefined references to the sof-client functions.

Fixes: 6955d9512d0e ("ASoC: SOF: Introduce IPC SOF client support")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Peter Ujfalusi <Peter Ujfalusi <peter.ujfalusi@linux.intel.com>>
Link: https://lore.kernel.org/r/20220214071330.22151-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Add Euro Headset support for wcd938x codec
Mark Brown [Mon, 14 Feb 2022 16:26:29 +0000 (16:26 +0000)]
ASoC: Add Euro Headset support for wcd938x codec

Merge series from Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>:

This patch set is to add switch control for selecting CTIA/OMTP Headset

2 years agoASoC: pcm3168a: code cleanup
Mark Brown [Mon, 14 Feb 2022 14:54:00 +0000 (14:54 +0000)]
ASoC: pcm3168a: code cleanup

Merge series from Nikita Yushchenko <nikita.yoush@cogentembedded.com>:

These patches clean up pcm3168a driver, without introducing any
functional change.

2 years agoASoC: dt-bindings: wcd938x: Add gpio property for selecting CTIA/OMTP headset
Srinivasa Rao Mandadapu [Sat, 12 Feb 2022 12:24:32 +0000 (17:54 +0530)]
ASoC: dt-bindings: wcd938x: Add gpio property for selecting CTIA/OMTP headset

Add gpio property used for selecting CTIA/OMTP headset connected
to wcd codec.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1644668672-29790-3-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset
Srinivasa Rao Mandadapu [Sat, 12 Feb 2022 12:24:31 +0000 (17:54 +0530)]
ASoC: codec: wcd938x: Add switch control for selecting CTIA/OMTP Headset

Add switch control for selecting CTIA or OMTP Headset by swapping
gnd and mic with the help of GPIO.

Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
Co-developed-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Signed-off-by: Venkata Prasad Potturu <quic_potturu@quicinc.com>
Link: https://lore.kernel.org/r/1644668672-29790-2-git-send-email-quic_srivasam@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: codec: wm8960: complete discharge on BIAS OFF->STANDBY
Viorel Suman [Tue, 8 Feb 2022 12:17:27 +0000 (14:17 +0200)]
ASoC: codec: wm8960: complete discharge on BIAS OFF->STANDBY

On BIAS STANDBY->OFF transition the current implementation sleeps
600ms on suspend in order to discharge the chip. The suspend is
propagated from "snd_soc_suspend" call for all audio cards in a
serial fashion, thus in case of boards like i.MX8DXL EVK which has
3 distinct WM8960 codecs the total cumulated sleep on suspend is 1.8
seconds.

On the other hand the BIAS OFF->STANDBY transition happens
asynchronously with regard to "snd_soc_resume" - the call is
propagated from "soc_resume_deferred" which is just scheduled
from "snd_soc_resume", each card having its own work scheduled to
execute "soc_resume_deferred" call.

The patch performs discharge completion on BIAS OFF->STANDBY transition
so that the cumulated effect on suspend described above is avoided
and discharge is completed in paralel in case of multiple WM8960
codecs on the board.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
Link: https://lore.kernel.org/r/20220208121727.4461-1-viorel.suman@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm8731: Delete empty remove() function
Mark Brown [Fri, 11 Feb 2022 16:58:11 +0000 (16:58 +0000)]
ASoC: wm8731: Delete empty remove() function

The I2C remove function is empty for the wm8731 driver, it can just be
deleted.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220211165811.1176005-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pcm3168a: remove numeric PCM3168A_NUM_SUPPLIES
Nikita Yushchenko [Tue, 8 Feb 2022 08:42:20 +0000 (11:42 +0300)]
ASoC: pcm3168a: remove numeric PCM3168A_NUM_SUPPLIES

Just use ARRAY_SIZE() instead.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220208084220.1289836-5-nikita.yoush@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pcm3168a: refactor format handling
Nikita Yushchenko [Tue, 8 Feb 2022 08:42:19 +0000 (11:42 +0300)]
ASoC: pcm3168a: refactor format handling

- drop incomplete (not tdm-aware) calculation/setting of hardware
  fmt value from pcm3168a_set_dai_fmt(); instead, store original
  SND_SOC_DAIFMT* setting in io_params

- in pcm3168a_hw_params(), do all checks in terms of SND_SOC_DAIFMT*,
  and convert that to register bitfield values only to write to
  hardware

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220208084220.1289836-4-nikita.yoush@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pcm3168a: refactor hw_params routine
Nikita Yushchenko [Tue, 8 Feb 2022 08:42:18 +0000 (11:42 +0300)]
ASoC: pcm3168a: refactor hw_params routine

- group together code lines that calculate value for msad/msda field

- rename variables to better match their meaning:
    val -> ms,
    max_ratio -> num_scki_ratios

- update variable types to match exactly parameters or return types
  of the calls where those variables are used

- write two fields of the same register in a single regmap call

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220208084220.1289836-3-nikita.yoush@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: pcm3168a: cleanup unintuitive mask usage
Nikita Yushchenko [Tue, 8 Feb 2022 08:42:17 +0000 (11:42 +0300)]
ASoC: pcm3168a: cleanup unintuitive mask usage

When checking if the requested parameters are supported, the driver uses
PCM3168A_FMT_DSP_MASK to check for PCM3168A_FMT_DSP_* values.

However, formally not only PCM3168A_FMT_DSP_* values match that
condition, PCM3168A_FMT_I2S_TDM and PCM3168A_FMT_LEFT_J_TDM also do.

The check still gives correct result because those extra values can't
be in 'fmt' at the check location. Still, to make the code less cryptic,
better to compare 'fmt' with PCM3168A_FMT_DSP_* values explicitly.

Signed-off-by: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Link: https://lore.kernel.org/r/20220208084220.1289836-2-nikita.yoush@cogentembedded.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: compr: Mark snd_compress_ops static
Daniel Baluta [Fri, 11 Feb 2022 08:26:31 +0000 (10:26 +0200)]
ASoC: SOF: compr: Mark snd_compress_ops static

Functions won't be directly used outside of compress.c file
so mark them as static.

This will also fix warnings reported by kernel test robot:

>> sound/soc/sof/compress.c:91:5: warning: no previous prototype for
function 'sof_compr_open' [-Wmissing-prototypes]
   int sof_compr_open(struct snd_soc_component *component,
       ^
   sound/soc/sof/compress.c:91:1: note: declare 'static' if the function
is not intended to be used outside of this translation unit
   int sof_compr_open(struct snd_soc_component *component,

Fixes: 6324cf901e14 ("SoC: SOF: compr: Add compress ops implementation")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20220211082631.179735-1-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: Intel: bytcr_wm5102: use GFP_KERNEL
Julia Lawall [Thu, 10 Feb 2022 20:42:17 +0000 (21:42 +0100)]
ASoC: Intel: bytcr_wm5102: use GFP_KERNEL

Platform_driver probe functions aren't called with locks held
and thus don't need GFP_ATOMIC. Use GFP_KERNEL instead.

Problem found with Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20220210204223.104181-4-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Add trace caps to speaker protection FW
Vlad Karpovich [Thu, 10 Feb 2022 17:20:53 +0000 (17:20 +0000)]
ASoC: wm_adsp: Add trace caps to speaker protection FW

Enable access to the speaker protection firmware debug stream
using compress stream API and lower minimum fragment size to
16 words.

Signed-off-by: Vlad Karpovich <Vlad.Karpovich@cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220210172053.22782-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: wm_adsp: Make compressed buffers optional
Charles Keepax [Thu, 10 Feb 2022 17:20:52 +0000 (17:20 +0000)]
ASoC: wm_adsp: Make compressed buffers optional

Newer firmwares will support compressed buffers that may or may not
exist, for example debugging streams. Update the driver to make a
compressed stream optional. A warning will still be generated at DSP
boot time and opening the stream will fail if the compressed buffer in
question does not exist, however the DSP can still be booted and other
features used.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220210172053.22782-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: tlv320adc3xxx: Add IIR filter configuration
Ricard Wanderlof [Thu, 10 Feb 2022 17:07:36 +0000 (18:07 +0100)]
ASoC: tlv320adc3xxx: Add IIR filter configuration

The TLV320ADC3001/3101 have an internal DSP, which can either be
used in various preset configurations (called "Processing Blocks"
in the data sheet), or as a freely programmable (using the
"PurePath Studio" graphical programming tool from TI) but rather
small DSP ("miniDSP").

Using the default configuration (PRB_R1) it's possible to set up
filtering using a first-order IIR, which can be useful for adding
a digital high pass filter to the signal chain, for instance.

This patch adds support for configuring the IIR filter coefficients.
The filter itself is always enabled; the default coefficients
implement a pass-through function.

Signed-off-by: Ricard Wanderlof <ricardw@axis.com>
Link: https://lore.kernel.org/r/alpine.DEB.2.21.2202101805360.7068@lnxricardw1.se.axis.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: IPC client infrastructure
Mark Brown [Thu, 10 Feb 2022 18:16:07 +0000 (18:16 +0000)]
ASoC: SOF: IPC client infrastructure

Merge series from Peter Ujfalusi <peter.ujfalusi@linux.intel.com>:

The Linux SOF implementation is historically monolithic in a sense that all
features accessible in the firmware can be used via the snd_sof_dev struct in
one way or another.

Support for features can not be added or removed runtime and with the current
way of things it is hard if not impossible to implement support for dynamic
feature support when based on the firmware manifest we can easily enable/access
independent modules with the SOF.

In order to be able to support such modularity this series introduces a small
framework within SOF for client support using the Auxiliary bus.

Client drivers can be removed runtime and later re-loaded if needed without
affecting the core's behaviour, but it is the core's and the platform's duty
to create the Auxiliary devices usable in the platform and via the firmware.

There is still a need for SOF manifest update to convey information about
features to really make the full dynamic client device creation.

The series will introduce the core SOF client support and converts the generic
ipc flood test, ipc message injector and the probes (Intel HDA only) to a client
driver.

2 years agoASoC: dt-bindings: samsung: convert to dtschema
Mark Brown [Thu, 10 Feb 2022 16:52:07 +0000 (16:52 +0000)]
ASoC: dt-bindings: samsung: convert to dtschema

Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>:

Convert Samsung DT bindings to dtschema

2 years agoMachine driver to support LPASS SC7280 sound card registration
Mark Brown [Thu, 10 Feb 2022 16:52:05 +0000 (16:52 +0000)]
Machine driver to support LPASS SC7280 sound card registration

Merge series from Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>:

This patch set is to add support for SC7280 sound card registration and
to add dt-bindings documentation file.

2 years agoASoC: SOF: Convert the generic probe support to SOF client
Peter Ujfalusi [Thu, 10 Feb 2022 15:05:25 +0000 (17:05 +0200)]
ASoC: SOF: Convert the generic probe support to SOF client

Add a new client driver for probes support and move
all the probes-related code from the core to the
client driver.

The probes client driver registers a component driver
with one CPU DAI driver for extraction and creates a
new sound card with one DUMMY DAI link with a dummy codec
that will be used for extracting audio data from specific
points in the audio pipeline.

The probes debugfs ops are based on the initial
implementation by Cezary Rojewski and have been moved
out of the SOF core into the client driver making it
easier to maintain. This change will make it easier
for the probes functionality to be added for all platforms
without having the need to modify the existing(15+) machine
drivers.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-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/20220210150525.30756-10-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Convert the generic IPC message injector into SOF client
Peter Ujfalusi [Thu, 10 Feb 2022 15:05:24 +0000 (17:05 +0200)]
ASoC: SOF: Convert the generic IPC message injector into SOF client

Move the IPC message injection code out from the debug file as separate
SOF client driver.

Based on the kernel configuration, the device registration for the new IPC
message injector is going to happen in the core.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-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/20220210150525.30756-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 years agoASoC: SOF: Convert the generic IPC flood test into SOF client
Ranjani Sridharan [Thu, 10 Feb 2022 15:05:23 +0000 (17:05 +0200)]
ASoC: SOF: Convert the generic IPC flood test into SOF client

Move the IPC flood test code out from the debug file as separate SOF client
driver.

Based on the kernel configuration, the device registration for the new IPC
flood test is going to happen in the core.
With the separate client driver it is going to be possible to run multiple
flood tests in parallel to increase the stress, the new Kconfig option can
be used to select this (defaults to 1).
In order to preserve backward compatibility with existing SW/scripts, the
first IPC flood test's debugfs files have been linked to the old files.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Co-developed-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-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/20220210150525.30756-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>