summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-06-19ASoC: core: Check for rtd == NULL in snd_soc_remove_pcm_runtime()Peter Ujfalusi
snd_soc_remove_pcm_runtime() might be called with rtd == NULL which will leads to null pointer dereference. This was reproduced with topology loading and marking a link as ignore due to missing hardware component on the system. On module removal the soc_tplg_remove_link() would call snd_soc_remove_pcm_runtime() with rtd == NULL since the link was ignored, no runtime was created. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://patch.msgid.link/20250619084222.559-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-19ASoC: topology: Do not call snd_soc_remove_pcm_runtime() for ignored linksPeter Ujfalusi
If a link has been ignored then it is not even added. The snd_soc_get_pcm_runtime() will return NULL as the runtime will does not exist. We can just skip this step to avoid performing a lookup to do nothing. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://patch.msgid.link/20250619084222.559-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-17ASoC: tegra: AHUB: Remove unneeded semicolonChen Ni
Remove unnecessary semicolons reported by Coccinelle/coccicheck and the semantic patch at scripts/coccinelle/misc/semicolon.cocci. Signed-off-by: Chen Ni <nichen@iscas.ac.cn> Link: https://patch.msgid.link/20250617032103.1725040-1-nichen@iscas.ac.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-16ASoC: Intel: Replace deprecated strcpy() with strscpy()Sachin Mokashi
strcpy() is deprecated, use strscpy() instead. As strcpy() performs no bounds checking on the destination buffer. This could result in buffer overflow. The safe replacement is strscpy(). Link: https://github.com/KSPP/linux/issues/88 Signed-off-by: Sachin Mokashi <sachin.mokashi@intel.com> Link: https://patch.msgid.link/20250613163530.1165690-1-sachin.mokashi@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-16firmware: cs_dsp: Remove unused struct list_head from cs_dsp_coeff_ctlRichard Fitzgerald
Remove two unused pointers from struct cs_dsp_coeff_ctl by taking the struct list_head out of struct cs_dsp_alg_region. On a x86_64 build this saves 16 bytes per control. Each cs_dsp_coeff_ctl instance needs to keep information about the algorithm region it refers to. This is done by embedding an instance of struct cs_dsp_alg_region. But cs_dsp_alg_region was also used to store entries in a list of algorithm regions, and so had a struct list_head object for that purpose. This list_head object is not used with the embedded object in struct cs_dsp_alg_region so was just wasted bytes. A new struct cs_dsp_alg_region_list_item has been defined for creating the list of algorithm regions. It contains a struct cs_dsp_alg_region and a struct list_head. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250616103052.66537-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-13ASoC: mediatek: use reserved memory or enableMark Brown
Merge series from Chen-Yu Tsai <wenst@chromium.org>: Angelo requested that these platforms use reserved memory regions if possible, and fall back to pre-allocated buffers only if that fails, to align with other MediaTek SoCs / platforms that already use reserved memory. The series covers MediaTek's MT8173, MT8183, MT8186, and MT8192 SoCs. There are three parts to the series: - Part one (patches 1 through 5) update the DT bindings to allow having a memory region. The text binding for the MT8173 was converted to YAML and also aligned with current usage by addition of a power domain. Note that the MT8183 text binding was _not_ converted. It is drastically different from what was landed in the device trees. Some time is needed to work out the differences. I might try to recombine the audio clocks (which are actually part of the same hardware block) as well. - Part two (patches 6 through 9) update the audio frontend drivers for the various platforms covered in this series. - Patch 6 is the evolution of version 1, now defaulting to reserved memory if possible. - Patch 7 adds support for >32 bit DMA addresses to the MT8183 driver. This was missing, and prevents the memory regions, which are allocated from the top end of main memory by default, from working. - Patch 8 and 9 are just some minor cleanups to reduce the number of "&pdev->dev" style dereferences. They are placed after the other changes to make it easier for the fixes to be backported. - Part three (patches 10 through 13) add a reserved memory region for the audio frontend on the various platforms. (This part is queued up and therefore not included in v3.) For the MT8173, the change covers the whole platform. In practice there are only ChromeOS devices. For the other platforms, only the ChromeOS devices are covered. These are what I have available for testing. Please have a look. I assume the DT binding and driver changes will go through the ASoC tree, while the device tree changes will go through the MediaTek tree.
2025-06-13ASoC: hdmi-codec: use SND_JACK_AVOUT as jack statusTerry Cheong
Use SND_JACK_AVOUT as the mask to align with hdac_hdmi driver so that we can determine HDMI/DP devices from event type. Most drivers that uses hdmi-codec driver will not be affected since they are creating jacks with SND_JACK_LINEOUT mask. They will still report SND_JACK_LINEOUT when the jack status is updated with snd_soc_jack_report. Signed-off-by: Terry Cheong <htcheong@chromium.org> Link: https://patch.msgid.link/20250613-hdmi-v1-1-665ba7ecd5e7@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-13ASoC: soc-ops-test: dynamically allocate struct snd_ctl_elem_valueKuninori Morimoto
This structure is really too larget to be allocated on the stack: linux/sound/soc/soc-ops-test.c:520:1: error: the frame size of\ 1304 bytes is larger than 1280 bytes [-Werror=frame-larger-than=] Change the function to dynamically allocate it instead. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87sek489l8.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: mediatek: mt8183-afe-pcm: use local `dev` pointer in driver callbacksChen-Yu Tsai
The probe and remove functions in the mt8183-afe-pcm driver repeatedly uses `&pdev->dev` for |struct device *|, but then assigns this value to `afe->dev` and uses that in other places in the same function. Store `&pdev->dev` in a local pointer and use that exclusively to avoid the numerous dereferences and to make the code more consistent. Lines are reflowed where it makes sense. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20250612074901.4023253-10-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: mediatek: mt8173-afe-pcm: use local `dev` pointer in driver callbacksChen-Yu Tsai
The probe and remove functions in the mt8183-afe-pcm driver repeatedly uses `&pdev->dev` for |struct device *|, but then assigns this value to `afe->dev` and uses that in other places in the same function. Store `&pdev->dev` in a local pointer and use that exclusively to avoid the numerous dereferences and to make the code more consistent. Lines are reflowed where it makes sense. Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20250612074901.4023253-9-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: mediatek: mt8183-afe-pcm: Support >32 bit DMA addressesChen-Yu Tsai
The AFE DMA hardware supports up to 34 bits for DMA addresses. This is missing from the driver and prevents reserved memory regions from working properly when the allocated region is above the 4GB line. Fill in the related register offsets for each DAI, and also set the DMA mask. Also fill in the LSB end register offsets for completeness. Fixes: a94aec035a12 ("ASoC: mediatek: mt8183: add platform driver") Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20250612074901.4023253-8-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: mediatek: use reserved memory or enable buffer pre-allocationChen-Yu Tsai
In commit 32c9c06adb5b ("ASoC: mediatek: disable buffer pre-allocation") buffer pre-allocation was disabled to accommodate newer platforms that have a limited reserved memory region for the audio frontend. Turns out disabling pre-allocation across the board impacts platforms that don't have this reserved memory region. Buffer allocation failures have been observed on MT8173 and MT8183 based Chromebooks under low memory conditions, which results in no audio playback for the user. Since some MediaTek platforms already have dedicated reserved memory pools for the audio frontend, the plan is to enable this for all of them. This requires device tree changes. As a fallback, reinstate the original policy of pre-allocating audio buffers at probe time of the reserved memory pool cannot be found or used. This patch covers the MT8173, MT8183, MT8186 and MT8192 platforms for now, the reason being that existing MediaTek platform drivers that supported reserved memory were all platforms that mainly supported ChromeOS, and is also the set of devices that I can verify. Fixes: 32c9c06adb5b ("ASoC: mediatek: disable buffer pre-allocation") Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20250612074901.4023253-7-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: dt-bindings: mt8192-afe-pcm: Allow specifying reserved memory regionChen-Yu Tsai
It is desirable to reserve memory for the audio frontend. Allow the "memory-region" property, to be used to point to a reserved memory region. Acked-by: "Rob Herring (Arm)" <robh@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20250612074901.4023253-6-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: dt-bindings: mt8186-afe-pcm: Allow specifying reserved memory regionChen-Yu Tsai
It is desirable to reserve memory for the audio frontend. Allow the "memory-region" property, to be used to point to a reserved memory region. Acked-by: "Rob Herring (Arm)" <robh@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20250612074901.4023253-5-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: dt-bindings: mt8173-afe-pcm: Allow specifying reserved memory regionChen-Yu Tsai
It is desirable to reserve memory for the audio frontend. Allow the "memory-region" property, to be used to point to a reserved memory region. Acked-by: "Rob Herring (Arm)" <robh@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20250612074901.4023253-4-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: dt-bindings: mt8173-afe-pcm: Add power domainChen-Yu Tsai
The audio subsystem sits under a controllable power domain. Add it to the binding. Acked-by: "Rob Herring (Arm)" <robh@kernel.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20250612074901.4023253-3-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: dt-bindings: Convert MT8173 AFE binding to dt-schemaChen-Yu Tsai
Convert the MT8173 AFE (audio frontend) binding from text to dt-schema in YAML. "clocks" is added to the list of required properties to match "clock-names". And the example was slightly fixed up in style. Otherwise everything is as before. A contributer and maintainer for a recently added MediaTek audio binding was chosen instead of the original submitter. Cc: Trevor Wu <trevor.wu@mediatek.com> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20250612074901.4023253-2-wenst@chromium.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-12ASoC: tas2781: Move the "include linux/debugfs.h" into tas2781.hShenghao Ding
Move the include linux/debugfs.h into tas2781.h for code clean. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20250612044252.1025-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-10ASoC: ops: dynamically allocate struct snd_ctl_elem_valueArnd Bergmann
This structure is really too larget to be allocated on the stack: sound/soc/soc-ops.c:435:5: error: stack frame size (1296) exceeds limit (1280) in 'snd_soc_limit_volume' [-Werror,-Wframe-larger-than] Change the function to dynamically allocate it instead. There is probably a better way to do it since only two integer fields inside of that structure are actually used, but this is the simplest rework for the moment. Fixes: 783db6851c18 ("ASoC: ops: Enforce platform maximum on initial value") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20250610093057.2643233-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-09ASoC: codecs: More const and unused member cleanupsMark Brown
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Make static data const for code safety and drop some unused fields in structs.
2025-06-09Add DisplayPort sound support for Fairphone 5Mark Brown
Merge series from Luca Weiss <luca.weiss@fairphone.com>: Add the necessary sound card bits and some dts additions to enable sound over DisplayPort-over-USB-C, e.g. to a connected TV or monitor. The UCM files can be found here: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/tree/master/device/testing/device-fairphone-fp5/ucm This series - in spirit - depends on the series enabling DisplayPort in the first place, but can land pretty independently, especially the ASoC bits: https://lore.kernel.org/linux-arm-msm/20250312-fp5-pmic-glink-dp-v2-0-a55927749d77@fairphone.com/
2025-06-09ASoC: Add Richtek RTQ9124 supportMark Brown
Merge series from cy_huang@richtek.com: This patch series adds Richtek RTQ9124 1x30W audio amplifier support.
2025-06-09Cleanup in rockchip_sai.cMark Brown
Merge series from Pei Xiao <xiaopei01@kylinos.cn>: 1.Simplify the condition logic in 2.Use helper function devm_clk_get_enabled()
2025-06-09ASoC: remove component->idMark Brown
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: snd_soc_component has "id", but no one is using it except Qcom. It is initialized at snd_soc_component_initialize(), but Qcom overwrites it. According to Srinivas, unfortunately, current Qcom lpass is broken. But we can update it and then, avoid to use component->id. Let's do it, and remove it.
2025-06-09ASoC: tas571x: add support for tas5753Mark Brown
Merge series from Bram Vlerick <bram.vlerick@openpixelsystems.org>: Add support for the ti,tas5753 to tas571x driver.
2025-06-09Use helper function for_each_child_of_node_scoped()Mark Brown
Merge series from Ai Chao <aichao@kylinos.cn>: This patch series introduces wrapper functions for_each_child_of_node_scoped(). The for_each_child_of_node_scoped() helper provides a scope-based clean-up functionality to put the device_node automatically, and as such, there is no need to call of_node_put() directly.
2025-06-09ASoC: Intel: avs: Add rt5640 board supportMark Brown
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>: Small set of patches intoducing two low-impact improvements to rt5640 codec driver and then avs_rt5640 machine board driver. The board behavior is based on existing boards such as avs_rt274. In regard to the retry-device-verification change, there is number of similar "fixes" found in the Realtek code in sound/soc/codecs. What I provide here is verified with tests, the delay is not mentioned in the spec I have access to.
2025-06-09ASoC: codecs: wcd93xx: Few simplifications of code andMark Brown
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>: Make the WCD93xx codec drivers simpler using devm_regulator_bulk_get_enable() and obtain missing VDD_PX supply on wcd939x. Context depends on fixes: https://lore.kernel.org/r/20250526-b4-b4-asoc-wcd9395-vdd-px-fixes-v1-0-0b8a2993b7d3@linaro.org
2025-06-09ASoC: renesas: msiof: Convert to <linux/spi/sh_msiof.h>Geert Uytterhoeven
Convert the MSIOF I2S driver to reuse the MSIOF register and register bit definitions in the header file shared by the MSIOF SPI driver. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/754ed54057e54effd06143e71d6cd305c3334eca.1747401908.git.geert+renesas@glider.be Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-09ASoC: amd: acp: Fix pointer assignments for snd_soc_acpi_mach structuresVenkata Prasad Potturu
This patch modifies the assignment of machine structure pointers in the acp_pci_probe function. Previously, the machine pointers were assigned using the address-of operator (&), which caused incompatibility issues in type assignments. Additionally, the declarations of the machine arrays in amd.h have been updated to reflect that they are indeed arrays (`[]`). The code is further cleaned up by declaring the codec structures in amd-acpi-mach.c as static, reflecting their intended usage. error: symbol 'amp_rt1019' was not declared. Should it be static? error: symbol 'amp_max' was not declared. Should it be static? error: symbol 'snd_soc_acpi_amd_acp_machines' was not declared. Should it be static? error: symbol 'snd_soc_acpi_amd_rmb_acp_machines' was not declared. Should it be static? error: symbol 'snd_soc_acpi_amd_acp63_acp_machines' was not declared. Should it be static? error: symbol 'snd_soc_acpi_amd_acp70_acp_machines' was not declared. Should it be static? Fixes: 9c2c0ef64009 ("ASoC: amd: acp: Fix snd_soc_acpi_mach id's duplicate symbol error") Link: https://github.com/thesofproject/linux/issues/5438 Signed-off-by: Venkata Prasad Potturu <venkataprasad.potturu@amd.com> Link: https://patch.msgid.link/20250609121251.639080-1-venkataprasad.potturu@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-09ASoC: codecs: Add support for Richtek RTQ9124ChiYuan Huang
Add codecs driver for Richtek RTQ9124. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://patch.msgid.link/aca49d1912bfd1b90e82146df6393760a731810c.1749454717.git.cy_huang@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-09ASoC: dt-bindings: rt9123: Append RTQ9124 descriptionChiYuan Huang
Document the ASoC Richtek RTQ9124 in existed RT9123 file. Signed-off-by: ChiYuan Huang <cy_huang@richtek.com> Link: https://patch.msgid.link/9921d64ce4d63c24499f92ef33a4ce7cb018c60b.1749454717.git.cy_huang@richtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: tas2781: Drop the unnecessary symbol implyShenghao Ding
The unnecessary symbols for imply are SND_SOC_TAS2781_COMLIB, SND_SOC_TAS2781_COMLIB_I2C, and SND_SOC_TAS2781_FMWLIB. They all used for library compiling. All the symbols in the imply are used for codec driver compiling. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Link: https://patch.msgid.link/20250523131111.1884-1-shenghao-ding@ti.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: dt-bindings: covert mxs-audio-sgtl5000.txt to yaml formatFrank Li
Convert mxs-audio-sgtl5000.txt to yaml format. Additional changes: - Add compatible string: bluegiga,apx4devkit-sgtl5000 denx,m28evk-sgtl5000 fsl,imx28-mbmx28lc-sgtl500 - Remove audio-routing from required list. Signed-off-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: "Rob Herring (Arm)" <robh@kernel.org> Link: https://patch.msgid.link/20250528165755.692264-1-Frank.Li@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: soc-dai: tidyup return value of snd_soc_xlate_tdm_slot_mask()Kuninori Morimoto
commit 7f1186a8d738661 ("ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()") checks return value of xlate_tdm_slot_mask() (A1)(A2). /* * ... (Y) * TDM mode can be disabled by passing 0 for @slots. In this case @tx_mask, * @rx_mask and @slot_width will be ignored. * ... */ int snd_soc_dai_set_tdm_slot(...) { ... if (...) (A1) ret = dai->driver->ops->xlate_tdm_slot_mask(...); else (A2) ret = snd_soc_xlate_tdm_slot_mask(...); if (ret) goto err; ... } snd_soc_xlate_tdm_slot_mask() (A2) will return -EINVAL if slots was 0 (X), but snd_soc_dai_set_tdm_slot() allow to use it (Y). (A) static int snd_soc_xlate_tdm_slot_mask(...) { ... if (!slots) (X) return -EINVAL; ... } Call xlate_tdm_slot_mask() only if slots was non zero. Reported-by: Giedrius Trainavičius <giedrius@blokas.io> Closes: https://lore.kernel.org/r/CAMONXLtSL7iKyvH6w=CzPTxQdBECf++hn8RKL6Y4=M_ou2YHow@mail.gmail.com Fixes: 7f1186a8d738661 ("ASoC: soc-dai: check return value at snd_soc_dai_set_tdm_slot()") Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/8734cdfx59.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: hdac_hdmi: remove hdac_hdmi_jack[_port]_init()Kuninori Morimoto
No one is using hdac_hdmi_jack[_port]_init(). Remove it and its related functions. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87o6v3j73q.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: codecs: lpass: Drop unused AIF_INVALID first DAI identifierKrzysztof Kozlowski
All four Qualcomm SoC macro codecs define DAI IDs in an enum starting with AIF_INVALID=0, which is nowhere used in the code thus actual DAI IDs start from 1. Drivers do not have their own of_xlate_dai_name(), thus snd_soc_get_dlc() expects the DTS to start numbering DAIs from 0, which creates confusing debugging scenario, e.g. DTS should use <&lpass_wsamacro 2> for WSA_MACRO_AIF_VI with dai->id=3. This also wastes some space, because drivers allocate few arrays for all DAIs and basically the [0] is never used. Drop the confusing first AIF_INVALID DAI identifier so the enum with DAI IDs will start from 0. This has little functional impact and does not affect the ABI, except saving a few bytes of memory per driver. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250523121811.380045-2-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: Intel: avs: Add rt5640 machine boardCezary Rojewski
To support connection between Intel AudioDSP and Realek 5640 codec implement avs_rt5640 machine board driver. The codec chip is located on I2C bus and the streaming occurs over I2S interface. A number of such devices can be connected simultaneously to the platform. Majority of the board's behavior is inherited from existing representatives such as avs_rt274. Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250530142120.2944095-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: codecs: rt5640: Retry DEVICE_ID verificationXinxin Wan
To be more resilient to codec-detection failures when the hardware powers on slowly, add retry mechanism to the device verification check. Similar pattern is found throughout a number of Realtek codecs. Our tests show that 60ms delay is sufficient to address readiness issues on rt5640 chip. Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Signed-off-by: Xinxin Wan <xinxin.wan@intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250530142120.2944095-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: codecs: rt5640: Drop dummy register namesCezary Rojewski
Registers 0xfa and 0xfb represent "General Control 1" and "General Control 2" respectively. Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250530142120.2944095-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASOC: rockchip: Use helper function devm_clk_get_enabled()Pei Xiao
Since commit 7ef9651e9792 ("clk: Provide new devm_clk helpers for prepared and enabled clocks"), devm_clk_get() and clk_prepare_enable() can now be replaced by devm_clk_get_enabled() when driver enables the clocks for the whole lifetime of the device. Moreover, it is no longer necessary to unprepare and disable the clocks explicitly. Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Acked-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Link: https://patch.msgid.link/84bc40641d05596f1edf4f01d1e6aea16bdbeeb5.1749201126.git.xiaopei01@kylinos.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASOC: rockchip: fix capture stream handling in rockchip_sai_xfer_stopPei Xiao
Correcting the capture stream handling which was incorrectly setting playback=true for capture streams. The original code mistakenly set playback=true for capture streams, causing incorrect behavior. Fixes: cc78d1eaabad ("ASoC: rockchip: add Serial Audio Interface (SAI) driver") Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn> Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Acked-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com> Link: https://patch.msgid.link/c374aae92c177aaf42c0f1371eccdbc7e9615786.1749201126.git.xiaopei01@kylinos.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: dt-bindings: tas57xx: add tas5753 compatibilityBram Vlerick
Add tas5753 to ti,tas57xx devicetree bindings. Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org> Link: https://patch.msgid.link/20250528-asoc-tas5753-support-v1-2-a50c3f6734ee@openpixelsystems.org Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: tas571x: add support for tas5753Bram Vlerick
Add support for tas5753, device is similar to tas5733 but with added headphone / line driver. Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org> Link: https://patch.msgid.link/20250528-asoc-tas5753-support-v1-1-a50c3f6734ee@openpixelsystems.org Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Acked-by: Peter Korsgaard <peter@korsgaard.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: codecs: wcd939x: Add VDD_PX supplyKrzysztof Kozlowski
Device has also VDD_PX supply, which should be acquired by the driver. Regulator framework will provide a dummy supply, thus the change is compatible with older DTS. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-6-64d3cb60313b@linaro.org Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: dt-bindings: qcom,wcd939x: Document missing VDD_PX supplyKrzysztof Kozlowski
Document VDD_PX supply on WCD9390 and WCD9395 audio codecs, which was missed in original posting. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-5-64d3cb60313b@linaro.org Acked-by: "Rob Herring (Arm)" <robh@kernel.org> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: codecs: wcd939x: Simplify return from devm_gpiod_get() errorKrzysztof Kozlowski
No need to store devm_gpiod_get() error code in temporary variable. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-4-64d3cb60313b@linaro.org Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: codecs: wcd939x: Simplify with devm_regulator_bulk_get_enable()Krzysztof Kozlowski
Drop separate regulator get and enable in probe() path with devm_regulator_bulk_get_enable(), which simplifies cleanup paths and device remove(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-3-64d3cb60313b@linaro.org Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: codecs: wcd938x: Simplify with devm_regulator_bulk_get_enable()Krzysztof Kozlowski
Drop separate regulator get and enable in probe() path with devm_regulator_bulk_get_enable(), which simplifies cleanup paths and device remove(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-2-64d3cb60313b@linaro.org Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2025-06-08ASoC: codecs: wcd937x: Simplify with devm_regulator_bulk_get_enable()Krzysztof Kozlowski
Drop separate regulator get and enable in probe() path with devm_regulator_bulk_get_enable(), which simplifies cleanup paths and device remove(). Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250526-b4-asoc-wcd9395-vdd-px-v1-1-64d3cb60313b@linaro.org Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Signed-off-by: Mark Brown <broonie@kernel.org>