summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2025-05-06AsoC: Phase out hybrid PCI devresMark Brown
Merge series from Philipp Stanner <phasta@kernel.org>: A year ago we spent quite some work trying to get PCI into better shape. Some pci_ functions can be sometimes managed with devres, which is obviously bad. We want to provide an obvious API, where pci_ functions are never, and pcim_ functions are always managed. Thus, everyone enabling his device with pcim_enable_device() must be ported to pcim_ functions. Porting all users will later enable us to significantly simplify parts of the PCI subsystem. See here [1] for details. This patch series does that for sound. Feel free to squash the commits as you see fit. P. [1] https://elixir.bootlin.com/linux/v6.14-rc4/source/drivers/pci/devres.c#L18
2025-05-06ASoC: Intel: sof_sdw: Avoid NULL check fail when re-probingCharles Keepax
The static platform_component name string is overwritten on card tear down by sof_link_unload(). After this has happened the NULL check on it in asoc_sdw_init_simple_dai_link() will fail when the driver is reprobed, causing the machine driver to fail probe. However, it also turns out that the ASoC core sets this string for all topology systems in soc_check_tplg_fes() anyway, after the aforementioned NULL check. So there is no need for the machine driver to set the platform name to anything meaningful at all. Replace all the platform_component stuff with some simple place holders and importantly since the core tampers with the snd_soc_dai_link_component in multiple places allocate a new one for each usage. Fixes: 59f8b622d52e ("ASoC: intel/sdw_utils: refactor init_dai_link() and init_simple_dai_link()") Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20250505141409.2614010-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
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-05ALSA: core: Remove unused snd_jack_set_parentDr. David Alan Gilbert
snd_jack_set_parent() was added as part of 2008's commit e76d8ceaaff9 ("ALSA: Add jack reporting API") but hasn't been used. Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250502235219.1000429-6-linux@treblig.org
2025-05-05ALSA: core: Remove unused snd_device_get_stateDr. David Alan Gilbert
snd_device_get_state() last use was removed in 2022 by commit 7e1afce5866e ("ALSA: usb-audio: Inform the delayed registration more properly") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250502235219.1000429-5-linux@treblig.org
2025-05-05ALSA: seq: Remove unused snd_seq_queue_client_leave_cellsDr. David Alan Gilbert
The last use of snd_seq_queue_client_leave_cells() was removed in 2018 by commit 85d59b57be59 ("ALSA: seq: Remove superfluous snd_seq_queue_client_leave_cells() call") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250502235219.1000429-4-linux@treblig.org
2025-05-05ALSA: pcm: Remove unused snd_dmaengine_pcm_open_request_chanDr. David Alan Gilbert
snd_dmaengine_pcm_open_request_chan() last use was removed in 2022's commit b401d1fd8053 ("ASoC: pxa: remove unused board support") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250502235219.1000429-3-linux@treblig.org
2025-05-05ALSA: pcm: Remove unused snd_pcm_rate_range_to_bitsDr. David Alan Gilbert
The last use of snd_pcm_rate_range_to_bits() was removed in 2016 by commit b6b6e4d670c9 ("ASoC: topology: Fix setting of stream rates, rate_min and rate_max") Remove it. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20250502235219.1000429-2-linux@treblig.org
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-01Merge tag 'asoc-fix-v6.15-rc4' of ↵Takashi Iwai
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v6.15 A moderately large batch of fixes for v6.15, many driver specific including cleanups for the enabling of the Cirrus KUnit tests and a fix for a nasty crash on resume on AMD systems. We also have one core fix, for an ordering issue between DAPM and DPCM which could leave things incorrectly unpowered.
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/realtek - Add more HP laptops which need mute led fixupChris Chiu
More HP EliteBook with Realtek HDA codec ALC3247 and combined CS35L56 Amplifiers need quirk ALC236_FIXUP_HP_GPIO_LED to fix the micmute LED. Signed-off-by: Chris Chiu <chris.chiu@canonical.com> Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20250430101843.150833-1-chris.chiu@canonical.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
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-30ALSA: hda/cs35l56: Remove dependency on COMPILE_TESTRichard Fitzgerald
Change the Kconfig dependency on ACPI || COMPILE_TEST to only depend on ACPI. The alternate dependency on COMPILE_TEST was a fudge to enable building KUnit tests for modules that are selected by the CS35L56 driver but don't depend on ACPI. This was based on a misunderstanding that KUNIT_ALL_TESTS meant "all tests". Actually KUNIT_ALL_TESTS only means "tests for modules that have satisfied dependencies" so it shouldn't be overriding dependencies. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20250428094126.125781-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2025-04-30ALSA: hda/realtek: Fix built-mic regression on other ASUS modelsTakashi Iwai
A few ASUS models use the ALC256_FIXUP_ASUS_HEADSET_MODE although they have no built-in mic pin on NID 0x13, as found in the commit c1732ede5e80 ("ALSA: hda/realtek - Fix headset and mic on several Asus laptops with ALC256"). This was relatively harmless in the past as NID 0x13 was assigned as the secondary mic. But since the fix for the pin sort order, this pin became the primary one, hence user started noticing the broken input, and we've fixed already for a few ASUS models to switch to ALC256_FIXUP_ASUS_MIC_NO_PRESENCE. This patch corrects the other ASUS models to use the right quirk entry for fixing the built-in mic regression. Here we cover X541SA (1043:12e0), X541UV (1043:12f0), Z550SA (1043:13bf0) and X555UB (1043:1ccd). Fixes: 3b4309546b48 ("ALSA: hda: Fix headset detection failure due to unstable sort") Link: https://bugzilla.kernel.org/show_bug.cgi?id=220058 Link: https://patch.msgid.link/20250430053210.31776-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>