]> www.infradead.org Git - users/dwmw2/linux.git/log
users/dwmw2/linux.git
5 months agoASoC: dt-bindings: fsl-esai: allow fsl,imx8qm-esai fallback to fsl,imx6ull-esai
Frank Li [Mon, 28 Oct 2024 19:49:31 +0000 (15:49 -0400)]
ASoC: dt-bindings: fsl-esai: allow fsl,imx8qm-esai fallback to fsl,imx6ull-esai

The ESAI of i.MX8QM is the same as i.MX6ULL. So allow fsl,imx8qm-esai
fallback to fsl,imx6ull-esai.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20241028-esai_fix-v1-1-3c1432a5613c@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: qcom: sc8280xp Add SM8750 sound card
Krzysztof Kozlowski [Fri, 1 Nov 2024 16:51:59 +0000 (17:51 +0100)]
ASoC: qcom: sc8280xp Add SM8750 sound card

Add OF device ID entry for SM8750 sound card with its own model name,
used to load proper Audioreach topology file.  The sound card is
compatible with SM8450 and newer family.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241101165159.370619-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: dt-bindings: qcom,sm8250: Add SM8750 sound card
Krzysztof Kozlowski [Fri, 1 Nov 2024 16:51:58 +0000 (17:51 +0100)]
ASoC: dt-bindings: qcom,sm8250: Add SM8750 sound card

Add bindings for SM8750 sound card, compatible with older SM8450
variant.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241101165159.370619-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: dt-bindings: sprd,sc9860-mcdt: convert to YAML
Stanislav Jakubek [Wed, 30 Oct 2024 17:49:22 +0000 (18:49 +0100)]
ASoC: dt-bindings: sprd,sc9860-mcdt: convert to YAML

Convert the Spreadtrum Multi-Channel Data Transfer controller bindings
to DT schema. Adjust filename to match compatible.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/140ee384c1c351ffa3abefa8dd3246d1625dda8d.1730310275.git.stano.jakubek@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: dt-bindings: sprd,pcm-platform: convert to YAML
Stanislav Jakubek [Wed, 30 Oct 2024 17:48:38 +0000 (18:48 +0100)]
ASoC: dt-bindings: sprd,pcm-platform: convert to YAML

Convert the Spreadtrum DMA platform bindings to DT schema.
Adjust filename to match compatible.

Signed-off-by: Stanislav Jakubek <stano.jakubek@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/9fc646b70a73e7a6c513771d69b0edcd140f09d7.1730310275.git.stano.jakubek@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: fsl_mqs: Support accessing registers by scmi interface
Shengjiu Wang [Fri, 25 Oct 2024 06:29:35 +0000 (14:29 +0800)]
ASoC: fsl_mqs: Support accessing registers by scmi interface

On i.MX95, the MQS module in Always-on (AON) domain only can
be accessed by System Controller Management Interface (SCMI)
MISC Protocol. So define a specific regmap_config for the case.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/20241025062935.1071408-1-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: bcm63xx-pcm-whistler: fix uninit-value in i2s_dma_isr
Suraj Sonawane [Sat, 2 Nov 2024 12:36:30 +0000 (18:06 +0530)]
ASoC: bcm63xx-pcm-whistler: fix uninit-value in i2s_dma_isr

Fix an issue detected by the Smatch tool:

sound/soc/bcm/bcm63xx-pcm-whistler.c:264 i2s_dma_isr()
error: uninitialized symbol 'val_1'.
sound/soc/bcm/bcm63xx-pcm-whistler.c:264 i2s_dma_isr()
error: uninitialized symbol 'val_2'.

These errors were triggered because the variables 'val_1' and 'val_2'
could remain uninitialized if 'offlevel' is zero, meaning the loop
that assigns values to them does not execute. In this case,
'dma_addr_next' would use uninitialized data, potentially leading
to undefined behavior.

To resolve this, a conditional update for 'dma_addr_next' is added,
ensuring it is assigned only when 'val_1' and 'val_2' are read.
A new boolean variable 'val_read' flags when the values have been
retrieved, setting 'dma_addr_next' only if valid data is available.

This solution prevents the use of uninitialized data, maintaining
defined behavior for 'dma_addr_next' in all cases, and aligns with
expected usage of I2S RX descriptor data.

Signed-off-by: Suraj Sonawane <surajsonawane0215@gmail.com>
Link: https://patch.msgid.link/20241102123630.25446-1-surajsonawane0215@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: codecs: Fix atomicity violation in snd_soc_component_get_drvdata()
Qiu-ji Chen [Mon, 30 Sep 2024 10:12:16 +0000 (18:12 +0800)]
ASoC: codecs: Fix atomicity violation in snd_soc_component_get_drvdata()

An atomicity violation occurs when the validity of the variables
da7219->clk_src and da7219->mclk_rate is being assessed. Since the entire
assessment is not protected by a lock, the da7219 variable might still be
in flux during the assessment, rendering this check invalid.

To fix this issue, we recommend adding a lock before the block
if ((da7219->clk_src == clk_id) && (da7219->mclk_rate == freq)) so that
the legitimacy check for da7219->clk_src and da7219->mclk_rate is
protected by the lock, ensuring the validity of the check.

This possible bug is found by an experimental static analysis tool
developed by our team. This tool analyzes the locking APIs
to extract function pairs that can be concurrently executed, and then
analyzes the instructions in the paired functions to identify possible
concurrency bugs including data races and atomicity violations.

Fixes: 6d817c0e9fd7 ("ASoC: codecs: Add da7219 codec driver")
Cc: stable@vger.kernel.org
Signed-off-by: Qiu-ji Chen <chenqiuji666@gmail.com>
Link: https://patch.msgid.link/20240930101216.23723-1-chenqiuji666@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: qcom: x1e80100: Support boards with two speakers
Krzysztof Kozlowski [Wed, 23 Oct 2024 12:41:52 +0000 (14:41 +0200)]
ASoC: qcom: x1e80100: Support boards with two speakers

Some Qualcomm X1E laptops have only two speakers.  Regardless whether
this sound card driver is suitable for them (we could re-use one for
some older SoC), we should set reasonable channel map depending on the
number of channels, not always 4-speaker setup.

This change is necessary for bringing audio support on Lenovo Thinkpad
T14s with Qualcomm X1E78100 and only two speakers.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241023124152.130706-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: codecs: ES8326: Reduce pop noise
Zhang Yi [Thu, 31 Oct 2024 06:02:53 +0000 (14:02 +0800)]
ASoC: codecs: ES8326: Reduce pop noise

We modify the value of ES8326_ANA_MICBIAS to reduce the pop noise

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://patch.msgid.link/20241031060253.21001-1-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: dt-bindings: fsl_spdif: Document imx6sl/sx compatible fallback
Fabio Estevam [Mon, 28 Oct 2024 02:07:49 +0000 (23:07 -0300)]
ASoC: dt-bindings: fsl_spdif: Document imx6sl/sx compatible fallback

i.MX6SL and i.MX6SX SPDIF blocks are compatible with i.MX35.

Document 'fsl,imx35-spdif' as a fallback compatible for these two
chip variants.

This fixes the following dt-schema warnings:

compatible: ['fsl,imx6sl-spdif', 'fsl,imx35-spdif'] is too long
compatible: ['fsl,imx6sx-spdif', 'fsl,imx35-spdif'] is too long

Signed-off-by: Fabio Estevam <festevam@denx.de>
Link: https://patch.msgid.link/20241028020749.36972-1-festevam@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: amd: acp: Fix for ACP SOF dmic tplg component load failure
Venkata Prasad Potturu [Mon, 4 Nov 2024 09:13:10 +0000 (14:43 +0530)]
ASoC: amd: acp: Fix for ACP SOF dmic tplg component load failure

Stream name mismatch with topology file causes tplg load failure.

As SOF framework assigns dailink->stream name, overriding stream name
other than link name causes SOF dmic component load failure.

[   35.474995] snd_sof_amd_acp70 0000:c4:00.5: error: can't connect DAI ACPDMIC0.IN stream acp-dmic-codec
[   35.475001] snd_sof_amd_acp70 0000:c4:00.5: failed to add widget type 28 name : ACPDMIC0.IN stream acp-dmic-codec
[   35.475013] sof_mach acp70-dsp: ASoC: failed to load widget ACPDMIC0.IN
[   35.475018] sof_mach acp70-dsp: ASoC: topology: could not load header: -22
[   35.475072] snd_sof_amd_acp70 0000:c4:00.5: error: tplg component load failed -22
[   35.475083] snd_sof_amd_acp70 0000:c4:00.5: error: failed to load DSP topology -22
[   35.475090] snd_sof_amd_acp70 0000:c4:00.5: ASoC: error at snd_soc_component_probe on 0000:c4:00.5: -22
[   35.475117] sof_mach acp70-dsp: ASoC: failed to instantiate card -22
[   35.475254] sof_mach acp70-dsp: error -EINVAL: Failed to register card(sof-acp70-dsp)
[   35.475261] sof_mach acp70-dsp: probe with driver sof_mach failed with error -22

Fixes: b2385de2ae11 ("ASoC: amd: acp: Add stream name to ACP PDM DMIC devices")
Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com>
Link: https://patch.msgid.link/20241104091312.1108299-1-venkataprasad.potturu@amd.com
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: doc: update clock api details
anish kumar [Thu, 31 Oct 2024 03:58:29 +0000 (20:58 -0700)]
ASoC: doc: update clock api details

Added ASoC clock api kernel doc in this
document.

Signed-off-by: anish kumar <yesanishhere@gmail.com>
Link: https://patch.msgid.link/20241031035829.54852-1-yesanishhere@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 months agoASoC: codecs: wcd937x: Remove unused of_gpio.h
Andy Shevchenko [Thu, 31 Oct 2024 10:33:02 +0000 (12:33 +0200)]
ASoC: codecs: wcd937x: Remove unused of_gpio.h

of_gpio.h is deprecated and subject to remove. The drivers in question
don't use it, simply remove the unused header.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20241031103302.2450830-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: Rename "sh" to "renesas"
Mark Brown [Wed, 30 Oct 2024 16:02:48 +0000 (16:02 +0000)]
ASoC: Rename "sh" to "renesas"

Merge series from Prabhakar <prabhakar.csengg@gmail.com>:

This patch series aims to rename "sh" to "renesas", along with this
the references to this path have been updated.

6 months agoASoC: cs42l84: Remove unused including <linux/version.h>
Jiapeng Chong [Wed, 30 Oct 2024 02:10:47 +0000 (10:10 +0800)]
ASoC: cs42l84: Remove unused including <linux/version.h>

./sound/soc/codecs/cs42l84.c: 15 linux/version.h not needed.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11570
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://patch.msgid.link/20241030021047.70543-1-jiapeng.chong@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoMAINTAINERS: Add entry for Renesas RZ ASoC driver
Lad Prabhakar [Fri, 25 Oct 2024 15:05:11 +0000 (16:05 +0100)]
MAINTAINERS: Add entry for Renesas RZ ASoC driver

Add a new entry to the MAINTAINERS file for Renesas RZ ASoC driver.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://patch.msgid.link/20241025150511.722040-6-prabhakar.mahadev-lad.rj@bp.renesas.com
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoMAINTAINERS: Add entry for Renesas R-Car and FSI ASoC drivers
Lad Prabhakar [Fri, 25 Oct 2024 15:05:10 +0000 (16:05 +0100)]
MAINTAINERS: Add entry for Renesas R-Car and FSI ASoC drivers

Add a new entry to the MAINTAINERS file for Renesas R-CAR and FSI ASoC
drivers.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20241025150511.722040-5-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: audio-graph-card2: Update comment with renamed file path
Lad Prabhakar [Fri, 25 Oct 2024 15:05:09 +0000 (16:05 +0100)]
ASoC: audio-graph-card2: Update comment with renamed file path

The "sound/soc/sh" directory has been renamed to "sound/soc/renesas".
Update the comment in audio-graph-card2.c to reflect the new file path
for better accuracy.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20241025150511.722040-4-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: renesas, rsnd: Update file path
Lad Prabhakar [Fri, 25 Oct 2024 15:05:08 +0000 (16:05 +0100)]
ASoC: renesas, rsnd: Update file path

The "sound/soc/sh" directory has been renamed to "sound/soc/renesas".
Update the reference in renesas,rsnd.txt to reflect the new file path
for consistency.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20241025150511.722040-3-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: Rename "sh" to "renesas"
Lad Prabhakar [Fri, 25 Oct 2024 15:05:07 +0000 (16:05 +0100)]
ASoC: Rename "sh" to "renesas"

Rename the "sh" folder to "renesas" to better reflect the Renesas-specific
drivers.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20241025150511.722040-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: codecs: adau1373: drop platform data
Mark Brown [Tue, 29 Oct 2024 18:56:55 +0000 (18:56 +0000)]
ASoC: codecs: adau1373: drop platform data

Merge series from Nuno Sa <nuno.sa@analog.com>:

Support the powerdown GPIO on ADAU1373.

6 months agoASoC: codecs: adau1373: add powerdown gpio
Nuno Sa [Mon, 28 Oct 2024 15:43:41 +0000 (16:43 +0100)]
ASoC: codecs: adau1373: add powerdown gpio

If the powerdown GPIO is specified, we use it for reset. Otherwise,
fallback to a software reset.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20241028-adau1373-shutdown-v2-4-647f56bbd182@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: codecs: adau1373: drop patform_data
Nuno Sa [Mon, 28 Oct 2024 15:43:40 +0000 (16:43 +0100)]
ASoC: codecs: adau1373: drop patform_data

struct adau1373_platform_data" was not being used by any platform.
Hence, drop it and move to firmware based support. All the
configurations quirks present in the platform_data are now supported as
firmware properties.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20241028-adau1373-shutdown-v2-3-647f56bbd182@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: dt-bindings: document the adau1373 Codec
Nuno Sa [Mon, 28 Oct 2024 15:43:39 +0000 (16:43 +0100)]
ASoC: dt-bindings: document the adau1373 Codec

Describe the adau1373 Low Power Codec with Speaker and
Headphone Amplifier.

While at it, properly add a MAINTAINERS entry for ADI sound bindings.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241028-adau1373-shutdown-v2-2-647f56bbd182@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: codecs: adau1373: add some kconfig text
Nuno Sa [Mon, 28 Oct 2024 15:43:38 +0000 (16:43 +0100)]
ASoC: codecs: adau1373: add some kconfig text

Add some text to 'tristate' so that we can actually enable the driver
when using things like menuconfig.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20241028-adau1373-shutdown-v2-1-647f56bbd182@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: cs42l84: remove incorrect of_match_ptr()
Arnd Bergmann [Tue, 29 Oct 2024 09:23:55 +0000 (09:23 +0000)]
ASoC: cs42l84: remove incorrect of_match_ptr()

The use of of_match_ptr() is incorrect here and just causes
a warning:

sound/soc/codecs/cs42l84.c:1084:34: error: unused variable 'cs42l84_of_match' [-Werror,-Wunused-const-variable]

Fixes: 250304a0fb34 ("ASoC: cs42l84: Add new codec driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20241029092404.3874040-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: Intel: add rt722 and rt1320 support
Mark Brown [Mon, 28 Oct 2024 16:33:39 +0000 (16:33 +0000)]
ASoC: Intel: add rt722 and rt1320 support

Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

This series add rt722 and rt1320 support for a new Dell SKU.

6 months agoASoC: Intel: soc-acpi-intel-arl-match: Add rt722 and rt1320 support
Mac Chiang [Mon, 28 Oct 2024 07:26:31 +0000 (15:26 +0800)]
ASoC: Intel: soc-acpi-intel-arl-match: Add rt722 and rt1320 support

This patch adds support for the rt722 multi-function codec and the
rt1320 amplifier in the ARL board configuration.

Link 0: RT722 codec with three endpoints: Headset, Speaker, and DMIC.
Link 2: RT1320 amplifier.

Note:
The Speaker endpoint on the RT722 codec is not used.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241028072631.15536-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: intel: sof_sdw: add quirk for Dell SKU
Mac Chiang [Mon, 28 Oct 2024 07:26:30 +0000 (15:26 +0800)]
ASoC: intel: sof_sdw: add quirk for Dell SKU

This patch adds a quirk to include the codec amplifier
function for this Dell SKU.

Note: In this SKU '0CF0', the RT722 codec amplifier is
excluded, and an external amplifier is used instead.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241028072631.15536-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: sdw_utils: Add quirk to exclude amplifier function
Mac Chiang [Mon, 28 Oct 2024 07:26:29 +0000 (15:26 +0800)]
ASoC: sdw_utils: Add quirk to exclude amplifier function

When SKUs use the multi-function codec, which integrates
Headset, Amplifier and DMIC. The corresponding quirks provide
options to support internal amplifier/DMIC or not.

In the case of RT722, this SKU excludes the internal amplifier and
use an additional amplifier instead.

Signed-off-by: Mac Chiang <mac.chiang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241028072631.15536-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: codecs: ES8326: Modify the configuration of and micbias
Zhang Yi [Mon, 28 Oct 2024 06:05:29 +0000 (14:05 +0800)]
ASoC: codecs: ES8326: Modify the configuration of and micbias

Because we designed a new version of ES8326, the configuration of
micbias needed to be modified.We tested the new driver,
on both the new version and the old one. It works well.

Signed-off-by: Zhang Yi <zhangyi@everest-semi.com>
Link: https://patch.msgid.link/20241028060529.3359-1-zhangyi@everest-semi.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: soc-devres: Remove unused devm_snd_soc_register_dai
Dr. David Alan Gilbert [Mon, 28 Oct 2024 02:12:26 +0000 (02:12 +0000)]
ASoC: soc-devres: Remove unused devm_snd_soc_register_dai

The last use of devm_snd_soc_register_dai() was removed by
commit fc4cb1e15f0c ("ASoC: topology: Properly unregister DAI on removal")
in 2021.

Remove it, and the helper it used.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Link: https://patch.msgid.link/20241028021226.477909-1-linux@treblig.org
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: rt1320: add mic function
Shuming Fan [Fri, 25 Oct 2024 08:12:59 +0000 (16:12 +0800)]
ASoC: rt1320: add mic function

This patch adds the mic function.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20241025081259.1419518-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: add CS42L84 codec driver
Mark Brown [Thu, 24 Oct 2024 18:21:16 +0000 (19:21 +0100)]
ASoC: add CS42L84 codec driver

Merge series from James Calligeros <jcalligeros99@gmail.com>:

This patch set adds a driver for the Cirrus Logic CS42L84 codec. This chip
is (so far) found only on Apple Silicon Macs. In keeping with proud Apple
tradition, the CS42L84 is essentially just a CS42L42 with a different
regmap and no publicly available datasheet. It may also be missing its
parent's S/PDIF capabilities as none of Apple's devices support S/PDIF out,
however this cannot be positively confirmed.

This driver has lived in the downstream Asahi tree for quite a while now,
and gained some refinements along the way. I have squashed most of these
into the initial driver commit as they were small changes like tweaking
msleep()s or filling out TLVs, but left seperate a larger change to
tip/ring sense IRQ handling as it differs significantly from what is found
in the CS42L42 driver.

6 months agoASoC: add Allwinner H616 audio codec support
Mark Brown [Thu, 24 Oct 2024 18:21:06 +0000 (19:21 +0100)]
ASoC: add Allwinner H616 audio codec support

Merge series from Ryan Walklin <ryan@testtoast.com>:

The Allwinner H616 has a playback-only audio codec, with a single stereo
or differential-mono line output.  This patch series adds support for
the H616 (and H313/H618/H700/T507) SoC.  Based on the Allwinner kernel
SDK driver, and tested on the H700.

6 months agoASoC: dt-bindings: Add CS42L84 codec
Martin Povišer [Sat, 19 Oct 2024 14:47:31 +0000 (00:47 +1000)]
ASoC: dt-bindings: Add CS42L84 codec

CS42L84 is a headphone jack codec made by Cirrus Logic and seen in Apple
computer models starting with 2021 Macbook Pros. It is not a publicly
documented part. To a degree the part is similar to the public CS42L42.
(The L84 superseded L83 seen in earlier Apple models, and the L83 was
pretty much the same as L42.)

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20241020-cs42l84-v2-1-37ba2b6721d9@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: cs42l84: leverage ring sense IRQs to correctly detect headsets
James Calligeros [Sat, 19 Oct 2024 14:47:33 +0000 (00:47 +1000)]
ASoC: cs42l84: leverage ring sense IRQs to correctly detect headsets

Some jacks integrated on devices with this codec, such as certain
Apple Silicon Macs, have quite trigger-happy tip sense switches that
cause a tip sense IRQ before the plug is fully seated. If users are
unfortunate with their timing, this can lead to headsets being detected
as mic-less headphones among other issues with the codec's device
detection routines.

Introduce some rudimentary ring sense interrupt handling so that we
can re-trigger the codec's detection routines when we are certain
that the plug is fully seated.

This seems to differ from what other Cirrus drivers do, but is
necessary for devices to be reliably detected properly here.

Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://patch.msgid.link/20241020-cs42l84-v2-3-37ba2b6721d9@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: cs42l84: Add new codec driver
Martin Povišer [Sat, 19 Oct 2024 14:47:32 +0000 (00:47 +1000)]
ASoC: cs42l84: Add new codec driver

The CS42L84 is a codec from Cirrus Logic found in Apple Silicon Macs.
The chip continues Apple's long tradition of compelling vendors to
spin out bespoke SKUs that are based on existing IP but made subtly
incompatible with the publicly available part. CS42L84 is very similar
to CS42L42, but has a different regmap.

Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Link: https://patch.msgid.link/20241020-cs42l84-v2-2-37ba2b6721d9@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: rt-sdw-common: fix rt_sdca_index_update_bits function parameter description
Bard Liao [Thu, 24 Oct 2024 06:02:05 +0000 (14:02 +0800)]
ASoC: rt-sdw-common: fix rt_sdca_index_update_bits function parameter description

Fix the mismatch between function parameter and description.
Below warning are reported with W=1.
warning: Function parameter or struct member 'val' not described in
'rt_sdca_index_update_bits'
warning: Excess function parameter 'value' description in
'rt_sdca_index_update_bits'

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20241024060205.20201-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: dt-bindings: allwinner: add H616 sun4i audio codec binding
Ryan Walklin [Wed, 23 Oct 2024 07:56:58 +0000 (20:56 +1300)]
ASoC: dt-bindings: allwinner: add H616 sun4i audio codec binding

The H616 has an audio codec compatible with the sun4i-a10 driver.

The codec is relatively cut down compared to some of the other Allwinner
SoCs and only has a single line-out route (relying on a separate digital
microphone IP block for input). HDMI and SPDIF audio are handled
separately by an audio hub IP block, which is not currently implemented
in mainline kernels. This requires some additional flexibility in the
DMA bindings.

Add compatible string and routing for the H616 audio codec, and update
the required DMA descriptions.

Signed-off-by: Ryan Walklin <ryan@testtoast.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241023075917.186835-3-ryan@testtoast.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: sun4i-codec: support allwinner H616 codec
Ryan Walklin [Wed, 23 Oct 2024 07:57:01 +0000 (20:57 +1300)]
ASoC: sun4i-codec: support allwinner H616 codec

The H616 SoC codec is playback-only with a single line-out route, and
has some register differences from prior codecs.

Add the required compatible string, registers, quirks, DAPM widgets,
codec controls and routes, based on existing devices and the H616
datasheet.

Signed-off-by: Ryan Walklin <ryan@testtoast.com>
Link: https://patch.msgid.link/20241023075917.186835-6-ryan@testtoast.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: sun4i-codec: Add playback only flag to quirks
Marcus Cooper [Wed, 23 Oct 2024 07:57:00 +0000 (20:57 +1300)]
ASoC: sun4i-codec: Add playback only flag to quirks

Some devices only have the playback side of the codec implemented
so add a quirk to check for this. This flag is only required internally
within the codec driver, as the DAI is configured for playback only
(capture disabled) separately in the create_card() function for these
devices.

Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Signed-off-by: Ryan Walklin <ryan@testtoast.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Philippe Simons <simons.philippe@gmail.com>
Link: https://patch.msgid.link/20241023075917.186835-5-ryan@testtoast.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: sun4i-codec: Add support for different DAC FIFOC addresses to quirks
Marcus Cooper [Wed, 23 Oct 2024 07:56:59 +0000 (20:56 +1300)]
ASoC: sun4i-codec: Add support for different DAC FIFOC addresses to quirks

The Allwinner H616 SoC  uses a different register address to control the
output FIFO.

Allow this to be specified separately from the ADC FIFO control
register.

Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Signed-off-by: Ryan Walklin <ryan@testtoast.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Philippe Simons <simons.philippe@gmail.com>
Link: https://patch.msgid.link/20241023075917.186835-4-ryan@testtoast.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: remove dpcm_xxx flags
Mark Brown [Wed, 23 Oct 2024 17:07:47 +0000 (18:07 +0100)]
ASoC: remove dpcm_xxx flags

Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>:

Now, we don't need to use dpcm_playback/capture flags for DPCM since v6.11,
and thus we can use playback/capture_only flags instead too for DPCM,
which is same as non-DPCM.

Let's remove dpcm_playback/capture flags, and use playback/capture_only flags
instead.

[Before] [After]
dpcm_playback = 1; /* no setting is needed */
dpcm_capture  = 1;

dpcm_playback = 1; playback_only = 1;
dpcm_capture  = 0;

dpcm_playback = 0; capture_only = 1;
dpcm_capture  = 1;

And then, because no-one uses dpcm_xxx flags, we don't need to have the code
for both DPCM and non-DPCM. These can be handled by same code.

6 months agoASoC: codecs: fix error code in ntp8835_i2c_probe()
Harshit Mogalapalli [Wed, 23 Oct 2024 14:44:11 +0000 (07:44 -0700)]
ASoC: codecs: fix error code in ntp8835_i2c_probe()

When reset_control_deassert() fails it returns valid error codes stored
in return, pass that to dev_err_probe() instead of
PTR_ERR(ntp8835->reset).

Fixes: dc9004ea273a ("ASoC: codecs: Add NeoFidelity NTP8835 codec")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/r/202409281054.DUTb5KxU-lkp@intel.com/
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Link: https://patch.msgid.link/20241023144421.1720234-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: SOF: core: Module parameter updates
Mark Brown [Wed, 23 Oct 2024 15:30:23 +0000 (16:30 +0100)]
ASoC: SOF: core: Module parameter updates

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

Add new debug only parameters to override the default IPC and boot
timeout, these are only available if CONFIG_SND_SOC_SOF_DEBUG is
enabled, only for developers.

The second patch moves the firmware, topology name/path and IPC
version overrides from acpi/pci/of platform code to core and markes
the platform parameters deprecated, to be removed in few kernel
cycles.
There is really no point of duplicating these overrides as they
are not platform dependent.

6 months agoASoC: soc-pcm: merge DPCM and non-DPCM validation check
Kuninori Morimoto [Sun, 20 Oct 2024 23:59:49 +0000 (23:59 +0000)]
ASoC: soc-pcm: merge DPCM and non-DPCM validation check

DPCM and non-DPCM validation check are very similar. The big difference
is that DPCM doesn't check Codec validation. This is historical reason.
It should be checked, but it breaks existing driver/behavior.

Anyway, if we uses dummy DAI as Codec when DPCM case, there is no
difference between DPCM and non-DPCM. Let's merge these.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/8734kq9vgq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: doc: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:59:43 +0000 (23:59 +0000)]
ASoC: doc: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/874j569vgw.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: soc-pcm: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:59:36 +0000 (23:59 +0000)]
ASoC: soc-pcm: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/875xpm9vh3.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: intel: boards: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:59:31 +0000 (23:59 +0000)]
ASoC: intel: boards: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/877ca29vh9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: soc-topology: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:59:25 +0000 (23:59 +0000)]
ASoC: soc-topology: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/878qui9vhe.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: soc-compress: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:59:20 +0000 (23:59 +0000)]
ASoC: soc-compress: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87a5ey9vhj.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: soc-core: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:59:14 +0000 (23:59 +0000)]
ASoC: soc-core: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Link: https://patch.msgid.link/87bjze9vhp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: mediatek: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:59:09 +0000 (23:59 +0000)]
ASoC: mediatek: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87cyju9vhu.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: samsung: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:59:03 +0000 (23:59 +0000)]
ASoC: samsung: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87ed4a9vi0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: intel: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:58:55 +0000 (23:58 +0000)]
ASoC: intel: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87froq9vi9.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: sof: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:58:49 +0000 (23:58 +0000)]
ASoC: sof: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87h6969vie.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: fsl: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:58:44 +0000 (23:58 +0000)]
ASoC: fsl: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87iktm9vij.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: amd: remove dpcm_xxx flags
Kuninori Morimoto [Sun, 20 Oct 2024 23:58:38 +0000 (23:58 +0000)]
ASoC: amd: remove dpcm_xxx flags

dpcm_xxx flags are no longer needed. It converts dpcm_xxx flag to
xxx_only if needed.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87jze29vip.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: SOF: core: Add fw, tplg and ipc type override parameters
Peter Ujfalusi [Wed, 23 Oct 2024 11:06:10 +0000 (14:06 +0300)]
ASoC: SOF: core: Add fw, tplg and ipc type override parameters

The different bus type helpers define their own override parameters for
firmware name/path, topology name/path. sof-pci-dev covers all while others
just a subset.
There is no technical reason to do that since these are generic platform
independent parameters.

Add the override module options to core (snd-sof module) and update the
description for the device helper modules as deprecated.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241023110610.6141-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: SOF: core: Add debug module parameters to set IPC and boot timeout
Peter Ujfalusi [Wed, 23 Oct 2024 11:06:09 +0000 (14:06 +0300)]
ASoC: SOF: core: Add debug module parameters to set IPC and boot timeout

Add two module parameters to override the IPC and boot timeout values if
the SOF stack is compiled with debug enabled to allow experimenting with
different timeout values without the need to recompile the kernel.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20241023110610.6141-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: uniphier: Handle regmap_write errors in aio_iecout_set_enable()
Ingyu Jang [Tue, 8 Oct 2024 05:11:11 +0000 (14:11 +0900)]
ASoC: uniphier: Handle regmap_write errors in aio_iecout_set_enable()

The aio_oport_set_stream_type() function did not previously check the
return values of regmap_write().
If these functions fail, it could lead to silent failures when
configuring the audio playback port, causing improper behavior in audio
stream output via S/PDIF without any indication of an error.

This patch modifies aio_oport_set_stream_type() to check the return
values of regmap_write().
If regmap_write() fails, the error code is propagated back to the caller
to ensure proper error handling.

Signed-off-by: Ingyu Jang <ingyujang25@unist.ac.kr>
Link: https://patch.msgid.link/SE1P216MB2287962B462AE91B26248D19FD7E2@SE1P216MB2287.KORP216.PROD.OUTLOOK.COM
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: fsl_xcvr: enable some interrupts
Mark Brown [Tue, 22 Oct 2024 19:48:31 +0000 (20:48 +0100)]
ASoC: fsl_xcvr: enable some interrupts

Merge series from Shengjiu Wang <shengjiu.wang@nxp.com>:

Enable interrupt of cmdc status update and the interrupts for
wrong preamble received.

6 months agoASoC: fsl_xcvr: reset RX dpath after wrong preamble
Shengjiu Wang [Tue, 8 Oct 2024 06:27:53 +0000 (14:27 +0800)]
ASoC: fsl_xcvr: reset RX dpath after wrong preamble

Below preamble error means wrong preamble of IEC958 received,
the channel order may be wrong at the moment.

FSL_XCVR_IRQ_PREAMBLE_MISMATCH
FSL_XCVR_IRQ_UNEXP_PRE_REC
FSL_XCVR_IRQ_M_W_PRE_MISMATCH
FSL_XCVR_IRQ_B_PRE_MISMATCH

All above errors may cause channel swap, to avoid such issues,
need to reset the DMAC path.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1728368873-31379-3-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: fsl_xcvr: enable interrupt of cmdc status update
Shengjiu Wang [Tue, 8 Oct 2024 06:27:52 +0000 (14:27 +0800)]
ASoC: fsl_xcvr: enable interrupt of cmdc status update

This enables the interrupt to be asserted when there
is a change in Capabilities data structure / Latency
request of the CMDC Status register.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Link: https://patch.msgid.link/1728368873-31379-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: dt-bindings: qcom: Add SM8750 LPASS macro codecs
Krzysztof Kozlowski [Tue, 22 Oct 2024 06:41:55 +0000 (08:41 +0200)]
ASoC: dt-bindings: qcom: Add SM8750 LPASS macro codecs

Document compatibles for Qualcomm SM8750 SoC macro digital codecs (RX,
TX, VA and WSA), compatible with previous generation (SM8550 and
SM8650).

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20241022064155.22800-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: tegra: Add support for S24_LE audio format
Ritu Chaudhary [Tue, 22 Oct 2024 04:13:30 +0000 (04:13 +0000)]
ASoC: tegra: Add support for S24_LE audio format

Add support for S24_LE format for all internal and IO AHUB
modules, except for ASRC (which is already supported).

The data flow happens as mentioned below:

- ADMAIF picks 24-bit valid data and converts it to 32-bit before
  sending to internal AHUB modules. This makes the driver change
  simpler for internal AHUB modules.
- IO modules CIF converts the 32-bit data to 24-bit before sending it
  to the external world.
- To maintain consistency across modules, conversions between 24-bit
  and 32-bit occur either at ADMAIF or at the IO modules CIF.

This feature has been thoroughly tested and verified with all internal
AHUB modules on the Jetson AGX Orin Platform, as well as with the
external RT5640 codec.

Signed-off-by: Ritu Chaudhary <rituc@nvidia.com>
Signed-off-by: Sheetal <sheetal@nvidia.com>
Reviewed-by: Sameer Pujar <spujar@nvidia.com>
Link: https://patch.msgid.link/20241022041330.3421765-1-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: dt-bindings: everest,es8328: Document audio graph port
Cristian Ciocaltea [Sat, 19 Oct 2024 00:43:14 +0000 (03:43 +0300)]
ASoC: dt-bindings: everest,es8328: Document audio graph port

The ES8328/ES8388 audio codec is currently used in conjunction with
audio-graph-card to provide an endpoint for binding with the other side
of the audio link.

This is achieved via the 'port' property, which is not supported by the
binding:

  rk3588s-indiedroid-nova.dtb: audio-codec@11: 'port' does not match any of the regexes: 'pinctrl-[0-9]+'
    from schema $id: http://devicetree.org/schemas/sound/everest,es8328.yaml#

Document the missing property.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20241019-es8328-doc-port-v1-1-25c1d1b5c65c@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: codecs: adau1372: add match table
Nuno Sa [Mon, 21 Oct 2024 14:00:49 +0000 (16:00 +0200)]
ASoC: codecs: adau1372: add match table

Add an of_device_id table for both the I2C and SPI drivers.

Signed-off-by: Nuno Sa <nuno.sa@analog.com>
Link: https://patch.msgid.link/20241021-adau1372-of-table-v1-1-6efbc7946957@analog.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: soc-utils: Remove PAGE_SIZE compile-time constant assumption
Ryan Roberts [Mon, 21 Oct 2024 13:03:07 +0000 (14:03 +0100)]
ASoC: soc-utils: Remove PAGE_SIZE compile-time constant assumption

In pursuit of the goal of supporting boot-time page size selection,
remove use of PAGE_SIZE from the dummy_dma_hardware struct definition,
since the value is not known at compile-time for this config.

Given the previous parameters were "essentially random", let's just
hardcode them as 4K and 4K*2 to sidestep the need to boot-time patch the
structure with the selected PAGE_SIZE.

Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Link: https://patch.msgid.link/20241021130308.3616451-1-ryan.roberts@arm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC/soundwire: add initial support for SDCA
Mark Brown [Fri, 18 Oct 2024 20:01:45 +0000 (21:01 +0100)]
ASoC/soundwire: add initial support for SDCA

Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

We need to get rt712 version by reading SDCA version and functions.
This patch series adds initial support for SDCA and add a helper to tell
if the codec is RT712_VB.

This series may go via the ASoC tree with Vinod's Acked-by tag.

Bard Liao (1):
  soundwire: sdw_intel: include linux/acpi.h

Pierre-Louis Bossart (10):
  ASoC/soundwire: remove sdw_slave_extended_id
  ASoC: SDCA: add initial module
  soundwire: slave: lookup SDCA version and functions
  ASoC: SDCA: add quirk function for RT712_VB match
  ASoC: rt712-sdca: detect the SMART_MIC function during the probe stage
  ASoC: soc-acpi: introduce new 'machine check' callback
  ASoC: sdw_utils: add SmartMic DAI for RT712 VB
  ASoC: sdw_utils: add SmartMic DAI for RT713 VB
  ASoC: Intel: soc-acpi: add is_device_rt712_vb() helper
  ASoC: SOF: Intel: hda: use machine_check() for SoundWire

 drivers/soundwire/Kconfig                     |   1 +
 drivers/soundwire/amd_init.c                  |  12 +-
 drivers/soundwire/intel_init.c                |  13 +-
 drivers/soundwire/slave.c                     |  14 ++
 include/linux/soundwire/sdw.h                 |   9 +-
 include/linux/soundwire/sdw_amd.h             |   7 +-
 include/linux/soundwire/sdw_intel.h           |   8 +-
 include/sound/sdca.h                          |  62 +++++++
 include/sound/sdca_function.h                 |  55 ++++++
 include/sound/soc-acpi.h                      |   8 +-
 sound/soc/Kconfig                             |   1 +
 sound/soc/Makefile                            |   1 +
 sound/soc/amd/ps/pci-ps.c                     |   3 +-
 sound/soc/codecs/rt712-sdca-sdw.c             |   1 +
 sound/soc/codecs/rt712-sdca.c                 |  38 +++-
 sound/soc/codecs/rt712-sdca.h                 |   1 +
 sound/soc/intel/Kconfig                       |   5 +
 sound/soc/intel/common/Makefile               |   3 +
 .../intel/common/soc-acpi-intel-mtl-match.c   |  51 ++++++
 .../intel/common/soc-acpi-intel-sdca-quirks.c |  42 +++++
 .../intel/common/soc-acpi-intel-sdca-quirks.h |  14 ++
 sound/soc/sdca/Kconfig                        |  11 ++
 sound/soc/sdca/Makefile                       |   5 +
 sound/soc/sdca/sdca_device.c                  |  67 +++++++
 sound/soc/sdca/sdca_functions.c               | 173 ++++++++++++++++++
 sound/soc/sdw_utils/soc_sdw_utils.c           |  18 +-
 sound/soc/soc-acpi.c                          |  30 +--
 sound/soc/sof/amd/acp-common.c                |   3 +-
 sound/soc/sof/intel/hda.c                     |  19 +-
 29 files changed, 610 insertions(+), 65 deletions(-)
 create mode 100644 include/sound/sdca.h
 create mode 100644 include/sound/sdca_function.h
 create mode 100644 sound/soc/intel/common/soc-acpi-intel-sdca-quirks.c
 create mode 100644 sound/soc/intel/common/soc-acpi-intel-sdca-quirks.h
 create mode 100644 sound/soc/sdca/Kconfig
 create mode 100644 sound/soc/sdca/Makefile
 create mode 100644 sound/soc/sdca/sdca_device.c
 create mode 100644 sound/soc/sdca/sdca_functions.c

--
2.43.0

6 months agoASoC: add support for some new Lenovo laptops with
Mark Brown [Fri, 18 Oct 2024 20:01:38 +0000 (21:01 +0100)]
ASoC: add support for some new Lenovo laptops with

Merge series from Bard Liao <yung-chuan.liao@linux.intel.com>:

Some SKUs are using host DMICs rather than the cs42l43 DMICs, update the
endpoint structure for these SKUs to remove the DMIC endpoint.

Charles Keepax (4):
  ASoC: sdw_utils: Add support for exclusion DAI quirks
  ASoC: sdw_utils: Add a quirk to allow the cs42l43 mic DAI to be
    ignored
  ASoC: Intel: sof_sdw: Add quirk for cs42l43 system using host DMICs
  ASoC: Intel: sof_sdw: Add quirks for some new Lenovo laptops

 include/sound/soc_sdw_utils.h       |  2 ++
 sound/soc/intel/boards/sof_sdw.c    | 41 +++++++++++++++++++++++++++++
 sound/soc/sdw_utils/soc_sdw_utils.c |  5 +++-
 3 files changed, 47 insertions(+), 1 deletion(-)

--
2.43.0

6 months agoASoC: nau8821: check regmap_raw_read/regmap_raw_write for failure
Vitaliy Shevtsov [Fri, 18 Oct 2024 11:07:41 +0000 (16:07 +0500)]
ASoC: nau8821: check regmap_raw_read/regmap_raw_write for failure

The return values from both regmap_raw_read() and regmap_raw_write() are not
checked despite they can fail. Propagate possible errors to caller.

Found by Linux Verification Center (linuxtesting.org) with Svace.

Signed-off-by: Vitaliy Shevtsov <v.shevtsov@maxima.ru>
Link: https://patch.msgid.link/20241018110743.18786-1-v.shevtsov@maxima.ru
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: amd: acp: Add stream name to ACP PDM DMIC devices
Mario Limonciello [Thu, 17 Oct 2024 21:09:52 +0000 (16:09 -0500)]
ASoC: amd: acp: Add stream name to ACP PDM DMIC devices

Add for sof and legacy dai links to dummy DMIC codec.

Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://patch.msgid.link/20241017210952.3586713-1-superm1@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: rx651: Use card->dev in replace of the &pdev->dev argument in the dev_err function
Liu Jing [Tue, 15 Oct 2024 07:49:38 +0000 (15:49 +0800)]
ASoC: rx651: Use card->dev in replace of the &pdev->dev argument in the dev_err function

Because card->dev = &pdev->dev is already defined in the rx51_soc_probe
function, and then &pdev->dev is still used.

Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241015074938.6247-1-liujing@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: SOF: Intel: hda: use machine_check() for SoundWire
Pierre-Louis Bossart [Wed, 16 Oct 2024 10:23:33 +0000 (18:23 +0800)]
ASoC: SOF: Intel: hda: use machine_check() for SoundWire

Use the new machine_check() callback to select an alternate topology
for RT712-VB devices.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-12-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: Intel: soc-acpi: add is_device_rt712_vb() helper
Pierre-Louis Bossart [Wed, 16 Oct 2024 10:23:32 +0000 (18:23 +0800)]
ASoC: Intel: soc-acpi: add is_device_rt712_vb() helper

Add a filter to skip the RT172 VB configuration if a SmartMic Function
is not found in the SDCA descriptors.

If the ACPI information is incorrect this can only be quirked further
with DMI information.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-11-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: sdw_utils: add SmartMic DAI for RT713 VB
Pierre-Louis Bossart [Wed, 16 Oct 2024 10:23:31 +0000 (18:23 +0800)]
ASoC: sdw_utils: add SmartMic DAI for RT713 VB

In theory the dailinks are created based on the number of endpoints
reported in ACPI match tables, so it should harmless to add a new
dailink: RT713 VA would not use it since it has only 2 endpoints.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-10-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: sdw_utils: add SmartMic DAI for RT712 VB
Pierre-Louis Bossart [Wed, 16 Oct 2024 10:23:30 +0000 (18:23 +0800)]
ASoC: sdw_utils: add SmartMic DAI for RT712 VB

In theory the dailinks are created based on the number of endpoints
reported in ACPI match tables, so it should harmless to add a new
dailink: RT712 VA would not use it since it has only 2 endpoints.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-9-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: soc-acpi: introduce new 'machine check' callback
Pierre-Louis Bossart [Wed, 16 Oct 2024 10:23:29 +0000 (18:23 +0800)]
ASoC: soc-acpi: introduce new 'machine check' callback

The existing machine_quirk() returns a pointer to a soc_acpi_mach
structure.
For SoundWire/SDCA support, we need a slightly different
functionality where a quirk function either validates or NACKs an
initial selection, based on additional firmware/DMI information.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: rt712-sdca: detect the SMART_MIC function during the probe stage
Pierre-Louis Bossart [Wed, 16 Oct 2024 10:23:28 +0000 (18:23 +0800)]
ASoC: rt712-sdca: detect the SMART_MIC function during the probe stage

We shouldn't do any devm_ based allocation in the io_init(), this need
to happen in the probe(). Luckily, we now have an SDCA helper to look
in ACPI tables if a SMART_MIC function is exposed.

FIXME: the registers are not well handled today, the regmap lists
registers which are not really supported in all platforms. The regmap
needs to throw an error if those registers are accessed without
existing.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-7-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: SDCA: add quirk function for RT712_VB match
Pierre-Louis Bossart [Wed, 16 Oct 2024 10:23:27 +0000 (18:23 +0800)]
ASoC: SDCA: add quirk function for RT712_VB match

Add a generic match function for quirks, chances are we are going to
have lots of those...

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-6-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agosoundwire: slave: lookup SDCA version and functions
Pierre-Louis Bossart [Wed, 16 Oct 2024 10:23:26 +0000 (18:23 +0800)]
soundwire: slave: lookup SDCA version and functions

Use SDCA helpers to get the basic information and store it in the
slave context. The information will be optionally be used in codec
drivers to register sub-devices for each Function.

When platforms are not based on ACPI the helpers do absolutely
nothing.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://patch.msgid.link/20241016102333.294448-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: SDCA: add initial module
Pierre-Louis Bossart [Wed, 16 Oct 2024 10:23:25 +0000 (18:23 +0800)]
ASoC: SDCA: add initial module

Add new module for SDCA (SoundWire Device Class for Audio) support.
For now just add a parser to identify the SDCA revision and the
function mask.

Note that the SDCA definitions and related MIPI DisCo properties are
defined only for ACPI platforms and extracted with _DSD helpers. There
is currently no support for Device Tree in the specification, the
'depends on ACPI' reflects this design limitation. This might change
in a future revision of the specification but for SDCA 1.0 ACPI is the
only supported type of platform firmware.

The SDCA library is defined with static inline fallbacks, which will
allow for unconditional addition of SDCA support in common parts of
the code.

The design follows a four-step process:

1) Basic information related to Functions is extracted from MIPI DisCo
tables and stored in the 'struct sdw_slave'. Devm_ based memory
allocation is not allowed at this point prior to a driver probe, so we only
store the function node, address and type.

2) When a codec driver probes, it will register subdevices for each
Function identified in phase 1)

3) a driver will probe for each subdevice and addition parsing/memory
allocation takes place at this level. devm_ based allocation is highly
encouraged to make error handling manageable.

4) Before the peripheral device becomes physically attached, register
access is not permitted and the regmaps are cache-only. When
peripheral device is enumerated, the bus level uses the
'update_status' notification; after optional device-level
initialization, the codec driver will notify each of the subdevices so
that they can start interacting with the hardware.

Note that the context extracted in 1) should be arguably be handled
completely in the codec driver probe. That would however make it
difficult to use the ACPI information for machine quirks, and
e.g. select different machine driver and topologies as done for the
RT712_VB handling later in the series. To make the implementation of
quirks simpler, this patchset extracts a minimal amount of context
(interface revision and number/type of Functions) before the codec
driver probe, and stores this context in the scope of the 'struct
sdw_slave'.

The SDCA library can also be used in a vendor-specific driver without
creating subdevices, e.g. to retrieve the 'initialization-table'
values to write platform-specific values as needed.

For more technical details, the SDCA specification is available for
public downloads at https://www.mipi.org/mipi-sdca-v1-0-download

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC/soundwire: remove sdw_slave_extended_id
Pierre-Louis Bossart [Wed, 16 Oct 2024 10:23:24 +0000 (18:23 +0800)]
ASoC/soundwire: remove sdw_slave_extended_id

This structure is used to copy information from the 'sdw_slave'
structures, it's better to create a flexible array of 'sdw_slave'
pointers and directly access the information. This will also help
access additional information stored in the 'sdw_slave' structure,
such as an SDCA context.

This patch does not add new functionality, it only modified how the
information is retrieved.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016102333.294448-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agosoundwire: sdw_intel: include linux/acpi.h
Bard Liao [Wed, 16 Oct 2024 10:23:23 +0000 (18:23 +0800)]
soundwire: sdw_intel: include linux/acpi.h

For the acpi_handle stuff.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Acked-by: Vinod Koul <vkoul@kernel.org>
Link: https://patch.msgid.link/20241016102333.294448-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: SOF: sof-of-dev: add parameter to override tplg/fw_filename
Anne Onciulescu [Thu, 17 Oct 2024 11:03:13 +0000 (14:03 +0300)]
ASoC: SOF: sof-of-dev: add parameter to override tplg/fw_filename

Add support to override topology and firmware filename,
using module parameters. This is helpful for development
and also for testing various scenarios.

Signed-off-by: Anne Onciulescu <anne.onciulescu@gmail.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Chao Song <chao.song@linux.intel.com>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20241017110313.1423258-1-daniel.baluta@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: mediatek: mt8188: remove unnecessary variable assignment
Tang Bin [Wed, 16 Oct 2024 01:18:51 +0000 (09:18 +0800)]
ASoC: mediatek: mt8188: remove unnecessary variable assignment

In the function mt8188_adda_mtkaif_init, 'val' to 0 is repeated,
thus delete one.

Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
Link: https://patch.msgid.link/20241016011851.2023-1-tangbin@cmss.chinamobile.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: rsnd: Refactor port handling with helper for endpoint node selection
Lad Prabhakar [Fri, 11 Oct 2024 17:53:46 +0000 (18:53 +0100)]
ASoC: rsnd: Refactor port handling with helper for endpoint node selection

Refactor the code responsible for selecting the correct device node for
audio endpoint parsing in the rsnd driver. A new helper function
`rsnd_pick_endpoint_node_for_ports()` is introduced to handle the
selection of the endpoint node by checking whether the port is named
'port' or 'ports'.

This change simplifies the logic in both `rsnd_dai_of_node()` and
`rsnd_dai_probe()` functions by replacing repetitive condition checks
with the new helper.

Suggested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/20241011175346.1093649-1-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: loongson: make loongson-i2s.o a separate module
Arnd Bergmann [Tue, 15 Oct 2024 15:09:54 +0000 (15:09 +0000)]
ASoC: loongson: make loongson-i2s.o a separate module

An object file should not be linked into multiple modules and/or
vmlinux:

scripts/Makefile.build:221: /home/arnd/arm-soc/sound/soc/loongson/Makefile: loongson_i2s.o is added to multiple modules: snd-soc-loongson-i2s-pci snd-soc-loongson-i2s-plat

Change this one to make it a library module with two exported symbols
that will work in any configuration.

Fixes: ba4c5fad598c ("ASoC: loongson: Add I2S controller driver as platform device")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20241015150958.2294155-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: codecs: Remove unneeded semicolon
Yang Li [Thu, 17 Oct 2024 05:19:09 +0000 (13:19 +0800)]
ASoC: codecs: Remove unneeded semicolon

This patch removes an unneeded semicolon after a switch statement.

./sound/soc/codecs/ntp8835.c:280:2-3: Unneeded semicolon

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=11404
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Link: https://patch.msgid.link/20241017051909.4638-1-yang.lee@linux.alibaba.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: makes snd_soc_set_runtime_hwparams() inline
Kuninori Morimoto [Wed, 16 Oct 2024 01:35:27 +0000 (01:35 +0000)]
ASoC: makes snd_soc_set_runtime_hwparams() inline

snd_soc_set_runtime_hwparams() is now doing very simple things.
We can makes it simply inline function, without having EXPORT_SYMBOL_GPL()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87cyk0eso0.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: Merge up fixes
Mark Brown [Thu, 17 Oct 2024 11:12:25 +0000 (12:12 +0100)]
ASoC: Merge up fixes

Some refactoring opportunities for the rcard driver were noticed while
fixing a bug.

6 months agoASoC: Intel: sof_sdw: Add quirks for some new Lenovo laptops
Charles Keepax [Wed, 16 Oct 2024 03:03:44 +0000 (11:03 +0800)]
ASoC: Intel: sof_sdw: Add quirks for some new Lenovo laptops

Add some more sidecar amplifier quirks.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016030344.13535-5-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: Intel: sof_sdw: Add quirk for cs42l43 system using host DMICs
Charles Keepax [Wed, 16 Oct 2024 03:03:43 +0000 (11:03 +0800)]
ASoC: Intel: sof_sdw: Add quirk for cs42l43 system using host DMICs

Add quirk to inform the machine driver to not bind in the cs42l43
microphone DAI link.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016030344.13535-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: sdw_utils: Add a quirk to allow the cs42l43 mic DAI to be ignored
Charles Keepax [Wed, 16 Oct 2024 03:03:42 +0000 (11:03 +0800)]
ASoC: sdw_utils: Add a quirk to allow the cs42l43 mic DAI to be ignored

To support some systems using host microphones add a quirk to allow the
cs42l43 microphone DAI link to be ignored.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016030344.13535-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: sdw_utils: Add support for exclusion DAI quirks
Charles Keepax [Wed, 16 Oct 2024 03:03:41 +0000 (11:03 +0800)]
ASoC: sdw_utils: Add support for exclusion DAI quirks

The system contains a mechanism for certain DAI links to be included
based on a quirk. Add support for certain DAI links to excluded based on
a quirk, this is useful in situations where the vast majority of SKUs
utilise a feature so it is easier to quirk on those that don't.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20241016030344.13535-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoASoC: rt-sdw-common: Enhance switch case to prevent uninitialized variable
Jack Yu [Mon, 14 Oct 2024 09:55:20 +0000 (09:55 +0000)]
ASoC: rt-sdw-common: Enhance switch case to prevent uninitialized variable

If det_mode is not 0, 3 or 5 then function will return
jack_type with an uninitialzed value.
Enhance switch case to prevent uninitialized variable issue.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://patch.msgid.link/8631337239d744088d56caab2d8f39cb@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 months agoMAINTAINERS: Update maintainer list for MICROCHIP ASOC, SSC and MCP16502 drivers
Andrei Simion [Mon, 14 Oct 2024 09:28:31 +0000 (12:28 +0300)]
MAINTAINERS: Update maintainer list for MICROCHIP ASOC, SSC and MCP16502 drivers

To help Claudiu and offload the work, add myself to the maintainer list for
those drivers.

Acked-by: Claudiu Beznea <claudiu.beznea@tuxon.dev>
Signed-off-by: Andrei Simion <andrei.simion@microchip.com>
Link: https://patch.msgid.link/20241014092830.46709-1-andrei.simion@microchip.com
Signed-off-by: Mark Brown <broonie@kernel.org>