]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
11 days agoALSA: pcmtest: fix reference leak on failed device registration
Guangshuo Li [Wed, 15 Apr 2026 19:31:38 +0000 (03:31 +0800)] 
ALSA: pcmtest: fix reference leak on failed device registration

When platform_device_register() fails in mod_init(), the embedded struct
device in pcmtst_pdev has already been initialized by
device_initialize(), but the failure path returns the error without
dropping the device reference for the current platform device:

  mod_init()
    -> platform_device_register(&pcmtst_pdev)
       -> device_initialize(&pcmtst_pdev.dev)
       -> setup_pdev_dma_masks(&pcmtst_pdev)
       -> platform_device_add(&pcmtst_pdev)

This leads to a reference leak when platform_device_register() fails.
Fix this by calling platform_device_put() before returning the error.

The issue was identified by a static analysis tool I developed and
confirmed by manual review.

Fixes: 315a3d57c64c5 ("ALSA: Implement the new Virtual PCM Test Driver")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Link: https://patch.msgid.link/20260415193138.3861297-1-lgs201920130244@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 days agoALSA: 6fire: Fix input volume change detection
Cássio Gabriel [Thu, 16 Apr 2026 13:24:40 +0000 (10:24 -0300)] 
ALSA: 6fire: Fix input volume change detection

usb6fire_control_input_vol_put() stores the analog capture volume
as a signed offset in rt->input_vol[] (-15..+15), but it compares
the cached value against the user-visible mixer value (0..30)
before subtracting 15.

This mixes two domains in the change detection path. Since the
runtime is zero-initialized, the visible default is 15; writing 0
right after probe is ignored, while writing 15 is reported as a
change even though the cached value remains 0.

Normalize the user value before comparing it with the cached offset.

Fixes: 06bb4e743501 ("ALSA: snd-usb-6fire: add analog input volume control")
Cc: stable@vger.kernel.org
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260416-alsa-6fire-input-volume-change-detection-v1-1-ec78299168df@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 days agoALSA: usb-audio: Add quirk entries for NexiGo N930W webcam
Johnathan Penberthy [Fri, 17 Apr 2026 01:01:23 +0000 (19:01 -0600)] 
ALSA: usb-audio: Add quirk entries for NexiGo N930W webcam

The NexiGo N930W 60fps webcam (USB ID 3443:930d) hits the same
'cannot get freq at ep 0x84' error in snd-usb-audio as its sibling
N930AF (1bcf:2283). Without QUIRK_FLAG_GET_SAMPLE_RATE the ADC clock
is never configured and the microphone streams only zero samples.

Testing on Linux 6.17 with QUIRK_FLAG_GET_SAMPLE_RATE |
QUIRK_FLAG_MIC_RES_16 (via quirk_alias=3443930d:1bcf2283) confirmed
the microphone captures real audio after a cold USB re-enumeration.
Adding a native quirk_flags_table entry avoids the alias workaround.

Signed-off-by: Johnathan Penberthy <johnathan.penberthy@gmail.com>
Link: https://patch.msgid.link/20260417010123.3080904-1-johnathan.penberthy@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
11 days agoALSA: vx: use correct function name in kernel-doc comment
Randy Dunlap [Mon, 16 Feb 2026 06:00:10 +0000 (22:00 -0800)] 
ALSA: vx: use correct function name in kernel-doc comment

Use the correct function name to avoid a kernel-doc warning (when
W=1 is used):

vx_cmd.h:210: warning: expecting prototype for vx_send_pipe_cmd_params().
 Prototype was for vx_set_pipe_cmd_params() instead

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260216060010.2784438-1-rdunlap@infradead.org
11 days agoALSA: virtio: drop an extaneous kernel-doc comment
Randy Dunlap [Mon, 16 Feb 2026 05:59:56 +0000 (21:59 -0800)] 
ALSA: virtio: drop an extaneous kernel-doc comment

Drop a kernel-doc struct comment since the struct member was removed.
This eliminates a kernel-doc warning when make W=1 is used.

virtio_pcm.h:65: warning: Excess struct member 'msg_last_enqueued'
 description in 'virtio_pcm_substream'

Fixes: fe981e67568c ("ALSA: virtio: use ack callback")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260216055956.2784399-1-rdunlap@infradead.org
11 days agoALSA: usb-audio: Add quirk for SmartlinkTechnology M01
Juan Pablo Fuentealba Bizama [Thu, 16 Apr 2026 19:11:49 +0000 (15:11 -0400)] 
ALSA: usb-audio: Add quirk for SmartlinkTechnology M01

Add quirk entry for SmartlinkTechnology M01 USB microphone to enable
the standard mixer interface.

Signed-off-by: Juan Pablo Fuentealba Bizama <jpfuentealbabizama@gmail.com>
Link: https://patch.msgid.link/20260416191149.12088-1-jpfuentealbabizama@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 days agoALSA: usb-audio: stop parsing UAC2 rates at MAX_NR_RATES
Cássio Gabriel [Wed, 15 Apr 2026 15:04:53 +0000 (12:04 -0300)] 
ALSA: usb-audio: stop parsing UAC2 rates at MAX_NR_RATES

parse_uac2_sample_rate_range() caps the number of enumerated
rates at MAX_NR_RATES, but it only breaks out of the current
rate loop. A malformed UAC2 RANGE response with additional
triplets continues parsing the remaining triplets and repeatedly
prints "invalid uac2 rates" while probe still holds
register_mutex.

Stop the whole parse once the cap is reached and return the
number of rates collected so far.

Fixes: 4fa0e81b8350 ("ALSA: usb-audio: fix possible hang and overflow in parse_uac2_sample_rate_range()")
Cc: stable@vger.kernel.org
Reported-by: syzbot+d56178c27a4710960820@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=d56178c27a4710960820
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260415-usb-audio-uac2-rate-cap-v1-1-5ecbafc120d8@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 days agoALSA: hda/intel: Move firmware loading into the probe work
Takashi Iwai [Wed, 15 Apr 2026 13:55:22 +0000 (15:55 +0200)] 
ALSA: hda/intel: Move firmware loading into the probe work

The hda-intel driver uses request_firmware_nowait() for loading its
patch, and tries to continue the probe directly from the fw loader
callback.  This works in principle, but it has a few drawbacks:

- The driver may be released before the firmware callback completes
- Having two ways of async probe makes the code flow unnecessarily
  complex

The former issue is more severe, as it may potentially lead to a UAF,
and there is no explicit way to cancel the pending firmware worker
for now.

This patch changes the firmware loading to be performed rather in the
common probe work without *_nowait().  Then the pending work can be
easily canceled, and the code becomes more straightforward.

A nice bonus is that, by moving into the probe work, the firmware
doesn't need any longer to be cached, hence we can get rid of struct
azx.fw field, and release the firmware immediately after parsing it,
too.

Fixes: 5cb543dba986 ("ALSA: hda - Deferred probing with request_firmware_nowait()")
Link: https://patch.msgid.link/20260415135526.1813126-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 days agoALSA: hda/realtek: add quirk for HONOR MRB-XXX M1020
Timofey Tarasenko [Wed, 15 Apr 2026 07:46:57 +0000 (17:46 +1000)] 
ALSA: hda/realtek: add quirk for HONOR MRB-XXX M1020

Adds pin fixups to enable subwoofer and JACK functionality
on Honor Magicbook Art 14 2025 (HONOR MRB-XXX M1020)

Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221147
Signed-off-by: Timofey Tarasenko <timka.tarasen@gmail.com>
Link: https://patch.msgid.link/20260415074657.1217862-1-timka.tarasen@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 days agoALSA: usb-audio: Tidy up error check for processing unit
Rong Zhang [Tue, 14 Apr 2026 13:29:01 +0000 (21:29 +0800)] 
ALSA: usb-audio: Tidy up error check for processing unit

There are two duplicated code paths calling get_min_max() with the same
arguments in build_audio_procunit(). This once led to a failure to
notice a code path that caused the `err' variable uninitialized when
adding error checks for callers of get_min_max*() [1].

Move cases in the switch-case statement to tidy up the error check by
merging the duplicated code paths together with a fallthrough attribute.
This also eliminates the `err = 0' lines and aggregates the error check
along with the corresponding call together, so that the intent of these
code paths is clearer.

The refactor also has an interesting effect that shrinks the .text size
by 16 bytes (GCC 15 amd64). It seems that the compiler was unable to
perform dead code elimination for the `err = 0' paths before.

Link: https://lore.kernel.org/r/ad36dGpCBTGsyFr_@stanley.mountain/
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260414-uac-build_auto_procunit-refactor-v1-1-afeb7efa6518@rong.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 days agoALSA: 6fire: Drop unnecessary NULL checks
Takashi Iwai [Tue, 14 Apr 2026 13:22:14 +0000 (15:22 +0200)] 
ALSA: 6fire: Drop unnecessary NULL checks

The NULL checks of chip pointer in usb6fire_chip_abrt() and
usb6fire_card_free() are utterly useless, as it's guaranteed to be
non-NULL.  Drop them for increasing the readability.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260414132218.411013-5-tiwai@suse.de
13 days agoALSA: 6fire: Reduce multi-level conditionals in usb6fire_chip_disconnect()
Takashi Iwai [Tue, 14 Apr 2026 13:22:13 +0000 (15:22 +0200)] 
ALSA: 6fire: Reduce multi-level conditionals in usb6fire_chip_disconnect()

The current code has deep indentation levels because of multiple if's.
Make it returning and reduce the multi-level conditionals for
increasing the code readability.

No functional change, just but a code refactoring.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260414132218.411013-4-tiwai@suse.de
13 days agoALSA: 6fire: Fix leftover global pointers after probe failures
Takashi Iwai [Tue, 14 Apr 2026 13:22:12 +0000 (15:22 +0200)] 
ALSA: 6fire: Fix leftover global pointers after probe failures

snd-usb-6fire driver holds devices[] and chips[] pointer arrays to
keep the usb_device and sfire_chip objects assigned to multiple
interfaces.  Those are, however, not properly cleared at the error
path of usb6fire_chip_probe(), which may confuse the later probes.
Also, the use of two pointer arrays makes things complicated; chips[]
may be NULL while devices[] may be left over.

For addressing this inconsistency, unify the pointer arrays, and use
only chips[] for managing the multiple devices, while the device is
checked with chip->dev pointer, instead.  Also, the assignment of
chips[] is moved at a later point where the probe successfully
returns, so that we don't leave the pointer there after the error.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260414132218.411013-3-tiwai@suse.de
13 days agoALSA: 6fire: Cover the whole probe and disconnect calls with register_mutex
Takashi Iwai [Tue, 14 Apr 2026 13:22:11 +0000 (15:22 +0200)] 
ALSA: 6fire: Cover the whole probe and disconnect calls with register_mutex

In 6fire driver, we protect the concurrent calls against probe and
disconnect with the register_mutex, but it's applied only partially.
Since we handle two global pointers in devices[] and chips[] pairs,
the assignment of the latter can be inconsistent upon concurrent
interface probes, and the refcount handling isn't properly protected
at disconnect, either.

This patch extends the mutex application range to the whole probe and
disconnect functions.  It makes the code safer against potential
concurrent probles and disconnects, while it makes the code easier to
read, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260414132218.411013-2-tiwai@suse.de
13 days agoALSA: caiaq: Handle probe errors properly
Takashi Iwai [Tue, 14 Apr 2026 10:59:00 +0000 (12:59 +0200)] 
ALSA: caiaq: Handle probe errors properly

The probe procedure of setup_card() in caiaq driver doesn't treat the
error cases gracefully, e.g. the error from snd_card_register() calls
snd_card_free() but continues.  This would lead to a UAF for the
further calls like snd_usb_caiaq_control_init(), as Berk suggested in
another patch in the link below.

However, the problem is not only that; in general, this function drops
the all error handlings (as it's a void function) although its caller
can propagate an error to snd_probe(), which eventually calls
snd_card_free() as a proper error path.  That said, we should treat
each error case in setup_card(), and just return the error code
promptly, which is then handled later as a fatal error in snd_probe().

This patch achieves it by changing the setup_card() to return an error
code.  Also, the superfluous snd_card_free() call is removed, too.

Note that card->private_free can be set still safely at returning an
error.  All called functions in card_free() have checks of the
unassigned resources or NULL checks.

Fixes: 8e3cd08ed8e5 ("[ALSA] caiaq - add control API and more input features")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/20260413034941.1131465-2-berkcgoksel@gmail.com
Link: https://patch.msgid.link/20260414105916.364073-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: control: Validate buf_len before strnlen() in snd_ctl_elem_init_enum_names()
Ziqing Chen [Tue, 14 Apr 2026 13:24:37 +0000 (21:24 +0800)] 
ALSA: control: Validate buf_len before strnlen() in snd_ctl_elem_init_enum_names()

snd_ctl_elem_init_enum_names() advances pointer p through the names
buffer while decrementing buf_len. If buf_len reaches zero but items
remain, the next iteration calls strnlen(p, 0).

While strnlen(p, 0) returns 0 and would hit the existing name_len == 0
error path, CONFIG_FORTIFY_SOURCE's fortified strnlen() first checks
maxlen against __builtin_dynamic_object_size(). When Clang loses track
of p's object size inside the loop, this triggers a BRK exception panic
before the return value is examined.

Add a buf_len == 0 guard at the loop entry to prevent calling fortified
strnlen() on an exhausted buffer.

Found by kernel fuzz testing through Xiaomi Smartphone.

Fixes: 8d448162bda5 ("ALSA: control: add support for ENUMERATED user space controls")
Cc: stable@vger.kernel.org
Signed-off-by: Ziqing Chen <chenziqing@xiaomi.com>
Link: https://patch.msgid.link/20260414132437.261304-1-chenziqing@xiaomi.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: usb-audio: Fix missing error handling for get_min_max*()
Takashi Iwai [Tue, 14 Apr 2026 09:33:34 +0000 (11:33 +0200)] 
ALSA: usb-audio: Fix missing error handling for get_min_max*()

The recent fix to add the error return value check from get_min_max*()
missed one case in build_audio_procunit() where no error value is set.
This may lead to an uninitialized variable and confuse the caller
(although this wouldn't happen practically because err is set for the
loop of num_ins at the beginning of the funciton).

Fix it by setting "err = 0" properly at the missing case, too.

Fixes: 4f55a85cd4fc ("ALSA: usb-audio: Add error checks against get_min_max*()")
Reported-by: Dan Carpenter <error27@gmail.com>
Closes: https://lore.kernel.org/ad36dGpCBTGsyFr_@stanley.mountain
Link: https://patch.msgid.link/20260414093336.305464-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: hda/realtek - fixed speaker no sound update
Kailang Yang [Tue, 14 Apr 2026 07:44:04 +0000 (15:44 +0800)] 
ALSA: hda/realtek - fixed speaker no sound update

Fixed speaker has pop noise on Lenovo Thinkpad X11 Carbon Gen 12.

Fixes: 630fbc6e870e ("ALSA: hda/realtek - fixed speaker no sound")
Reported-and-tested-by: Jeremy Bethmont <jeremy.bethmont@gmail.com>
Closes: https://lore.kernel.org/CAC88DfsHrhyhy0Pn1O-z9egBvMYu=6NYgcvcC6KCgwh_-Ldkxg@mail.gmail.com
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: hda/realtek: Add quirk for Acer PT316-51S headset mic
Faye Nichols [Mon, 13 Apr 2026 21:20:25 +0000 (15:20 -0600)] 
ALSA: hda/realtek: Add quirk for Acer PT316-51S headset mic

The Acer PT316-51S (PCI SSID 1025:160e) with ALC287 codec does not
detect the headset microphone due to missing BIOS pin configuration
for pin 0x19. Apply ALC2XX_FIXUP_HEADSET_MIC to enable it.

Signed-off-by: Faye Nichols <faye.opensource@gmail.com>
Link: https://patch.msgid.link/20260413212645.117119-1-faye.opensource@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: usb-audio: Exclude Scarlett 18i20 1st Gen from SKIP_IFACE_SETUP
Geoffrey D. Bennett [Mon, 13 Apr 2026 17:33:00 +0000 (03:03 +0930)] 
ALSA: usb-audio: Exclude Scarlett 18i20 1st Gen from SKIP_IFACE_SETUP

Same issue as the other 1st Gen Scarletts: QUIRK_FLAG_SKIP_IFACE_SETUP
causes distorted audio on the Scarlett 18i20 1st Gen (1235:800c).

Fixes: 38c322068a26 ("ALSA: usb-audio: Add QUIRK_FLAG_SKIP_IFACE_SETUP")
Reported-by: tucktuckg00se [https://github.com/geoffreybennett/linux-fcp/issues/54]
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://patch.msgid.link/ad0ozNnkcFrcjVQz@m.b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoMerge tag 'asoc-v7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Mon, 13 Apr 2026 16:09:48 +0000 (18:09 +0200)] 
Merge tag 'asoc-v7.1' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v7.1

There's one new core feature here but mostly this has been a fairly
quiet release, we've got a few new drivers and one core feature that's
likely to be relatively rarely used but the bulk of the work this time
around has been on quality.

 - Support for bus keepers, this will be used by the Apple device
   support.
 - Enhancements to the SDCA support, incuding retaskable jacks.
 - Unwinding of the pcm_new()/pcm_free() cleanups from Morimoto-san.
 - Test improvements for the Cirrus Logic drivers.
 - Large sets of fixes for the NXP, nVidia and Qualcomm drivers.
 - Support for AMD RPL DMICs, Cirrus Logic CS42L43 and CS47L47, nVidia
   machines with CPCAP and WM8962.

2 weeks agoALSA: hda/realtek: Add quirk for Legion S7 15IMH
Eric Naim [Mon, 13 Apr 2026 15:48:17 +0000 (23:48 +0800)] 
ALSA: hda/realtek: Add quirk for Legion S7 15IMH

Fix speaker output on the Lenovo Legion S7 15IMH05.

Cc: stable@vger.kernel.org
Signed-off-by: Eric Naim <dnaim@cachyos.org>
Link: https://patch.msgid.link/20260413154818.351597-1-dnaim@cachyos.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: hda/realtek: Add quirk for HP Spectre x360 14-ea
songxiebing [Mon, 13 Apr 2026 01:18:54 +0000 (09:18 +0800)] 
ALSA: hda/realtek: Add quirk for HP Spectre x360 14-ea

HP Spectre x360 Convertible 14-ea0xxx (2021 model or so)
doesn't make produce sound,The Bang & Olufsen speaker amplifier
is not enabled.

Root causing:
The PCI subsystem ID is 103c:0000 (HP left it unset), while the codec
subsystem ID is 103c:885b. The vendor-wide catch-all
SND_PCI_QUIRK_VENDOR(0x103c, "HP", ALC269_FIXUP_HP_MUTE_LED) matches
103c:0000 before the codec SSID fallback is reached, so
ALC245_FIXUP_HP_X360_AMP never applies.

So add the quirk in alc269_fixup_tbl.

Reported-by: dzidmail <dzidmail@gmail.com>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=221341
Signed-off-by: songxiebing <songxiebing@kylinos.cn>
Link: https://patch.msgid.link/20260413011854.96520-1-songxiebing@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: caiaq: take a reference on the USB device in create_card()
Berk Cem Goksel [Mon, 13 Apr 2026 03:49:41 +0000 (06:49 +0300)] 
ALSA: caiaq: take a reference on the USB device in create_card()

The caiaq driver stores a pointer to the parent USB device in
cdev->chip.dev but never takes a reference on it. The card's
private_free callback, snd_usb_caiaq_card_free(), can run
asynchronously via snd_card_free_when_closed() after the USB
device has already been disconnected and freed, so any access to
cdev->chip.dev in that path dereferences a freed usb_device.

On top of the refcounting issue, the current card_free implementation
calls usb_reset_device(cdev->chip.dev). A reset in a free callback
is inappropriate: the device is going away, the call takes the
device lock in a teardown context, and the reset races with the
disconnect path that the callback is already cleaning up after.

Take a reference on the USB device in create_card() with
usb_get_dev(), drop it with usb_put_dev() in the free callback,
and remove the usb_reset_device() call.

Fixes: b04dcbb7f7b1 ("ALSA: caiaq: Use snd_card_free_when_closed() at disconnection")
Cc: stable@vger.kernel.org
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Signed-off-by: Berk Cem Goksel <berkcgoksel@gmail.com>
Link: https://patch.msgid.link/20260413034941.1131465-3-berkcgoksel@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoMerge branch 'for-next' into for-linus
Takashi Iwai [Mon, 13 Apr 2026 05:18:36 +0000 (07:18 +0200)] 
Merge branch 'for-next' into for-linus

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoASoC: dt-bindings: rockchip: convert rk3399-gru-sound to DT Schema
Anushka Badhe [Fri, 10 Apr 2026 05:55:32 +0000 (11:25 +0530)] 
ASoC: dt-bindings: rockchip: convert rk3399-gru-sound to DT Schema

Convert the rockchip,rk3399-gru-sound.txt DT binding to DT Schema
format.

Update rockchip,cpu from a single I2S controller phandle to a
phandle-array. Add an optional second entry for the SPDIF controller,
as seen in rk3399-gru.dtsi, required by boards with DisplayPort audio.

Signed-off-by: Anushka Badhe <anushkabadhe@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260410055532.60868-1-anushkabadhe@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoALSA: sscape: Add suspend and resume support
Cássio Gabriel [Sat, 11 Apr 2026 18:14:41 +0000 (15:14 -0300)] 
ALSA: sscape: Add suspend and resume support

The SoundScape ISA driver has lacked suspend and resume callbacks since
commit 277e926c9b27 ("[ALSA] sscape - Use platform_device").

A plain snd_wss resume is not sufficient for SoundScape. Resume also
needs to restore the board-specific gate-array routing, and non-VIVO
boards need to reinitialize the probe-time MIDI firmware and MIDI
control state when the MPU-401 side was enabled during probe.

That firmware reload can be handled in-kernel because
commit acd47100914b ("ALSA: sscape: convert to firmware loader framework")
moved the driver to request_firmware().

Add ISA and ISA-PnP PM callbacks, reconfigure the board on resume,
reload the non-VIVO MIDI firmware, restore the MIDI state, and then
resume the WSS codec. If MIDI firmware reload fails, keep the WSS resume
path alive and leave MIDI unavailable instead of failing the whole
device resume.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260411-alsa-sscape-pm-v2-2-aeb5682e14b0@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: sscape: Cache per-card resources for board reinitialization
Cássio Gabriel [Sat, 11 Apr 2026 18:14:40 +0000 (15:14 -0300)] 
ALSA: sscape: Cache per-card resources for board reinitialization

The SoundScape driver programs the gate-array directly from the global
resource arrays during probe. That is sufficient for initial bring-up,
but a PM resume path also needs the resolved per-card IRQ, DMA, MPU IRQ
and joystick settings after probe has finished.

Store the resolved resources in struct soundscape and move the board
setup into a reusable helper. Also factor the MIDI state programming so
the same sequence can be reused by a later PM resume path.

This is preparatory work for suspend/resume support and is not intended
to change runtime behaviour.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260411-alsa-sscape-pm-v2-1-aeb5682e14b0@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: usb-audio: Do not expose sticky mixers
Rong Zhang [Fri, 10 Apr 2026 17:49:04 +0000 (01:49 +0800)] 
ALSA: usb-audio: Do not expose sticky mixers

Some devices' mixers are sticky, which accept SET_CUR but do absolutely
nothing. Registering these mixers confuses userspace and results in
ineffective volume control.

Check if a mixer is sticky by setting the volume to the maximum or
minimum value and checking for effectiveness afterward. Prevent the
mixer from being registered if it turns out to be sticky.

Quirky device sample:

  usb 7-1: New USB device found, idVendor=0e0b, idProduct=fa01, bcdDevice= 1.00
  usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
  usb 7-1: Product: Feaulle Rainbow
  usb 7-1: Manufacturer: Generic
  usb 7-1: SerialNumber: 20210726905926
  (Mic Capture Volume)

Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260411-uac-sticky-mixer-v1-3-29d62717befd@rong.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: usb-audio: Move volume control resolution check into a function
Rong Zhang [Fri, 10 Apr 2026 17:49:03 +0000 (01:49 +0800)] 
ALSA: usb-audio: Move volume control resolution check into a function

get_min_max_with_quirks() is too lengthy and hard to read.

Move the volume control resolution check code into a function as it's
relatively self-contained.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/87o6jsk3vs.wl-tiwai@suse.de
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260411-uac-sticky-mixer-v1-2-29d62717befd@rong.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: usb-audio: Add error checks against get_min_max*()
Rong Zhang [Fri, 10 Apr 2026 17:49:02 +0000 (01:49 +0800)] 
ALSA: usb-audio: Add error checks against get_min_max*()

All callers of get_min_max*() ignore the latter's return code
completely. This means to ignore temporary errors at the probe time.
However, it is not optimal and leads to some maintenance burdens.

Return -EAGAIN for temporary errors, and check against it in the callers
of get_min_max*(). If any other error occurs, bail out of the caller
early.

Suggested-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/87ldewi4j8.wl-tiwai@suse.de
Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260411-uac-sticky-mixer-v1-1-29d62717befd@rong.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: usb-audio: Add quirk for PreSonus AudioBox USB
Abhinav Mahadevan [Fri, 10 Apr 2026 14:33:35 +0000 (20:03 +0530)] 
ALSA: usb-audio: Add quirk for PreSonus AudioBox USB

The PreSonus AudioBox USB (0x194f:0x0301) only supports S24_3LE
format for both playback and capture. It does not support S16_LE
despite being a USB full-speed device. Add explicit format quirks
for both the playback (interface 2) and capture (interface 3)
interfaces to ensure correct format negotiation.

Signed-off-by: Abhinav Mahadevan <abhi220204@gmail.com>
Link: https://patch.msgid.link/20260410143335.5974-1-abhi220204@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: interwave: guard PM-only restore helpers with CONFIG_PM
Cássio Gabriel [Fri, 10 Apr 2026 13:56:52 +0000 (10:56 -0300)] 
ALSA: interwave: guard PM-only restore helpers with CONFIG_PM

The InterWave PM patch added snd_interwave_restore_regs() and
snd_interwave_restore_memory() as static helpers, but both are used only
from the resume path under CONFIG_PM.

On configurations without CONFIG_PM, such as alpha allyesconfig, this
leaves both helpers unused and triggers -Wunused-function warnings with
W=1.

Move the PM-only helpers into the existing CONFIG_PM section. Keep
__snd_interwave_restore_regs() outside the guard because it is also used
during probe-time initialization.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604101958.x16oNkfo-lkp@intel.com/
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260410-alsa-interwave-pm-warning-fix-v1-1-434d14c9c262@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: usb-audio: Evaluate packsize caps at the right place
Takashi Iwai [Fri, 10 Apr 2026 14:32:19 +0000 (16:32 +0200)] 
ALSA: usb-audio: Evaluate packsize caps at the right place

We introduced the upper bound checks of the packet sizes by the
ep->maxframesize for avoiding the URB submission errors.  However, the
check was applied at an incorrect place in the function
snd_usb_endpoint_set_params() where ep->maxframesize isn't defined
yet; the value is defined at a bit later position.  So this ended up
with a failure at the first run while the second run works.

For fixing it, move the check at the correct place, right after the
calculation of ep->maxframesize in the same function.

Fixes: 7fe8dec3f628 ("ALSA: usb-audio: Cap the packet size pre-calculations")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=221292
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20260410143220.1676344-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: sc6000: Restore board setup across suspend
Cássio Gabriel [Fri, 10 Apr 2026 03:54:33 +0000 (00:54 -0300)] 
ALSA: sc6000: Restore board setup across suspend

snd_wss_resume() restores only the codec register image.  The SC-6000
driver also programs card-specific DSP routing and enters MSS mode
during probe, and that setup is not replayed after suspend.

Cache the WSS chip pointer in the SC-6000 card state and wire ISA
suspend and resume callbacks to the shared board-programming helper,
so the board is reinitialized before the codec state is restored.

This keeps the old/new DSP split in one place and restores the
board-level MSS setup that the codec resume path does not cover.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260410-alsa-sc6000-pm-v1-2-4d9e95493d26@gmail.com
2 weeks agoALSA: sc6000: Keep the programmed board state in card-private data
Cássio Gabriel [Fri, 10 Apr 2026 03:54:32 +0000 (00:54 -0300)] 
ALSA: sc6000: Keep the programmed board state in card-private data

The driver may auto-select IRQ and DMA resources at probe time, but
sc6000_init_board() still derives the SC-6000 soft configuration from
the module parameter arrays.  When irq=auto or dma=auto is used, the
codec is created with the selected resources while the board is
programmed with the unresolved values.

Store the mapped ports and generated SC-6000 board configuration in
card-private data, build that configuration from the live probe
results instead of the raw module parameters, and keep the probe-time
board programming in a shared helper.

This fixes the resource-programming mismatch and leaves the driver
with a stable board-state block that can be reused by suspend/resume.

Fixes: c282866101bf ("ALSA: sc6000: add support for SC-6600 and SC-7000")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260410-alsa-sc6000-pm-v1-1-4d9e95493d26@gmail.com
2 weeks agoALSA: 6fire: fix use-after-free on disconnect
Berk Cem Goksel [Fri, 10 Apr 2026 05:13:41 +0000 (08:13 +0300)] 
ALSA: 6fire: fix use-after-free on disconnect

In usb6fire_chip_abort(), the chip struct is allocated as the card's
private data (via snd_card_new with sizeof(struct sfire_chip)).  When
snd_card_free_when_closed() is called and no file handles are open, the
card and embedded chip are freed synchronously.  The subsequent
chip->card = NULL write then hits freed slab memory.

Call trace:
  usb6fire_chip_abort sound/usb/6fire/chip.c:59 [inline]
  usb6fire_chip_disconnect+0x348/0x358 sound/usb/6fire/chip.c:182
  usb_unbind_interface+0x1a8/0x88c drivers/usb/core/driver.c:458
  ...
  hub_event+0x1a04/0x4518 drivers/usb/core/hub.c:5953

Fix by moving the card lifecycle out of usb6fire_chip_abort() and into
usb6fire_chip_disconnect().  The card pointer is saved in a local
before any teardown, snd_card_disconnect() is called first to prevent
new opens, URBs are aborted while chip is still valid, and
snd_card_free_when_closed() is called last so chip is never accessed
after the card may be freed.

Fixes: a0810c3d6dd2 ("ALSA: 6fire: Release resources at card release")
Cc: stable@vger.kernel.org
Cc: Andrey Konovalov <andreyknvl@gmail.com>
Signed-off-by: Berk Cem Goksel <berkcgoksel@gmail.com>
Link: https://patch.msgid.link/20260410051341.1069716-1-berkcgoksel@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: fireworks: bound device-supplied status before string array lookup
Greg Kroah-Hartman [Thu, 9 Apr 2026 14:05:54 +0000 (16:05 +0200)] 
ALSA: fireworks: bound device-supplied status before string array lookup

The status field in an EFW response is a 32-bit value supplied by the
firewire device.  efr_status_names[] has 17 entries so a status value
outside that range goes off into the weeds when looking at the %s value.

Even worse, the status could return EFR_STATUS_INCOMPLETE which is
0x80000000, and is obviously not in that array of potential strings.

Fix this up by properly bounding the index against the array size and
printing "unknown" if it's not recognized.

Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Fixes: bde8a8f23bbe ("ALSA: fireworks: Add transaction and some commands")
Cc: stable <stable@kernel.org>
Assisted-by: gregkh_clanker_t1000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://patch.msgid.link/2026040953-astute-camera-1aa1@gregkh
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: usx2y: us144mkii: fix NULL deref on missing interface 0
Greg Kroah-Hartman [Thu, 9 Apr 2026 14:01:56 +0000 (16:01 +0200)] 
ALSA: usx2y: us144mkii: fix NULL deref on missing interface 0

A malicious USB device with the TASCAM US-144MKII device id can have a
configuration containing bInterfaceNumber=1 but no interface 0.  USB
configuration descriptors are not required to assign interface numbers
sequentially, so usb_ifnum_to_if(dev, 0) returns will NULL, which will
then be dereferenced directly.

Fix this up by checking the return value properly.

Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Fixes: dee1bcf28a3d ("ALSA: usb-audio: Add initial driver for TASCAM US-144MKII")
Cc: stable <stable@kernel.org>
Assisted-by: gregkh_clanker_t1000
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/2026040955-fall-gaining-e338@gregkh
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoASoC: SOF: Don't allow pointer operations on unconfigured streams
Mark Brown [Thu, 26 Mar 2026 14:52:41 +0000 (14:52 +0000)] 
ASoC: SOF: Don't allow pointer operations on unconfigured streams

When reporting the pointer for a compressed stream we report the current
I/O frame position by dividing the position by the number of channels
multiplied by the number of container bytes. These values default to 0 and
are only configured as part of setting the stream parameters so this allows
a divide by zero to be configured. Validate that they are non zero,
returning an error if not

Fixes: c1a731c71359 ("ASoC: SOF: compress: Add support for computing timestamps")
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20260326-asoc-compress-tstamp-params-v1-1-3dc735b3d599@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: rt1320-sdw: Add an approach to get new hardware advance gain
Jack Yu [Fri, 10 Apr 2026 06:42:25 +0000 (14:42 +0800)] 
ASoC: rt1320-sdw: Add an approach to get new hardware advance gain

Add an approach to get new hardware advance gain,
and if there is no advance gain with this approach,
we can still get advance gain with original method.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://patch.msgid.link/20260410064225.662656-1-jack.yu@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SDCA: Update text of FIXME
Charles Keepax [Fri, 10 Apr 2026 10:45:00 +0000 (11:45 +0100)] 
ASoC: SDCA: Update text of FIXME

A couple of attempts to correct this FIXME have been sent upstream but
the situation is not quite a simple as the FIXME implies. Update the
FIXME to include a better description of the situation.

Link: https://lore.kernel.org/linux-sound/20260408085607.3813488-1-shumingf@realtek.com/
Link: https://lore.kernel.org/linux-sound/20260324-sdca-function-status-init-irq-v1-1-bba49417a4e0@gmail.com/
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260410104500.163337-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: amd: yc: Add MSI Vector A16 HX A8WHG to quirk table
Ihor Uzlov [Fri, 10 Apr 2026 09:45:53 +0000 (11:45 +0200)] 
ASoC: amd: yc: Add MSI Vector A16 HX A8WHG to quirk table

Add the MSI Vector A16 HX A8WHG (board MS-15MM) to the DMI quirk table
to enable DMIC support. This laptop uses an AMD Ryzen 9 7945HX (Dragon
Range) with the ACP6x audio coprocessor (rev 0x62) and a Realtek ALC274
codec. The built-in digital microphone is connected via the ACP PDM
interface and requires this DMI entry to be activated.

Tested on MSI Vector A16 HX A8WHG with kernel 6.8.0-107 (Ubuntu 24.04).
DMIC capture device appears as 'acp6x' and records audio correctly.

Signed-off-by: Ihor Uzlov <igor.uzlov@gmail.com>
Link: https://patch.msgid.link/20260410094553.24654-1-igor.uzlov@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: uda1380: Modernize the driver
Linus Walleij [Thu, 9 Apr 2026 21:39:31 +0000 (23:39 +0200)] 
ASoC: uda1380: Modernize the driver

This codec driver depended on the legacy GPIO API, and nothing
in the kernel is defining the platform data, so get rid of this.

Two in-kernel device trees are defining this codec using
undocumented device tree properties, so support these for now.
The same properties can be defined using software nodes if board
files are desired. The device tree use the "-gpio" rather than
"-gpios" suffix but the GPIO DT parser will deal with that.

Since there may be out of tree users, migrate to GPIO descriptors,
drop the platform data that is unused, and assign the dac_clk the
value that was used in all platforms found in a historical dig,
and support setting the clock to the PLL using the undocumented
device tree property.

Add some menuconfig so the codec can be selected and tested.

Signed-off-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260409-asoc-uda1380-v3-1-b3d5a53f31be@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: rt1320-sdw: kcontrol for brown-out feature update
Jack Yu [Thu, 9 Apr 2026 06:01:01 +0000 (14:01 +0800)] 
ASoC: rt1320-sdw: kcontrol for brown-out feature update

Create a kcontrol to enable or disable brown-out dynamically.

Signed-off-by: Jack Yu <jack.yu@realtek.com>
Link: https://patch.msgid.link/20260409060102.4177554-1-jack.yu@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: tegra: Fix spelling error 'recieved' -> 'received'
Qinghua Zhao [Thu, 9 Apr 2026 13:52:13 +0000 (21:52 +0800)] 
ASoC: tegra: Fix spelling error 'recieved' -> 'received'

Fix typo in comment where 'recieved' should be 'received'.

Signed-off-by: Qinghua Zhao <zqh1630@126.com>
Link: https://patch.msgid.link/20260409135213.16558-1-zqh1630@126.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: Yet another round of SDCA fixes
Mark Brown [Thu, 9 Apr 2026 18:39:32 +0000 (19:39 +0100)] 
ASoC: Yet another round of SDCA fixes

Charles Keepax <ckeepax@opensource.cirrus.com> says:

Another round of SDCA fixes a couple of fix to the IRQ cleanup
from Richard, and a minor tweak to the IRQ handling from me.

2 weeks agoASoC: SDCA: Tidy up irq_enable_flags()/sdca_irq_disable()
Charles Keepax [Thu, 9 Apr 2026 16:43:27 +0000 (17:43 +0100)] 
ASoC: SDCA: Tidy up irq_enable_flags()/sdca_irq_disable()

In irq_enable_flags() and sdca_irq_disable() there is a NULL
check on the interrupt data pointer, however this is just pulled
from an array so can never be NULL. This was likely left over
from an earlier version that looked up the data in a different
way. Replace the check with checking for the IRQ itself being
non-zero.

Whilst here also drop the sdca_interrupt structure down into
the loop within the function to better match the style of the
rest of the code in this file.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260409164328.3999434-4-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SDCA: Fix cleanup inversion in class driver
Richard Fitzgerald [Thu, 9 Apr 2026 16:43:26 +0000 (17:43 +0100)] 
ASoC: SDCA: Fix cleanup inversion in class driver

Fix inverted cleanup of the SoundWire IRQ and the function drivers
that use it.

The devm cleanup function to call sdca_dev_unregister_functions() was
being registered at the end of class_sdw_probe(). The bus core
creates the parent SoundWire IRQ handler after class_sdw_probe() has
returned, and it registers a devm cleanup handler at the same time.

This led to a cleanup inversion where the devm cleanup for the parent
Soundwire IRQ runs before the handler that removes the function drivers.
So the parent IRQ is destroyed before the function drivers had a chance
to do any cleanup and remove their IRQ handlers.

Move the registrations of the function driver cleanup into
class_boot_work() after the function drivers are registered, so that it
runs before the cleanup of the parent SoundWire IRQ handler.

Fixes: 2d877d0659cb ("ASoC: SDCA: Add basic SDCA class driver")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260409164328.3999434-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SDCA: Correct kernel doc for sdca_irq_cleanup()
Charles Keepax [Thu, 9 Apr 2026 16:43:25 +0000 (17:43 +0100)] 
ASoC: SDCA: Correct kernel doc for sdca_irq_cleanup()

Fix typo of function argument name in the kernel doc.

Fixes: 0b8757b220f9 ("ASoC: SDCA: Unregister IRQ handlers on module remove")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604090800.koxM6j6O-lkp@intel.com/
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260409164328.3999434-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoALSA: hda/alc269: Drop superfluous GPIO write at resume
Takashi Iwai [Thu, 9 Apr 2026 14:37:29 +0000 (16:37 +0200)] 
ALSA: hda/alc269: Drop superfluous GPIO write at resume

alc269_resume() has an extra code to write GPIO data, but this is
basically already done in the standard alc_init(), hence it's
superfluous.  Let's drop the code.

Since all external callers of alc_write_gpio_data() are gone after
this, fold the only usage of alc_write_gpio_data() into the caller and
drop the export as well.

Link: https://patch.msgid.link/20260409143735.1412134-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: usb-audio: Add quirk flags for Feaulle Rainbow
Rong Zhang [Wed, 8 Apr 2026 18:33:05 +0000 (02:33 +0800)] 
ALSA: usb-audio: Add quirk flags for Feaulle Rainbow

Feaulle Rainbow is a wired USB-C dynamic in-ear monitor (IEM) featuring
active noise cancellation (ANC).

The supported sample rates are 48000Hz and 96000Hz at 16bit or 24bit,
but it does not support reading the current sample rate and results in
an error message printed to kmsg. Set QUIRK_FLAG_GET_SAMPLE_RATE to skip
the sample rate check.

Its playback mixer reports val = -15360/0/128. Setting -15360 (-60dB)
mutes the playback, so QUIRK_FLAG_MIXER_PLAYBACK_MIN_MUTE is needed.

Add a quirk table entry matching VID/PID=0x0e0b/0xfa01 and applying
the mentioned quirk flags, so that it can work properly.

Quirky device sample:

  usb 7-1: New USB device found, idVendor=0e0b, idProduct=fa01, bcdDevice= 1.00
  usb 7-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
  usb 7-1: Product: Feaulle Rainbow
  usb 7-1: Manufacturer: Generic
  usb 7-1: SerialNumber: 20210726905926

Signed-off-by: Rong Zhang <i@rong.moe>
Link: https://patch.msgid.link/20260409-feaulle-rainbow-v1-1-09179e09000d@rong.moe
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: hda/senarytech: Clean up with the new GPIO helper
Takashi Iwai [Thu, 9 Apr 2026 09:38:23 +0000 (11:38 +0200)] 
ALSA: hda/senarytech: Clean up with the new GPIO helper

Use the new GPIO helper function to clean up the open code.

Merely a code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-11-tiwai@suse.de
2 weeks agoALSA: hda/conexant: Clean up with the new GPIO helper
Takashi Iwai [Thu, 9 Apr 2026 09:38:22 +0000 (11:38 +0200)] 
ALSA: hda/conexant: Clean up with the new GPIO helper

Use the new GPIO helper function to clean up the open code.

Merely a code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-10-tiwai@suse.de
2 weeks agoALSA: hda/cirrus: Clean up with the new GPIO helper
Takashi Iwai [Thu, 9 Apr 2026 09:38:21 +0000 (11:38 +0200)] 
ALSA: hda/cirrus: Clean up with the new GPIO helper

Use the new GPIO helper function to clean up the open code.

Merely a code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-9-tiwai@suse.de
2 weeks agoALSA: hda/ca0132: Clean up with the new GPIO helper
Takashi Iwai [Thu, 9 Apr 2026 09:38:20 +0000 (11:38 +0200)] 
ALSA: hda/ca0132: Clean up with the new GPIO helper

Use the new GPIO helper function to clean up the open code.

Merely a code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-8-tiwai@suse.de
2 weeks agoALSA: hda/sigmatel: Clean up with the new GPIO helper
Takashi Iwai [Thu, 9 Apr 2026 09:38:19 +0000 (11:38 +0200)] 
ALSA: hda/sigmatel: Clean up with the new GPIO helper

Use the new GPIO helper function to clean up the open code.

Merely a code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-7-tiwai@suse.de
2 weeks agoALSA: hda/analog: Fix GPIO verb orders
Takashi Iwai [Thu, 9 Apr 2026 09:38:18 +0000 (11:38 +0200)] 
ALSA: hda/analog: Fix GPIO verb orders

So far we used the verb cache to restore the GPIO mask, direction and
data bits at PM resume.  But, due to the nature of the cache resume
mechanism, the calling order isn't guaranteed, and this might lead to
some inconsistency at the restored state.

For assuring the GPIO verb orders, use the new GPIO helper function to
explicitly set up the GPIO bits, instead of using the codec verb
caches, while keeping the current data bits in ad198x_spec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-6-tiwai@suse.de
2 weeks agoALSA: hda/alc662: Simplify the quirk for CSL Unity BF24B
Takashi Iwai [Thu, 9 Apr 2026 09:38:17 +0000 (11:38 +0200)] 
ALSA: hda/alc662: Simplify the quirk for CSL Unity BF24B

The previous implementation of the quirk for CSL Unity BF24B in commit
de65275fc94e ("ALSA: hda/realtek: Add quirk for CSL Unity BF24B")
introduced the unnecessary GPIO caching which leads to a superfluous
write at each init/resume.

Use the new helper to write GPIO bits directly for optimization.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-5-tiwai@suse.de
2 weeks agoALSA: hda/realtek: Clean up with snd_hda_codec_set_gpio()
Takashi Iwai [Thu, 9 Apr 2026 09:38:16 +0000 (11:38 +0200)] 
ALSA: hda/realtek: Clean up with snd_hda_codec_set_gpio()

Use a new helper function to clean up the code.

Along with it, make alc_write_gpio() static as well, which is used
only locally in realtek.c.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-4-tiwai@suse.de
2 weeks agoALSA: hda: Add a simple GPIO setup helper function
Takashi Iwai [Thu, 9 Apr 2026 09:38:15 +0000 (11:38 +0200)] 
ALSA: hda: Add a simple GPIO setup helper function

Introduce a common GPIO setup helper function, so that we can clean up
the open code found in many codec drivers later.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-3-tiwai@suse.de
2 weeks agoALSA: hda: Add sync version of snd_hda_codec_write()
Takashi Iwai [Thu, 9 Apr 2026 09:38:14 +0000 (11:38 +0200)] 
ALSA: hda: Add sync version of snd_hda_codec_write()

We used snd_hda_codec_read() for the verb write when a synchronization
is needed after the write, e.g. for the power state toggle or such
cases.  It works in principle, but it looks rather confusing and too
hackish.

For improving the code readability, introduce a new helper function,
snd_hda_codec_write_sync(), which is another variant of
snd_hda_codec_write(), and replace the existing snd_hda_codec_read()
calls with this one.

No behavior change but just the code refactoring.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260409093826.1317626-2-tiwai@suse.de
2 weeks agoALSA: usb-audio: Add iface reset and delay quirk for HUAWEI USB-C HEADSET
Lianqin Hu [Thu, 9 Apr 2026 08:21:37 +0000 (08:21 +0000)] 
ALSA: usb-audio: Add iface reset and delay quirk for HUAWEI USB-C HEADSET

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 full-speed USB device number 2 using xhci-hcd
usb 1-1: New USB device found, idVendor=12d1, idProduct=3a07
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1: Product: HUAWEI USB-C HEADSET
usb 1-1: Manufacturer: bestechnic
usb 1-1: SerialNumber: 0296C100000000000000000000000

Signed-off-by: Lianqin Hu <hulianqin@vivo.com>
Link: https://patch.msgid.link/TYUPR06MB62176A18EA7A9DD0AC2826BCD2582@TYUPR06MB6217.apcprd06.prod.outlook.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: msnd: add ISA and PnP system sleep callbacks
Cássio Gabriel [Thu, 9 Apr 2026 05:07:46 +0000 (02:07 -0300)] 
ALSA: msnd: add ISA and PnP system sleep callbacks

The msnd drivers do not implement system sleep callbacks today, so
they have no defined way to recover DSP state after suspend.

Add common card suspend/resume helpers, rerun the DSP
initialization path on resume, restore the cached capture-source
state, and rearm the shared IRQ for already-open users.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260409-msnd-pm-support-v1-2-2abef720d0e7@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: msnd: prepare system sleep support
Cássio Gabriel [Thu, 9 Apr 2026 05:07:45 +0000 (02:07 -0300)] 
ALSA: msnd: prepare system sleep support

System suspend cannot work for msnd today because the PCM trigger
paths reject SNDRV_PCM_TRIGGER_SUSPEND, and the driver has only
refcounted IRQ helpers.

Add the small helpers needed by the PM callbacks and restore master
volume from the cached ALSA mixer state when the DSP is
reinitialized.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260409-msnd-pm-support-v1-1-2abef720d0e7@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: i2c: ak4xxx-adda: seed AK5365 cache with reset defaults
Cássio Gabriel [Wed, 8 Apr 2026 15:17:37 +0000 (12:17 -0300)] 
ALSA: i2c: ak4xxx-adda: seed AK5365 cache with reset defaults

snd_akm4xxx_init() clears the register and volume caches before
dispatching by codec type. The AK5365 case then returns immediately,
leaving the software cache at zero instead of the documented AK5365
reset defaults.

The AK5365 capture volume controls read from volumes[] and the proc
register dump reads from images[], so the initial capture volume state
and proc output are wrong until a control write happens.

Seed the AK5365 cache with its documented reset defaults instead of
adding a guessed init sequence. The datasheet documents the reset
values and states that MCLK/LRCK changes do not require a PDN/PWN
reset because the chip has a built-in reset-free circuit.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260408-ak5365-cache-defaults-v1-1-fff639aca3e3@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: hda/realtek: Add quirk for CSL Unity BF24B
Zhang Heng [Thu, 9 Apr 2026 02:40:28 +0000 (10:40 +0800)] 
ALSA: hda/realtek: Add quirk for CSL Unity BF24B

The CSL Unity BF24B all-in-one PC uses a Realtek ALC662 rev3 audio
codec and requires the correct GPIO configuration to enable sound
output from both the speakers and the headphone.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=221258
Signed-off-by: Zhang Heng <zhangheng@kylinos.cn>
Link: https://patch.msgid.link/20260409024028.1297587-1-zhangheng@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoMerge branch 'for-linus' into for-next
Takashi Iwai [Thu, 9 Apr 2026 06:31:21 +0000 (08:31 +0200)] 
Merge branch 'for-linus' into for-next

Pull 7.0-devel branch for further development of HD-audio codec quirks.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoMerge tag 'asoc-fix-v7.0-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git...
Takashi Iwai [Thu, 9 Apr 2026 05:00:53 +0000 (07:00 +0200)] 
Merge tag 'asoc-fix-v7.0-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v7.0

A somewhat larger set of fixes than I'd like unfortunatey, not from any
one place but rather spread out over different drivers.  We've got a
bunch more fixes for the SDCA interrupt support, several relatively
minor SOF fixes, a few more driver specific fixes and a couple more AMD
quirks.

2 weeks agoASoC: dt-bindings: hisilicon: Convert hi6210 I2S to dt-schema
Chaitanya Sabnis [Fri, 27 Mar 2026 09:21:06 +0000 (14:51 +0530)] 
ASoC: dt-bindings: hisilicon: Convert hi6210 I2S to dt-schema

Convert the Hisilicon hi6210 I2S controller hardware binding from
legacy plain text to modern YAML dt-schema format.

During the conversion, the order of the dma-names properties in the
example was corrected to "tx", "rx" to match the official property
description, resolving a contradiction in the original text binding.

Signed-off-by: Chaitanya Sabnis <chaitanya.msabnis@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20260327092106.4233-1-chaitanya.msabnis@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: tas2781: Explicit association of Device, Device Name, and Device ID
Shenghao Ding [Mon, 6 Apr 2026 10:31:31 +0000 (18:31 +0800)] 
ASoC: tas2781: Explicit association of Device, Device Name, and Device ID

By correlating devices with their names and IDs, the driver becomes more
discoverable.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20260406103131.1883-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: amd: acp: update DMI quirk and add ACP DMIC for Lenovo platforms
Syed Saba Kareem [Wed, 8 Apr 2026 13:30:06 +0000 (19:00 +0530)] 
ASoC: amd: acp: update DMI quirk and add ACP DMIC for Lenovo platforms

Replace DMI_EXACT_MATCH with DMI_MATCH for Lenovo SKU entries (21YW,
21YX) so the quirk applies to all variants of these models, not just
exact SKU matches.

Add ASOC_SDW_ACP_DMIC flag alongside ASOC_SDW_CODEC_SPKR in driver_data
for these Lenovo platform entries, as these platforms use ACP PDM DMIC
instead of SoundWire DMIC for digital microphone support.

Fixes: 3acf517e1ae0 ("ASoC: amd: amd_sdw: add machine driver quirk for Lenovo models")
Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20260408133029.1368317-1-syed.sabakareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SDCA: Unregister IRQ handlers on module remove
Richard Fitzgerald [Wed, 8 Apr 2026 09:38:34 +0000 (10:38 +0100)] 
ASoC: SDCA: Unregister IRQ handlers on module remove

Ensure that all interrupt handlers are unregistered before the parent
regmap_irq is unregistered.

sdca_irq_cleanup() was only called from the component_remove(). If the
module was loaded and removed without ever being component probed the
FDL interrupts would not be unregistered and this would hit a WARN
when devm called regmap_del_irq_chip() during the removal of the
parent IRQ.

Fixes: 4e53116437e9 ("ASoC: SDCA: Fix errors in IRQ cleanup")
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260408093835.2881486-5-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SDCA: mask Function_Status value
Maciej Strozek [Wed, 8 Apr 2026 09:38:32 +0000 (10:38 +0100)] 
ASoC: SDCA: mask Function_Status value

According to the SDCA specification [1], when writing Function_Status during
handling this control, the value should mask off bit 7.

[1] MIPI Specification for SoundWire Device Class for Audio, version
    1.1, section 7.14.1.3 (Host Software Handling of Function_Status)

Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260408093835.2881486-3-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SDCA: Fix overwritten var within for loop
Maciej Strozek [Wed, 8 Apr 2026 09:38:31 +0000 (10:38 +0100)] 
ASoC: SDCA: Fix overwritten var within for loop

mask variable should not be overwritten within the for loop or it will
skip certain bits. Change to using BIT() macro.

Fixes: b9ab3b618241 ("ASoC: SDCA: Add some initial IRQ handlers")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260408093835.2881486-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: amd: acp-da7219-max98357a: tidyup acp_soc_is_rltk_max()
Kuninori Morimoto [Wed, 8 Apr 2026 05:22:06 +0000 (05:22 +0000)] 
ASoC: amd: acp-da7219-max98357a: tidyup acp_soc_is_rltk_max()

acp-da7219-max98357a() user exists behind it. No need to has pre-define.
Remove it. And it is local function, add static.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87h5pmvxfm.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: stm32_sai: fix incorrect BCLK polarity for DSP_A/B, LEFT_J
Tomasz Merta [Wed, 8 Apr 2026 08:40:56 +0000 (10:40 +0200)] 
ASoC: stm32_sai: fix incorrect BCLK polarity for DSP_A/B, LEFT_J

The STM32 SAI driver do not set the clock strobing bit (CKSTR) for DSP_A,
DSP_B and LEFT_J formats, causing data to be sampled on the wrong BCLK
edge when SND_SOC_DAIFMT_NB_NF is used.

Per ALSA convention, NB_NF requires sampling on the rising BCLK edge.
The STM32MP25 SAI reference manual states that CKSTR=1 is required for
signals received by the SAI to be sampled on the SCK rising edge.
Without setting CKSTR=1, the SAI samples on the falling edge, violating
the NB_NF convention. For comparison, the NXP FSL SAI driver correctly
sets FSL_SAI_CR2_BCP for DSP_A, DSP_B and LEFT_J, consistent with its
I2S handling.

This patch adds SAI_XCR1_CKSTR for DSP_A, DSP_B and LEFT_J in
stm32_sai_set_dai_fmt which was verified empirically with a cs47l35 codec.
RIGHT_J (LSB) is not investigated and addressed by this patch.

Note: the STM32 I2S driver (stm32_i2s_set_dai_fmt) may have the same issue
for DSP_A mode, as I2S_CGFR_CKPOL is not set. This has not been verified
and is left for a separate investigation.

Signed-off-by: Tomasz Merta <tommerta@gmail.com>
Link: https://patch.msgid.link/20260408084056.20588-1-tommerta@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoASoC: SOF: Intel: hda: modify period size constraints for ACE4
Kai Vehmanen [Wed, 8 Apr 2026 08:45:14 +0000 (11:45 +0300)] 
ASoC: SOF: Intel: hda: modify period size constraints for ACE4

Intel ACE4 based products set more strict constraints on HDA BDLE start
address and length alignment. Add a constraint to align period size to
128 bytes.

The commit removes the "minimum as per HDA spec" comment. This comment
was misleading as spec actually does allow a 2 byte BDLE length, and
more importantly, period size also directly impacts how the BDLE start
addresses are aligned, so it is not sufficient just to consider allowed
buffer length.

Fixes: d3df422f66e8 ("ASoC: SOF: Intel: add initial support for NVL-S")
Cc: stable@vger.kernel.org
Reported-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Link: https://patch.msgid.link/20260408084514.24325-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoALSA: hda/intel: enforce stricter period-size alignment for Intel NVL
Kai Vehmanen [Wed, 8 Apr 2026 08:45:13 +0000 (11:45 +0300)] 
ALSA: hda/intel: enforce stricter period-size alignment for Intel NVL

Intel ACE4 based products set more strict constraints on HDA BDLE start
address and length alignment. Modify capability flags to drop
AZX_DCAPS_NO_ALIGN_BUFSIZE for Intel Nova Lake platforms.

Fixes: 7f428282fde3 ("ALSA: hda: controllers: intel: add support for Nova Lake")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Cc: <stable@vger.kernel.org>
Link: https://patch.msgid.link/20260408084514.24325-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoASoC: nau8325: Add software reset during probe
Neo Chang [Wed, 8 Apr 2026 05:26:39 +0000 (13:26 +0800)] 
ASoC: nau8325: Add software reset during probe

Currently, the driver only performs a hardware reset during the I2C probe
sequence. To ensure all internal states of the codec are properly cleared
without affecting the configuration registers, a software reset is also
required.

According to the hardware specification, writing to the Software Reset
register (R01) twice will reset all internal states safely.

This patch adds the nau8325_software_reset() function, executes it right
after the hardware reset in the probe function, and marks the R01 register
as writeable in the regmap configuration.

Signed-off-by: Neo Chang <YLCHANG2@nuvoton.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260408052639.187149-1-YLCHANG2@nuvoton.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2 weeks agoALSA: usb-audio: qcom: Fix incorrect type in enable_audio_stream
songxiebing [Wed, 8 Apr 2026 08:33:11 +0000 (16:33 +0800)] 
ALSA: usb-audio: qcom: Fix incorrect type in enable_audio_stream

Fix sparse warning:
sound/usb/qcom/qc_audio_offload.c:943:27: sparse: incorrect type in argument 2
expected unsigned int val but got snd_pcm_format_t.

Explicitly cast pcm_format to unsigned int for snd_mask_leave().

Fixes: 326bbc348298 ("ALSA: usb-audio: qcom: Introduce QC USB SND offloading support")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202604062109.Oxi8JjWW-lkp@intel.com/
Signed-off-by: songxiebing <songxiebing@kylinos.cn>
Link: https://patch.msgid.link/20260408083311.774173-1-songxiebing@kylinos.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: i2c: ak4xxx-adda: implement AK4529 reset handling
Cássio Gabriel [Tue, 7 Apr 2026 21:13:06 +0000 (18:13 -0300)] 
ALSA: i2c: ak4xxx-adda: implement AK4529 reset handling

Delta 410 uses snd_akm4xxx_reset() both around DFS changes and from
its PM callbacks, but the AK4529 case in this helper is still left
unimplemented and never drives the codec reset path.

The AK4529 datasheet documents register 09h.RSTN as an internal
timing reset. Clearing RSTN powers down the ADC and DAC blocks, but
does not reinitialize the register map. That matches the existing
ak4xxx helper model, which already keeps the desired codec state in
the software register cache.

Implement AK4529 reset handling by clearing 09h.RSTN on state == 1,
then replaying the cached register image and setting RSTN back to 1
on state == 0.

This restores cached Delta 410 mixer state after resume and gives
the AK4529 DFS-change path a real codec reset sequence.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260407-ak4529-reset-handling-v1-1-b971c18b1a32@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2 weeks agoALSA: interwave: add ISA and PnP suspend and resume callbacks
Cássio Gabriel [Tue, 7 Apr 2026 15:35:43 +0000 (12:35 -0300)] 
ALSA: interwave: add ISA and PnP suspend and resume callbacks

interwave still leaves both its ISA and PnP PM callbacks disabled even
though the shared GUS suspend and resume path now exists.

This board needs InterWave-specific glue around the shared GUS PM path.
The attached WSS codec has its own register image that must be saved and
restored across suspend, the InterWave-specific GF1 compatibility,
decode, MPU401, and emulation settings must be rewritten after the
shared GF1 resume path reinitializes the chip, and the probe-detected
InterWave memory layout must be restored without rerunning the
destructive DRAM/ROM detection path.

Track the optional STB TEA6330T bus at probe time, restore its cached
mixer state after resume, add resume-safe helpers for the InterWave
register and memory-configuration state, and wire both the ISA and PnP
front-ends up to the shared GUS PM helpers.

The resume path intentionally restores only the cached hardware setup.
It does not attempt to preserve sample RAM contents across suspend.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260407-alsa-interwave-pm-v2-3-8dd96c6129e9@gmail.com
2 weeks agoALSA: tea6330t: add mixer state restore helper
Cássio Gabriel [Tue, 7 Apr 2026 15:35:42 +0000 (12:35 -0300)] 
ALSA: tea6330t: add mixer state restore helper

The InterWave STB variant uses a TEA6330T mixer on its private
I2C bus. The mixer state is cached in software, but there is no
helper to push that register image back to hardware after system
resume.

Add a small restore helper that reapplies the cached TEA6330T
register image to the device so board drivers can restore the
external mixer state as part of their PM resume path.

Take snd_i2c_lock() around the full device lookup and restore
sequence so the bus device list traversal is also protected.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260407-alsa-interwave-pm-v2-2-8dd96c6129e9@gmail.com
2 weeks agoALSA: tea6330t: move snd_tea6330t_detect() EXPORT_SYMBOL
Cássio Gabriel [Tue, 7 Apr 2026 15:35:41 +0000 (12:35 -0300)] 
ALSA: tea6330t: move snd_tea6330t_detect() EXPORT_SYMBOL

Move the remaining standalone snd_tea6330t_detect() EXPORT_SYMBOL()
declaration next to its function definition so tea6330t.c follows the
usual layout.

No functional change intended.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20260407-alsa-interwave-pm-v2-1-8dd96c6129e9@gmail.com
3 weeks agoASoC: amd: ps: fix the pcm device numbering for acp pdm dmic
Syed Saba Kareem [Fri, 3 Apr 2026 10:06:17 +0000 (15:36 +0530)] 
ASoC: amd: ps: fix the pcm device numbering for acp pdm dmic

Fixed PCM device numbering is required for acp pdm dmic pcm device
to have a common UCM changes.
Set the 'use_dai_pcm_id' flag true in acp pdm dma driver for acp 6.3
platform. This will fix the pcm device numbering based on dai_link->id.

Fixes: 33cea6bbe488 ("ASoC: amd: add acp6.2 pdm platform driver")
Signed-off-by: Syed Saba Kareem <Syed.SabaKareem@amd.com>
Fixes: tag.
Link: https://patch.msgid.link/20260403100624.676953-1-syed.sabakareem@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: Merge up v7.0-rc7
Mark Brown [Tue, 7 Apr 2026 14:43:29 +0000 (15:43 +0100)] 
ASoC: Merge up v7.0-rc7

Merge tag 'v7.0-rc7' to get fixes that make my CI happier.

3 weeks agoRevert "ALSA: hda/realtek: Add quirk for Gigabyte Technology to fix headphone"
Takashi Iwai [Tue, 7 Apr 2026 12:33:17 +0000 (14:33 +0200)] 
Revert "ALSA: hda/realtek: Add quirk for Gigabyte Technology to fix headphone"

This reverts commit 56fbbe096a89ff4b52af78a21a4afd9d94bdcc80.

It caused regressions on other Gigabyte models, and looking at the
bugzilla entry again, the suggested change appears rather dubious, as
incorrectly setting the front mic pin as the headphone.

Fixes: 56fbbe096a89 ("ALSA: hda/realtek: Add quirk for Gigabyte Technology to fix headphone")
Cc: <stable@vger.kernel.org>
Reported-by: Marcin Krycki <m.krycki@gmail.com>
Reported-by: Theodoros Orfanidis <teoulas@gmail.com>
Closes: https://lore.kernel.org/CAEfRphPU_ABuVFzaHhspxgp2WAqi7kKNGo4yOOt0zeVFPSj8+Q@mail.gmail.com
Link: https://patch.msgid.link/20260407123333.171130-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
3 weeks agoASoC: Intel: avs: Fix memory leak in avs_register_i2s_test_boards()
Cezary Rojewski [Tue, 7 Apr 2026 08:54:58 +0000 (10:54 +0200)] 
ASoC: Intel: avs: Fix memory leak in avs_register_i2s_test_boards()

Caller is responsible for freeing array allocated with
parse_int_array().

Found out by Coverity.

Fixes: 7d859189de13 ("ASoC: Intel: avs: Allow to specify custom configurations with i2s_test")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20260407085459.400628-1-cezary.rojewski@intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: intel: avs: Fix type mismatch in variable assignment
songxiebing [Wed, 25 Mar 2026 02:17:52 +0000 (10:17 +0800)] 
ASoC: intel: avs: Fix type mismatch in variable assignment

The input parameter requirement for snd_pcm_format_physical_with is
snd_pcm_format_t,but params->codec.format is __u32, resulting in a
mismatch error:

sparse warnings: (new ones prefixed by >>)
>> sound/soc/intel/avs/probes.c:147:58: sparse: sparse: incorrect type in argument 1 (different base types) @@     expected restricted snd_pcm_format_t [usertype] format @@     got unsigned int [usertype] format @@
   sound/soc/intel/avs/probes.c:147:58: sparse:     expected restricted snd_pcm_format_t [usertype] format
   sound/soc/intel/avs/probes.c:147:58: sparse:     got unsigned int [usertype] format

So here, the format is cast to snd_pcm_format_t.

Signed-off-by: songxiebing <songxiebing@kylinos.cn>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202512190032.hnwn9mCV-lkp@intel.com/
Link: https://patch.msgid.link/20260325021752.238203-1-songxiebing@kylinos.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: soc.h: remove unused card->pmdown_time
Kuninori Morimoto [Mon, 6 Apr 2026 05:51:51 +0000 (05:51 +0000)] 
ASoC: soc.h: remove unused card->pmdown_time

commit f0fba2ad1b6b ("ASoC: multi-component - ASoC Multi-Component
Support") has replaced "card->pmdown_time" to "rtd->pmdown_time".
card->pmdown_time has been not used this 15 years. Let's remove it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://patch.msgid.link/87eckstz49.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: SOF: Intel: Fixes for find_acpi_adr_device() when some endpoints are missing
Mark Brown [Mon, 6 Apr 2026 12:23:33 +0000 (13:23 +0100)] 
ASoC: SOF: Intel: Fixes for find_acpi_adr_device() when some endpoints are missing

Bard Liao <yung-chuan.liao@linux.intel.com> says:

To make sure find_acpi_adr_device can work well when some of the
endpoints are missing and do not map 1:1 to codec_info_list.

3 weeks agoASoC: SOF: Intel: fix iteration in is_endpoint_present()
Maciej Strozek [Thu, 2 Apr 2026 06:45:31 +0000 (14:45 +0800)] 
ASoC: SOF: Intel: fix iteration in is_endpoint_present()

is_endpoint_present() iterates over sdca_data.num_functions, but checks
the dai_type according to codec info list, which will cause problems if
not all endpoints from the codec info list are present. Make sure the
type of actually present functions is compared against target dai_type.

Fixes: 5226d19d4cae ("ASoC: SOF: Intel: use sof_sdw as default SDW machine driver")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20260402064531.2287261-3-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: SOF: Intel: Fix endpoint index if endpoints are missing
Maciej Strozek [Thu, 2 Apr 2026 06:45:30 +0000 (14:45 +0800)] 
ASoC: SOF: Intel: Fix endpoint index if endpoints are missing

In case of missing endpoints, the sequential numbering will cause wrong
mapping. Instead, assign the original DAI index from codec_info_list.

Fixes: 5226d19d4cae ("ASoC: SOF: Intel: use sof_sdw as default SDW machine driver")
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://patch.msgid.link/20260402064531.2287261-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: SDCA: Fix errors in IRQ cleanup
Charles Keepax [Mon, 16 Mar 2026 14:14:49 +0000 (14:14 +0000)] 
ASoC: SDCA: Fix errors in IRQ cleanup

IRQs are enabled through sdca_irq_populate() from component probe
using devm_request_threaded_irq(), this however means the IRQs can
persist if the sound card is torn down. Some of the IRQ handlers
store references to the card and the kcontrols which can then
fail. Some detail of the crash was explained in [1].

Generally it is not advised to use devm outside of bus probe, so
the code is updated to not use devm. The IRQ requests are not moved
to bus probe time as it makes passing the snd_soc_component into
the IRQs very awkward and would the require a second step once the
component is available, so it is simpler to just register the IRQs
at this point, even though that necessitates some manual cleanup.

Link: https://lore.kernel.org/linux-sound/20260310183829.2907805-1-gaggery.tsai@intel.com/
Fixes: b126394d9ec6 ("ASoC: SDCA: Generic interrupt support")
Reported-by: Gaggery Tsai <gaggery.tsai@intel.com>
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://patch.msgid.link/20260316141449.2950215-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: SOF: compress: return the configured codec from get_params
Cássio Gabriel [Wed, 25 Mar 2026 20:05:11 +0000 (17:05 -0300)] 
ASoC: SOF: compress: return the configured codec from get_params

The SOF compressed offload path accepts codec parameters in
sof_compr_set_params() and forwards them to firmware as
extended data in the SOF IPC stream params message.

However, sof_compr_get_params() still returns success without
filling the snd_codec structure. Since the compress core allocates
that structure zeroed and copies it back to userspace on success,
SNDRV_COMPRESS_GET_PARAMS returns an all-zero codec description
even after the stream has been configured successfully.

The stale TODO in this callback conflates get_params() with capability
discovery. Supported codec enumeration belongs in get_caps() and
get_codec_caps(). get_params() should report the current codec settings.

Cache the codec accepted by sof_compr_set_params() in the per-stream SOF
compress state and return it from sof_compr_get_params().

Fixes: 6324cf901e14 ("ASoC: SOF: compr: Add compress ops implementation")
Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260325-sof-compr-get-params-v1-1-0758815f13c7@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: amd: acp: add Lenovo P16s G5 AMD quirk for legacy SDW machine
Mark Pearson [Fri, 3 Apr 2026 01:03:25 +0000 (21:03 -0400)] 
ASoC: amd: acp: add Lenovo P16s G5 AMD quirk for legacy SDW machine

Add a DMI quirk entry for Lenovo P16s G5 AMD to use ASOC_SDW_ACP_DMIC.
Needed to allow the microphone to work on this platform

Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://patch.msgid.link/20260403010336.1223078-1-mpearson-lenovo@squebb.ca
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: dt-bindings: ti,tas2552: Add sound-dai-cells
Marek Vasut [Sun, 5 Apr 2026 23:44:35 +0000 (01:44 +0200)] 
ASoC: dt-bindings: ti,tas2552: Add sound-dai-cells

Add missing sound-sai-cells for this codec into schema.
At the same time, drop trailing spaces from description.

Fixes: 506e0825a4c9 ("ASoC: dt-bindings: Convert ti,tas2552 to DT schema")
Signed-off-by: Marek Vasut <marex@nabladev.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20260405234502.154227-1-marex@nabladev.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: qcom: audioreach: explicitly enable speaker protection modules
Ravi Hothi [Thu, 26 Mar 2026 11:35:31 +0000 (17:05 +0530)] 
ASoC: qcom: audioreach: explicitly enable speaker protection modules

Speaker protection and VI feedback modules are disabled by default.
Explicitly enable them when configuring speaker protection.

Fixes: 3e43a8c033c3 ("ASoC: qcom: audioreach: Add support for VI Sense module")
Fixes: 0db76f5b2235 ("ASoC: qcom: audioreach: Add support for Speaker Protection module")
Signed-off-by: Ravi Hothi <ravi.hothi@oss.qualcomm.com>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
Link: https://patch.msgid.link/20260326113531.3144998-1-ravi.hothi@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
3 weeks agoASoC: rt5640: Handle 0Hz sysclk during stream shutdown
Sheetal [Mon, 6 Apr 2026 09:05:47 +0000 (09:05 +0000)] 
ASoC: rt5640: Handle 0Hz sysclk during stream shutdown

Commit 2458adb8f92a ("SoC: simple-card-utils: set 0Hz to sysclk when
shutdown") sends a 0Hz sysclk request during stream shutdown to clear
codec rate constraints. The rt5640 codec forwards this 0Hz to
clk_set_rate(), which can cause clock controller firmware faults on
platforms where MCLK is SoC-driven (e.g. Tegra) and 0Hz falls below
the hardware minimum rate.

Handle the 0Hz case by clearing the internal sysclk state and
returning early, avoiding the invalid clk_set_rate() call.

Signed-off-by: Sheetal <sheetal@nvidia.com>
Link: https://patch.msgid.link/20260406090547.988966-1-sheetal@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>