linux-2.6-microblaze.git
3 weeks agoALSA: hda/hdmi: Add quirk for TUXEDO IBS14G6
Aaron Erhardt [Wed, 18 Feb 2026 21:32:10 +0000 (22:32 +0100)]
ALSA: hda/hdmi: Add quirk for TUXEDO IBS14G6

Depending on the timing during boot, the BIOS might report wrong pin
capabilities, which can lead to HDMI audio being disabled. Therefore,
force HDMI audio connection on TUXEDO InfinityBook S 14 Gen6.

Signed-off-by: Aaron Erhardt <aer@tuxedocomputers.com>
Signed-off-by: Werner Sembach <wse@tuxedocomputers.com>
Link: https://patch.msgid.link/20260218213234.429686-1-wse@tuxedocomputers.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: echoaudio: Add SPDX ids to some files
Tim Bird [Thu, 12 Feb 2026 23:49:28 +0000 (16:49 -0700)]
ALSA: echoaudio: Add SPDX ids to some files

Add SPDX-License-Identifier lines to some files in the
sound subsystem - mostly in the echoaudio drivers.
Remove boilerplate GPL headers.

Signed-off-by: Tim Bird <tim.bird@sony.com>
Link: https://patch.msgid.link/20260212234928.3739815-1-tim.bird@sony.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: isa: Add SPDX id lines to some files
Tim Bird [Thu, 12 Feb 2026 19:59:05 +0000 (12:59 -0700)]
ALSA: isa: Add SPDX id lines to some files

Add SPDX-License-Identifier lines to several files where
they are missing, mostly in the sound/isa subdir.
Use GPL-2.0 as the id.

[ note: the same change applied to sound/hda/core/trace.c, too -- tiwai ]

Signed-off-by: Tim Bird <tim.bird@sony.com>
Link: https://patch.msgid.link/20260212195905.3726149-1-tim.bird@sony.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: core: Add SPDX license id to files
Tim Bird [Thu, 12 Feb 2026 18:31:03 +0000 (11:31 -0700)]
ALSA: core: Add SPDX license id to files

Add an SPDX id of LGPL-2.0+ to files in the
sound core sub-system that are missing ids.  Remove
boilerplate text.

These files were originally submitted in a big commit
for the ALSA sound system for kernel version 2.5.4,
by Jaroslav Kysela, in Feb 2002.

Signed-off-by: Tim Bird <tim.bird@sony.com>
Link: https://patch.msgid.link/20260212183103.3720788-1-tim.bird@sony.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: hda/realtek: Fix headset mic on ASUS Zenbook 14 UX3405MA
Erik Sanjaya [Tue, 17 Feb 2026 10:21:12 +0000 (17:21 +0700)]
ALSA: hda/realtek: Fix headset mic on ASUS Zenbook 14 UX3405MA

The ASUS Zenbook 14 UX3405MA uses an ALC294 codec with CS35L41
amplifiers over SPI. The existing quirk for this model only configured
the amplifiers, leaving the headset microphone on the combo jack
non-functional.

Introduce a new fixup that configures pin 0x19 as headset mic input
and chains to ALC245_FIXUP_CS35L41_SPI_2 to preserve speaker
functionality.

Similar to the fix done for the UM3406HA in commit 018f659753fd
("ALSA: hda/realtek: Fix headset mic on ASUS Zenbook 14").

Signed-off-by: Erik Sanjaya <sirreidlos@gmail.com>
Link: https://patch.msgid.link/20260217102112.20651-1-sirreidlos@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: hda/conexant: Fix headphone jack handling on Acer Swift SF314
Takashi Iwai [Tue, 17 Feb 2026 10:44:11 +0000 (11:44 +0100)]
ALSA: hda/conexant: Fix headphone jack handling on Acer Swift SF314

Acer Swift SF314 (SSID 1025:136d) needs a bit of tweaks of the pin
configurations for NID 0x16 and 0x19 to make the headphone / headset
jack working.  NID 0x17 can remain as is for the working speaker, and
the built-in mic is supported via SOF.

Cc: <stable@vger.kernel.org>
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221086
Link: https://patch.msgid.link/20260217104414.62911-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: usb-audio: Avoid potentially repeated XRUN error messages
Takashi Iwai [Mon, 16 Feb 2026 14:12:08 +0000 (15:12 +0100)]
ALSA: usb-audio: Avoid potentially repeated XRUN error messages

Some XRUN-related error messages may repeat themselves, because there
can be multiple pending packets.  Modify notify_xrun() function to
return whether it's being stopped or not, and show the error message
only once when the XRUN is actually handled.

Along with it, fix a typo of word package to packet in the error
message.

Link: https://patch.msgid.link/20260216141209.1849200-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: usb-audio: Add sanity check for OOB writes at silencing
Takashi Iwai [Mon, 16 Feb 2026 14:12:07 +0000 (15:12 +0100)]
ALSA: usb-audio: Add sanity check for OOB writes at silencing

At silencing the playback URB packets in the implicit fb mode before
the actual playback, we blindly assume that the received packets fit
with the buffer size.  But when the setup in the capture stream
differs from the playback stream (e.g. due to the USB core limitation
of max packet size), such an inconsistency may lead to OOB writes to
the buffer, resulting in a crash.

For addressing it, add a sanity check of the transfer buffer size at
prepare_silent_urb(), and stop the data copy if the received data
overflows.  Also, report back the transfer error properly from there,
too.

Note that this doesn't fix the root cause of the playback error
itself, but this merely covers the kernel Oops.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=221076
Link: https://patch.msgid.link/20260216141209.1849200-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: usb-audio: Optimize the copy of packet sizes for implicit fb handling
Takashi Iwai [Mon, 16 Feb 2026 14:12:06 +0000 (15:12 +0100)]
ALSA: usb-audio: Optimize the copy of packet sizes for implicit fb handling

We did manual copies over loop for the packet data update of the
implicit feedback, but this can be optimized with a simple memcpy().

Along with it, change the data type of snd_usb_packet_info struct to
align with other (from uint32_t to int).

No functional changes but only code optimizations.

Link: https://patch.msgid.link/20260216141209.1849200-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: usb-audio: Update the number of packets properly at receiving
Takashi Iwai [Mon, 16 Feb 2026 14:12:05 +0000 (15:12 +0100)]
ALSA: usb-audio: Update the number of packets properly at receiving

At receiving the packets from the implicit feedback source, we didn't
update ctx->packets field but only the ctx->packet_size[] data.
In exceptional cases, this might lead to unexpectedly superfluous data
transfer (although this won't happen usually due to the nature of USB
isochronous transfer).  Fix it to update the field properly.

Link: https://patch.msgid.link/20260216141209.1849200-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 weeks agoALSA: usb-audio: Add iface reset and delay quirk for GHW-123P
胡连勤 [Thu, 12 Feb 2026 04:20:36 +0000 (04:20 +0000)]
ALSA: usb-audio: Add iface reset and delay quirk for GHW-123P

Setting up the interface when suspended/resumeing fail on this card.
Adding a reset and delay quirk will eliminate this problem.

usb 1-1: New USB device found, idVendor=0020, idProduct=0b21
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: GHW-123P
usb 1-1: Manufacturer: Generic
usb 1-1: SerialNumber: 20210726905926

Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/TYUPR06MB62176831E47899AB98902012D260A@TYUPR06MB6217.apcprd06.prod.outlook.com
5 weeks agoALSA: hda/tas2781: Ignore reset check for SPI device
Baojun Xu [Wed, 11 Feb 2026 03:09:46 +0000 (11:09 +0800)]
ALSA: hda/tas2781: Ignore reset check for SPI device

In the SPI driver probe, the device should be in the default state, so the
device status check is not necessary. It should be forced to do the
firmware download as I2C device.

Signed-off-by: Baojun Xu <baojun.xu@ti.com>
Link: https://patch.msgid.link/20260211030946.2330-1-baojun.xu@ti.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoALSA: hda/realtek: Add quirk for Samsung Galaxy Book3 Pro 360 (NP965QFG)
Lewis Mason [Tue, 10 Feb 2026 23:13:37 +0000 (23:13 +0000)]
ALSA: hda/realtek: Add quirk for Samsung Galaxy Book3 Pro 360 (NP965QFG)

The Samsung Galaxy Book3 Pro 360 NP965QFG (subsystem ID 0x144d:0xc1cb)
uses the same Realtek ALC298 codec and amplifier configuration as the
NP960QFG (0x144d:0xc1ca). Apply the same ALC298_FIXUP_SAMSUNG_AMP_V2_4_AMPS
fixup to enable the internal speakers.

Cc: stable@vger.kernel.org
Signed-off-by: Lewis Mason <lewis@ocuru.co.uk>
Link: https://patch.msgid.link/20260210231337.7265-1-lewis@ocuru.co.uk
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoALSA: hda/realtek: Add quirk for Gigabyte G5 KF5 (2023)
Eric Naim [Tue, 10 Feb 2026 09:34:02 +0000 (17:34 +0800)]
ALSA: hda/realtek: Add quirk for Gigabyte G5 KF5 (2023)

Fixes microphone detection when a headset is connected to the audio jack
using the ALC256.

Cc: stable@vger.kernel.org
Signed-off-by: Eric Naim <dnaim@cachyos.org>
Link: https://patch.msgid.link/20260210093403.21514-1-dnaim@cachyos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoMerge tag 'asoc-v6.20' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Mon, 9 Feb 2026 16:39:11 +0000 (17:39 +0100)]
Merge tag 'asoc-v6.20' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v7.0

This release is almost all abut driers, there's very little core work
here, although some of that driver work is in more generic areas like
SDCA and SOF:

 - Generic SDCA support for reporting jack events.
 - Continuing platform support, cleanup and feature improements for the
   AMD, Intel, Qualcomm and SOF code.
 - Platform description improvements for the Cirrus drivers.
 - Support for NXP i.MX952, Realtek RT1320 and RT5575, and Sophogo
   CV1800B.

We also pulled in one small SPI API update and some more substantial
regmap work (cache description improvements) for use in drivers.

5 weeks agoALSA: usb-audio: Add DSD support for iBasso DC04U
Qihang Guo [Mon, 9 Feb 2026 10:04:18 +0000 (18:04 +0800)]
ALSA: usb-audio: Add DSD support for iBasso DC04U

Vendor ID 0x0661 is assigned to Hamamatsu Photonics K.K.,
but is used by iBasso for iBasso DC04U (0x0661:0x0883),
which supports native DSD playback.

This patch adds QUIRK_FLAG_DSD_RAW for iBasso DC04U, enabling
native DSD playback (DSD_U32_BE). The change has been verified
on Arch Linux using mpd and pw-cat.

Signed-off-by: Qihang Guo <v-conet@outlook.com>
Link: https://patch.msgid.link/TYYPR01MB14098529E0BD900921BE6F42CF465A@TYYPR01MB14098.jpnprd01.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoALSA: mixer: oss: Add card disconnect checkpoints
Takashi Iwai [Mon, 9 Feb 2026 12:12:11 +0000 (13:12 +0100)]
ALSA: mixer: oss: Add card disconnect checkpoints

ALSA OSS mixer layer calls the kcontrol ops rather individually, and
pending calls might be not always caught at disconnecting the device.

For avoiding the potential UAF scenarios, add sanity checks of the
card disconnection at each entry point of OSS mixer accesses.  The
rwsem is taken just before that check, hence the rest context should
be covered by that properly.

Link: https://patch.msgid.link/20260209121212.171430-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoASoC: SOF: ipc4-control: Set correct error code in refresh_bytes_control
Peter Ujfalusi [Mon, 9 Feb 2026 12:02:39 +0000 (14:02 +0200)]
ASoC: SOF: ipc4-control: Set correct error code in refresh_bytes_control

Return -EINVAL in case the scontrol contains more data than the amount of
space available for it to store in sof_ipc4_refresh_bytes_control().

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-sound/aYXvFr-LVHVJSvS7@stanley.mountain/
Fixes: 2a28b5240f2b ("ASoC: SOF: ipc4-control: Add support for generic bytes control")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260209120239.6066-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: SOF: Intel: select CONFIG_SND_HDA_EXT_CORE from SND_SOC_SOF_HDA_COMMON
Arnd Bergmann [Mon, 9 Feb 2026 07:08:38 +0000 (08:08 +0100)]
ASoC: SOF: Intel: select CONFIG_SND_HDA_EXT_CORE from SND_SOC_SOF_HDA_COMMON

The _hda_dsp_stream_put() function now depends on the
snd_hdac_ext_stream_release() interface from SND_HDA_EXT_CORE:

x86_64-linux-ld: vmlinux.o: in function `_hda_dsp_stream_put':
hda-stream.c:(.text+0xfac605): undefined reference to `snd_hdac_ext_stream_release'

Select this symbol the same way the other users do.

Fixes: 89e1d632bb29 ("ASoC: SOF: Intel: add hda_dsp_stream_pair_get/put helpers")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://patch.msgid.link/20260209070901.857700-1-arnd@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoALSA: usb-audio: Add iface reset and delay quirk for AB13X USB Audio
Lianqin Hu [Mon, 9 Feb 2026 08:38:29 +0000 (08:38 +0000)]
ALSA: usb-audio: Add iface reset and delay quirk for AB13X USB Audio

Setting up the interface when suspended/resumeing fail on this card.
Adding a reset and delay quirk will eliminate this problem.

usb 1-1: New USB device found, idVendor=001f, idProduct=0b21
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: AB13X USB Audio
usb 1-1: Manufacturer: Generic
usb 1-1: SerialNumber: 20210926172016

Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
Link: https://patch.msgid.link/TYUPR06MB6217522D0DB6E2C9DF46B56ED265A@TYUPR06MB6217.apcprd06.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoASoC: amd: maintainer information
Vijendar Mukunda [Sat, 7 Feb 2026 06:23:51 +0000 (11:53 +0530)]
ASoC: amd: maintainer information

Update MAINTAINERS file for AMD ASoC drivers.

Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20260207062433.1465232-1-Vijendar.Mukunda@amd.com
5 weeks agoMerge branch 'for-linus' into for-next
Takashi Iwai [Sun, 8 Feb 2026 16:38:37 +0000 (17:38 +0100)]
Merge branch 'for-linus' into for-next

Pull 6.19-devel branch.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoALSA: ctxfi: Add quirk for SE-300PCIE variant (160b:0102)
Harin Lee [Sun, 8 Feb 2026 13:30:01 +0000 (22:30 +0900)]
ALSA: ctxfi: Add quirk for SE-300PCIE variant (160b:0102)

Add quirk for the Onkyo SE-300PCIE variant with PCI subsystem ID
(160b:0102). This variant (OK0011) was found in the official Windows
driver packages.

Also, reorder entries and fix the indentation to maintain
consistency.

Signed-off-by: Harin Lee <me@harin.net>
Link: https://patch.msgid.link/20260208133001.680550-1-me@harin.net
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoALSA: hda/generic: fix typos in comments
Pedro Amarante [Sun, 8 Feb 2026 05:24:39 +0000 (21:24 -0800)]
ALSA: hda/generic: fix typos in comments

Fix 'ony' -> 'only' and 'evalute' -> 'evaluate' in code comments.

Signed-off-by: Pedro Amarante <ppedrolia@gmail.com>
Link: https://patch.msgid.link/20260208052439.11498-1-ppedrolia@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoALSA: hda/realtek - Enable mute LEDs on HP ENVY x360 15-es0xxx
Illia Barbashyn [Sat, 7 Feb 2026 22:19:37 +0000 (23:19 +0100)]
ALSA: hda/realtek - Enable mute LEDs on HP ENVY x360 15-es0xxx

The mute and mic-mute LEDs on HP ENVY x360 Convertible 15-es0xxx
(PCI SSID 103c:88b3) do not work with the current driver.

This model requires a combination of COEFBIT and GPIO fixups to
correctly control the LEDs. Introduce a new fixup function
alc245_fixup_hp_envy_x360_mute_led and add a quirk to apply it.

Signed-off-by: Illia Barbashyn <04baril@gmail.com>
Link: https://patch.msgid.link/20260207221955.24132-1-04baril@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoALSA: hda/conexant: Add quirk for HP ZBook Studio G4
Takashi Iwai [Sat, 7 Feb 2026 13:13:17 +0000 (14:13 +0100)]
ALSA: hda/conexant: Add quirk for HP ZBook Studio G4

It was reported that we need the same quirk for HP ZBook Studio G4
(SSID 103c:826b) as other HP models to make the mute-LED working.

Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/64d78753-b9ff-4c64-8920-64d8d31cd20c@gmail.com
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221002
Link: https://patch.msgid.link/20260207131324.2428030-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoASoC: fsl_asrc_dma: allocate memory from dma device
Shengjiu Wang [Fri, 6 Feb 2026 01:48:05 +0000 (09:48 +0800)]
ASoC: fsl_asrc_dma: allocate memory from dma device

The dma-coherent property is used to indicate a device is capable of
coherent DMA operations. On i.MX952, one of EDMA devices support such
feature, in order to support the EDMA device, the memory needs to be
allocated from the DMA device.

Make this driver to support both non dma-coherent and dma-coherent dma
engine.

Remove dma coerce_mask_and coherent() because DMA provider already set it
according to its capability.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260206014805.3897764-5-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: fsl_asrc: Add support for i.MX952 platform
Shengjiu Wang [Fri, 6 Feb 2026 01:48:04 +0000 (09:48 +0800)]
ASoC: fsl_asrc: Add support for i.MX952 platform

Add a compatible string, clock mapping table and enable the option
'start_before_dma' to support ASRC on the i.MX952 platform.

The clock mapping table is to map the clock sources on i.MX952 to the
clock ids in the driver, the clock ids are for all the clock sources on
all supported platforms.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260206014805.3897764-4-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: fsl_asrc_m2m: Add option to start ASRC before DMA device for M2M
Shengjiu Wang [Fri, 6 Feb 2026 01:48:03 +0000 (09:48 +0800)]
ASoC: fsl_asrc_m2m: Add option to start ASRC before DMA device for M2M

There is a limitation on i.MX952 that dma request is not cleared at the
end of conversion with dma slave mode. Which causes sample is dropped
from the input fifo on the second time if dma is triggered before the
client device and EDMA may copy wrong data from output fifo as the output
fifo is not ready in the beginning.

The solution is to trigger asrc before dma on i.MX952, and add delay to
wait output data is generated then start the EDMA for output, otherwise
the m2m function has noise issues.

So add an option to start ASRC first for M2M before ASRC is enabled on
i.MX952.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260206014805.3897764-3-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: dt-bindings: fsl,imx-asrc: Add support for i.MX952 platform
Shengjiu Wang [Fri, 6 Feb 2026 01:48:02 +0000 (09:48 +0800)]
ASoC: dt-bindings: fsl,imx-asrc: Add support for i.MX952 platform

Add new compatible string 'fsl,imx952-asrc' for i.MX952 platform,
below are the differences that make this ASRC not fallback compatible
with other platforms.

1) There is a power domain on i.MX952 for the wakeupmix system where
ASRC is in. But it is enabled by default, ASRC device don't need
to enable it, so it is optional for i.MX952.
2) The clock sources of ASRC are different on i.MX952.
3) There is a limitation on i.MX952 that DMA request is not cleared at the
end of conversion with dma slave mode. Which causes sample is dropped from
the input fifo on the second time if DMA is triggered before the client
device and DMA may copy wrong data from output fifo as the output fifo is
not ready in the beginning. So there is specially handling in the driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20260206014805.3897764-2-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoALSA: oss: delete self assignment
Dan Carpenter [Fri, 6 Feb 2026 13:41:47 +0000 (16:41 +0300)]
ALSA: oss: delete self assignment

No need to assign "uctl" to itself.  Delete it.

Fixes: 55f98ece9939 ("ALSA: oss: Relax __free() variable declarations")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://patch.msgid.link/aYXvm2YoV2yRimhk@stanley.mountain
Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 weeks agoASoC: rockchip: spdif: Cleanups and port features
Mark Brown [Thu, 5 Feb 2026 22:52:13 +0000 (22:52 +0000)]
ASoC: rockchip: spdif: Cleanups and port features

Merge series from Sebastian Reichel <sebastian.reichel@collabora.com>:

I'm currently working on DisplayPort audio support for the Rockchip
RK3588/RK3576 SoCs, which preferrably use S/PDIF as DAI source.

Apparently the upstream Rockchip S/PDIF driver is lacking a couple of
features right now, which are necessary to get things going (i.e.
setting the sysclk from the machine driver). I found the missing bits
in Rockchip's 6.1 BSP kernel and ported them over. This series effectly
brings the mainline kernel on-par with the BSP driver, but also contains
a couple of cleanup patches of my own to bring the driver to the modern
age.

5 weeks agoASoC: cs35l56: More support for new Dell laptops
Mark Brown [Thu, 5 Feb 2026 22:41:22 +0000 (22:41 +0000)]
ASoC: cs35l56: More support for new Dell laptops

Merge series from Richard Fitzgerald <rf@opensource.cirrus.com>:

Some new Dell models use spare pins on the amp as a binary integer
value to indicate the speaker type. The driver must use this to
select the correct firmware files for the hardware.

Patch #1 is the new support.
The other patches are for KUnit testing.

5 weeks agoASoC: rockchip: spdif: Convert to FIELD_PREP
Sebastian Reichel [Tue, 3 Feb 2026 16:46:32 +0000 (17:46 +0100)]
ASoC: rockchip: spdif: Convert to FIELD_PREP

Convert the driver to use FIELD_PREP to increase readability.
This also fixes an issue that the SDPIF_CFGR_VDW_MASK was wrong,
which didn't have any effects as the only user in the driver
updates the other bits at the same time.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-10-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: rockchip: spdif: Fill IEC958 CS info per params
Sugar Zhang [Tue, 3 Feb 2026 16:46:31 +0000 (17:46 +0100)]
ASoC: rockchip: spdif: Fill IEC958 CS info per params

Add support to fill IEC958 channel status information.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-9-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: rockchip: spdif: Add support for format S32_LE
Sugar Zhang [Tue, 3 Feb 2026 16:46:30 +0000 (17:46 +0100)]
ASoC: rockchip: spdif: Add support for format S32_LE

Treat 32 bit sample width as if it was 24 bits using only the
24 most significant bits.

[I've merged the channel-swapping fix from Zohn Ni into Sugar Zhang's
patch introducing the problem in the first place]

Co-developed-by: Zohn Ni <zohn.ni@rock-chips.com>
Signed-off-by: Zohn Ni <zohn.ni@rock-chips.com>
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-8-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: rockchip: spdif: Add support for set mclk rate
Sugar Zhang [Tue, 3 Feb 2026 16:46:29 +0000 (17:46 +0100)]
ASoC: rockchip: spdif: Add support for set mclk rate

Allow setting the mclk rate from the machine driver.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-7-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: rockchip: spdif: Swap PCM and DAI component registration order
Sugar Zhang [Tue, 3 Feb 2026 16:46:28 +0000 (17:46 +0100)]
ASoC: rockchip: spdif: Swap PCM and DAI component registration order

PCM should be registered before the DAI component, as the second one
triggers snd_soc_try_rebind_card.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-6-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: rockchip: spdif: Improve sample rate support
Sugar Zhang [Tue, 3 Feb 2026 16:46:27 +0000 (17:46 +0100)]
ASoC: rockchip: spdif: Improve sample rate support

The hardware supports all sample rates up to 192kHz.

Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-5-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: rockchip: spdif: Use dev_err_probe
Sebastian Reichel [Tue, 3 Feb 2026 16:46:26 +0000 (17:46 +0100)]
ASoC: rockchip: spdif: Use dev_err_probe

Cleanup the probe routine a little bit by using dev_err_probe
instead of dev_err.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-4-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: rockchip: spdif: Fully convert to device managed resources
Sebastian Reichel [Tue, 3 Feb 2026 16:46:25 +0000 (17:46 +0100)]
ASoC: rockchip: spdif: Fully convert to device managed resources

This driver mixes device managed resources with unmanaged ones
and (as a lot of them do) gets the order wrong resulting in
potential race condition problems at module removal time. Let's
go to full device managed resources to cleanup the code and get
rid of the potential race condition.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-3-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: rockchip: spdif: Move DT compatible table
Sebastian Reichel [Tue, 3 Feb 2026 16:46:24 +0000 (17:46 +0100)]
ASoC: rockchip: spdif: Move DT compatible table

Move rk_spdif_match DT compatible table to the usual place before the
platform-driver struct definition and drop the useless of_match_ptr(),
since it is fine to reference the DT id table even when OF support is
disabled (which makes the driver useless anyways).

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-2-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: rockchip: spdif: Use device_get_match_data()
Sebastian Reichel [Tue, 3 Feb 2026 16:46:23 +0000 (17:46 +0100)]
ASoC: rockchip: spdif: Use device_get_match_data()

Use device_get_match_data(), so that the probe routine does not
directly reference the of_match_table. This allows moving the
table at the end of the file where most recent drivers have it.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Link: https://patch.msgid.link/20260203-rockchip-spdif-cleanup-and-bsp-sync-v2-1-4412016cf577@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: fsl: imx-rpmsg: use snd_soc_find_dai_with_mutex() in probe
Ziyi Guo [Thu, 5 Feb 2026 05:24:29 +0000 (05:24 +0000)]
ASoC: fsl: imx-rpmsg: use snd_soc_find_dai_with_mutex() in probe

imx_rpmsg_probe() calls snd_soc_find_dai() without holding client_mutex.
However, snd_soc_find_dai() has lockdep_assert_held(&client_mutex)
indicating callers must hold this lock, as the function iterates over the
global component list.

All other callers of snd_soc_find_dai() either hold client_mutex via the
snd_soc_bind_card() path or use the snd_soc_find_dai_with_mutex() wrapper.

Use snd_soc_find_dai_with_mutex() instead to fix the missing lock
protection.

Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260205052429.4046903-1-n7l8m4@u.northwestern.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: cs35l56: KUnit tests for parsing and using onchip GPIOs
Richard Fitzgerald [Thu, 5 Feb 2026 16:48:38 +0000 (16:48 +0000)]
ASoC: cs35l56: KUnit tests for parsing and using onchip GPIOs

Add KUnit test cases for:

- cs35l56_process_xu_properties() which reads the onchip GPIO definitions.
- cs35l56_set_fw_name() calls functions to configure and set the GPIOs.
- cs35l56_set_fw_name() saves the ID value in cs35l56_priv.speaker_id.
- cs35l56_set_fw_name() does not overwrite a speaker ID that was already
  found some other way.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260205164838.1611295-4-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: cs35l56-shared: KUnit tests for onchip speaker ID gpios
Richard Fitzgerald [Thu, 5 Feb 2026 16:48:37 +0000 (16:48 +0000)]
ASoC: cs35l56-shared: KUnit tests for onchip speaker ID gpios

Add KUnit testing of:
 cs35l56_check_and_save_onchip_spkid_gpios()
 cs35l56_configure_onchip_spkid_pads()
 cs35l56_read_onchip_spkid()

The test consists of:

- A mock regmap that simulates the pad and pin config registers.

- Parameterization of the pin list, pulls list, a simulated value for
  each pin and the speaker ID value that this should produce.

- A self-test of the simulated pin and GPIO registers.

- A test that the value returned by cs35l56_read_onchip_spkid() is
  correct.

- A test that the pin pull-up/down are set correctly by
  cs35l56_configure_onchip_spkid_pads()

- A test that cs35l56_configure_onchip_spkid_pads() and
  cs35l56_read_onchip_spkid(0 return the expected values if
  cs35l56_base->num_onchip_spkid_gpios == 0.

- A test that cs35l56_check_and_save_onchip_spkid_gpios() saves
  the configuration.

- A test that cs35l56_check_and_save_onchip_spkid_gpios() rejects
  illegal GPIO numbers.

- A test that cs35l56_check_and_save_onchip_spkid_gpios() rejects
  illegal pull types.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260205164838.1611295-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoASoC: cs35l56: Support for reading speaker ID from on-chip GPIOs
Richard Fitzgerald [Thu, 5 Feb 2026 16:48:36 +0000 (16:48 +0000)]
ASoC: cs35l56: Support for reading speaker ID from on-chip GPIOs

Add support for using the state of pins on the amplifier to indicate
the type of speaker fitted.

Previously, where there were alternate speaker vendors, this was
indicated using host CPU GPIOs.

Some new Dell models use spare pins on the CS35L63 as GPIOs for the
speaker ID detection.

Cirrus-specific SDCA Disco properties provide a list of the pins to be
used, and pull-up/down settings for the pads. This list is ordered,
MSbit to LSbit.

The code to set the firmware filename has been modified to check for
using chip pins for speaker ID. The entire block of code to set
firmware name has been moved out of cs35l56_component_probe() into
its own function to make it easier to KUnit test.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260205164838.1611295-2-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
5 weeks agoALSA: hda/realtek: Enable headset mic for Acer Nitro 5
Breno Baptista [Thu, 5 Feb 2026 02:43:41 +0000 (23:43 -0300)]
ALSA: hda/realtek: Enable headset mic for Acer Nitro 5

Add quirk to support microphone input through headphone jack on Acer Nitro 5 AN515-57 (ALC295).

Signed-off-by: Breno Baptista <brenomb07@gmail.com>
Link: https://patch.msgid.link/20260205024341.26694-1-brenomb07@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 weeks agoASoC: cs4271: Fix resource leak in cs4271_soc_resume()
Harshit Mogalapalli [Sat, 10 Jan 2026 19:53:36 +0000 (11:53 -0800)]
ASoC: cs4271: Fix resource leak in cs4271_soc_resume()

Smatch detects this resource leak:

sound/soc/codecs/cs4271.c:548 cs4271_soc_resume() warn:
 'cs4271->clk' from clk_prepare_enable() not released on lines: 540,546.

Instead of direct returns, unprepare the clock and disable regulators on
the error paths.

Fixes: cf6bf51b5325 ("ASoC: cs4271: Add support for the external mclk")
Fixes: 9a397f473657 ("ASoC: cs4271: add regulator consumer support")
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Acked-by: Herve Codina <herve.codina@bootlin.com>
Reviewed-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Link: https://patch.msgid.link/20260110195337.2522347-1-harshit.m.mogalapalli@oracle.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: Support for echoref (virtual DAI)
Mark Brown [Thu, 5 Feb 2026 00:45:16 +0000 (00:45 +0000)]
ASoC: SOF: Support for echoref (virtual DAI)

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

The series adds support for echo reference functionality by allowing
the capturing of playback audio right before it leaves the DSP.
For this to work correctly we need a virtual DAI that is also connected
to the echo reference capture device and in absence of playback a
signal generator generates silence to allow the capture to run.
When the real playback starts, application will start to receive the
playback audio to be usable for echo reference.

6 weeks agoASoC: ti: davinci-mcasp: Add asynchronous mode
Mark Brown [Thu, 5 Feb 2026 00:45:12 +0000 (00:45 +0000)]
ASoC: ti: davinci-mcasp: Add asynchronous mode

Merge series from Sen Wang <sen@ti.com>:

This series adds asynchronous mode support to the McASP driver, which
enables independent configuration of bitclocks, frame sync, and audio
configurations between tx(playback) and rx(record). And achieves
simultaneous playback & record using different audio configurations.

It also adds two clean up patches to the McASP driver that disambiguate
and simplifies the logic which avoids the async enhancement from being
too convoluted to review and analyze.

The implementation is based on vendor documentation and patches tested in
both SK-AM62P-LP (sync mode, McASP slave) and AM62D-EVM
(async mode, McASP master, rx & tx has different TDM configs).
Testing verifies async mode functionality while maintaining backward
compatibility with the default sync mode.

Bootlog and Async mode tests on AM62D-EVM: [0]

[0]: https://gist.github.com/SenWang125/f31f9172b186d414695e37c8b9ef127d

6 weeks agoMinor SDCA Fixes
Mark Brown [Thu, 5 Feb 2026 00:45:07 +0000 (00:45 +0000)]
Minor SDCA Fixes

Merge series from Charles Keepax <ckeepax@opensource.cirrus.com>:

A bit of a mixed bag of minor misc fixes, improve handling
of volatile SDCA Controls, make some minor bug fixes to jack
detect, improve the cache syncing by adding some more defaults,
and improve some FDL error messages.

6 weeks agoASoC: ti: davinci-mcasp: Add asynchronous mode support
Sen Wang [Tue, 3 Feb 2026 00:37:03 +0000 (18:37 -0600)]
ASoC: ti: davinci-mcasp: Add asynchronous mode support

McASP has dedicated clock & frame sync registers for both transmit
and receive. Currently McASP driver only supports synchronous behavior and
couples both TX & RX settings.

Add logic that enables asynchronous mode via ti,async-mode property. In
async mode, playback & record can be done simultaneously with different
audio configurations (tdm slots, tdm width, audio bit depth).

Note the ability to have different tx/rx DSP formats (i2s, dsp_a, etc.),
while possible in hardware, remains to be a gap as it require changes
to the corresponding machine driver interface.

Existing IIS (sync mode) and DIT mode logic remains mostly unchanged.
Exceptions are IIS mode logic that previously assumed sync mode, which has
now been made aware of the distinction. And shared logic across all modes
also now checks for McASP tx/rx-specific driver attributes. Those
attributes have been populated according to the original extent, ensuring
no divergence in functionality.

Constraints no longer applicable for async mode are skipped.
Clock selection options have also been added to include rx/tx-only clk_ids,
exposing independent configuration via the machine driver as well.

Note that asynchronous mode is not applicable for McASP in DIT mode,
which is a transmitter-only mode to interface w/ self-clocking formats.

Signed-off-by: Sen Wang <sen@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Tested-by: Paresh Bhagat <p-bhagat@ti.com>
Link: https://patch.msgid.link/20260203003703.2334443-5-sen@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: ti: davinci-mcasp: Streamline pdir behavior across rx & tx streams
Sen Wang [Tue, 3 Feb 2026 00:37:02 +0000 (18:37 -0600)]
ASoC: ti: davinci-mcasp: Streamline pdir behavior across rx & tx streams

Simplify the mcasp_set_clk_pdir caller convention in start/stop stream
function, to make it so that set_clk_pdir gets called regardless when
stream starts and also disables when stream ends.

Functionality-wise, everything remains the same as the previously skipped
calls are now either correctly configured
(when McASP is SND_SOC_DAIFMT_BP_FC - pdir needs to be enabled)
or called with a bitmask of zero (when McASP is SND_SOC_DAIFMT_BC_FC - pdir
gets disabled).

On brief regarding McASP Clock and Frame sync configurations, refer to [0].

[0]:TRM Section 12.1.1.4.2 https://www.ti.com/lit/ug/sprujd4a/sprujd4a.pdf

Signed-off-by: Sen Wang <sen@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Tested-by: Paresh Bhagat <p-bhagat@ti.com>
Link: https://patch.msgid.link/20260203003703.2334443-4-sen@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: ti: davinci-mcasp: Disambiguate mcasp_is_synchronous function
Sen Wang [Tue, 3 Feb 2026 00:37:01 +0000 (18:37 -0600)]
ASoC: ti: davinci-mcasp: Disambiguate mcasp_is_synchronous function

The current mcasp_is_synchronous() function does more than what it
proclaims, it also checks if McASP is a frame producer.

Therefore split the original function into two separate ones and
replace all occurrences with the new equivalent logic.

Signed-off-by: Sen Wang <sen@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Tested-by: Paresh Bhagat <p-bhagat@ti.com>
Link: https://patch.msgid.link/20260203003703.2334443-3-sen@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: dt-bindings: davinci-mcasp: Add properties for asynchronous mode
Sen Wang [Tue, 3 Feb 2026 00:37:00 +0000 (18:37 -0600)]
ASoC: dt-bindings: davinci-mcasp: Add properties for asynchronous mode

McASP supports the independent configuration of TX & RX clk and frame
sync registers. By default, the driver is configured in synchronous mode
where RX clock generator is disabled and it uses transmit clock signals as
bit clock and frame sync. Therefore add optional properties needed for
asynchronous mode.

Add ti,async-mode boolean binding to provide a way to decouple the default
behavior and allows for independent TX & RX clocking.

Add tdm-slots-rx uint32 binding to provide an alternative hardware
specifier stating the number of RX serializers.
The existing property tdm-slots will still dictate number of
TX serializers, and RX if tdm-slots-rx isn't given for backwards
compatibility.

Add auxclk-fs-ratio-rx which allows to specify the ratio just for RX.
The driver can be supplied with two different ratios
(auxclk-fs-ratio and auxclk-fs-ratio-rx in tandem) and achieve two
different sampling rates for tx & rx.

Signed-off-by: Sen Wang <sen@ti.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Tested-by: Paresh Bhagat <p-bhagat@ti.com>
Link: https://patch.msgid.link/20260203003703.2334443-2-sen@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoMerge tag 'asoc-fix-v6.19-rc8' of https://git.kernel.org/pub/scm/linux/kernel/git...
Takashi Iwai [Wed, 4 Feb 2026 16:03:08 +0000 (17:03 +0100)]
Merge tag 'asoc-fix-v6.19-rc8' of https://git./linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v6.19

A bunch more small fixes here, plus some more of the constant stream of
quirks.   The most notable change here is Richard's change to the cs_dsp
code for the KUnit tests which is relatively large, mostly due to
boilerplate.  The tests were triggering large numbers of error messages
as part of verifying that problems with input data are appropriately
detected which in turn caused runtime issues for the framework due to
the performance impact of pushing the logging out, while the logging is
valuable in normal operation it's basically useless while doing tests
designed to trigger it so rate limiting is an appropriate fix.

6 weeks agoASoC: SDCA: Limit values user can write to Selected Mode
Charles Keepax [Wed, 4 Feb 2026 12:59:43 +0000 (12:59 +0000)]
ASoC: SDCA: Limit values user can write to Selected Mode

Prevent the user from both updating the Selected Mode control
whilst the jack is not present, and from writing values that don't
correspond to a valid jack type (Unknown, in progress, etc.).

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260204125944.1134011-7-ckeepax@opensource.cirrus.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SDCA: Add regmap defaults for specification defined values
Charles Keepax [Wed, 4 Feb 2026 12:59:42 +0000 (12:59 +0000)]
ASoC: SDCA: Add regmap defaults for specification defined values

Some of the SDCA Controls have a defined reset value in the
specification. Update the parsing to add these specification defined
values into the regmap defaults array. This will reduce the number of
registers that are synchronised on a cache sync.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260204125944.1134011-6-ckeepax@opensource.cirrus.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SDCA: Rearrange FDL file messages
Charles Keepax [Wed, 4 Feb 2026 12:59:41 +0000 (12:59 +0000)]
ASoC: SDCA: Rearrange FDL file messages

It is helpful to have something in the log showing which firmware file
was loaded by the driver. Update the existing FDL disk file debug
statement to just note that a disk file rather than ACPI file was used,
and add a new info printk that prints out the details of the loaded file
regardless of where that file came from. Likewise, sometimes it is
useful to get a message if the file-sets list is missing, although this
isn't technically an error so make it a debug.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260204125944.1134011-5-ckeepax@opensource.cirrus.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SDCA: Still process most of the jack detect if control is missing
Charles Keepax [Wed, 4 Feb 2026 12:59:40 +0000 (12:59 +0000)]
ASoC: SDCA: Still process most of the jack detect if control is missing

DAPM creates its controls very late in the card creation, so
there is no call into the driver after the controls are created. This
means the jack IRQs can't be guaranteed to be registered after the ALSA
controls are available. If a jack IRQ is received before the controls
are available, currently the driver does not update the Selected Mode as
it is required by the specification to do.

If the ALSA controls are not available update the Selected Mode directly
rather than going through the ALSA control. The ALSA control should pick
up the state once it is created.

Fixes: b9ab3b618241 ("ASoC: SDCA: Add some initial IRQ handlers")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260204125944.1134011-4-ckeepax@opensource.cirrus.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SDCA: Handle volatile controls correctly
Charles Keepax [Wed, 4 Feb 2026 12:59:39 +0000 (12:59 +0000)]
ASoC: SDCA: Handle volatile controls correctly

There are very few volatile controls in SDCA that are exported
as ALSA controls, typically Detected Mode is the only common
one. However, the current code does not resume the device when
these ALSA controls are accessed, which will result in the
read/write failing.

Add a new wrapper specifically for volatile controls that will do
the required pm_runtime operations before accessing the register.

Fixes: c3ca24e3fcb6 ("ASoC: SDCA: Create ALSA controls from DisCo")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260204125944.1134011-3-ckeepax@opensource.cirrus.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SDCA: Remove outdated todo comment
Charles Keepax [Wed, 4 Feb 2026 12:59:38 +0000 (12:59 +0000)]
ASoC: SDCA: Remove outdated todo comment

Support for -cn- properties has already been added, however the TODO
comment noting this feature was required was not removed. Remove the
now redundant comment.

Fixes: 50a479527ef01 ("ASoC: SDCA: Add support for -cn- value properties")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260204125944.1134011-2-ckeepax@opensource.cirrus.com
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: tas2781: Put three different calibrated data solution into the same data structure
Shenghao Ding [Mon, 2 Feb 2026 10:27:56 +0000 (18:27 +0800)]
ASoC: tas2781: Put three different calibrated data solution into the same data structure

TAS2781 driver supports three solutions of calibrated data. The first is
from the driver itself: driver reads the calibrated files directly during
probe; The second is from user space: during init of audio hal, the audio
hal will pass the calibrated data via kcontrol interface. Driver will
store this data in "struct calidata" for use. The third is from UEFI,
mainly used in hda device. These three solutions save the calibrated data
into different data structures. It is time to put them together into
"struct calidata" for use.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20260202102757.532-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX952
Chancel Liu [Mon, 2 Feb 2026 10:56:22 +0000 (19:56 +0900)]
ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX952

Add compatible string "fsl,imx952-rpmsg-audio" for i.MX952 platform,
which is backward compatible with i.MX95. Set it to fall back to
"fsl,imx95-rpmsg-audio".

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20260202105622.39772-3-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX94
Chancel Liu [Mon, 2 Feb 2026 10:56:21 +0000 (19:56 +0900)]
ASoC: dt-bindings: fsl_rpmsg: Add compatible string for i.MX94

Add compatible string "fsl,imx94-rpmsg-audio" for i.MX94 platform,
which is backward compatible with i.MX95. Set it to fall back to
"fsl,imx95-rpmsg-audio".

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
Link: https://patch.msgid.link/20260202105622.39772-2-chancel.liu@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: Intel: hda: Add a virtual CPU DAI
Ranjani Sridharan [Wed, 4 Feb 2026 08:18:33 +0000 (10:18 +0200)]
ASoC: SOF: Intel: hda: Add a virtual CPU DAI

Add a virtual CPU DAI for loopback capture for echo reference
implementation. We can't use the snd-soc-dummy-dai because it is already
used for the bluetooth DAI link.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Mateusz Redzynia <mateuszx.redzynia@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-11-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: Intel: hda: Fix NULL pointer dereference
Ranjani Sridharan [Wed, 4 Feb 2026 08:18:32 +0000 (10:18 +0200)]
ASoC: SOF: Intel: hda: Fix NULL pointer dereference

If there's a mismatch between the DAI links in the machine driver and
the topology, it is possible that the playback/capture widget is not
set, especially in the case of loopback capture for echo reference
where we use the dummy DAI link. Return the error when the widget is not
set to avoid a null pointer dereference like below when the topology is
broken.

RIP: 0010:hda_dai_get_ops.isra.0+0x14/0xa0 [snd_sof_intel_hda_common]

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Mateusz Redzynia <mateuszx.redzynia@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-10-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: sof-audio: Add support for loopback capture
Ranjani Sridharan [Wed, 4 Feb 2026 08:18:31 +0000 (10:18 +0200)]
ASoC: SOF: sof-audio: Add support for loopback capture

An example of a DAI-less loopback pipeline would be the echo
reference capture in the speaker playback path. This pipeline
is set up as follows:

Host(Playback) -> mixin -> mixout -> gain -> module-copier -> DAI
|
V
Host(Capture) <-  Process module <- virtual DAI

In the above example, the virtual DAI exploits the concept of an
aggregated DAI (one with a non-zero DAI ID) in topology to enable this
pipeline to work with DPCM. A virtual DAI is a DAI widget with a
non-zero DAI ID and hence is skipped when traversing the list of DAPM
widgets during widget prepare/set/up/free/unprepare. The process module
in the above pipeline generates 0's that are captured by the echo
reference PCM.  When the playback path is active, the process module acts
as a passthrough module to allow the playback samples to be passthrough
to the capture host.

In order for these pipelines to work properly, the logic for
setting/preparing/freeing/unpreparing the widgets needs to be amended to
make sure that only the widgets that are in the pipeline in the same
direction as the PCM being started are set up. For example, when the
playback PCM is started, the capture pipeline widgets also show up in
the list of connected DAPM widgets but they shouldn't be set up yet
because the echo reference capture PCM hasn't been started yet.
Alternatively, when the echo reference capture PCM is started, the
playback pipeline widgets should not be setup.

Finally, the last step needed to put this all together is the set the
routes for widgets connecting the playback and the capture pipelines
when both are active.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-9-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: sof-audio: Traverse paths with aggregated DAI widgets
Ranjani Sridharan [Wed, 4 Feb 2026 08:18:30 +0000 (10:18 +0200)]
ASoC: SOF: sof-audio: Traverse paths with aggregated DAI widgets

Aggregated DAI widgets exist in topology for representation and are not
actually initialized in the firmware. But in preparation for using this
as a virtual DAI for loopback capture, make sure that we can traverse
the path from an aggregated DAI widget to the host widget.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-8-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: ipc4-topology: Add support for process modules with no input pins
Ranjani Sridharan [Wed, 4 Feb 2026 08:18:29 +0000 (10:18 +0200)]
ASoC: SOF: ipc4-topology: Add support for process modules with no input pins

A tone generator module can be a type of processing module with no input
pins. Adjust the logic to set the reference params for selecting output
format and the basecfg format based on the output format.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-7-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: ipc4-topology: Add new tokens for pipeline direction
Ranjani Sridharan [Wed, 4 Feb 2026 08:18:28 +0000 (10:18 +0200)]
ASoC: SOF: ipc4-topology: Add new tokens for pipeline direction

Parse the pipeline direction from topology. The direction_valid token is
required for backward-compatibility with older topologies that may not
have the direction set for pipelines. This will be used when
setting up pipelines to check if a pipeline is in the same direction as
the requested params and skip those in the opposite direction like in
the case of echo reference capture pipelines during playback.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-6-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: Intel: sof_sdw: Add a DAI link for loopback capture
Ranjani Sridharan [Wed, 4 Feb 2026 08:18:27 +0000 (10:18 +0200)]
ASoC: Intel: sof_sdw: Add a DAI link for loopback capture

Add a DAI link for loopback capture as the last link to make sure
the other DAI link ID's remain unaffected. It serves as a dummy DAI link
to enable echo reference capture in the SDW topologies which do not have
an actual backend capture DAI.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agouapi: sound: sof: tokens: Add missing token for KCPS
Ranjani Sridharan [Wed, 4 Feb 2026 08:18:26 +0000 (10:18 +0200)]
uapi: sound: sof: tokens: Add missing token for KCPS

Align with the firmware and add the missing token for pipeline kcps.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: pcm: Split up widget prepare and setup
Ranjani Sridharan [Wed, 4 Feb 2026 08:18:25 +0000 (10:18 +0200)]
ASoC: SOF: pcm: Split up widget prepare and setup

Widgets are set up in 2 steps, first ipc_prepare followed by the actual
IPC sent to the DSP to set up the widget. Split these 2 steps to do the
ipc_prepare during hw_params and the setting up in the prepare callback.
This will allow for future modifications to pipeline set up to be split
up between the FE and BE DAI prepare ops.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: sof-audio: Add a new op in struct sof_ipc_tplg_ops
Ranjani Sridharan [Wed, 4 Feb 2026 08:18:24 +0000 (10:18 +0200)]
ASoC: SOF: sof-audio: Add a new op in struct sof_ipc_tplg_ops

Add a new host_config op in struct sof_ipc_tplg_ops and define it for
IPC4. This will be used to configure the host widget during prepare
after a suspend/resume or after an xrun.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260204081833.16630-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: fsl_xcvr: fix missing lock in fsl_xcvr_mode_put()
Ziyi Guo [Mon, 2 Feb 2026 17:41:12 +0000 (17:41 +0000)]
ASoC: fsl_xcvr: fix missing lock in fsl_xcvr_mode_put()

fsl_xcvr_activate_ctl() has
lockdep_assert_held(&card->snd_card->controls_rwsem),
but fsl_xcvr_mode_put() calls it without acquiring this lock.

Other callers of fsl_xcvr_activate_ctl() in fsl_xcvr_startup() and
fsl_xcvr_shutdown() properly acquire the lock with down_read()/up_read().

Add the missing down_read()/up_read() calls around fsl_xcvr_activate_ctl()
in fsl_xcvr_mode_put() to fix the lockdep assertion and prevent potential
race conditions when multiple userspace threads access the control.

Signed-off-by: Ziyi Guo <n7l8m4@u.northwestern.edu>
Link: https://patch.msgid.link/20260202174112.2018402-1-n7l8m4@u.northwestern.edu
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: dt-bindings: ti,tlv320aic3x: Add compatible string ti,tlv320aic23
Frank Li [Mon, 2 Feb 2026 20:57:57 +0000 (15:57 -0500)]
ASoC: dt-bindings: ti,tlv320aic3x: Add compatible string ti,tlv320aic23

Add compatible string ti,tlv320aic23 to fix below CHECK_DTB warning:
arch/arm/boot/dts/nxp/imx/imx35-eukrea-mbimxsd35-baseboard.dtb:
    /soc/bus@43f00000/i2c@43f80000/codec@1a: failed to match any schema with compatible: ['ti,tlv320aic23']

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Link: https://patch.msgid.link/20260202205758.3044617-1-Frank.Li@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: amd: fix memory leak in acp3x pdm dma ops
Chris Bainbridge [Mon, 2 Feb 2026 20:50:33 +0000 (20:50 +0000)]
ASoC: amd: fix memory leak in acp3x pdm dma ops

Fixes: 4a767b1d039a8 ("ASoC: amd: add acp3x pdm driver dma ops")
Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
Link: https://patch.msgid.link/20260202205034.7697-1-chris.bainbridge@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: Intel: reserve link DMA for sdw bpt stream
Mark Brown [Wed, 4 Feb 2026 11:18:54 +0000 (11:18 +0000)]
ASoC: SOF: Intel: reserve link DMA for sdw bpt stream

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

Currently, hda_sdw_bpt_dma_prepare() get a HDA stream and use the link
DMA but doesn't reserve it. It works fine because we assume the
SwoundWire BPT will not run with audio streams simultaneously. Create
and use the new helpers to reserve the link DMA and allow running BPT
and audio stream simultaneously.

Pierre adds:

For the record this solution has two issues not documented in any commit
message:

a) this will not work in 'dspless' mode, where the link DMA is not
enabled.  That's probably fine given that no one used that mode in
production, but that's a software restriction that you will not be able
to undo.

b) this raise the question of how bandwidth will be managed. The premise
of BPT is that it uses all the bus bandwidth to guarantee predictable
firmware download times. If the available bandwidth is restricted by
other audio streams, then mechanically the startup latency will be
increased and vary - or you will have to run the bus at a higher
frequency to provision enough bandwidth for BPT but that means higher
power consumption. Or you will have to change the bus clock dynamically
which is possible at the hardware level for SDCA parts but not legacy
ones.

I am not going to lay on the tracks for this low-level set of changes,
but you'll have to address the b) opens for future contributions.

6 weeks agoALSA: usb-audio: fix broken logic in snd_audigy2nx_led_update()
Sergey Shtylyov [Tue, 3 Feb 2026 16:15:57 +0000 (19:15 +0300)]
ALSA: usb-audio: fix broken logic in snd_audigy2nx_led_update()

When the support for the Sound Blaster X-Fi Surround 5.1 Pro was added,
the existing logic for the X-Fi Surround 5.1 in snd_audigy2nx_led_put()
was broken due to missing *else* before the added *if*: snd_usb_ctl_msg()
became incorrectly called twice and an error from first snd_usb_ctl_msg()
call ignored.  As the added snd_usb_ctl_msg() call was totally identical
to the existing one for the "plain" X-Fi Surround 5.1, just merge those
two *if* statements while fixing the broken logic...

Found by Linux Verification Center (linuxtesting.org) with the Svace static
analysis tool.

Fixes: 7cdd8d73139e ("ALSA: usb-audio - Add support for USB X-Fi S51 Pro")
Signed-off-by: Sergey Shtylyov <s.shtylyov@auroraos.dev>
Link: https://patch.msgid.link/20260203161558.18680-1-s.shtylyov@auroraos.dev
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 weeks agoALSA: hda/realtek: Add quirk for Minisforum V3 SE
Samuel Dionne-Riel [Tue, 3 Feb 2026 01:01:33 +0000 (20:01 -0500)]
ALSA: hda/realtek: Add quirk for Minisforum V3 SE

First, adding a generic quirk for Bass speaker DAC avoidance.

This pattern (re-routing the bass speakers off of a DAC without volume
control) seems common enough that having a "model" to match against and
quickly use to verify may be worthwhile.

The alc285_fixup_thinkpad_x1_gen7 routing was selected, amongst the
different options, as it should allow tuning the ratio between both
speaker set.

The routing was verified using `hda-verb`, and picking either 0x00 or
0x01. Either routing made the volume of the bass speakers controllable.

    hda-verb /dev/snd/hwC1D0 0x17 SET_CONNECT_SEL 0x01

This likely will apply for the Minisforum V3, though there isn't a lot
of information to confirm whether or not the identifiers are the same.

This was verified on the Minisforum V3 SE, and the root cause (the bass
speakers routing) was found out by using pink noise, and playing with
the mixers.

Signed-off-by: Samuel Dionne-Riel <samuel@dionne-riel.com>
Link: https://patch.msgid.link/20260203010132.1981419-2-samuel@dionne-riel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 weeks agoALSA: aloop: Fix racy access at PCM trigger
Takashi Iwai [Tue, 3 Feb 2026 14:09:59 +0000 (15:09 +0100)]
ALSA: aloop: Fix racy access at PCM trigger

The PCM trigger callback of aloop driver tries to check the PCM state
and stop the stream of the tied substream in the corresponding cable.
Since both check and stop operations are performed outside the cable
lock, this may result in UAF when a program attempts to trigger
frequently while opening/closing the tied stream, as spotted by
fuzzers.

For addressing the UAF, this patch changes two things:
- It covers the most of code in loopback_check_format() with
  cable->lock spinlock, and add the proper NULL checks.  This avoids
  already some racy accesses.
- In addition, now we try to check the state of the capture PCM stream
  that may be stopped in this function, which was the major pain point
  leading to UAF.

Reported-by: syzbot+5f8f3acdee1ec7a7ef7b@syzkaller.appspotmail.com
Closes: https://lore.kernel.org/69783ba1.050a0220.c9109.0011.GAE@google.com
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20260203141003.116584-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 weeks agoASoC: SOF: Intel: hda: add SDCA property check
Mac Chiang [Tue, 3 Feb 2026 09:59:23 +0000 (17:59 +0800)]
ASoC: SOF: Intel: hda: add SDCA property check

If SDCA property is not present in the DisCo table, assume it
is present. This allows DAI links to be created from codec_info_list
instead of being skipped.

Signed-off-by: Mac Chiang <mac.chiang@intel.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/20260203095923.3741674-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: Intel: soc-acpi-intel-ptl-match: drop rt721 related match tables
Mac Chiang [Tue, 3 Feb 2026 10:00:27 +0000 (18:00 +0800)]
ASoC: Intel: soc-acpi-intel-ptl-match: drop rt721 related match tables

Use functional topologies to support all RT721-related topology and
amplifier combinations,
e.g. sof-ptl-rt721.tplg, sof-ptl-rt721-l3-rt1320-l3.tplg.

If these entries are not removed, they will all use the sof-ptl-rt721.tplg.

Signed-off-by: Mac Chiang <mac.chiang@intel.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/20260203100027.3741754-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: Intel: allow module parameter override BT link to 0
Bard Liao [Tue, 3 Feb 2026 11:15:45 +0000 (19:15 +0800)]
ASoC: SOF: Intel: allow module parameter override BT link to 0

The existing code test if (bt_link_mask_override) to overwrite the BT
link mask. This doesn't allow user to disable the BT link mask. User may
want to disable the BT link when it is detected by the NHLT.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://patch.msgid.link/20260203111545.3742255-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: Intel: hda-sdw-bpt: support simultaneous audio and BPT streams
Bard Liao [Tue, 3 Feb 2026 11:40:27 +0000 (19:40 +0800)]
ASoC: SOF: Intel: hda-sdw-bpt: support simultaneous audio and BPT streams

Currently the SoundWire BPT stream uses the paired link DMA but not
reserve it. It works without any issue because we assume the SoundWire
BPT will not run with audio streams simultaneously.
To support simultaneous audio and BPT streams, we need to use the
hda_dma_prepare/cleanup helpers to reserve the pair link host DMA.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20260203114027.3742558-4-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: Intel: add hda_dma_prepare/cleanup helpers
Bard Liao [Tue, 3 Feb 2026 11:40:26 +0000 (19:40 +0800)]
ASoC: SOF: Intel: add hda_dma_prepare/cleanup helpers

SoundWire BPT stream needs to use link and host DMAs. Thus we need
helpers to prepare and cleanup the link and host DMAs. Currently the
SoundWire BPT stream uses hda_cl_prepare/cleanup helpers. It works fine
because we assume the SwoundWire BPT will not run with audio streams
simultaneously. The new helpers are copied from hda_cl_prepare/cleanup
and add a flag to reserve the paired host and link DMAs. The new helpers
will be used by both code loader and SoundWire BPT.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20260203114027.3742558-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: Intel: add hda_dsp_stream_pair_get/put helpers
Bard Liao [Tue, 3 Feb 2026 11:40:25 +0000 (19:40 +0800)]
ASoC: SOF: Intel: add hda_dsp_stream_pair_get/put helpers

Currently, hda_dsp_stream_get/put are used to get/put the host dma.
However, we may want to use a hda stream that both host and link dma are
available. Add helper to find the hda stream and reserve/release it.

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
Link: https://patch.msgid.link/20260203114027.3742558-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: rt1320: fix intermittent no-sound issue
Shuming Fan [Tue, 3 Feb 2026 08:48:26 +0000 (16:48 +0800)]
ASoC: rt1320: fix intermittent no-sound issue

This patch adds a setting to resolve the intermittent no-sound issue.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://patch.msgid.link/20260203084827.768238-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: SOF: Intel: use hdev->info.link_mask directly
Bard Liao [Tue, 3 Feb 2026 07:24:05 +0000 (15:24 +0800)]
ASoC: SOF: Intel: use hdev->info.link_mask directly

The link_mask variable is not changed after setting to
hdev->info.link_mask until it is used for another purpose to get the
used SoundWire links and set to mach->mach_params.links. Besides, the
link_mask variable should be reset before any link id is added to the
link_mask. To fix the issue above and avoid confusing, use the
hdev->info.link_mask variable directly to check if the SoundWire link
is enabled.

Fixes: 5226d19d4cae ("ASoC: SOF: Intel: use sof_sdw as default SDW machine driver")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20260203072405.3716307-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: es8328: error handling and resume fixes
Mark Brown [Mon, 2 Feb 2026 23:31:48 +0000 (23:31 +0000)]
ASoC: es8328: error handling and resume fixes

Merge series from Hsieh Hung-En <hungen3108@gmail.com>:

This series fixes some issues and improves robustness in the es8328
driver.

6 weeks agoASoC: amd: acp: Add ACP7.0 match entries for Cirrus
Mark Brown [Mon, 2 Feb 2026 23:31:44 +0000 (23:31 +0000)]
ASoC: amd: acp: Add ACP7.0 match entries for Cirrus

Merge series from Simon Trimmer <simont@opensource.cirrus.com>:

This patch series adds a number of ACP7.0 match table entries that are
being used in customer products.

Some of the configurations are very similar so the series begins with
renaming and sorting the existing structures so that the end result is
easier to manage.

6 weeks agoAnbernic RG-DS AW87391 Speaker Amps
Mark Brown [Mon, 2 Feb 2026 23:31:39 +0000 (23:31 +0000)]
Anbernic RG-DS AW87391 Speaker Amps

Merge series from Chris Morgan <macroalpha82@gmail.com>:

Add support for the Anbernic RG-DS Speaker Amplifiers. The Anbernic
RG-DS uses two AW87391 ICs at 0x58 and 0x5B on i2c2. However, the
manufacturer did not provide a firmware file, only a sequence of
register writes to each device to enable and disable them.

Add support for this *specific* configuration in the AW87390 driver.
Since we are relying on a device specific sequence I am using a
device specific compatible string. This driver does not currently
support the aw87391 for any other device as I have none to test
with valid firmware. Attempts to create firmware with the AwinicSCPv4
have not been successful.

6 weeks agoASoC: qcom: q6asm: drop DSP responses for closed data streams
Cédric Bellegarde [Fri, 2 Jan 2026 21:52:25 +0000 (22:52 +0100)]
ASoC: qcom: q6asm: drop DSP responses for closed data streams

'Commit a354f030dbce ("ASoC: qcom: q6asm: handle the responses
after closing")' attempted to ignore DSP responses arriving
after a stream had been closed.

However, those responses were still handled, causing lockups.

Fix this by unconditionally dropping all DSP responses associated with
closed data streams.

Signed-off-by: Cédric Bellegarde <cedric.bellegarde@adishatz.org>
Link: https://patch.msgid.link/20260102215225.609166-1-cedric.bellegarde@adishatz.org
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: wcd-mbhc-v2: remove unnecessary module_init/exit functions
Ethan Nelson-Moore [Sat, 31 Jan 2026 02:01:10 +0000 (18:01 -0800)]
ASoC: wcd-mbhc-v2: remove unnecessary module_init/exit functions

The wcd-mbhc-v2 driver has unnecessary empty module_init and
module_exit functions. Remove them. Note that if a module_init function
exists, a module_exit function must also exist; otherwise, the module
cannot be unloaded.

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://patch.msgid.link/20260131020111.46108-1-enelsonmoore@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: amd: acp: Add ACP7.0 match entries for Cirrus Logic parts
Simon Trimmer [Tue, 27 Jan 2026 17:34:49 +0000 (17:34 +0000)]
ASoC: amd: acp: Add ACP7.0 match entries for Cirrus Logic parts

This adds some match entries for a few system configurations:

cs42l45 link 1 UID 0
cs35l63 link 0 UID 0
cs35l63 link 0 UID 2
cs35l63 link 0 UID 4
cs35l63 link 0 UID 6

cs42l45 link 0 UID 0
cs35l63 link 1 UID 0
cs35l63 link 1 UID 1

cs42l45 link 0 UID 0
cs35l63 link 1 UID 1
cs35l63 link 1 UID 3

cs42l45 link 1 UID 0
cs35l63 link 0 UID 0
cs35l63 link 0 UID 1

cs35l63 link 0 UID 0
cs35l63 link 0 UID 2
cs35l63 link 0 UID 4
cs35l63 link 0 UID 6

cs42l43 link 0 UID 1

cs42l43b link 0 UID 1

cs42l45 link 0 UID 0

cs42l45 link 1 UID 0

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Reviewed-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Link: https://patch.msgid.link/6cac5670fd5bc14201d925584251d75e59307431.1769534442.git.simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: amd: acp: Sort Cirrus Logic match entries
Simon Trimmer [Tue, 27 Jan 2026 17:34:48 +0000 (17:34 +0000)]
ASoC: amd: acp: Sort Cirrus Logic match entries

In preparation for adding more match entries sort the ones that are
present.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/0a756390dfb7e928246d0f35c611f175e1311e55.1769534442.git.simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: amd: acp: Rename Cirrus Logic component match entries to include link and uid
Simon Trimmer [Tue, 27 Jan 2026 17:34:47 +0000 (17:34 +0000)]
ASoC: amd: acp: Rename Cirrus Logic component match entries to include link and uid

In preparation for having similar matches with multiple UIDs on the same
bus rename the match entries to include the bus link and device uid
numbers in their name using the lNuN convention.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/f8f7fab5131ea6080421812dcce3e9ffc5b936e0.1769534442.git.simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
6 weeks agoASoC: amd: acp: Sort match table into most specific first
Simon Trimmer [Tue, 27 Jan 2026 17:34:46 +0000 (17:34 +0000)]
ASoC: amd: acp: Sort match table into most specific first

Match tables should be sorted so that more complex combinations of
device matches are before simpler combinations, with the single device
matches at the end.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Link: https://patch.msgid.link/50c385a7f64ccd75cabf49eddbc0ec6fe13f3252.1769534442.git.simont@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>