summaryrefslogtreecommitdiff
path: root/sound/soc
AgeCommit message (Collapse)Author
2025-05-06ASoC: sdw_utils: Remove num_platforms from simple DAI helperCharles Keepax
There is no point in passing num_platforms into asoc_sdw_init_simple_dai_link(). Firstly, as a single pointer for the component name is passed in only a single string can be passed and secondly if it is a complex DAI with multiple platforms it would make more sense to use asoc_sdw_init_dai_link(). Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250505141409.2614010-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-05ALSA: hda/tas2781: select CONFIG_CRC8 for SND_HDA_SCODEC_TAS2781_I2CArnd Bergmann
The crc8 function is used by the common fmwlib module, so this has to be selected directly to avoid a link failure: ERROR: modpost: "crc8" [sound/soc/codecs/snd-soc-tas2781-fmwlib.ko] undefined! Fixes: 9fa6a693ad8d ("ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage SND_SOC_TAS2781_FMWLIB") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20250505052303.1812002-1-arnd@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-05-05ASoC: intel: atom: Return -ENOMEM if pcim_iomap() failsPhilipp Stanner
The error checks for pcim_iomap() have the function return -EINVAL. -ENOMEM is a more appropriate error code. Replace -EINVAL with -ENOMEM. Signed-off-by: Philipp Stanner <phasta@kernel.org> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250425081742.61623-6-phasta@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-05ASoC: intel: atom: Use pure devres PCIPhilipp Stanner
pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Remove the call to pci_release_regions(), since pcim_ functions do cleanup automatically. Pass 0 as length parameter to pcim_iomap(), which is the standard way for ioremapping an entire BAR. Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://patch.msgid.link/20250425081742.61623-5-phasta@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-05ASoC: intel: avs: Use pure devres PCIPhilipp Stanner
pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Remove the goto jump to pci_release_regions(), since pcim_ functions clean up automatically. Signed-off-by: Philipp Stanner <phasta@kernel.org> Link: https://patch.msgid.link/20250425081742.61623-4-phasta@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-05ASoC: sof: Use pure devres PCIPhilipp Stanner
pci_request_regions() is a hybrid function which becomes managed if pcim_enable_device() was called before. This hybrid nature is deprecated and should not be used anymore. Replace pci_request_regions() with the always-managed function pcim_request_all_regions(). Remove surplus calls to PCI release functions, since pcim_ functions do cleanup automatically. Signed-off-by: Philipp Stanner <phasta@kernel.org> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250425081742.61623-3-phasta@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-05ASoC: mediatek: mt8188-mt6359: select CONFIG_SND_SOC_MT6359_ACCDETArnd Bergmann
The driver support was added without selecting the codec, which leads to a link failure: aarch64-linux-ld: sound/soc/mediatek/mt8188/mt8188-mt6359.o: in function `mt8188_mt6359_init': mt8188-mt6359.c:(.text+0x19f0): undefined reference to `mt6359_accdet_enable_jack_detect' Fixes: f35d834d67ad ("ASoC: mediatek: mt8188-mt6359: Add accdet headset jack detect support") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Link: https://patch.msgid.link/20250505052106.1811802-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-04ASoC: SOF: amd: add soundwire IO support for ACP7.0 &Mark Brown
Merge series from Vijendar Mukunda <Vijendar.Mukunda@amd.com>: This patch series contains - ACP sof stack improvements - Add support for ACP7.1 platform. - Soundwire IO support for ACP7.0 & ACP7.1 platforms Link: https://github.com/thesofproject/linux/pull/5392
2025-05-03ASoC: SOF: amd: add build support for soundwireVijendar Mukunda
Add build support for SoundWire for ACP7.0/ACP7.1 platforms. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-10-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-03ASoC: SOF: amd: add soundwire wake irq handlingVijendar Mukunda
Add SoundWire wake interrupt handling for ACP7.0 & ACP7.1 platforms. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-9-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-03ASoC: SOF: amd: enable soundwire host wake irq maskVijendar Mukunda
Enable SoundWire host wake interrupt mask during acp init sequence based on wake enable checks for each SoundWire manager instance for ACP7.0 & ACP7.1 platforms. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-8-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-03ASoC: SOF: amd: refactor acp reset sequenceVijendar Mukunda
Below mentioned register sequence should be part of acp init sequence. 1) Set ACP clock mux selection register to ACP_ACLK clock source. 2) Enable ACP global interrupt enable register 3) Enable ACP error interrupt mask. ACP reset sequence should contain code related to asserting acp soft reset and release the soft reset. Move the rest of the registers programming to acp init sequence. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-7-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-03ASoC: SOF: amd: enable ACP_PME_EN register for ACP7.0 & ACP7.1 platformsVijendar Mukunda
As per design flow for ACP7.0 & ACP7.1 platforms, enable ACP_PME_EN register for below scenarios. 1. During acp init sequence 2. During resume sequence for SoundWire ClockStop power mode. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-03ASoC: SOF: amd: update soundwire specific acp descriptor fieldsVijendar Mukunda
Update SoundWire specific acp descriptor structure fields for ACP7.0 & ACP7.1 platforms. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-03ASoC: SOF: amd: add ACP7.1 platform supportVijendar Mukunda
Add SOF support for ACP7.1 platform. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-03ASoC: SOF: amd: add missing acp descriptor fieldVijendar Mukunda
Add missing acp descriptor field acp_error_stat for ACP7.0 platform. Fixes: 490be7ba2a01 ("ASoC: SOF: amd: add support for acp7.0 based platform") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-03ASoC: SOF: amd: remove else condition in resume sequenceVijendar Mukunda
Else condition is not required after break/return statement. Remove else condition in resume callback. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20250502154445.3008598-2-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-03ASoC: soc-utils: add snd_soc_dlc_is_dummy()Mark Brown
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: We are using dummy component/dlc, but didn't have its check funciton. This patch adds it.
2025-05-02ASoC: fsl_rpmsg: Allocate a smaller buffer size for capture streamChancel Liu
If both playback and capture streams have large buffer size in low power audio case, the total size will exceed the maximum buffer size for this sound card. Capture stream doesn't need so large buffer size in fact. So calculate a reasonable smaller buffer size and allocate it for capture stream. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20250421105701.2273588-2-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-02ASoC: fsl_rpmsg: Configure CPU DAI for card that sits on rpmsg-micfil-channelChancel Liu
Sound card that sits on rpmsg-micfil-channel has different settings on CPU DAI. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20250421105701.2273588-1-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-02ASoC: codecs: tas2764: Fix Wvoid-pointer-to-enum-cast warningKrzysztof Kozlowski
'devid' is an enum, thus cast of pointer on 64-bit compile test with clang and W=1 causes: tas2764.c:879:19: error: cast to smaller integer type 'enum tas2764_devid' from 'const void *' [-Werror,-Wvoid-pointer-to-enum-cast] One of the discussions in 2023 on LKML suggested warning is not suitable for kernel. Nothing changed in this regard for more than a year, so assume the warning will stay and we want to have warnings-free builds. Link: https://lore.kernel.org/all/20230814160457.GA2836@dev-arch.thelio-3990X/ Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250427105105.18164-4-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-02ASoC: codecs: wsa88xx/wcd938x: Drop kerneldoc marker from inner commentKrzysztof Kozlowski
Drop the kerneldoc marker from a comment within a function: wsa883x.c:1402: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202504261851.TJGZIvtl-lkp@intel.com/ Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://patch.msgid.link/20250427105105.18164-3-krzysztof.kozlowski@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-02ASoC: mediatek: mt8195: use snd_soc_dlc_is_dummy()Kuninori Morimoto
We can use snd_soc_dlc_is_dummy(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87a58g8vue.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-02ASoC: mediatek: mt8188: use snd_soc_dlc_is_dummy()Kuninori Morimoto
We can use snd_soc_dlc_is_dummy(). Let's use it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87bjsw8vuk.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-02ASoC: soc-utils: add snd_soc_dlc_is_dummy()Kuninori Morimoto
We have snd_soc_xxx_is_dummy() functions, but not for dlc. Let's add it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87cydc8vup.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: codec: twl4030: Convert to GPIO descriptorsMark Brown
Merge series from "Peng Fan (OSS)" <peng.fan@oss.nxp.com>: This is separated from [1]. With an update that sorting the headers in a separate patch. No other changes, so I still keep Linus' R-b for Patch 2. [1] https://lore.kernel.org/all/20250408-asoc-gpio-v1-3-c0db9d3fd6e9@nxp.com/
2025-05-01ASoC: intel/sdw_utils: Add volume limits to CS35L56Mark Brown
Merge series from Stefan Binding <sbinding@opensource.cirrus.com>: Both CS35L56 and CS42L43 have maximum volumes above 0dB. However, for many use cases, this can cause distorted audio, depending various factors, such as other signal-processing elements in the chain, for example if the audio passes through a gain control before reaching the amp or the signal path has been tuned for a particular maximum gain in the amp. In the cases where systems use the soc_sdw_* drivers, audio above the 0dB volume will likely always be distorted, therefore apply a 0dB limit to those devices. Stefan Binding (2): ASoC: intel/sdw_utils: Add volume limit to cs42l43 speakers ASoC: intel/sdw_utils: Add volume limit to cs35l56 speakers include/sound/soc_sdw_utils.h | 1 + sound/soc/sdw_utils/soc_sdw_bridge_cs35l56.c | 4 ++++ sound/soc/sdw_utils/soc_sdw_cs42l43.c | 10 ++++++++ sound/soc/sdw_utils/soc_sdw_cs_amp.c | 24 ++++++++++++++++++++ 4 files changed, 39 insertions(+) -- 2.43.0
2025-05-01ASoC: stm32: sai: fix kernel rate configurationMark Brown
Merge series from Olivier Moysan <olivier.moysan@foss.st.com>: This patchset adds some checks on kernel minimum rate requirements. This avoids potential clock rate misconfiguration, when setting the kernel frequency on STM32MP2 SoCs.
2025-05-01ASoC: Intel: avs: Fix kcalloc() sizesThorsten Blum
rlist, clist, and slist are allocated using sizeof(pointer) instead of sizeof(*pointer). Fix the allocations by using sizeof(*pointer) and avoid overallocating memory on 64-bit systems. Fixes: f2f847461fb7 ("ASoC: Intel: avs: Constrain path based on BE capabilities") Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Link: https://patch.msgid.link/20250426141342.94134-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: codec: sma1307: Remove including of_gpio.hPeng Fan
of_gpio.h is deprecated. And there is no user in this driver using API in of_gpio.h, so remove it. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://patch.msgid.link/20250427055020.176099-1-peng.fan@oss.nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: codec: twl4030: Convert to GPIO descriptorsPeng Fan
of_gpio.h is deprecated, update the driver to use GPIO descriptors. - Use of_property_present to check "ti,hs_extmute_gpio" to set hs_extmute - if returned value is true. - Use devm_gpiod_get_optional to get GPIO descriptor, set consumer name. - Use gpiod_set_value to configure output value. While at here - drop remove hook after switching to use devm_gpiod_get_optional - Add return value for twl4030_init_chip to propagate value to parent in case defer probe happens Checking the only user logicpd-som-lv.dtsi that uses polarity GPIO_ACTIVE_HIGH, so all should work as expected. Cc: Tony Lindgren <tony@atomide.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250428-twl4030-v2-2-868d0d572f12@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: codec: twl4030: Sort headers alphabeticallyPeng Fan
Sort headers alphabetically to easily insert new ones and drop unused ones. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://patch.msgid.link/20250428-twl4030-v2-1-868d0d572f12@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: amd: ps: fix for irq handler return statusVijendar Mukunda
If any Soundwire manager interrupt is reported, and wake interrupt is not reported, in this scenario irq_flag will be set to zero, which results in interrupt handler return status as IRQ_NONE. Add new irq flag 'wake_irq_flag' check for SoundWire wake interrupt handling to fix incorrect irq handling return status. Fixes: 3898b189079c8 ("ASoC: amd: ps: add soundwire wake interrupt handling") Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Link: https://patch.msgid.link/20250430195517.3065308-1-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: simple-card-utils: Fix pointer check in graph_util_parse_link_directionAlexander Stein
Actually check if the passed pointers are valid, before writing to them. This also fixes a USBAN warning: UBSAN: invalid-load in ../sound/soc/fsl/imx-card.c:687:25 load of value 255 is not a valid value for type '_Bool' This is because playback_only is uninitialized and is not written to, as the playback-only property is absent. Fixes: 844de7eebe97 ("ASoC: audio-graph-card2: expand dai_link property part") Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com> Link: https://patch.msgid.link/20250429094910.1150970-1-alexander.stein@ew.tq-group.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: intel/sdw_utils: Add volume limit to cs35l56 speakersStefan Binding
The volume control for cs35l56 speakers has a maximum gain of +12 dB. However, for many use cases, this can cause distorted audio, depending various factors, such as other signal-processing elements in the chain, for example if the audio passes through a gain control before reaching the amp or the signal path has been tuned for a particular maximum gain in the amp. In the case of systems which use the soc_sdw_* driver, audio will likely be distorted in all cases above 0 dB, therefore add a volume limit of 400, which is 0 dB maximum volume inside this driver. The volume limit should be applied to both soundwire and soundwire bridge configurations. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Link: https://patch.msgid.link/20250430103134.24579-3-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: intel/sdw_utils: Add volume limit to cs42l43 speakersStefan Binding
The volume control for cs42l43 speakers has a maximum gain of +31.5 dB. However, for many use cases, this can cause distorted audio, depending various factors, such as other signal-processing elements in the chain, for example if the audio passes through a gain control before reaching the codec or the signal path has been tuned for a particular maximum gain in the codec. In the case of systems which use the soc_sdw_cs42l43 driver, audio will likely be distorted in all cases above 0 dB, therefore add a volume limit of 128, which is 0 dB maximum volume inside this driver. Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250430103134.24579-2-sbinding@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: stm32: sai: add a check on minimal kernel frequencyOlivier Moysan
On MP2 SoCs SAI kernel clock rate is managed through stm32_sai_set_parent_rate() function. If the kernel clock rate was set previously to a low frequency, this frequency may be too low to support the newly requested audio stream rate. However the stm32_sai_rate_accurate() will only check accuracy against the maximum kernel clock rate. The function will return leaving the kernel clock rate unchanged. Add a check on minimal frequency requirement, to avoid this. Fixes: 2cfe1ff22555 ("ASoC: stm32: sai: add stm32mp25 support") Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Link: https://patch.msgid.link/20250430165210.321273-3-olivier.moysan@foss.st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-05-01ASoC: stm32: sai: skip useless iterations on kernel rate loopOlivier Moysan
the frequency of the kernel clock must be greater than or equal to the bitclock rate. When searching for a convenient kernel clock rate in stm32_sai_set_parent_rate() function, it is useless to continue the loop below bitclock rate, as it will result in a invalid kernel clock rate. Change the loop output condition. Fixes: 2cfe1ff22555 ("ASoC: stm32: sai: add stm32mp25 support") Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com> Link: https://patch.msgid.link/20250430165210.321273-2-olivier.moysan@foss.st.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-30ALSA: hda/tas2781: Remove tas2781_spi_fwlib.c and leverage ↵Shenghao Ding
SND_SOC_TAS2781_FMWLIB Most codes in tas2781_spi_fwlib.c are same as tas2781-fmwlib.c, mainly for firmware parsing, only differece is the register reading, bit update and book switching in i2c and spi. The main purpose of this patch is for code cleaup and arrange the shared part for i2c and spi. Signed-off-by: Shenghao Ding <shenghao-ding@ti.com> Acked-by: Mark Brown <broonie@kernel.org> Link: https://patch.msgid.link/20250429111055.567-1-shenghao-ding@ti.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-30ASoC: wm_adsp: Don't use no_free_ptr() when passing to PTR_ERR()Richard Fitzgerald
It's no longer necessary to no_free_ptr() an auto-freed pointer before passing it to PTR_ERR(). This was fixed by commit cd7eb8f83fcf ("mm/slab: make __free(kfree) accept error pointers"). Removing the no_free_ptr() avoids the spurious warning "inconsistent IS_ERR and PTR_ERR". Fixes: b5d057a86e20 ("ASoC: wm_adsp: Use vmemdup_user() instead of open-coding") Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202504270751.nR3Ngfrq-lkp@intel.com/ Link: https://patch.msgid.link/20250428090803.97909-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-30ASoC: codecs: Use min() to simplify aw_dev_dsp_update_container()Thorsten Blum
Use min() to simplify aw_dev_dsp_update_container() and improve its readability. No functional changes intended. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Link: https://patch.msgid.link/20250429071032.65391-2-thorsten.blum@linux.dev Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-30ASoC: SOF: ipc4-pcm: Adjust pipeline_list->pipelines allocation typeKees Cook
In preparation for making the kmalloc family of allocators type aware, we need to make sure that the returned type from the allocation matches the type of the variable being assigned. (Before, the allocator would always return "void *", which can be implicitly cast to any pointer type.) The assigned type is "struct snd_sof_pipeline **", but the returned type will be "struct snd_sof_widget **". These are the same size allocation (pointer size) but the types don't match. Adjust the allocation type to match the assignment. Signed-off-by: Kees Cook <kees@kernel.org> Fixes: 9c04363d222b ("ASoC: SOF: Introduce struct snd_sof_pipeline") Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20250426062511.work.859-kees@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-30ASoC: SOF: topology: Fix null pointer dereferenceJulien Massot
The "get_function_tplg_files" function is only applicable to ACPI-based devices (sof_pdata->machine and not sof_pdata->of_machine). Skip this check for OF-based devices to avoid a NULL pointer dereference in snd_sof_load_topology(). Fixes: 6d5997c412cc ("ASoC: SOF: topology: load multiple topologies") Reviewed-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com> Reviewed-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Signed-off-by: Julien Massot <julien.massot@collabora.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://patch.msgid.link/20250429-fixup-of-sof-topology-v4-1-ff692244d64c@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-30ASoC: amd: acp: Drop superfluous assignment in acp_sof_probe()Cristian Ciocaltea
The 'card' pointer is not required to be NULL initialized as it is never accessed before the related memory allocation takes place. Drop the redundant assignment. Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com> Link: https://patch.msgid.link/20250429-acp-sof-probe-assign-v1-1-9784f6eb7660@collabora.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-30ASoC: Intel: catpt: avoid type mismatch in dev_dbg() formatArnd Bergmann
Depending on the architecture __ffs() returns either an 'unsigned long' or 'unsigned int' result. Compile-testing this driver on targets that use the latter produces a warning: sound/soc/intel/catpt/dsp.c: In function 'catpt_dsp_set_srampge': sound/soc/intel/catpt/dsp.c:181:44: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'u32' {aka 'unsigned int'} [-Werror=format=] 181 | dev_dbg(cdev->dev, "sanitize block %ld: off 0x%08x\n", | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Change the type of the local variable to match the format string and avoid the warning on any architecture. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250429073545.3558494-1-arnd@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-26ASoC: add Renesas MSIOF sound driverMark Brown
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: Renesas MSIOF can work as both SPI and I2S. Current Linux supports MSIOF-SPI. This patch-set adds new MSIOF-I2S. Because it is using same HW-IP, we want to share same compatible for both MSIOF-SPI/I2S case. MSIOF-I2S (Sound) will use Audio-Graph-Card/Card2 which uses Of-Graph, but MSIOF-SPI is not use Of-Graph. So, this patch-set assumes it was used as MSIOF-I2S if DT is using Of-Graph, otherwise, it is MSIOF-SPI (This assumption will works if SPI *never* use Of-Graph in the future). One note so far is that it is using "spi@xxx" node name for both MSIOF-SPI/I2S. DTC will automatically checks "spi@xxx" node as SPI device which requests #address-cells/#size-cells. But is not needed for I2S. So we will get warning about it on Sparrow Hawk which uses MSIOF-I2S. We have no solution about it, so far. Link: https://lore.kernel.org/r/87zfgi1a5a.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/87h62vh5mj.wl-kuninori.morimoto.gx@renesas.com Link: https://lore.kernel.org/r/875xjeb0wu.wl-kuninori.morimoto.gx@renesas.com
2025-04-26ASoC: renesas: add MSIOF sound supportKuninori Morimoto
Renesas MSIOF (Clock-Synchronized Serial Interface with FIFO) can work as both SPI and I2S. Adds MSIOF-I2S driver. MSIOF-SPI/I2S are using same DT compatible properties. MSIOF-I2S uses Of-Graph for Audio-Graph-Card/Card2, MSIOF-SPI doesn't use Of-Graph. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://patch.msgid.link/87r01q2wzv.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-26ASoC: renesas: rsnd: enable to use "adg" clockKuninori Morimoto
ADG needs its MSTP to use it, and it was handled as "clk_i" before. R-Car Gen2/Gen3 are using it, but Gen4 doesn't have it. "clk_i" is not intuitive for ADG MSTP. Let's enable to use "adg" clock. It can keep compatible with R-Car Gen2/Gen3 and Gen4. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87sem62x00.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-26ASoC: renesas: rsnd: care BRGA/BRGB select in rsnd_adg_clk_enable()Kuninori Morimoto
Renesas rsnd related clocks are enabled by rsnd_adg_clk_enable(), but it doesn't care about BRGA/BRGB selection (It is handled when SSI was started) (BRGA is used for 44.1kHz lineage, BRGB is used for 48kHz lineage in this driver). But it should be handled since probe time. Includes BRGCKR_31 in adg->ckr to handle it since boot time. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87tt6m2x05.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2025-04-26ASoC: renesas: rsnd: allow to use ADG as standaloneKuninori Morimoto
Audio clock generator (= ADG) can be used standalone (without DAI), but current driver indicates error if it doesn't have DAI on DT. It is not error, allow to use ADG as standalone. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87v7r22x0a.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>