aboutsummaryrefslogtreecommitdiffstats
path: root/sound
AgeCommit message (Collapse)AuthorFilesLines
2 daysMerge branch 'for-next' of ↵Mark Brown377-2154/+32506
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
2 daysMerge branch 'for-next' of ↵Mark Brown4-28/+28
https://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394.git
2 daysMerge branch 'for-next' of ↵Mark Brown129-734/+2185
https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
3 daysMerge remote-tracking branch 'asoc/for-7.2' into asoc-nextMark Brown377-2154/+32506
3 daysASoC: Intel: catpt: Error handling and debug improvementsMark Brown7-12/+68
Cezary Rojewski <cezary.rojewski@intel.com> says: Outcome of a long debug to solve one, long-standing bug ocurring very rarely on Haswell/Broadwell machines during the boot procedure of the AudioDSP firmware. Clever/unfortunate user can increase the reproduction rare to 100%. The bug: an exception occurring early during FW boot (firmware side, not the software one) leaves the firmware hanging and the existing software code is incappable of recognizing such problem. The only solution a user currently has is: rmmod and then modprobe the driver. Recently, together with Krzysztof from the firmware team decided to take it up and clear the dashboard. The exception handling takes just a few lines of code (all part of the first patch), everything else that this patchset is composed of improves the debugability and logging. If anything similar pops up, the developers can see what's going on. Link: https://patch.msgid.link/20260528083444.1439233-1-cezary.rojewski@intel.com
3 daysASoC: Intel: catpt: Print error code if board-registration failsCezary Rojewski1-1/+1
Message alone without the code does not tell us much. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20260528083444.1439233-4-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
3 daysASoC: Intel: catpt: Add pretty-trace for large IPC payloadsCezary Rojewski4-11/+44
Mimic mechanism found in the Intel's avs-driver and update the existing IPC payload tracing to allow for pretty printing even large payloads. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20260528083444.1439233-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
3 daysASoC: Intel: catpt: Complete coredump handlingCezary Rojewski3-0/+23
An exception may occur during the firmware booting procedure. In such case the firmware sends COREDUMP_REQUESTS and expects the driver to dump relevant information and finish with the COREDUMP_RELEASE write. To distinguish such situation from generic timeout, always signal fw_ready completion when a coredump request is received and translate it to -EREMOTEIO in catpt_boot_firmware(). The "FW READY" print makes the success clearly visible even when the event-traces are not enabled. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20260528083444.1439233-2-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
4 daysASoC: cs-amp-lib: Simplify overcomplicated error returnRichard Fitzgerald1-4/+1
In cs_amp_devm_get_dell_ssidex() remove an unnecessary special case check on -ENOENT that just returned -ENOENT. The other branch of the if() statement returned the error, which would of course return -ENOENT if the error was -ENOENT and so do exactly the same as the first branch. The whole if statement is identical to just returning the original pointer if it is an error value. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260528144632.130197-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
4 daysMerge tag 'asoc-fix-v7.1-rc5' of ↵Takashi Iwai3-26/+53
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v7.1 This round of fixes is mostly Sirini's Qualcomm cleanups that have been in review for a while, we also have a couple of small fixes from Cássio.
4 daysASoC: soc-card: add snd_soc_card_set_topology_name()Kuninori Morimoto4-23/+18
Some drivers want to use topology name, but currently each drivers are setting it by own method. This patch adds new snd_soc_card_set_topology_name() and do it by same method. Almost all driver doesn't set topology name, let's remove fixed name array, and use devm_kasprintf() instead. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/878q942wce.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
4 daysALSA: hda/realtek:ALC269 fixup for Yoga Pro 7 15ASH11 mic mute LEDJackie Dong1-1/+9
Lenovo Yoga Pro 7 15ASH11 with AMD RYZEN AI MAX+ 388 (Strix Halo, ACP 7.0) uses Realtek ALC287 series codec. The ALC269_FIXUP_LENOVO_XPAD_ACPI in alc269_fixup_vendor_tbl[] can load lenovo_wmi_hotkey_utilities module by default in this laptop, but the driver doesn't control mic mute LED. If users run below command and the mic mute LED can work normally. $sudo echo 'Capture Switch' >/sys/class/sound/ctl-led/mic/card1/attach After added the SND_PCI_QUIRK quirk special for Lenovo Yoga Pro 7 15ASH11, the mic mute LED works well. Fixes: 83dca2530fb3 ("ALSA: hda/realtek: ALC269 fixup for Lenovo Yoga Pro 7 15ASH111 audio") Signed-off-by: Jackie Dong <xy-jackie@139.com> Link: https://patch.msgid.link/20260527130353.5658-1-xy-jackie@139.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 daysALSA: aoa: check snd_ctl_new1() return valueZhao Dongdong1-0/+6
snd_ctl_new1() can return NULL when memory allocation fails. In layout.c, the function does not check the return value before dereferencing ctl->id.name or passing to aoa_snd_ctl_add(), which can lead to a NULL pointer dereference. Add NULL checks after snd_ctl_new1() calls and return early if any fails. Assisted-by: Opencode:DeepSeek-V4-Flash Cc: stable@vger.kernel.org Fixes: f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa") Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn> Link: https://patch.msgid.link/tencent_35F3A25FEEBF190A2E15ED787754C57E3708@qq.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 daysALSA: cmipci: check snd_ctl_new1() return valueZhao Dongdong1-0/+6
snd_ctl_new1() can return NULL when memory allocation fails. snd_cmipci_spdif_controls() does not check the return value before dereferencing kctl->id.device, which can lead to a NULL pointer dereference. Add NULL checks after snd_ctl_new1() calls and return -ENOMEM if any fails. Assisted-by: Opencode:DeepSeek-V4-Flash Cc: stable@vger.kernel.org Fixes: f2f312ad88c6 ("ALSA: cmipci: Fix kctl->id initialization") Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn> Link: https://patch.msgid.link/tencent_964433DCD132125D5EDA79EE068A2D6EFA09@qq.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 daysALSA: ymfpci: check snd_ctl_new1() return valueZhao Dongdong1-0/+6
snd_ctl_new1() can return NULL when memory allocation fails. snd_ymfpci_create_spdif_controls() does not check the return value before dereferencing kctl->id.device, which can lead to a NULL pointer dereference. Add NULL checks after snd_ctl_new1() calls and return -ENOMEM if any fails. Assisted-by: Opencode:DeepSeek-V4-Flash Cc: stable@vger.kernel.org Fixes: c9b83ae4a160 ("ALSA: ymfpci: Fix kctl->id initialization") Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn> Link: https://patch.msgid.link/tencent_4745C5DC2333325C0EDAB1EFC88A136E6809@qq.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 daysALSA: ice1712: check snd_ctl_new1() return valueZhao Dongdong3-0/+16
snd_ctl_new1() can return NULL when memory allocation fails. The ice1712 driver calls snd_ctl_new1() without checking the return value before dereferencing the pointer in multiple places (ice1712.c, ice1724.c, aureon.c), which can lead to NULL pointer dereferences. Add NULL checks after snd_ctl_new1() calls and return -ENOMEM if any fails. Assisted-by: Opencode:DeepSeek-V4-Flash Cc: stable@vger.kernel.org Fixes: b9a4efd61b6b ("ALSA: ice1712,ice1724: fix the kcontrol->id initialization") Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn> Link: https://patch.msgid.link/tencent_42E5E2AB1B6A5101F7EE8C2117F1F687BB07@qq.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 daysALSA: gus: check snd_ctl_new1() return valueZhao Dongdong1-0/+2
snd_ctl_new1() can return NULL when memory allocation fails. snd_gf1_pcm_volume_control() does not check the return value before dereferencing kctl->id.index, which can lead to a NULL pointer dereference. Add a NULL check after snd_ctl_new1() and return -ENOMEM if it fails. Assisted-by: Opencode:DeepSeek-V4-Flash Cc: stable@vger.kernel.org Fixes: c5ae57b1bb99 ("ALSA: gus: Fix kctl->id initialization") Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn> Link: https://patch.msgid.link/tencent_F644A3DCAD32945D62DB2FEEBE8A996F6809@qq.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 daysALSA: es1938: check snd_ctl_new1() return valueZhao Dongdong1-0/+2
snd_ctl_new1() can return NULL when memory allocation fails. snd_es1938_mixer() does not check the return value before dereferencing the pointer, which can lead to a NULL pointer dereference. Add a NULL check after snd_ctl_new1() and return -ENOMEM if it fails. Assisted-by: Opencode:DeepSeek-V4-Flash Cc: stable@vger.kernel.org Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Signed-off-by: Zhao Dongdong <zhaodongdong@kylinos.cn> Link: https://patch.msgid.link/tencent_E0DC65165FDF2C8982BAFB6794B854B53B0A@qq.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 daysALSA: hda/hdmi: Use 'AC_PINSENSE_ELDV' to detect pinsense for LoongsonHuacai Chen2-1/+13
Due to a hardware defect, for Loongson PCI HDMI devices with a reversion ID of 2, the pin sense status must be determined via the ELD. Add a codec flag, eld_jack_detect, to indicate this case, and do special handlings in read_pin_sense(). Cc: stable@vger.kernel.org Signed-off-by: Baoqi Zhang <zhangbaoqi@loongson.cn> Signed-off-by: Haowei Zheng <zhenghaowei@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Link: https://patch.msgid.link/20260527140841.3407183-1-chenhuacai@loongson.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 daysASoC: codecs: simple-mux: Fix enum control bounds checkCássio Gabriel1-1/+1
simple_mux_control_put() rejects values greater than e->items, but enum control values are zero based. For the two-entry mux used by this driver, valid values are 0 and 1, so value 2 must be rejected as well. Accepting e->items can store an invalid mux state, pass it to the GPIO setter, and pass it on to the DAPM mux update path where it is used as an index into the enum text array. Use the same >= e->items check used by the ASoC enum helpers. Fixes: 342fbb7578d1 ("ASoC: add simple-mux") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260527-asoc-simple-mux-enum-bounds-v1-1-3f805b9fc671@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
5 daysALSA: hda: cs35l41: imply SERIAL_MULTI_INSTANTIATEJohny Lin1-0/+2
Use a weak reverse selection to suggest the config SERIAL_MULTI_INSTANTIATE just like cs35l56 did. Signed-off-by: Johny Lin <johnylin@google.com> Link: https://patch.msgid.link/20260527023350.3067547-1-johnylin@google.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 daysALSA: seq: midi: Serialize output teardown with event_inputZhang Cen1-14/+41
event_process_midi() borrows msynth->output_rfile.output and then passes the substream to dump_midi() and snd_rawmidi_kernel_write() without synchronizing with the output open/close transition. midisynth_use() also publishes output_rfile before snd_rawmidi_output_params() has finished. The last midisynth_unuse() can therefore release the same rawmidi file and free substream->runtime before snd_rawmidi_kernel_write1() takes its runtime buffer reference. That leaves the event_input path using a stale substream or runtime and can end in a NULL-deref or use-after-free. Fix this with two pieces of synchronization. Keep a short IRQ-safe spinlock only for publishing or clearing output_rfile and for pairing the output snapshot with an snd_use_lock_t reference. Once event_process_midi() has taken that in-flight reference, it drops the spinlock before calling snd_seq_dump_var_event(), dump_midi(), or snd_rawmidi_kernel_write(). midisynth_unuse() now detaches the visible rawmidi file under the same spinlock, waits for the in-flight writers to drain, and only then drains and releases the saved file. midisynth_use() likewise opens into a local snd_rawmidi_file and publishes it only after snd_rawmidi_output_params() succeeds. The buggy scenario involves two paths, with each column showing the order within that path: event_input path: last unuse path: 1. event_process_midi() snapshots 1. midisynth_unuse() starts output_rfile.output. tearing down output_rfile. 2. dump_midi() reaches 2. snd_rawmidi_kernel_release() snd_rawmidi_kernel_write() closes the output file. before runtime is pinned. 3. close_substream() frees 3. The callback keeps using substream->runtime. the borrowed substream. Validation reproduced this kernel report: KASAN null-ptr-deref in snd_rawmidi_kernel_write1+0x56/0x360 RIP: 0033:0x7fde7dd0837f RIP: 0010:snd_rawmidi_kernel_write1+0x56/0x360 Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Assisted-by: Codex:gpt-5.5 Signed-off-by: Zhang Cen <rollkingzzc@gmail.com> Link: https://patch.msgid.link/20260527062948.3614025-1-rollkingzzc@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 daysASoC: Address es9356 build failures without CONFIG_SND_SOC_SDCAMark Brown2-5/+6
Nathan Chancellor <nathan@kernel.org> says: This series addresses the build failure I reported at [1]. The first patch allows CONFIG_SND_SOC_SDCA to be selected by a user. The third patch fixes the actual build failure by requiring CONFIG_SND_SOC_SDCA to enable CONFIG_SND_SOC_ES9356. The second patch is a standalone clean up to make the third patch diff cleaner. If there are any issues, please let me know. [1]: https://lore.kernel.org/20260518224657.GA536765@ax162/ Link: https://patch.msgid.link/20260526-es9356-dep-fixes-v1-0-39ac16f43d54@kernel.org
5 daysASoC: es9356-sdca: Depend on CONFIG_SND_SOC_SDCANathan Chancellor1-0/+1
When building without CONFIG_SND_SOC_SDCA, there is an error at link time when building the es9356-sdca driver: ERROR: modpost: "sdca_asoc_q78_get_volsw" [sound/soc/codecs/snd-soc-es9356.ko] undefined! ERROR: modpost: "sdca_asoc_q78_put_volsw" [sound/soc/codecs/snd-soc-es9356.ko] undefined! Add an explicit dependency on CONFIG_SND_SOC_SDCA to ensure these symbols are always present when building the driver. Fixes: 5d9cb740cd38 ("ASoC: es9356-sdca: Add ES9356 SDCA driver") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20260526-es9356-dep-fixes-v1-3-39ac16f43d54@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
5 daysASoC: codecs: Adjust indentation in CONFIG_SND_SOC_ES9356 definitionNathan Chancellor1-4/+4
The indentation of CONFIG_SND_SOC_ES9356 uses spaces, instead of the Kconfig standard using tabs. Adjust it. Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20260526-es9356-dep-fixes-v1-2-39ac16f43d54@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
5 daysASoC: SDCA: Make CONFIG_SND_SOC_SDCA a user selectable symbolNathan Chancellor1-1/+1
Currently, CONFIG_SND_SOC_SDCA is a hidden Kconfig symbol, so it must be selected by a user selectable symbol to be enabled. However, it may not be possible for configurations to select this symbol without running into a recursive dependency issue: error: recursive dependency detected! symbol SOUNDWIRE depends on SND_SOC_SDCA_OPTIONAL symbol SND_SOC_SDCA_OPTIONAL default value contains SND_SOC_SDCA symbol SND_SOC_SDCA is selected by SND_SOC_ES9356 symbol SND_SOC_ES9356 depends on SOUNDWIRE Turn CONFIG_SND_SOC_SDCA into a user selectable symbol so that drivers can depend on it and allow the user to enable it explicitly. Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://patch.msgid.link/20260526-es9356-dep-fixes-v1-1-39ac16f43d54@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
5 daysASoC: mediatek: mt2701: allocate i2s_path with privRosen Penev2-13/+10
Use a flexible array member to combine allocations. Clean up surrounding code and allocate based on afe_priv and not platform_priv which is a void pointer. struct_size needs a properly typed pointer to work. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260519010413.629214-1-rosenp@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
5 daysALSA: usb-audio: Add quirk for Novation MininovaUwe Küchler1-0/+8
Add a device-specific quirk for the Novation Mininova synthesizer (USB ID 1235:001e) to enable proper recognition and functionality as a MIDI device. Signed-off-by: Uwe Küchler <uwe@kuechler.org> Link: https://patch.msgid.link/20260526162033.7513-1-uwe@kuechler.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 daysALSA: seq: oss: Fix UAF at handling events with embedded SysEx dataTakashi Iwai6-7/+20
The OSS sequencer processes the input MIDI bytes into a sequencer event to be dispatched later (in snd_seq_oss_midi_putc() called from snd_seq_oss_process_event()). When it's a SysEx data, the event record contains data.ext.ptr pointer to the original SysEx bytes, and the referred data is copied into the pool afterwards at dispatching. The problem is that, if the sequencer port gets closed concurrently before the dispatch, the OSS sequencer core also releases the resources (in snd_seq_oss_midi_check_exit_port()), while the pending event may hold a stale pointer, eventually leading to a UAF at a later dispatch. Fortunately, there is already a refcounting mechanism (snd_use_lock_t) for the OSS MIDI device access, and for addressing the issue above, we just need to extend the refcount until the event gets dispatched. This patch extends snd_seq_oss_process_event() to give back the refcount object, which is in turn released after calling the sequencer dispatcher with the given event in the caller side. According to the original report, KASAN report as below: KASAN slab-use-after-free in snd_seq_event_dup+0x40c/0x470 RIP: 0033:0x7f2cb66a6340 Read of size 6 Call trace: dump_stack_lvl+0x73/0xb0 (?:?) print_report+0xd1/0x650 (?:?) srso_alias_return_thunk+0x5/0xfbef5 (?:?) __virt_addr_valid+0x1a7/0x340 (?:?) kasan_complete_mode_report_info+0x64/0x200 (?:?) kasan_report+0xf7/0x130 (?:?) snd_seq_event_dup+0x40c/0x470 (?:?) kasan_check_range+0x10c/0x1c0 (?:?) __asan_memcpy+0x27/0x70 (?:?) snd_seq_event_dup+0x9/0x470 (?:?) snd_seq_client_enqueue_event+0x139/0x240 (?:?) _raw_spin_unlock_irqrestore+0x4b/0x60 (?:?) snd_seq_kernel_client_enqueue+0x102/0x120 (?:?) snd_seq_oss_write+0x416/0x4e0 (?:?) apparmor_file_permission+0x20/0x30 (?:?) odev_write+0x3b/0x60 (?:?) vfs_write+0x1ce/0x850 (?:?) lock_release+0xc8/0x2a0 (?:?) __kasan_check_write+0x18/0x20 (?:?) __mutex_unlock_slowpath+0x129/0x510 (?:?) ksys_write+0xe1/0x180 (?:?) mutex_unlock+0x16/0x20 (?:?) odev_ioctl+0x65/0xc0 (?:?) __x64_sys_write+0x46/0x60 (?:?) x64_sys_call+0x7d/0x20d0 (?:?) do_syscall_64+0xc1/0x360 (arch/x86/entry/syscall_64.c:87) entry_SYSCALL_64_after_hwframe+0x77/0x7f (?:?) Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-and-tested-by: Zhang Cen <rollkingzzc@gmail.com> Closes: https://lore.kernel.org/20260521233900.478153-1-rollkingzzc@gmail.com Link: https://patch.msgid.link/20260526152843.617503-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 daysALSA: xen-front: Connect event channel after stream prepareCássio Gabriel3-12/+27
The request channel must be connected from ALSA .open(), because hw-rule queries and the stream open request use it. The event channel is different: XENSND_EVT_CUR_POS handling uses ALSA runtime buffer and period geometry, and the corresponding Xen stream parameters are not submitted to the backend until .prepare() sends XENSND_OP_OPEN. Currently .open() connects both channels. A backend current-position event, or a stale event queued for an earlier stream instance, can therefore reach xen_snd_front_alsa_handle_cur_pos() before runtime->buffer_size and runtime->period_size are valid. Add a per-channel connection helper, connect only the request channel in .open(), connect the event channel after a successful stream prepare, and disconnect it before stream close/free. Re-check the event-channel state after taking ring_io_lock so disconnecting the event channel synchronizes against a threaded IRQ that passed the initial lockless state test. Keep defensive runtime geometry checks in the position handler. Fixes: 1cee559351a7 ("ALSA: xen-front: Implement ALSA virtual sound driver") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260526-alsa-xen-event-channel-fixes-v1-2-91d3a6a50778@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 daysALSA: xen-front: Reset event channel state on stream clearCássio Gabriel2-4/+8
xen_snd_front_evtchnl_pair_clear() resets evt_next_id for both channels. That is correct for the request channel, where evt_next_id is used to allocate the next request id. It is wrong for the event channel: incoming events are validated against evt_id, and evt_id is incremented by evtchnl_interrupt_evt(). This leaves the expected event id from the previous stream instance. A backend that restarts event ids for a reopened stream can then have valid current-position events dropped until the stale frontend id catches up. Reset evt_id for the event channel. Also advance the event-page consumer to the current producer while clearing the stream, so obsolete events queued for the previous stream instance are not delivered to the next ALSA runtime. Fixes: 1cee559351a7 ("ALSA: xen-front: Implement ALSA virtual sound driver") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260526-alsa-xen-event-channel-fixes-v1-1-91d3a6a50778@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 daysALSA: usb-audio: Add iface reset and delay quirk for TAE1160 USB AudioLianqin Hu1-0/+2
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=25aa, idProduct=600b usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: TAE1159 usb 1-1: Manufacturer: Generic usb 1-1: SerialNumber: 20210726905926 Signed-off-by: Lianqin Hu <hulianqin@vivo.com> Link: https://patch.msgid.link/TYUPR06MB621736D7C85D43200E54E740D2082@TYUPR06MB6217.apcprd06.prod.outlook.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 daysALSA: hda/cs420x: Add CS4208 fixup for iMac16,1Jakub Pisarczyk1-0/+1
The 21.5" Retina 4K iMac (Late 2015, DMI product name "iMac16,1") ships with a Cirrus Logic CS4208 codec wired to an external speaker amplifier enabled through codec GPIO0 -- the same arrangement as the late-2013 MacBookPro 11,x. Without a matching entry in cs4208_mac_fixup_tbl[] the fixup picker logs: snd_hda_codec_cs420x hdaudioC1D0: CS4208: picked fixup for codec SSID 106b:0000 i.e. an empty fixup name, GPIO0 stays low, the external amp is never powered up, and the internal speakers are silent on a stock kernel. The codec SSID reported by hardware is 0x106b:0x7f00. Reusing CS4208_MBP11 (GPIO0 + SPDIF switch fixup) makes the internal speakers and S/PDIF output work out of the box, removing the need for users to set `options snd_hda_intel model=mbp11` via /etc/modprobe.d/. Tested on iMac16,1 (kernel 6.17.0): four internal drivers (Left tweeter, Left woofer, Right tweeter, Right woofer, exposed as the 4 channels of the analog-surround-40 ALSA profile) produce audio after the fixup is applied. Signed-off-by: Jakub Pisarczyk <pisarz77@gmail.com> Link: https://patch.msgid.link/20260526201830.34097-1-pisarz77@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 daysALSA: hda/realtek: add quirk for HP Dragonfly Folio G3 2-in-1Fabian Lippold1-0/+1
Add PCI quirk for HP Dragonfly Folio G3 (PCI ID 103c:8a06) to select the CS35L41 SPI4 & GPIO LED fixup variant. Signed-off-by: Fabian Lippold <fabianlippold1184@gmail.com> Link: https://patch.msgid.link/20260526154418.1850568-3-fabianlippold1184@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
5 daysASoC: SOF: ipc4-topology: Support for multiple src output formatsMark Brown1-16/+48
Peter Ujfalusi <peter.ujfalusi@linux.intel.com> says: SRC can only change the rate, we can still allow different bit depth and channels to be handled, the only restriction is that the input and output must have matching bit depth and channel format. In a separate patch do a sanity check for the number of formats on the input and output side as SRC/ASRC must have at least one of them. Link: https://patch.msgid.link/20260526105748.26149-1-peter.ujfalusi@linux.intel.com
5 daysASoC: SOF: ipc4-topology: Allow the use of multiple formats for src outputPeter Ujfalusi1-16/+30
The SRC module can only change the rate, it keeps the format and channels intact, but this does not mean the num_output_formats must be 0: The SRC module can support different formats/channels, we just need to check if the output format lists the correct combination of out rate and the input format/channels. Change the logic to prioritize the sink_rate of the module as target rate, then the rate of the FE in case of capture or in case of playback check the single rate specified in the output formats. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://patch.msgid.link/20260526105748.26149-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
5 daysASoC: SOF: ipc4-topology: Validate the number of in/out formats for src/asrcPeter Ujfalusi1-0/+18
SRC and ASRC modules must have at least one input and on one output formats to be usable. Do a sanity check during setup type and fail if either the number of input or output formats are 0. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20260526105748.26149-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
6 daysASoC: cs35l56-shared-test: Fix possible null pointer dereferenceEthan Tidmore1-1/+0
The struct regmap_config is dereferenced before its check. Also, after it is checked priv->reg_offset is assigned to regmap_config->reg_base, making the removed line redundant. Detected by Smatch: sound/soc/codecs/cs35l56-shared-test.c:681 cs35l56_shared_test_case_base_init() warn: variable dereferenced before check 'regmap_config' (see line 665) Signed-off-by: Ethan Tidmore <ethantidmore06@gmail.com> Link: https://patch.msgid.link/20260523211522.522616-1-ethantidmore06@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
6 daysALSA: usb-audio: add IFB_SILENCE_ON_EMPTY quirk for Behringer Flow 8Gordon Chen3-1/+20
The Behringer Flow 8 (1397:050c) is an 8-channel USB mixer that declares OUT EP 0x01 with implicit feedback from capture EP 0x81 via its UAC2 endpoint companion descriptor. After 5-35 minutes of continuous playback, the device occasionally returns a capture URB in which every iso_frame_desc has a non-zero status (-EXDEV bursts, visible as rate-limited "frame N active: -18" lines in dmesg from pcm.c). In that case snd_usb_handle_sync_urb() at endpoint.c counts bytes==0 and falls into the early "skip empty packets" return originally added for M-Audio Fast Track Ultra. As a result the playback EP loses its sole IFB-driven feeder and the OUT ring starves permanently: hw_ptr stops advancing while substream state remains RUNNING. Only USB re-enumeration recovers. Three independent ftrace captures (taken at the moment of stall via a userspace watchdog) consistently show: - 60-70 capture URB completions in the 70ms window before the marker - 0 retire_playback_urb / queue_pending_output_urbs / snd_usb_endpoint_implicit_feedback_sink calls - every usb_submit_urb in the window comes from snd_complete_urb+0x64e (capture self-resubmit), none from the queue_pending_output_urbs path Add a new opt-in quirk QUIRK_FLAG_IFB_SILENCE_ON_EMPTY: when set, the early return is skipped and we fall through to enqueue a packet_info whose packet_size[i] are all 0 (the existing loop already maps status!=0 packets to size 0). prepare_outbound_urb then emits a silence packet, the OUT ring keeps moving, and the device rides through the glitch. The default behaviour (early return) is preserved for all existing devices including M-Audio Fast Track Ultra. Only Flow 8 opts in here. Cc: stable@vger.kernel.org Signed-off-by: Gordon Chen <chengordon326@gmail.com> Link: https://patch.msgid.link/20260526072906.90106-1-chengordon326@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 daysRevert "ALSA: scarlett2: Fix 2i2 Gen 4 direct monitor gain on firmware 2417"Takashi Iwai1-29/+4
This reverts commit db37cf47b67e38ade40de5cd74a4d4d772ff1416. The fix was needed only for 7.1, while 7.2 devel branch already received a better fix series (732a6397a526..a895279d060d), hence it's superfluous. Link: https://lore.kernel.org/ahUytAir51SvJjd7@m.b4.vu Link: https://patch.msgid.link/20260526054923.210493-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 daysALSA: seq: Remove arbitrary prioq insertion limitCássio Gabriel1-6/+8
The sequencer priority queue insertion path uses a hardcoded traversal limit of 10000 entries. The value is intended to catch a corrupted list, but it also becomes a real limit for valid queues. The event pool limit is per client, while a sequencer queue can be shared by multiple clients. A queue can therefore legitimately contain more than 10000 events. In that case, inserting an event that has to be placed past the arbitrary limit fails with -EINVAL. Use the queue's own cell count as the traversal bound instead. This keeps the protection against inconsistent list accounting or cyclic lists without rejecting valid large queues. Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260525-alsa-seq-prioq-limit-v1-1-16c348df5ff7@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
6 daysALSA: hda/realtek: Fix speaker output on ASUS ROG Strix G615LPZhang Heng1-0/+1
Add quirk for ALC294 codec on ASUS ROG Strix G615LP (SSID 1043:1214) using ALC287_FIXUP_TXNW2781_I2C_ASUS to fix speaker output. Link: https://bugzilla.kernel.org/show_bug.cgi?id=221173 Cc: <stable@vger.kernel.org> Signed-off-by: Zhang Heng <zhangheng@kylinos.cn> Link: https://patch.msgid.link/20260526013611.1954949-1-zhangheng@kylinos.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 daysASoC: qcom: q6asm-dai: fix error handlingMark Brown1-23/+25
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> says: Here is the set of patches, that fixes one of the isssue reported by Richard Acayan, while doing fix for the reported issue, found various other issues in the existing code. This set contains some of those cleanups along with few trivial coding style patches which looked uncomfortable to read. Patch 1 should be enough to fix the issue reported. Tested this is on UNO-Q. Link: https://patch.msgid.link/20260518092347.3446946-1-srinivas.kandagatla@oss.qualcomm.com
7 daysASoC: qcom: q6asm-dai: use pointer type with kzalloc_obj()Srinivas Kandagatla1-1/+1
Use kzalloc_obj(*prtd) instead of explicitly naming the structure type. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260518092347.3446946-6-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: qcom: q6asm-dai: remove unnecessary bracesSrinivas Kandagatla1-2/+1
The ASM_CLIENT_EVENT_DATA_WRITE_DONE case does not declare any local variables or require a separate scope, so drop the unnecessary braces. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260518092347.3446946-5-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: qcom: q6asm-dai: fix error handling in prepare and set_paramsSrinivas Kandagatla1-8/+16
Fix error handling in q6asm_dai_compr_set_params() and q6asm_dai_prepare() for both CMD_CLOSE and q6asm_unmap_memory_regions(). In both the functions, we are doing q6asm_audio_client_free in failure cases, which means if prepare or set_params fail, we can never recover. Now open and close are done in respective dai_open/close functions. Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260518092347.3446946-4-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: qcom: q6asm-dai: close stream only when runningSrinivas Kandagatla1-7/+7
q6asm_dai_close() and q6asm_dai_compr_free() currently issue CMD_CLOSE whenever prtd->state is non-zero. After prepare() closes an existing stream, the state is updated to Q6ASM_STREAM_STOPPED. Since this state is also non-zero, the close and free paths can send CMD_CLOSE again for a stream that has already been closed. Restrict CMD_CLOSE to the Q6ASM_STREAM_RUNNING state so the command is sent only when the ASM stream is still active. Fixes: 2a9e92d371db ("ASoC: qdsp6: q6asm: Add q6asm dai driver") Cc: Stable@vger.kernel.org Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260518092347.3446946-3-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: qcom: q6asm-dai: do not set stream state in event and trigger callbacksSrinivas Kandagatla1-5/+0
The q6asm-dai stream state is used by prepare() to decide whether an existing stream setup needs to be closed before opening/configuring a new one. Updating the state from trigger or asynchronous DSP callbacks can make that state stale or incorrect relative to the actual setup lifetime. In particular, setting Q6ASM_STREAM_STOPPED on STOP or EOS completion can make prepare() believe there is no active setup to close, which can result in opening/configuring the same stream more than once. Keep stream state updates tied to prepare(), where the stream is actually closed and reopened, and stop changing it from trigger and EOS callbacks. Fixes: bfbb12dfa144 ("ASoC: qcom: q6asm-dai: perform correct state check before closing") Cc: Stable@vger.kernel.org Closes: https://lore.kernel.org/all/afS7rTHdc9TyIeLx@rdacayan/ Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260518092347.3446946-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: codecs: max98090: switch to standard set_jack callbackMark Brown3-10/+7
Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> says: The MAX98090 codec driver currently exposes a custom max98090_mic_detect() helper for machine drivers to register a headset jack. This series converts the driver to use the standard component .set_jack callback and updates the mt8173-max98090 machine driver to use snd_soc_component_set_jack() instead of the codec-specific helper. Using the standard callback removes the need for a custom exported symbol and allows machine drivers to use the common ASoC jack registration interface. This also improves compatibility with machine drivers, such as Qualcomm platforms, that already rely on snd_soc_component_set_jack(). Link: https://patch.msgid.link/20260520155002.145306-1-srinivas.kandagatla@oss.qualcomm.com
7 daysASoC: codecs: max98090: use component set_jack callbackSrinivas Kandagatla2-8/+5
The MAX98090 driver provides a custom max98090_mic_detect() helper for machine drivers to register a jack. This can be implemented using the standard component set_jack callback instead. Doing so allows machine drivers to use snd_soc_component_set_jack(), which is also the interface used by machine drivers including Qualcomm ones. Convert max98090_mic_detect() to a component set_jack callback and remove the exported helper. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260520155002.145306-3-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: mt8173-max98090: use standard callback to set jackSrinivas Kandagatla1-2/+2
use snd_soc_component_set_jack() instead of custom callback to max98090 codec. This will help other drivers using the standard callback to exercise the standard path instead of custom callback. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Link: https://patch.msgid.link/20260520155002.145306-2-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgetsMark Brown3-29/+119
Chancel Liu <chancel.liu@nxp.com> says: Some audio systems require specific DAPM widgets to remain powered during system suspend. Introduce a generic and reusable mechanism in the ASoC core to mark selected DAPM widgets as ignore_suspend. The unified mechanism consists of two parts: 1. Parse and store the name list of widgets to ignore suspend in struct snd_soc_card The list of widgets can be provided either by the machine driver or parsed from Device Tree. Different machines have different routing and power requirements. Each machine can specify its own widgets to ignore suspend through DT property. It enables flexible policy without hard code. A new helper, snd_soc_of_parse_ignore_suspend_widgets() is added for this purpose. 2. Apply ignore_suspend flags during snd_soc_bind_card() After all components have been probed and all DAPM widgets have been registered, snd_soc_bind_card() performs a unified lookup of the configured widget names across all DAPM contexts of the card and marks the matching widgets with ignore_suspend = 1. Switch to use core ignore-suspend-widgets support for imx-rpmsg driver. Chancel Liu (3): ASoC: dapm: Fix widget lookup with prefixed names across DAPM contexts ASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgets ASoC: fsl: imx-rpmsg: Switch to core ignore-suspend-widgets support Link: https://patch.msgid.link/20260507013654.2945915-1-chancel.liu@nxp.com
7 daysASoC: fsl: imx-rpmsg: Switch to core ignore-suspend-widgets supportChancel Liu1-17/+9
The imx-rpmsg machine driver currently implements its own logic to parse ignore-suspend-widgets from Device Tree and manually traverse DAPM widgets to mark them as ignore_suspend. It also has a potential issue that some widgets listed in the property (e.g. "Headphone Jack") belong to card or CPU DAI DAPM context. Switch to use snd_soc_of_parse_ignore_suspend_widgets() with the introduction of a generic ignore-suspend-widgets mechanism in the ASoC core. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20260507013654.2945915-4-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: soc-core: Add core support for ignoring suspend on selected DAPM widgetsChancel Liu2-0/+73
Some audio systems require specific DAPM widgets to remain powered during system suspend. Introduce a generic and reusable mechanism in the ASoC core to mark selected DAPM widgets as ignore_suspend. The unified mechanism consists of two parts: 1. Parse and store the name list of widgets to ignore suspend in struct snd_soc_card The list of widgets can be provided either by the machine driver or parsed from Device Tree. Different machines have different routing and power requirements. Each machine can specify its own widgets to ignore suspend through DT property. It enables flexible policy without hard code. A new helper, snd_soc_of_parse_ignore_suspend_widgets() is added for this purpose. 2. Apply ignore_suspend flags during snd_soc_bind_card() After all components have been probed and all DAPM widgets have been registered, snd_soc_bind_card() performs a unified lookup of the configured widget names across all DAPM contexts of the card and marks the matching widgets with ignore_suspend = 1. Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Link: https://patch.msgid.link/20260507013654.2945915-3-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: dapm: Fix widget lookup with prefixed names across DAPM contextsChancel Liu1-12/+37
Currently dapm_find_widget() manually constructs a prefixed widget name based on the provided DAPM context and compares it using strcmp(). This happens to work in most cases because callers usually know which DAPM context the target widget belongs to and pass in the matching DAPM context. However, this assumption breaks when search_other_contexts is enabled. In such cases, callers may intentionally pass a different DAPM context, while searching for a widget that actually belongs to another DAPM context. For example, when searching for a "DAC" widget, the widget belongs to the codec DAPM and be registered with a codec prefix, while the caller passes card->dapm and intends to search across all DAPM contexts. The current implementation incorrectly applies the caller card DAPM causing the lookup to fail even though the widget exists on the card. Improve the matching strategy to support both use cases: 1. When the caller provides a fully qualified name with prefix, perform exact string matching. This preserves the ability to use prefixes for disambiguation. 2. When the caller provides a bare widget name without prefix, try exact matching first, then fall back to prefix-stripped comparison using snd_soc_dapm_widget_name_cmp(). To determine whether the pin name includes a prefix, a new helper function snd_soc_dapm_pin_has_prefix() is introduced. It checks if the pin name starts with any known component prefix on the card. This fixes widget lookup failures when searching across different DAPM contexts while maintaining backward compatibility for explicitly prefixed lookups. Fixes: ae4fc532244b ("ASoC: dapm: use component prefix when checking widget names") Signed-off-by: Chancel Liu <chancel.liu@nxp.com> Assisted-by: Cody:Claude-4.5-Sonnet Link: https://patch.msgid.link/20260507013654.2945915-2-chancel.liu@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: Intel: bytcht_es8316: Fix MCLK leak on init errorsCássio Gabriel1-2/+27
byt_cht_es8316_init() enables MCLK before configuring the codec sysclk and creating the headset jack. If either of those later steps fails, the function returns without disabling MCLK, leaving the clock enabled after card registration fails. Track whether this driver enabled MCLK and disable it on the init error paths. Add the matching DAI link exit callback so the same clock enable is also balanced when ASoC cleans up a successfully initialized link. Fixes: a03bdaa565cb ("ASoC: Intel: add machine driver for BYT/CHT + ES8316") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260519-asoc-bytcht-es8316-mclk-leak-v1-1-b4a11cdc2afd@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: add shared BCLK rate constraint for cross-DAI coordinationMark Brown29-219/+419
Troy Mitchell <troy.mitchell@linux.spacemit.com> says: On some SoCs (e.g. SpacemiT K3), multiple I2S controllers share the same physical BCLK. When one controller is already streaming, the others must use hw_params that result in the same BCLK rate, otherwise the shared clock would be reconfigured and corrupt the active stream. This series adds framework-level support for this constraint: Patch 1 adds the dt-bindings for the spacemit,k3-i2s compatible. The K3 SoC uses the same I2S IP as K1 but requires additional clocks: a dedicated sysclk_div, along with c_sysclk and c_bclk which are shared across multiple I2S controllers. Patch 2 adds a DEFINE_GUARD wrapping snd_soc_card_mutex_lock() and snd_soc_card_mutex_unlock() so that scope-based locking picks up the SND_SOC_CARD_CLASS_RUNTIME lockdep subclass. Patch 3 adds the constraint logic in soc-pcm.c. During PCM open, every DAI that has a bclk clock pointer gets a hw_rule registered unconditionally. The rule callback runs at hw_refine time: it scans the card for an active peer sharing the same physical BCLK (via clk_is_match()) that has already completed hw_params, then constrains the current stream's rate to match the established BCLK rate. The first DAI to complete hw_params is unconstrained; subsequent DAIs must match. Two modes are supported: - Default (I2S): BCLK = rate * channels * sample_bits. The rule derives the valid rate range from the current channel and sample_bits intervals. - Explicit ratio (TDM): if the driver sets dai->bclk_ratio (e.g. slots * slot_width), the rule computes the single valid rate as active_bclk_rate / bclk_ratio. This series was prompted by review feedback on the SpacemiT K3 I2S series, where a vendor-specific fixed-sample-rate property was rejected in favor of a generic framework solution: https://lore.kernel.org/all/afFqgF6ZRwYdfUmL@sirena.co.uk/ Link: https://patch.msgid.link/20260522-i2s-same-blk-v4-0-a71a86faaa20@linux.spacemit.com
7 daysASoC: soc-pcm: constrain hw_params when DAIs share the same BCLKTroy Mitchell1-0/+116
When multiple CPU DAIs on the same sound card share the same physical BCLK, add a hw_rule during PCM open that constrains the sample rate so the resulting BCLK rate stays consistent across all sharing DAIs. The rule callback scans all DAIs on the card at hw_refine time, looking for an active peer that shares the same physical BCLK (via clk_is_match()) and has already completed hw_params (checked via dai->symmetric_rate != 0). This ensures the constraint uses the real BCLK rate established by the peer's clk_set_rate() in hw_params, not a stale boot-time default. The first DAI to complete hw_params is unconstrained (no active peer yet); subsequent DAIs are constrained to match. The rule supports two modes: - If the DAI has an explicit bclk_ratio set (e.g. for TDM where BCLK = rate * slots * slot_width), the rate is constrained to active_bclk_rate / bclk_ratio. - Otherwise, the default formula BCLK = rate * channels * sample_bits is used to derive the valid rate range. The constraint is purely additive: DAIs that do not set a bclk clock pointer are completely unaffected. Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com> Link: https://patch.msgid.link/20260522-i2s-same-blk-v4-3-a71a86faaa20@linux.spacemit.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: soc-pcm: add DEFINE_GUARD for snd_soc_card_mutexTroy Mitchell1-0/+3
Define a guard class wrapping snd_soc_card_mutex_lock() and snd_soc_card_mutex_unlock() so that scope-based locking can be used while still picking up the SND_SOC_CARD_CLASS_RUNTIME lockdep subclass. Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com> Link: https://patch.msgid.link/20260522-i2s-same-blk-v4-2-a71a86faaa20@linux.spacemit.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysASoC: soc-dai: add shared BCLK clock for cross-DAI rate constraintsTroy Mitchell1-0/+18
Add a bclk field to struct snd_soc_dai and a helper function snd_soc_dai_set_bclk_clk() that platform drivers can use to declare which clock is their BCLK. Also cache the bclk_ratio in snd_soc_dai_set_bclk_ratio() so that the framework can use it later in hw_rule evaluation for TDM configurations where BCLK = rate * slots * slot_width. When multiple DAIs on the same card share the same physical BCLK (detected via clk_is_match()), the ASoC core can automatically constrain their hw_params so that the resulting BCLK rates are compatible. This commit adds the data structure support; the actual constraint logic follows in the next patch. Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com> Link: https://patch.msgid.link/20260522-i2s-same-blk-v4-1-a71a86faaa20@linux.spacemit.com Signed-off-by: Mark Brown <broonie@kernel.org>
7 daysALSA: drivers: Mark some variables as __ro_after_initLen Bao2-3/+3
Some variables in the 'ALSA/drivers' are initialized only during the init phase in the '__init' functions and never changed. So, mark them as __ro_after_init to reduce the attack surface. Signed-off-by: Len Bao <len.bao@gmx.us> Link: https://patch.msgid.link/20260524165249.48941-1-len.bao@gmx.us Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 daysALSA: core: Mark some variables as __ro_after_initLen Bao5-8/+8
Some variables in the 'ALSA/core' are initialized only during the init phase in the '__init' functions and never changed. So, mark them as __ro_after_init to reduce the attack surface. Signed-off-by: Len Bao <len.bao@gmx.us> Link: https://patch.msgid.link/20260524162914.47764-1-len.bao@gmx.us Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 daysALSA: isa: Mark '*_registered' variables as __ro_after_initLen Bao9-21/+21
The '*_registered' variables are initialized only during the init phase in the '__init' functions and never changed. So, mark them as __ro_after_init to reduce the attack surface. Signed-off-by: Len Bao <len.bao@gmx.us> Link: https://patch.msgid.link/20260524154051.45258-1-len.bao@gmx.us Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 daysMerge branch 'for-linus' into for-nextTakashi Iwai30-252/+394
Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 daysALSA: hda/realtek: Limit mic boost on Positivo DN140Edson Juliano Drosdeck1-0/+1
The internal mic boost on the Positivo DN140 is too high. Fix this by applying the ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine to limit the gain. Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com> Link: https://patch.msgid.link/20260524185324.28959-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 daysALSA: scarlett2: Fix 2i2 Gen 4 direct monitor gain on firmware 2417Geoffrey D. Bennett1-4/+29
Firmware 2417 for the Scarlett 4th Gen 2i2 moved the direct monitor gain parameter by 4 bytes, from offset 0x2a0 to 0x2a4, breaking the "Direct Monitor X Mix Y" controls. Special-case the offset in the get/set config helpers when the running firmware is 2417 or later. Fixes: 4e809a299677 ("ALSA: scarlett2: Add support for Solo, 2i2, and 4i4 Gen 4") Cc: <stable@vger.kernel.org> Signed-off-by: Geoffrey D. Bennett <g@b4.vu> Link: https://patch.msgid.link/ahIWTueUlWA5xiV+@m.b4.vu Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 daysALSA: pcm: oss: Fix setup list UAF on proc write errorCássio Gabriel1-7/+11
snd_pcm_oss_proc_write() links a newly allocated setup entry into the OSS setup list before duplicating the task name. If the task-name allocation fails, the error path frees the already linked entry and leaves setup_list pointing at freed memory. A later OSS device open can then walk the stale list entry in snd_pcm_oss_look_for_setup() and dereference freed memory. Allocate the task name and initialize the setup entry before publishing the entry on setup_list. Also fetch the initial proc read iterator only after taking setup_mutex, so all setup_list traversal follows the same list lifetime rules. Reported-by: syzbot+8e498074a794999eb41c@syzkaller.appspotmail.com Closes: https://lore.kernel.org/all/6a1062b7.170a0220.35b2b7.0003.GAE@google.com Closes: https://syzkaller.appspot.com/bug?extid=8e498074a794999eb41c Fixes: 060d77b9c04a ("[ALSA] Fix / clean up PCM-OSS setup hooks") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260522-alsa-pcm-oss-setup-uaf-v1-1-40bdcc4d17e8@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 daysALSA: hda: cs35l56: Fix system name string leaksCássio Gabriel1-8/+9
cs35l56_hda_read_acpi() gets an allocated ACPI _SUB string from acpi_get_subsystem_id(). On success, that string is used to create the firmware system name. Several error paths after the _SUB lookup can return without releasing the allocated string. This includes speaker ID lookup errors other than -ENOENT, and errors after a firmware system name has been allocated. Use scoped cleanup for the temporary _SUB string and make cs35l56->system_name device-managed. This releases the temporary _SUB string on every error path and lets devres release the firmware system name on probe failure and device removal. Fixes: 6f03b446cbae ("ALSA: hda: cs35l56: Add support for speaker id") Fixes: 40b1c2f9b299 ("ALSA: hda/cs35l56: Workaround bad dev-index on Lenovo Yoga Book 9i GenX") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260522-alsa-cs35l56-system-name-leak-v4-1-a6154dd09cd9@gmail.com
7 daysALSA: hda/realtek: Add HDA_CODEC_QUIRK for Lenovo Yoga Slim 7 14AGP11Kris Kater1-0/+1
The BIOS on the Lenovo Yoga Slim 7 14AGP11 (AMD Ryzen AI / Kraken Point chassis; board LNVNB161216, product 83QS) programs the PCI subsystem ID of the HDA function as 17aa:0000. As a result no entry in alc269_fixup_tbl[] matches via SND_PCI_QUIRK, the fixup falls back to the generic auto-routing path, and the bass speaker pin is left mis-routed. Laptop speakers sound noticeably thin. The codec's own internal subsystem ID register reports 0x17aa394c correctly, so an HDA_CODEC_QUIRK entry (which matches on the codec SSID rather than on the PCI SSID) binds the chassis to the existing ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN fixup. This mirrors the same workaround already in place for the closely-related Yoga 7 2-in-1 14AKP10 and 16AKP10 entries earlier in the table. With this change the kernel log goes from ALC287: picked fixup for PCI SSID 17aa:0000 to ALC287: picked fixup alc287-yoga9-bass-spk-pin and speaker routing matches what the firmware intended. Verified by the reporter against the equivalent modprobe override (model=,alc287-yoga9-bass-spk-pin). Link: https://bugzilla.kernel.org/show_bug.cgi?id=221438 Signed-off-by: Kris Kater <kris@kater.nu> Link: https://patch.msgid.link/20260522060902.9423-1-kris@kater.nu Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 daysALSA: hda/realtek: Fix incorrect comment for ALC299_FIXUP_PREDATOR_SPKZhang Heng1-1/+1
The comment for the pin configuration 0x21 in the fixup ALC299_FIXUP_PREDATOR_SPK states "use as headset mic, without its own jack detect", but the fixup name and the actual usage indicate that the pin is meant to be used as internal speaker. Correct the comment to avoid confusion. Signed-off-by: Zhang Heng <zhangheng@kylinos.cn> Link: https://patch.msgid.link/20260522060742.1384390-1-zhangheng@kylinos.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
7 daysALSA: firewire-motu: Protect register DSP event queue positionsCássio Gabriel1-4/+7
The register DSP event queue is updated under parser->lock, but snd_motu_register_dsp_message_parser_count_event() reads pull_pos and push_pos without the lock. snd_motu_register_dsp_message_parser_copy_event() also reads both queue positions before taking the lock. Protect these accesses with parser->lock as well. This keeps the hwdep poll/read path consistent with the producer side and with the cached meter/parameter accessors. Fixes: 634ec0b2906e ("ALSA: firewire-motu: notify event for parameter change in register DSP model") Cc: stable@vger.kernel.org Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260521-alsa-firewire-motu-event-locking-v1-1-708e1c2b5e56@gmail.com
10 daysASoC: stm: Use guard() for mutex & spin locksMark Brown4-89/+59
phucduc.bui@gmail.com <phucduc.bui@gmail.com> says: This series converts mutex and spinlock handling in the STM drivers to use guard() helpers. The changes are code cleanup only and should have no functional impact. Link: https://patch.msgid.link/20260515112458.34378-1-phucduc.bui@gmail.com
10 daysASoC: stm: stm32_spdifrx: Use guard() for spin locksbui duc phuc1-28/+16
Clean up the code using guard() for spin locks. Merely code refactoring, and no behavior change. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260515112458.34378-5-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: stm: stm32_sai_sub: Use guard() for mutex & spin locksbui duc phuc1-18/+11
Clean up the code using guard() for mutex & spin locks. Merely code refactoring, and no behavior change. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260515112458.34378-4-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: stm: stm32_i2s: Use guard() for spin locksbui duc phuc1-36/+29
Clean up the code using guard() for spin locks. Merely code refactoring, and no behavior change. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260515112458.34378-3-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: stm: stm32_adfsdm: Use guard() for mutex locksbui duc phuc1-7/+3
Clean up the code using guard() for mutex locks. Merely code refactoring, and no behavior change. Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Link: https://patch.msgid.link/20260515112458.34378-2-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: mediatek: mt8189: Fix probe resource cleanupCássio Gabriel1-10/+28
The MT8189 AFE probe assigns reserved memory with of_reserved_mem_device_init(), but only releases that assignment from .remove(). If probe fails after the reserved memory has been assigned, the assignment record is left behind. The probe path also uses pm_runtime_get_sync() without checking its return value. If runtime resume fails, pm_runtime_get_sync() leaves the usage count incremented and the driver continues initialization without the device being resumed. Use pm_runtime_resume_and_get() so resume errors abort probe without leaking a PM usage count. Finally, component registration failure currently jumps to a label that drops a runtime PM reference even though the temporary probe reference was already released. Return the component registration error directly, and do not drop an unmatched PM reference from .remove(). Fixes: 7eb153585598 ("ASoC: mediatek: mt8189: add platform driver") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260514-asoc-mt8189-probe-cleanup-v1-1-ded733363281@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: SOF: ipc4-topology: Enable deep buffer captureSeppo Ingalsuo1-15/+24
This patch lets a capture PCM to operate with deep buffer by taking dsp_max_burst_size_in_ms from topology if it is defined. Earlier the value from topology was omitted for capture. If not defined, the maximum burst size for capture is set similarly as before to one millisecond. The dma_buffer_size is set similarly as for playback from largest of deep_buffer_dma_ms or SOF_IPC4_MIN_DMA_BUFFER_SIZE times OBS. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20260522075659.2645-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysMerge tag 'asoc-fix-v7.1-rc4' of ↵Takashi Iwai20-165/+205
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus ASoC: Fixes for v7.1 A bigger batch of fixes than usual due to -next not happeing last week, this is mostly stuff for laptops - a lot of quirks and small fixes, mainly for x86 and SoundWire. Nothing too big or exciting individually, just two week's worth.
10 daysASoC: SOF: ipc4-topology: Print for format type in dbg_audio_formatPeter Ujfalusi1-18/+19
8 and 32 bit formats can have different types, print them in debug information to have complete view of the supported formats. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20260520150204.18303-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: cs35l56: Replace open-coded SoundWire regmap with generic regmap-sdwMark Brown1-0/+1
Richard Fitzgerald <rf@opensource.cirrus.com> says: This series replaces the entirely custom SoundWire regmap with the generic regmap-sdw. The reasons for doing this are: - Avoid code duplication - Avoid effort of keeping custom implementation up-to-date - Prepare for supporting BRA Link: https://patch.msgid.link/20260521115420.978616-1-rf@opensource.cirrus.com
10 daysASoC: cs35l56: Use standard SoundWire regmap implementationRichard Fitzgerald3-84/+51
Use the regmap_sdw implementation for SoundWire instead of re-implementing the low-level bus transactions in cs35l56-sdw.c The cs35l56 registers are big-endian on I2C and SPI but little-endian over SoundWire. The firmware files are all big-endian and contain opaque blobs in big-endian order. So these must be endian-swapped to transfer over SoundWire. A custom regmap bus implementation is used to do this endian-swapping. The original implementation of this custom regmap bus was a complete bus backend, performing the endian swapping and low-level SoundWire bus read/write. This commit changes the custom regmap bus to only perform the endian-swap. It uses an underlying simple uncached regmap_sdw bus to deal with transferring the 32-bit registers over the SoundWire bus. Although this adds a small amount of overhead, from passing through the regmap APIs twice, it avoids having a local duplicate implementation of what regmap_sdw already does. The slow-read handling for OTP registers must access 8-bit SoundWire registers so it still uses low-level SoundWire bus reads. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260521115420.978616-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: cs35l56: Use reg_base to offset addresses on SoundWireRichard Fitzgerald2-6/+3
Set the reg_base member of regmap_config for SoundWire so that the regmap core will apply the 0x8000 offset to addresses, instead of doing it within our low-level regmap read/write callbacks. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260521115420.978616-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: cs35l56-shared-test: Subtract reg_base offset in dummy regmapRichard Fitzgerald1-0/+6
Subtract the value of cs35l56 regmap_config->reg_base from addresses passed into the mock regmap bus. Chip register addresses transferred over SoundWire are offset by 0x8000 to move them after the address range reserved in the SoundWire spec. This commit prepares for changing the cs35l56-sdw driver to use regmap_config->reg_base to add this offset. When that is done the addresses passed into the mock regmap_bus will include this offset. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260521115420.978616-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: SOF: Intel: Enable offload for UAOL for LNL+Mark Brown2-33/+18
Peter Ujfalusi <peter.ujfalusi@linux.intel.com> says: The USB Audio Offload (UAOL) can only be used from the DSP side and on Lunar Lake (ACE2) and newer platforms the access to it's register space must be granted by the host, just like for SSP or DMIC. This series enable the offload for UAOL for LNL or newer devices. Link: https://patch.msgid.link/20260520150639.25301-1-peter.ujfalusi@linux.intel.com
10 daysASoC: SOF: Intel: lnl: Enable offload for UAOL linkPeter Ujfalusi1-1/+2
The handling of UAOL (USB Audio Offload Link) is similar to SSP and DMIC, it is handled by the DSP firmware. Set the offload enable for it similar to SSP and DMIC. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://patch.msgid.link/20260520150639.25301-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: SOF: Intel: hda-mlink/lnl: Convert offload enable functions to voidPeter Ujfalusi2-33/+17
hdac_bus_eml_enable_offload() can only fail in case the IP is not enabled in the platform, which is not really an error as the ACE IP can be configured differently when integrated into a specific SoC. While it is unlikely, but it is a valid configuration that for example the DMIC is disabled. In this case we will just skip setting the offload for a link that is not present. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://patch.msgid.link/20260520150639.25301-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: AMD: ACP7.x initial PCI driver bring-upMark Brown6-0/+419
Vijendar Mukunda <Vijendar.Mukunda@amd.com> says: This series adds initial AMD ACP 7.x support for ACP7.D / 7.E / 7.F platforms. Compared to earlier ACP generations, ACP7.x includes substantial design changes, including an updated register set/layout. For that reason, the ACP7.x implementation is placed under a separate sound/soc/amd/acp7x/ directory instead of extending older-generation code paths, keeping ACP7.x-specific logic and register definitions cleanly separated and easier to maintain. This initial version is intentionally focused on the core PCI driver bring-up: register definitions, probe/remove, basic helper wiring, and system sleep + runtime PM integration. A follow-up series will add support for additional Audio I/O blocks, including SoundWire and the ACP PDM controller. The primary goal of this series is to unblock power validation, since the ACP IP currently does not have a driver available with PM ops support on these platforms. Link: https://patch.msgid.link/20260507181251.20594-1-Vijendar.Mukunda@amd.com
10 daysASoC: amd: acp7x: add system and runtime PM opsVijendar Mukunda3-0/+77
Add ACP7.x PM callbacks and hook up system sleep and runtime PM ops for the PCI driver. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/20260507181251.20594-6-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: amd: enable acp7.x drivers buildVijendar Mukunda3-0/+16
ACP7.x drivers can be built by selecting necessary kernel config option. The patch enables build support of the same. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/20260507181251.20594-5-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: amd: acp7x: add helper functions and hw opsVijendar Mukunda3-2/+197
Add ACP7.x init/deinit helper routines and wire up PCI hw ops for ACP7.D/7.E/7.F variants. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/20260507181251.20594-4-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: amd: acp7x: add ACP PCI driver probe/remove sequenceVijendar Mukunda2-0/+131
Add ACP7.x PCI driver probe and remove sequence for ACP7.D/7.E/7.F variants. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Link: https://patch.msgid.link/20260507181251.20594-3-Vijendar.Mukunda@amd.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: codecs: pcm512x: fix null-ptr dereference in pcm512x_overclock_xxx_put()Jeongjun Park1-3/+3
In the pcm512x chipset driver, pcm512x_overclock_xxx_put() is defined as a general mixer kcontrol instead of a DAPM kcontrol, so struct snd_soc_dapm_context must not be accessed via snd_soc_dapm_kcontrol_to_dapm(). This causes a NULL pointer dereference, so it must be modified to use snd_soc_component_to_dapm(). Cc: stable@kernel.org Closes: https://github.com/raspberrypi/linux/issues/7242 Fixes: 02dbbb7e982a ("ASoC: codecs: pcm512x: convert to snd_soc_dapm_xxx()") Signed-off-by: Jeongjun Park <aha310510@gmail.com> Link: https://patch.msgid.link/20260521113712.227438-1-aha310510@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: Intel: soc-acpi-intel-ptl-match: Remove unnecessary cs42l43 matchCharles Keepax1-118/+0
For PTL onwards Cirrus are intending to rely on function topologies, rather than using a match table for each system type. Remove this unnecessary match table entry. Having the match entries can mean that systems match when they should use function topologies instead, resulting in incorrect audio configurations. Although, admittedly this is not too likely with this 6x amp configuration as those are quite rare, but best to follow best practice. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260520163631.3300102-3-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: soc-acpi-intel-ptl-match: Make Chrome matches conditionalCharles Keepax3-0/+18
For PTL onwards Cirrus are intending to rely on function topologies, rather than using a match table for each system type. Chrome systems tend to have custom magic in the topology and thus need to load a specific file. This causes problems as these system can have the same layout as generic laptops causing the match to apply to other laptops. Add a DMI quirk that forces these matches to only apply to specific devices. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Link: https://patch.msgid.link/20260520163631.3300102-2-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: Intel: soc-acpi: Add entry for sof_es8336 in NVL match table.Balamurugan C1-0/+13
Adding ES83x6 I2S codec support for NVL platforms and entry in match table. Signed-off-by: Balamurugan C <balamurugan.c@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/20260520061143.2024963-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
10 daysASoC: Intel: sof_sdw: Add support for nvlrvp in NVL platformJairaj Arava1-0/+8
Add an entry in the soundwire quirk table for novalake boards to support NVL RVP Signed-off-by: Jairaj Arava <jairaj.arava@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20260520060814.2024852-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
11 daysASoC: cs-amp-lib: Some bug and typo fixesMark Brown12-39/+110
Richard Fitzgerald <rf@opensource.cirrus.com> says: This series fixes bugs and a typo in cs-amp-lib. Link: https://patch.msgid.link/20260521122511.987322-1-rf@opensource.cirrus.com
11 daysASoC: cs-amp-lib: Fix typo in error message: write -> readRichard Fitzgerald1-1/+1
Fix the error message in cs_amp_read_cal_coeff() to say "Failed to read". It was incorrectly "Failed to write", probably a copy-paste error. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260521122511.987322-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
11 daysASoC: cs-amp-lib: Fix missing dput() after debugfs_lookup()Richard Fitzgerald1-3/+10
Rewrite cs_amp_create_debugfs() so that dput() will be called on a valid dentry returned from debugfs_lookup(). The pointer returned from debugfs_lookup() must be released by dput(). The pointer returned from debugfs_create_dir() does not need to be passed to dput(). Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: cdd27fa3298a ("ASoC: cs-amp-lib: Add helpers for factory calibration") Link: https://patch.msgid.link/20260521122511.987322-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
11 daysASoC: cs-amp-lib: Fix wrong sizeof() in _cs_amp_set_efi_calibration_data()Richard Fitzgerald1-1/+1
When calculating data->count replace the incorrect sizeof(data) with use of struct_offset(). The faulty sizeof(data) was incorrectly calculating the size of the pointer instead of the size of the struct pointed to. As it happens, both values are 8 on a 64-bit CPU. In the unlikely event of using this code on a 32-bit CPU the number of available bytes would be calculated 4 larger than is actually available. Instead of changing to sizeof(*data) it has been replaced by struct_offset() because it has better chance of detecting these sorts of typos. Also the offset of the data[] array is actually what we want to know here anyway. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 2b62e66626f0 ("ASoC: cs-amp-lib: Add function to write calibration to UEFI") Link: https://patch.msgid.link/20260521122511.987322-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
11 daysASoC: cs35l56: Fix flushing of IRQ work in cs35l56_sdw_remove()Richard Fitzgerald1-1/+2
Use flush_work() instead of cancel_work_sync() to terminate pending IRQ work in cs35l56_sdw_remove(). And flush_work() again after masking the interrupts to flush any queueing that was racing with the masking. This is the same sequence as cs35l56_sdw_system_suspend(). cs35l56_sdw_interrupt() takes the pm_runtime to prevent the bus powering- down before the interrupt status can be read and handled. The work releases this pm_runtime. So cancelling it, instead of flushing, could leave an unbalanced pm_runtime. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: e49611252900 ("ASoC: cs35l56: Add driver for Cirrus Logic CS35L56") Link: https://patch.msgid.link/20260521123057.988732-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
11 daysASoC: Rework initialization of i2c_device_idsMark Brown200-426/+398
Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> says: This series is a preparation for diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 23ff24080dfd..aebd3a5e90af 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -477,7 +477,11 @@ struct rpmsg_device_id { struct i2c_device_id { char name[I2C_NAME_SIZE]; - kernel_ulong_t driver_data; /* Data private to the driver */ + union { + /* Data private to the driver */ + kernel_ulong_t driver_data; + const void *driver_data_ptr; + }; }; /* pci_epf */ and this requires that .driver_data is assigned via a named initializer for static data. This requirement isn't a bad one because named initializers are also much better readable than list initializers. The union added to struct i2c_device_id enables further cleanups like: diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index 8a082ff034dd..b2aac7348d22 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -1429,7 +1429,7 @@ static int kxcjk1013_probe(struct i2c_client *client) if (id) { name = id->name; - data->info = (const struct kx_chipset_info *)(id->driver_data); + data->info = id->driver_data_ptr; } else { name = iio_get_acpi_device_name_and_data(&client->dev, &ddata); data->info = ddata; @@ -1630,11 +1630,11 @@ static const struct dev_pm_ops kxcjk1013_pm_ops = { }; static const struct i2c_device_id kxcjk1013_id[] = { - { .name = "kxcjk1013", .driver_data = (kernel_ulong_t)&kxcjk1013_info }, - { .name = "kxcj91008", .driver_data = (kernel_ulong_t)&kxcj91008_info }, - { .name = "kxtj21009", .driver_data = (kernel_ulong_t)&kxtj21009_info }, - { .name = "kxtf9", .driver_data = (kernel_ulong_t)&kxtf9_info }, - { .name = "kx023-1025", .driver_data = (kernel_ulong_t)&kx0231025_info }, + { .name = "kxcjk1013", .driver_data_ptr = &kxcjk1013_info }, + { .name = "kxcj91008", .driver_data_ptr = &kxcj91008_info }, + { .name = "kxtj21009", .driver_data_ptr = &kxtj21009_info }, + { .name = "kxtf9", .driver_data_ptr = &kxtf9_info }, + { .name = "kx023-1025", .driver_data_ptr = &kx0231025_info }, { } }; MODULE_DEVICE_TABLE(i2c, kxcjk1013_id); that are an improvement for readability (again!) and it keeps some properties of the pointers (here: being const) without having to pay attention for that. (I didn't find a good example in sound/soc, so an iio driver was used to demonstrate the gain.) My additional motivation for this effort is CHERI[1]. This is a hardware extension that uses 128 bit pointers but unsigned long is still 64 bit. So with CHERI you cannot store pointers in unsigned long variables. The first patch drops a few empty remove callbacks that I found while working on patch #2. The second converts all hwmon drivers to use named initializers. Link: https://patch.msgid.link/cover.1778692164.git.u.kleine-koenig@baylibre.com
11 daysASoC: Use named initializers for arrays of i2c_device_dataUwe Kleine-König (The Capable Hub)200-391/+391
While being less compact, using named initializers allows to more easily see which members of the structs are assigned which value without having to lookup the declaration of the struct. And it's also more robust against changes to the struct definition. The mentioned robustness is relevant for a planned change to struct i2c_device_id that replaces .driver_data by an anonymous union. While touching all these arrays, unify indention and usage of commas. This patch doesn't modify the compiled arrays, only their representation in source form benefits. The former was confirmed with x86 and arm64 builds. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com> Reviewed-by: Linus Walleij <linusw@kernel.org> Link: https://patch.msgid.link/ae2ff4898eb340bd8bcafb7b75443eb4a0ce3e76.1778692164.git.u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
11 daysASoC: Drop empty i2c remove callbacksUwe Kleine-König (The Capable Hub)7-35/+7
A remove callback that does nothing has the same semantic (apart from a debug output) as no such callback at all as i2c_device_remove() just does: if (driver->remove) { dev_dbg(dev, "remove\n"); driver->remove(client); } Remove these useless callbacks. While touching the driver structs, unify indention. Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/3afd8230634dd68ac7c1885ee2b01da377349f89.1778692164.git.u.kleine-koenig@baylibre.com Signed-off-by: Mark Brown <broonie@kernel.org>
11 daysASoC: SOF: ipc4-control: Use local copy of IPC message for sendingPeter Ujfalusi1-49/+41
If a kcontrol update comes to a control right at the same time when the PCM containing the control is started up then there is a small window when a race can happen: while the widget is set up the swidget->setup_mutex is taken in topology level and if the control update comes at this point, it will be stopped within sof_ipc4_set_get_kcontrol_data() with the mutex and it will be blocked until the swidget setup is done, which will clear the control's IPC message payload. To avoid such race, use local copy of the template IPC message instead of the template directly. This will ensure data integrity in case of concurrent updates during initialization. Link: https://github.com/thesofproject/linux/issues/5734 Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://patch.msgid.link/20260520141349.9625-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
11 daysASoC: SOF: DSP core count handling updatesMark Brown3-2/+28
Peter Ujfalusi <peter.ujfalusi@linux.intel.com> says: The series address developer facing issues regarding to how the DSP core count is handled: IPC4 code ignored the DISABLE_MULTICORE flag, fixed by the first patch. The second patch does a validation of the core index from topology against the number of DSP cores available on the booted device, which makes generic development topologies usable among different DSP variants without failure. Link: https://patch.msgid.link/20260520135514.32720-1-peter.ujfalusi@linux.intel.com
11 daysASoC: SOF: Validate and correct the core id against the number of cores of ↵Peter Ujfalusi3-3/+26
the DSP Generic development topologies can reference core id outside of the range of the number of DSP cores the device might have. Product families have different number of cores, for example: Intel TGL has 4, TGL-H has 2, ADL has 4, ADL-S has 2, etc The development topologies are tuned for the higher end devices and in this case they will fail on DSP with less number of cores. Override the out of range core id from topology to primary core and inform the user about it. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20260520135514.32720-3-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
11 daysASoC: SOF: ipc4-topology: Handle SOF_DBG_DISABLE_MULTICORE flag for pipelinesPeter Ujfalusi1-0/+3
SOF_DBG_DISABLE_MULTICORE is handled for swidgets in topology.c but the pipeline's core is not changed to primary core if the flag is set. Check the flag and if it is set, force the pipeline core to primary core. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20260520135514.32720-2-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
12 daysASoC: uda1380: remove kmemdup_arrayRosen Penev1-7/+6
Use a flexible array member to combine allocations. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260519010337.629127-1-rosenp@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
12 daysASoC: move card->pop_time to soc-dapmMark Brown5-29/+43
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> says: This is v3 to move card->pop_time to soc-dapm. card->pop_time is used only on TI, and Janusz posted patch which will stop using it. It was posted at 12 Apr 2026, and [1/2] is it as-is. [2/2] will move card->pop_time to soc-dapm. We can use it via debugfs. I have added [RFC] on Subject. Link: https://patch.msgid.link/87wlx9wj1h.wl-kuninori.morimoto.gx@renesas.com
12 daysASoC: soc-dapm: move card->pop_time to soc-dapm.cKuninori Morimoto3-18/+20
Card has pop_time which have used only from TI, and it is now stop using it. This pop_time is used for debug, and can be access from debugfs. Let's move it from Card to soc-dapm.c local. This patch renames it as asoc/${card}/pop_time to asoc/dapm_pop_time. This patch moves it from Card to soc-dapm.c, tidyup soc-dapm.c accordingly, and remove card->pop_time from cx20442.c which is no longer needed. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87tssdwj0p.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
12 daysASoC: ti: ams-delta: Stop (ab)using card->pop_timeJanusz Krzysztofik3-11/+23
A flag is needed that tells the card driver if the codec has been initialized successfully over the modem's line discipline. Initially, codec->hw_write was used as the flag, but it was then dropped and the flag function associated with card->pop_time, already managed by the codec driver for diagnostic purposes. Since now the card->pop_time is going to be killed, stop abusing foreign fields in favor of an own one. Signed-off-by: Janusz Krzysztofik <jmkrzyszt@gmail.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87v7ctwj0w.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
12 daysASoC: fsl: Allow MPC5200 PSC audio compile testingRosen Penev1-3/+3
They require a PPC platform to compile but that's it. Allow the Freescale PowerPC ASoC menu in PowerPC compile-test builds and let the MPC5200 PSC I2S and AC97 drivers depend on PPC_BESTCOMM directly. This keeps native platform builds unchanged while extending compile-test coverage. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260518051706.1027500-1-rosenp@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
12 daysASoC: rt722-sdca: Add a control to support CAE firmware updateJack Yu3-8/+346
Realtek CAE requires specific tuning parameters based on the system vendor and SKU. This patch adds a kcontrol to trigger the firmware loading process. Signed-off-by: Jack Yu <jack.yu@realtek.com> Link: https://patch.msgid.link/20260520053243.3645180-1-jack.yu@realtek.com Signed-off-by: Mark Brown <broonie@kernel.org>
12 daysALSA: seq: Serialize UMP output teardown with event_inputZhang Cen1-4/+18
seq_ump_process_event() borrows client->out_rfile.output without synchronizing with the first-open and last-close transition in seq_ump_client_open() and seq_ump_client_close(). The last output unuse can therefore drop opened[STR_OUT] to zero and release the rawmidi file while an in-flight event_input callback is still inside snd_rawmidi_kernel_write(). That leaves the rawmidi substream runtime exposed to teardown before the write path has taken its own buffer reference. Add a per-client rwlock for the event_input-visible output file. Publish a newly opened output file under the write side, and hold the read side from the output lookup through snd_rawmidi_kernel_write(). The last output close copies and clears the visible output file under the write side, then drops the lock and releases the saved rawmidi file. Use IRQ-safe rwlock guards because event_input can also be reached from atomic sequencer delivery. The buggy scenario involves two paths, with each column showing the order within that path: path A label: event_input path path B label: last unuse path 1. seq_ump_process_event() reads 1. seq_ump_client_close() client->out_rfile.output. drops opened[STR_OUT] to zero. 2. snd_rawmidi_kernel_write1() 2. snd_rawmidi_kernel_release() has not yet pinned runtime. closes the output file. 3. The writer continues using 3. close_substream() frees the borrowed substream. substream->runtime. This keeps the output substream and runtime alive for the full event_input write while keeping rawmidi release outside the rwlock. KASAN reproduced this as a slab-use-after-free in snd_rawmidi_kernel_write1(), with allocation through seq_ump_use()/snd_seq_port_connect() and free through seq_ump_unuse()/snd_seq_port_disconnect(). Suggested-by: Takashi Iwai <tiwai@suse.de> Validation reproduced this kernel report: KASAN slab-use-after-free in snd_rawmidi_kernel_write1+0x9d/0x400 RIP: 0033:0x7f5528af837f Read of size 8 Call trace: dump_stack_lvl+0x73/0xb0 (?:?) print_report+0xd1/0x650 (?:?) srso_alias_return_thunk+0x5/0xfbef5 (?:?) __virt_addr_valid+0x1a7/0x340 (?:?) kasan_complete_mode_report_info+0x64/0x200 (?:?) kasan_report+0xf7/0x130 (?:?) snd_rawmidi_kernel_write1+0x9d/0x400 (?:?) __asan_load8+0x82/0xb0 (?:?) update_stack_state+0x1ef/0x2d0 (?:?) snd_rawmidi_kernel_write+0x1a/0x20 (?:?) seq_ump_process_event+0xd4/0x120 (sound/core/seq/seq_ump_client.c:82) __snd_seq_deliver_single_event+0x8a/0xe0 (?:?) snd_seq_deliver_from_ump+0x2b2/0xd60 (?:?) lock_acquire+0x14e/0x2e0 (?:?) find_held_lock+0x31/0x90 (?:?) snd_seq_port_use_ptr+0xa6/0xe0 (?:?) __kasan_check_write+0x18/0x20 (?:?) do_raw_read_unlock+0x32/0xa0 (?:?) _raw_read_unlock+0x26/0x50 (?:?) snd_seq_deliver_single_event+0x45c/0x4b0 (?:?) snd_seq_deliver_event+0x10d/0x1b0 (?:?) snd_seq_client_enqueue_event+0x192/0x240 (?:?) snd_seq_write+0x2cd/0x450 (?:?) apparmor_file_permission+0x20/0x30 (?:?) security_file_permission+0x51/0x60 (?:?) vfs_write+0x1ce/0x850 (?:?) __fget_files+0x12b/0x220 (?:?) lock_release+0xc8/0x2a0 (?:?) __rcu_read_unlock+0x74/0x2d0 (?:?) __fget_files+0x135/0x220 (?:?) ksys_write+0x15a/0x180 (?:?) rcu_is_watching+0x24/0x60 (?:?) __x64_sys_write+0x46/0x60 (?:?) x64_sys_call+0x7d/0x20d0 (?:?) do_syscall_64+0xc1/0x360 (arch/x86/entry/syscall_64.c:87) entry_SYSCALL_64_after_hwframe+0x77/0x7f (?:?) Fixes: 81fd444aa371 ("ALSA: seq: Bind UMP device") Signed-off-by: Zhang Cen <rollkingzzc@gmail.com> Link: https://patch.msgid.link/20260520103249.3048345-1-rollkingzzc@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 daysALSA: scarlett2: Allow flash writes ending at segment boundaryCássio Gabriel1-2/+5
scarlett2_hwdep_write() rejects writes when offset + count is greater than or equal to the selected flash segment size. That incorrectly treats a write ending exactly at the end of the segment as out of space, although the last byte written is still within the segment. Split invalid argument checks from the segment-space check, keep zero-length writes as no-ops, and compare count against the remaining segment size. This permits exact-end writes and avoids relying on offset + count before deciding whether the request is in bounds. Fixes: 1abfbd3c9527 ("ALSA: scarlett2: Add support for uploading new firmware") Cc: stable@vger.kernel.org Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260519-alsa-scarlett2-flash-write-boundary-v1-1-b550480e92da@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 daysALSA: hda/realtek: Add LED quirk for HP ProBook 430 G6Marius Hoch1-0/+1
Like the HP ProBook 440 G6, the HP ProBook 430 G6 needs the ALC236_FIXUP_HP_MUTE_LED_MICMUTE_VREF quirk for its mute and microphone mute LEDs. Tested on a HP ProBook 430 G6. Signed-off-by: Marius Hoch <mail@mariushoch.de> Link: https://patch.msgid.link/20260519140248.4211-2-mail@mariushoch.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 daysALSA: hda/intel: Make sure to cancel irq-pending work at closing PCM streamTakashi Iwai3-4/+20
The pending irq work might be still floating while the assigned stream has been already closed, which may lead to UAF, especially when another async work for fasync is involved. For addressing this, extend the hda_controller_ops for allowing the extra cleanup procedure that is specific to the controller driver, and make sure to cancel and sync the pending irq work at each PCM close before releasing the resources. Reported-by: Jake Lamberson <lamberson.jake@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260519121157.28477-2-tiwai@suse.de
12 daysALSA: hda: Move irq pending work into hda-intel streamTakashi Iwai4-56/+89
Currently, the delayed IRQ handling for PCM streams is managed in a single work embedded in hda_intel, but this is basically a per-stream thing. Due to the single work, we can't cancel the work properly at closing each stream, for example. For making the IRQ pending work to be stream-based, this patch changes the following: - An extended version of azx_dev (i.e. the hd-audio stream object) is defined for snd-hda-intel - The irq_pending flag and irq_pending_work are moved to hda_intel_stream, so that they can be hda-intel stream specific - The stream creation and assignment are refactored so that snd-hda-intel can handle individually; the snd-hda-intel specific workaround for stream tags is also moved to snd-hda-intel itself instead of the common code - The irq pending work is canceled properly at free / shutdown While we're at it, changed the bit field flag to bool, as the bit field doesn't help much in our case. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260519121157.28477-1-tiwai@suse.de
12 daysALSA: seq: Register kernel port with full informationTakashi Iwai3-11/+28
The current ALSA sequencer core tries to register the new kernel sequencer port on the list at first, then fill up the port information. This means that user-space may sneak the wrong information before the actual data is filled, which isn't ideal. Although the user-space should try to query the port info after the port registration notification is sent out, it'd be still better to have a port available with the full info from the beginning. This patch changes the sequencer port creation and registration procedure; now split to two steps, for creation and insertion, and the port is registered after the information is filled. Link: https://sashiko.dev/#/patchset/20260518194023.1667857-1-maoyixie.tju%40gmail.com Link: https://patch.msgid.link/20260519094254.465041-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysASoC: soc-utils: Add missing va_end in snd_soc_ret()Robertus Diawan Chris1-0/+1
The default case in snd_soc_ret() use va_start without va_end to cleanup "args" object which can cause undefined behavior. So, add missing va_end to cleanup "args" object. This is reported by Coverity Scan as "Missing varargs init or cleanup". Fixes: 943116ba2a6a ("ASoC: add common snd_soc_ret() and use it") Signed-off-by: Robertus Diawan Chris <robertusdchris@gmail.com> Link: https://patch.msgid.link/20260519054024.274741-1-robertusdchris@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: cs35l56: Use standard SoundWire regmap implementationRichard Fitzgerald3-84/+51
Use the regmap_sdw implementation for SoundWire instead of re-implementing the low-level bus transactions in cs35l56-sdw.c The cs35l56 registers are big-endian on I2C and SPI but little-endian over SoundWire. The firmware files are all big-endian and contain opaque blobs in big-endian order. So these must be endian-swapped to transfer over SoundWire. A custom regmap bus implementation is used to do this endian-swapping. The original implementation of this custom regmap bus was a complete bus backend, performing the endian swapping and low-level SoundWire bus read/write. This commit changes the custom regmap bus to only perform the endian-swap. It uses an underlying simple uncached regmap_sdw bus to deal with transferring the 32-bit registers over the SoundWire bus. Although this adds a small amount of overhead, from passing through the regmap APIs twice, it avoids having a local duplicate implementation of what regmap_sdw already does. The slow-read handling for OTP registers must access 8-bit SoundWire registers so it still uses low-level SoundWire bus reads. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260519135435.479949-4-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: cs35l56: Use reg_base to offset addresses on SoundWireRichard Fitzgerald2-6/+3
Set the reg_base member of regmap_config for SoundWire so that the regmap core will apply the 0x8000 offset to addresses, instead of doing it within our low-level regmap read/write callbacks. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260519135435.479949-3-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: cs35l56-shared-test: Subtract reg_base offset in dummy regmapRichard Fitzgerald1-0/+6
Subtract the value of cs35l56 regmap_config->reg_base from addresses passed into the mock regmap bus. Chip register addresses transferred over SoundWire are offset by 0x8000 to move them after the address range reserved in the SoundWire spec. This commit prepares for changing the cs35l56-sdw driver to use regmap_config->reg_base to add this offset. When that is done the addresses passed into the mock regmap_bus will include this offset. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260519135435.479949-2-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: tegra: tegra210-mixer: Reject too-short fade durationsSheetal2-8/+29
DURATION_INV_N3 is computed from BIT_ULL(31 + prescalar) divided by the configured duration, and then written as a 32-bit RAM value. Durations of 32 samples or less overflow that value, so reject them and advertise the valid range through the fade duration control. Validate the ALSA integer control value as a long before storing it in the driver's u32 duration field. Use a u32 temporary for duration RAM writes because the largest valid inverse value can still exceed INT_MAX. Fixes: 36645381b864 ("ASoC: tegra: Add per-stream Mixer Fade controls") Signed-off-by: Sheetal <sheetal@nvidia.com> Link: https://patch.msgid.link/20260519094858.1426057-1-sheetal@nvidia.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysMerge branch 'for-linus' into for-nextTakashi Iwai9-33/+76
Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysALSA: usx2y: Drain pending US-428 pipe-4 output commandsCássio Gabriel1-16/+23
The US-428 pipe-4 output path submits at most one pending p4out entry from the shared-memory ring per input interrupt. If userspace queues more than one command before the interrupt handler runs, later commands remain pending until later input interrupts, even when async pipe-4 URBs are available. Drain pending entries while idle async URBs are available. Copy each command into the existing per-URB async buffer before submission, so the submitted transfer does not depend on a userspace-mapped ring slot remaining unchanged after p4out_sent is advanced. Also update p4out_sent only after usb_submit_urb() succeeds, so a failed submission is not reported as sent. This keeps the shared-memory ABI unchanged and fixes only the local queue-draining behavior. Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260519-alsa-usx2y-p4out-drain-v1-1-8f0a4550bae2@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysALSA: ua101: Reject too-short USB descriptorsCássio Gabriel1-2/+3
find_format_descriptor() walks the class-specific interface extras by advancing with bLength. It rejects descriptors that extend past the remaining buffer, but it does not reject descriptor lengths smaller than a USB descriptor header. Reject too-short descriptors before using bLength to advance the local scan. This keeps the UA-101 parser robust against malformed descriptor data and matches the usual USB descriptor walking rules. Fixes: 63978ab3e3e9 ("sound: add Edirol UA-101 support") Cc: stable@vger.kernel.org Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260519-alsa-ua101-desc-len-v1-1-4307d1a5e054@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysALSA: hda/realtek: Fix mute and mic-mute LEDs for HP 16 Piston OmniBook XZhang Heng1-1/+1
The ALC245 sound card on this machine requires the quirk `ALC245_FIXUP_HP_ENVY_X360_15_FH0XXX` to fix the mic and mute LED. Link: https://bugzilla.kernel.org/show_bug.cgi?id=221509 Cc: <stable@vger.kernel.org> Signed-off-by: Zhang Heng <zhangheng@kylinos.cn> Link: https://patch.msgid.link/20260519015535.891156-1-zhangheng@kylinos.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysALSA: usb-audio: Use flexible allocation for Scarlett2 packetsRosen Penev1-5/+5
Allocate Scarlett2 USB packets and request buffers with the flex allocation helpers for their trailing data arrays. Keep the computed packet sizes where they are still needed for USB transfer lengths. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260519004935.627797-1-rosenp@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysALSA: usb-audio: Use flexible allocation for FCP packetsRosen Penev1-2/+2
Allocate FCP request and response packets with kmalloc_flex() for the trailing packet data instead of passing the computed struct size directly to kmalloc(). Keep the computed packet sizes for the USB transfer length checks. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260519004834.627676-1-rosenp@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysALSA: oss: Use flexible allocation for PCM pluginsRosen Penev1-1/+1
Allocate PCM plugin objects with kzalloc_flex() for the trailing extra data area instead of open-coding the size calculation. This keeps the allocation tied to the existing flexible array member without changing the plugin lifetime. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260519004647.627429-1-rosenp@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysALSA: seq: avoid past-the-end iterator in snd_seq_create_port()Maoyi Xie1-2/+5
snd_seq_create_port() walks client->ports_list_head looking for the ordered insertion point and on loop fall-through passes &p->list to list_add_tail(): list_for_each_entry(p, &client->ports_list_head, list) { if (p->addr.port == port) { kfree(new_port); return -EBUSY; } if (p->addr.port > num) break; ... } list_add_tail(&new_port->list, &p->list); When the loop walks all entries without break (e.g., the new port sorts last), p is past-the-end. &p->list aliases &client->ports_list_head (the list head) via container_of offset cancellation, so the insert lands at the list tail. That is the intended behaviour, but the access is undefined per C11 even though it works in practice. Track an explicit insert_before pointer initialised to the list head and overwritten to &p->list only when the loop breaks early. The observable behaviour is unchanged. Fixes: 9244b2c3079f ("[ALSA] alsa core: convert to list_for_each_entry*") Signed-off-by: Maoyi Xie <maoyixie.tju@gmail.com> Link: https://patch.msgid.link/20260518194023.1667857-3-maoyixie.tju@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysALSA: timer: avoid past-the-end iterator in snd_timer_dev_register()Maoyi Xie1-5/+14
snd_timer_dev_register() walks snd_timer_list looking for the ordered insertion point and on loop fall-through passes &timer1->device_list to list_add_tail(): list_for_each_entry(timer1, &snd_timer_list, device_list) { ... break; /* on found-position */ ... } list_add_tail(&timer->device_list, &timer1->device_list); When the loop walks all entries without break, timer1 is past-the-end. &timer1->device_list aliases &snd_timer_list (the list head) via container_of offset cancellation, so the insert lands at the list tail. That is the intended behaviour, but the access is undefined per C11 even though it works in practice. Track an explicit insert_before pointer initialised to the list head and overwritten to &timer1->device_list only when the loop breaks early. The observable behaviour is unchanged. Fixes: 9244b2c3079f ("[ALSA] alsa core: convert to list_for_each_entry*") Signed-off-by: Maoyi Xie <maoyixie.tju@gmail.com> Link: https://patch.msgid.link/20260518194023.1667857-2-maoyixie.tju@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysALSA: ice1724: Fix blocking open for independent surround PCMsCássio Gabriel1-5/+14
The independent surround playback open path rejects a substream when the matching PDMA channel is reserved by the multi-channel PDMA0 stream. It currently returns -EBUSY for that case, although the driver has carried a FIXME noting that blocking mode is not handled properly. ALSA PCM open waits and retries only when the low-level open callback returns -EAGAIN. Returning -EBUSY therefore makes blocking opens fail immediately, the same as nonblocking opens. Return -EAGAIN for the temporary PDMA0 reservation conflict. The PCM core continues to report -EBUSY for O_NONBLOCK callers, while blocking callers sleep and retry. Also wake the independent surround PCM wait queue when hw_free releases a PDMA reservation. The reservation can be released by the pro PCM, while waiters are sleeping on the independent surround PCM, so waking the current substream PCM is not sufficient for this cross-PCM reservation. Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260518-ice1724-blocking-open-v1-1-1bfa3e5aa7cf@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysALSA: hda/ca0132: add QUIRK_GENERIC path for Gigabyte GA-Z170X-Gaming G1Ezio Galeazzi2-13/+99
Some CA0132 implementations (e.g. Gigabyte GA-Z170X-Gaming G1) produce white noise when using the DSP firmware path. Add a QUIRK_GENERIC path that uses the standard HDA generic parser instead, with custom pin configs. This patch applies against v6.18.24. Signed-off-by: Ezio Galeazzi <eziogale@gmail.com> Link: https://lore.kernel.org/0c0b781f-1595-4595-921a-66d83cf5930b@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
13 daysASoC: Add support for GPIOs driven amplifiersMark Brown12-60/+990
Herve Codina <herve.codina@bootlin.com> says: On some embedded system boards, audio amplifiers are designed using discrete components such as op-amp, several resistors and switches to either adjust the gain (switching resistors) or fully switch the audio signal path (mute and/or bypass features). Those switches are usually driven by simple GPIOs. This kind of amplifiers are not handled in ASoC and the fallback is to let the user-space handle those GPIOs out of the ALSA world. In order to have those kind of amplifiers fully integrated in the audio stack, this series introduces the audio-gpio-amp to handle them. This new ASoC component allows to have the amplifiers seen as ASoC auxiliarty devices and so it allows to control them through audio mixer controls. In order to ease the review, I choose to split modifications related to the merge of the gpio-audio-amp part into the simple-amplfier driver in several commits. Link: https://patch.msgid.link/20260513081702.317117-1-herve.codina@bootlin.com
13 daysASoC: simple-amplifier: Update author and copyrightHerve Codina1-2/+8
After reworking the simple-amplifier driver and adding support for gpio-audio-amp in the driver, add myself as the author of the gpio-audio-amp part of the driver and add a related copyright. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-17-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: gpio-audio-amp: Add support for gain-labelsHerve Codina1-3/+113
The possible gain values can be described using labels instead of gain values in dB. Those different labels are attached to a gpio values using the gain-labels property. Using the gain-labels description is mutually exclusive with gain-ranges description used to describe the relationship between gpios values and gain values. Handle the gain-labels description and the related kcontrol. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-16-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: gpio-audio-amp: Add support for gain-rangesHerve Codina1-5/+312
The mapping between physical gain values and gpio values can be expressed using ranges described in the gain-ranges property. This gain-ranges property is an array of ranges. Each range in the array is defined by the first point and last point in the range. Those points are a pair of values, the gpios value and the related gain (dB) value. With that, a given range defines N possible items (from the first point gpios value to the last point gpios value) in order to set a gain from the first point gain value to the last point gain value. Handle this description and the related kcontrol. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-15-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: gpio-audio-amp: Add support for basic gainHerve Codina1-0/+125
Several gpios can be used to control the amplifier gain. Add basic support for those gpios. This basic support doesn't include any mapping between the GPIOs value and the physical gain value (dB). The support for this kind of mapping will be added later on. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-14-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: gpio-audio-amp: Add support for bypass gpioHerve Codina1-2/+19
A gpio can be used to control the amplifier bypass feature. Add support for this bypass gpio in the same way as it has been done for the mute gpio. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-13-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: gpio-audio-amp: Add support for mute gpioHerve Codina1-2/+125
A gpio can be used to control the amplifier mute feature. Add support for this mute gpio. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-12-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: gpio-audio-amp: Add support for extra power suppliesHerve Codina1-3/+82
The gpio-audio-amp devices can use additional power supplies: - vddio, - vdda1, - vdda2 Add support for those additional power supplies. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-11-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: Introduce support for gpio-audio-ampHerve Codina1-0/+54
Improve the simple-amplifier introducing preliminary support for gpio-audio-amp. Those amplifiers are amplifiers driven by gpios. This support introduction doesn't handle any GPIO yet but introduces the compatible strings and the related DAPM table. Two gpio-audio-amp are available: A mono and a stereo version. The mono version has only one audio channel and gpio settings impact features such as the gain or mute of this sole channel. The stereo version has two channels (left and right). Gpio settings impact both channels in the same manner and at the same time. For instance, the gain setting set the gain of both channels as well as the mute setting mutes both channels. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-10-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: Remove DAPM widgets and routes from the ASoC ↵Herve Codina1-6/+53
component driver The simple-amplifier set the DAPM wigets and routes table in the ASoC component driver. This is perfectly fine when the component has well known DAPM tables. The simple-amplifier is going to handle several kind of components based on the driver compatible string. The DAPM table will not be the same for all components supported by the driver. In order to have different DAPM table based on matching compatible strings, move those tables from the ASoC component driver to the device compatible string matching data. Add those DAPM widgets and routes dynamically during the ASoC component probe operation. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-9-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: Use 'simple_amp' variable name instead of 'priv'Herve Codina1-10/+10
The simple-amplifier driver use 'priv' as variable name for its private data (struct simple_amp). With the support for gpio-audio-amp, more functions and data structures will be added. Those future additions will add more complexity in data manipulation and will make the 'priv' term error prone. In order to clearly identify the struct simple_amp private data, use 'simple_amp' as variable name when this structure is involved. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-8-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: Rename drv_event() functionHerve Codina1-3/+3
The drv_event() is used to handle power events related to the DRV item. Later, with the support for gpio-audio-amp, this function will be also used to handle power events related to the PGA item. Also, more functions will be added in the driver and it is a common usage to prefix functions based on the driver name. Rename the drv_event() function to simple_amp_power_event() to follow common usage and get rid of the 'drv' term. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-7-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: Remove CONFIG_OF flag and of_match_ptr()Herve Codina1-3/+1
The simple-amplifier Use CONFIG_OF flag for its of_device_id table and of_match_ptr() when it assigns the table in the driver declaration. This is no more needed. Drop them. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-6-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: Add missing headersHerve Codina1-0/+2
The simple-amplifier driver is a platform device driver. Add missing include files related to this kind of driver. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-5-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: simple-amplifier: Remove DRV_NAME defined valueHerve Codina1-3/+1
DRV_NAME is defined and used only in the simple-amplifier driver declaration. Remove the useless defined and use directly the value in the driver declaration itself. Signed-off-by: Herve Codina <herve.codina@bootlin.com> Link: https://patch.msgid.link/20260513081702.317117-4-herve.codina@bootlin.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: fsl_sai: Eliminate possible interrupt storm during probeShengjiu Wang1-7/+36
When the SAI peripheral is left in a running state by the bootloader, the driver can experience an interrupt storm during probe that prevents successful initialization. This occurs because the current code registers the IRQ handler before resetting the hardware to a known state. The issue manifests as: - Continuous interrupts firing immediately after devm_request_irq() - Driver probe failure or system hang - Error messages about unhandled interrupts This is particularly problematic on systems where U-Boot or other bootloaders enable SAI for boot-time audio feedback or diagnostics and don't properly disable it before handing control to Linux. Fix this by reordering the probe sequence: 1. Add fsl_sai_reset_hw() to clear TCSR/RCSR control registers, which disables the transmitter/receiver and all interrupt sources 2. Move devm_request_irq() to after hardware initialization This ensures the SAI is in a clean reset state before the interrupt handler can be invoked, preventing the storm while maintaining proper error handling and cleanup paths. Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Link: https://patch.msgid.link/20260512065252.75859-1-shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org>
13 daysASoC: mediatek: mt8196: Fix probe resource cleanupCássio Gabriel1-14/+30
The MT8196 AFE probe assigns reserved memory with of_reserved_mem_device_init(), but never releases it. This leaks the reserved memory assignment on driver removal and on later probe failures. The same probe path also uses unchecked pm_runtime_get_sync() calls. A failure while resuming the device can leave the runtime PM usage count in an unexpected state. The regmap error path returns directly while the device is still runtime active, and the remove path drops a runtime PM reference even though successful probe has already released its temporary reference. Register a devm cleanup action for the reserved memory assignment, use pm_runtime_resume_and_get(), and only drop runtime PM references on paths where they are actually held. Fixes: 57513aabfe5b ("ASoC: mediatek: mt8196: add platform driver") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260517-asoc-mt8196-probe-cleanup-v1-1-a5d26949d7fe@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
14 daysALSA: ctxfi: Keep line/mic notification controls per mixerCássio Gabriel2-10/+10
ctxfi stores the Line Capture Switch and Mic Capture Switch controls in a file-scope kctls[] array so do_line_mic_switch() can notify the opposite control when the shared line/mic input selection changes. That storage is shared by all ctxfi cards. If more than one X-Fi card is present, a later card can overwrite the pointers saved by an earlier one. A control update on one card can then use another card's kcontrol object for snd_ctl_notify(). If that other card is removed, the saved pointer can also become stale. Store those notification targets in struct ct_mixer instead. The mixer is per-card state and matches the lifetime of the controls created for that card. Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260517-alsa-ctxfi-mixer-kctls-v1-1-6e4f81f6b658@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
14 daysALSA: hda/realtek: Add quirk for HP Z66 G6 14 laptopMinxi Hou1-0/+1
The HP Z66 G6 14 inch laptop uses the ALC236 codec with subsystem ID 0x103c:8df7. Without a quirk entry, the PCI SSID falls back to the generic 0x103c:0000 fixup, which does not configure the mute/micmute LED GPIOs correctly. Add the SND_PCI_QUIRK entry for this model using ALC236_FIXUP_HP_GPIO_LED, matching the surrounding HP EliteBook G12 entries (0x8dec-0x8dfe) which share the same ALC236 codec and GPIO LED layout. Signed-off-by: Minxi Hou <houminxi@gmail.com> Link: https://patch.msgid.link/20260518031542.2899188-1-houminxi@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-17ALSA: pcm: Don't setup bogus iov_iter for silencingTakashi Iwai1-0/+3
At transition to the iov_iter for PCM data transfer, we blindly applied the iov_iter setup also for silencing (i.e. data = NULL), and it leads to a calculation of bogus iov_iter. Fortunately this didn't cause troubles on most of architectures but it goes wrong on RISC-V now, causing a NULL dereference. Handle the NULL data case to treat the silencing in interleaved_copy() for addressing the bug above. noninterleaved_copy() has already the NULL data handling, so it doesn't need changes. Reported-by: Jiakai Xu <xujiakai24@mails.ucas.ac.cn> Closes: https://lore.kernel.org/20260515051516.3103036-1-xujiakai24@mails.ucas.ac.cn Fixes: cf393babb37a ("ALSA: pcm: Add copy ops with iov_iter") Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20260517165121.31399-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-17ALSA: hda/realtek: Add mute LED quirk for HP Pavilion Plus 14Aryan Kushwaha1-0/+1
The HP Pavilion Plus 14-eh0xxx with subsystem ID 103c:8a36 needs the ALC245 COEF bit mute LED quirk for the mute LED to follow the audio mute state. Add the missing quirk entry. Signed-off-by: Aryan Kushwaha <aryankushwaha3101@gmail.com> Link: https://patch.msgid.link/20260516144436.35022-1-aryankushwaha3101@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-16ALSA: pcm_drm_eld: rate-limit ELD parsing errorsFrancesco Saverio Pavone1-2/+2
Mirror of Mark Brown's ASoC: hdac_hdmi rate-limit patch (commit [lkml.kernel.org/lkml/2025/6/13/1380]) for the generic snd_parse_eld() helper used by ASoC hdmi-codec. When a HDMI sink is disconnected (e.g. a board with two HDMI outputs and only one cable), userspace audio servers like PipeWire keep probing the disconnected card and trigger: HDMI: Unknown ELD version 0 at every probe — easily 30+ messages per burst on rk3588. The same applies to malformed ELD (MNL out of range). Both conditions are expected when no sink is attached; rate-limit the dev_info() so the kernel ring buffer does not fill up. Signed-off-by: Francesco Saverio Pavone <pavone.lawyer@gmail.com> Link: https://patch.msgid.link/20260516141244.21801-1-pavone.lawyer@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-16ALSA: hda: Avoid quirk matching with zero PCI SSIDTakashi Iwai1-2/+2
Heiko reported that BIOS on some recent machines doesn't set up PCI SSID properly but leave with zero (e.g. on HP Dragonfly Folio 13.5 inch G3 with SSID 103c:8a05/8a06), which confuses the quirk table matching and results in the non-functional state. Fix it by skipping the PCI SSID matching when either vendor or device ID is zero and falling back to the codec SSID that is supposed to be more stable for those cases. Reported-by: Heiko Schmid <heiko@future-machines.org> Tested-by: Heiko Schmid <heiko@future-machines.org> Closes: https://lore.kernel.org/20260514133110.12302-1-heiko@future-machines.org Link: https://patch.msgid.link/20260515105700.276420-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-16ALSA: hda/realtek: Add quirk for HP 250 G10 (103c:8b34)Sergio Boglione1-0/+1
HP 250 15.6 inch G10 Notebook PC uses the same ALC236 codec as the HP 255 15.6 inch G10 (103c:8b2f) and requires the same fixup to enable the internal speaker EAPD and microphone routing. Signed-off-by: Sergio Boglione <sboglione@gmail.com> Link: https://patch.msgid.link/20260516131651.143109-1-sboglione@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-16ALSA: hda/realtek: Use ALC287_FIXUP_TXNW2781_I2C for ASUS Strix Gxx5Eric Naim1-6/+6
These devices were incorrectly using the ALC287_FIXUP_TAS2781_I2C quirk leading to errors: [ 18.765990] Serial bus multi instantiate pseudo device driver TXNW2781:00: error -ENXIO: IRQ index 0 not found [ 18.768153] Serial bus multi instantiate pseudo device driver TXNW2781:00: error -ENXIO: IRQ index 0 not found [ 18.768476] Serial bus multi instantiate pseudo device driver TXNW2781:00: error -ENXIO: IRQ index 0 not found [ 18.768899] Serial bus multi instantiate pseudo device driver TXNW2781:00: Instantiated 3 I2C devices. Use the ALC287_FIXUP_TXNW2781_I2C quirk instead to fix this and restore speaker audio on affected devices. Fixes: 1e9c708dc3ae ("ALSA: hda/tas2781: Add new quirk for Lenovo, ASUS, Dell projects") Link: https://lore.kernel.org/59fd4aa4-76b9-4984-8db9-a60e55ec6e80@losource.net/ Closes: https://lore.kernel.org/CACB9z7kjs8rhLstEc8fV29BCTb5dd881JwGozoKdO5cwCb=YwQ@mail.gmail.com Signed-off-by: Eric Naim <dnaim@cachyos.org> Link: https://patch.msgid.link/20260516111532.111463-1-dnaim@cachyos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-16ALSA: virtio: Add missing 384 kHz PCM rate mappingCássio Gabriel2-2/+4
The VirtIO sound UAPI defines VIRTIO_SND_PCM_RATE_384000, and ALSA has SNDRV_PCM_RATE_384000. However, virtio-snd's rate conversion tables stop at 192 kHz. A device advertising only 384 kHz is rejected as having no supported PCM frame rates. A device advertising 384 kHz together with lower rates does not expose 384 kHz through the ALSA hardware constraints. The selected ALSA rate also needs a reverse mapping for SET_PARAMS. Add the missing 384 kHz entries to both conversion tables. Fixes: 29b96bf50ba9 ("ALSA: virtio: build PCM devices and substream hardware descriptors") Fixes: da76e9f3e43a ("ALSA: virtio: PCM substream operators") Cc: stable@vger.kernel.org Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260515-alsa-virtio-384k-rate-v1-1-35ecb5df835c@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-16ALSA: asihpi: Fix potential OOB array access at reading cacheTakashi Iwai1-0/+6
find_control() to retrieve a cached info accesses the array with the given index blindly, which may lead to an OOB array access. Add a sanity check for avoiding it. Link: https://sashiko.dev/#/patchset/20260511230121.28606-1-rosenp%40gmail.com Cc: <stable@vger.kernel.org> Link: https://patch.msgid.link/20260515085606.242284-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-16ASoC: sigmadsp: Use flexible array for control cacheRosen Penev1-2/+2
Allocate SigmaDSP controls with kzalloc_flex() for the trailing cache data instead of open-coding the size calculation. Annotate the cache array with its existing byte count so the allocation helper can initialize the counter. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260511230351.28868-1-rosenp@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-16ASoC: pcm6240: Use flexible array for config blocksRosen Penev2-22/+16
Store the per-config block pointer table in the config allocation instead of allocating it separately. This ties the table to the config object lifetime and removes the extra allocation and free path. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260511231313.31929-1-rosenp@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-16ASoC: amd: acp: Add DMI quirk for ASUS Zenbook S16 UM5606GAJasper Smet1-0/+7
The ASUS Zenbook S16 (UM5606GA) with AMD Ryzen AI 9 465 (Strix Point, ACP 7.0) has a BIOS that incorrectly sets the ACPI property 'acp-audio-config-flag' to 0x10 (FLAG_AMD_LEGACY_ONLY_DMIC) for the ACP device. This prevents snd_pci_ps from probing the SoundWire bus, resulting in no internal audio (dummy output only). The hardware uses a Cirrus Logic CS42L43 (headphone/jack) and four CS35L56 smart amplifiers (speakers), all on SoundWire link 1. The corresponding machine table entry (acp70_cs42l43_l1u0_cs35l56x4_l1u0123) already exists in amd-acp70-acpi-match.c and correctly describes this topology. Add a DMI quirk to override the flag to 0, consistent with the existing entry for the HN7306EA. Signed-off-by: Jasper Smet <josbeir@gmail.com> Link: https://patch.msgid.link/20260513052137.56703-1-josbeir@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-16ASoC: amd: acp-sdw-legacy: check CPU DAI name before loggingCássio Gabriel1-1/+1
devm_kasprintf() can fail and return NULL. The legacy AMD SoundWire machine driver logs cpus->dai_name before checking the allocation result. Move the debug print after the NULL check, matching the ordering used by the SOF AMD SoundWire path after commit 5726b68473f7 ("ASoC: amd/sdw_utils: avoid NULL deref when devm_kasprintf() fails"). Fixes: 2981d9b0789c ("ASoC: amd: acp: add soundwire machine driver for legacy stack") Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260511-asoc-amd-acp-sdw-legacy-dai-name-null-v1-1-dc6151b6da8a@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-16ASoC: qcom: q6apm-dai: Allocate an extra page for PCM buffersSrinivas Kandagatla1-1/+6
Some Old DSP firmware versions use 32-bit address arithmetic and size for validating the PCM buffer address range. If a buffer is allocated near the top of the 32-bit address space, arithmetic calculations involving the end address can overflow and fail checks. Work around this by increasing the preallocated PCM buffer size by one page. The DSP is still passed the usable buffer size, excluding the extra page, which prevents the firmware from seeing an end address that crosses the 32-bit boundary. This was not hit before because PCM buffer allocation and DSP-side mapping happened at different points, and the size mapped on the DSP was usually nperiods * period_size. Therefore the mapped size was unlikely to match the full preallocated buffer size exactly, although the issue was still possible. With early buffer mapping on the DSP, the full preallocated buffer is mapped during PCM creation, making the failure reproducible at boot. Fixes: 8ea6e25c8536 ("ASoC: qcom: q6apm: Add support for early buffer mapping on DSP") Cc: Stable@vger.kernel.org Reported-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Closes: https://lore.kernel.org/all/7f10abbd-fb78-4c3a-ab90-7ca78239891a@oldschoolsolutions.biz/ Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com> Tested-by: Jens Glathe <jens.glathe@oldschoolsolutions.biz> Link: https://patch.msgid.link/20260514090607.2435484-1-srinivas.kandagatla@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-15ALSA: hda/cs35l41: Fix firmware load work teardownCássio Gabriel2-22/+60
cs35l41_hda creates ALSA controls whose private data points at the cs35l41_hda object. The firmware load control can also queue fw_load_work. Those controls are not removed on component unbind, and device remove only cancels fw_load_work through cs35l41_remove_dsp(). That helper is skipped when halo_initialized is false. With firmware_autostart disabled, a firmware load can be requested before the DSP has been initialized. If the component or device is removed before the queued work runs, the worker can run after teardown and dereference driver state that is no longer valid. Track the created controls and remove them on unbind so no new control callback can reach the driver data or queue more work. Then cancel fw_load_work to drain any request that was already queued. Also cancel the work unconditionally during device remove before runtime PM teardown. Fixes: 47ceabd99a28 ("ALSA: hda: cs35l41: Support Firmware switching and reloading") Fixes: 4c870513fbb0 ("ALSA: hda: cs35l41: Add read-only ALSA control for forced mute") Cc: stable@vger.kernel.org Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Reviewed-by: Stefan Binding <sbinding@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260511-alsa-hda-cs35l41-fw-work-teardown-v1-1-1184e9bc4f25@gmail.com
2026-05-15ASoC: Intel: sof_sdw: append dai type to dai link name unconditionallyBard Liao1-11/+12
The dai_type is used to select function topologies. Since the topology stream name and DAI link name use partial matching, unconditionally appending the dai_type provides necessary selection metadata without breaking existing topologies. Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com> Link: https://patch.msgid.link/20260515083043.1864426-1-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-15ASoC: Merge up fixesMark Brown9-32/+101
Merge up the fixes to help CI.
2026-05-15ALSA: virtio: Validate control metadata from the deviceCássio Gabriel1-0/+50
virtio-snd control handling trusts the device-provided control type and value count returned by the device. That metadata is then used directly to index g_v2a_type_map[] in virtsnd_kctl_info(), and to size loops and memcpy() operations in virtsnd_kctl_get() and virtsnd_kctl_put() against fixed-size virtio_snd_ctl_value and snd_ctl_elem_value arrays. A buggy or malicious device can therefore trigger out-of-bounds access by advertising an invalid control type or an oversized value count. Validate control type and count once in virtsnd_kctl_parse_cfg(), before querying enumerated items or exposing the control to ALSA. Fixes: d6568e3de42d ("ALSA: virtio: add support for audio controls") Cc: stable@vger.kernel.org Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260507-alsa-virtio-validate-kctl-info-v1-1-7404fb12ec37@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: hda/ca0132: Disable auto-detect on manual output selectMatt DeVillier1-13/+31
Commit 778031e1658d ("ALSA: hda/ca0132: Set HP/Speaker auto-detect default from headphone pin verb") enables HP/Speaker auto-detect by default when the headphone pin supports presence detect. With auto-detect enabled, ca0132_select_out() and ca0132_alt_select_out() choose the output from jack presence instead of the manual HP/Speaker selection. This means selecting speaker output while headphones are plugged in updates the control state, but audio still routes to the headphones. Treat an explicit manual output selection as a request to leave auto-detect mode. Clear the HP/Speaker auto-detect switch before applying the manual selection, and notify userspace so the auto-detect control state is updated in mixers. Do this for both the normal HP/Speaker Playback Switch and the alternate Output Select control used by desktop cards. This keeps auto-detect enabled by default for devices with jack presence detection, while preserving the expected behavior that a manual output choice takes effect immediately. Fixes: 778031e1658d ("ALSA: hda/ca0132: Set HP/Speaker auto-detect default from headphone pin verb") Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Link: https://lore.kernel.org/CAFTm+6AfeXKf=b2frG4xC5yC4jjM9TkD6c8+dOWWFw6BDjDESw@mail.gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15Merge branch 'for-linus' into for-nextTakashi Iwai52-492/+572
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: hda/realtek: Add mute LED quirk for HP Pavilion Laptop 16-ag0xxxAdrien Burnett1-0/+1
Add a SND_PCI_QUIRK entry for the HP Pavilion Laptop 16-ag0xxx (subsystem 0x103c:0x8cbc, Realtek ALC245). The ALC245_FIXUP_HP_X360_MUTE_LEDS fixup is already used by the neighbouring HP Pavilion Aero Laptop 13-bg0xxx (0x103c:0x8cbd); it chains the master-mute COEF handler with the GPIO mic-mute LED handler, which is what this machine needs. Tested on the affected hardware: both the mute and mic-mute key LEDs respond correctly to the keyboard hotkeys after this change. Cc: <stable@vger.kernel.org> Signed-off-by: Adrien Burnett <an.arctic.pigeon@gmail.com> Link: https://patch.msgid.link/20260514165905.21175-1-an.arctic.pigeon@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: hda/realtek: ALC269 fixup for Lenovo Yoga Pro 7 15ASH111 audioJackie Dong1-0/+1
Volume control for the speakers on the Lenovo Yoga Pro 7 15ASH11 laptop doesn't work. The DAC routing is the same as on the ThinkPad X1 Gen7 function, so reuse the alc285_fixup_thinkpad_x1_gen7 to get it working. Signed-off-by: Jackie Dong <xy-jackie@139.com> Link: https://patch.msgid.link/20260514153940.7320-1-xy-jackie@139.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: hda: Fix NULL pointer dereference in snd_hda_ctl_add()Quan Sun1-0/+3
snd_hda_ctl_add() dereferences kctl->id.subdevice without checking whether kctl is NULL. Multiple callers in sound/hda/codecs/ca0132.c pass the return value of snd_ctl_new1() directly to snd_hda_ctl_add() without a NULL check: return snd_hda_ctl_add(codec, nid, snd_ctl_new1(&knew, codec)); snd_ctl_new1() returns NULL when the underlying snd_ctl_new() fails on memory allocation (kzalloc_flex),which can occur under memory pressure or via fault injection. Add a NULL check at the entry of snd_hda_ctl_add(), matching the pattern already used by snd_ctl_add_replace() at the same call path (sound/core/control.c:515). Return -EINVAL to let callers handle the error gracefully. Fixes: 44f0c9782cc6 ("ALSA: hda/ca0132: Add tuning controls") Signed-off-by: Quan Sun <2022090917019@std.uestc.edu.cn> Link: https://patch.msgid.link/20260514132245.3062884-1-2022090917019@std.uestc.edu.cn Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: hda/realtek: Add quirk for Samsung Galaxy Book5 360 headphoneMarkus Kramer1-0/+1
The Samsung Galaxy Book5 360 (NP750QHA, PCI subsystem ID 0x144d:0xc902) has severe audio distortion on the 3.5mm headphone jack. Applying ALC256_FIXUP_SAMSUNG_HEADPHONE_VERY_QUIET corrects the output path configuration, consistent with fixes already applied to other Samsung Galaxy Book models using the same ALC256 codec. Cc: stable@vger.kernel.org Link: https://github.com/thesofproject/linux/issues/5648 Signed-off-by: Markus Kramer <linux@markus-kramer.de> Link: https://patch.msgid.link/20260513222818.14351-1-linux@markus-kramer.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: hda/cs35l56: Drop malformed default N from KconfigAndy Shevchenko1-1/+0
First of all, it has to be 'default n' (small letter n), otherwise it looks for CONFIG_N which is absent and in case of appearance will enable something unrelated. Second and most important is that 'n' *is* the default 'default' already. Hence just drop malformed line. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Richard Fitzgerald <rf@opensource.cirrus.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20260513162758.365972-1-andriy.shevchenko@linux.intel.com
2026-05-15ALSA: hda/realtek: fix mic boost on Framework PTLDaniel Schaefer1-1/+9
In addition to the mic jack fix, also need to avoid boosting the internal mic too much, otherwise >50% input volume clips a lot. Also add a second SSID. We have one for the classic chassis/speaker and one for the new Pro chassis/speaker. To: Jaroslav Kysela <perex@perex.cz> To: Takashi Iwai <tiwai@suse.com> To: linux-sound@vger.kernel.org Cc: Dustin L. Howett <dustin@howett.net> Cc: linux@frame.work Signed-off-by: Daniel Schaefer <dhs@frame.work> Link: https://patch.msgid.link/20260513155513.11683-1-dhs@frame.work Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: asihpi: Use flexible array for control cacheRosen Penev2-14/+6
Store the ASIHPI control-cache lookup table in the control-cache allocation instead of allocating it separately. This keeps the lookup table tied to the cache object lifetime and removes the extra allocation and free path. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260511230121.28606-1-rosenp@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: ctxfi: Use flexible array for SRCIMP imappersRosen Penev2-15/+2
Store the SRCIMP imapper entries in the SRCIMP resource allocation instead of allocating a separate array. This keeps the mapper table tied to the SRCIMP lifetime and removes the extra allocation and cleanup paths. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260511230026.28488-1-rosenp@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: M-Audio C600 disable Output Gain KnobSimon Wood1-2/+44
The C400/C600 interfaces have a large output gain knob which attenuates the outputs as stereo pairs (1/2, 3/4 and 5/6). The Windows driver/app provides a control to disable this knob/behaviour on any/all outputs, forcing maximum gain on each. The 'disable behaviour' is desirable if any outputs are being used for aux/effects sends, or if interface is being used as a live/matrix mixer. This patch adds a control to select which output pairs are affected by the Output Gain Knob. Default behaviour is to select all outputs. Tested on the C600, likely also works for the C400. Signed-off-by: Simon Wood <simon@mungewell.org> Link: https://patch.msgid.link/20260511212458.44142-1-simon@mungewell.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: hda/realtek: Limit mic boost on Positivo DN50EEdson Juliano Drosdeck1-0/+1
The internal mic boost on the Positivo DN50E is too high. Fix this by applying the ALC269_FIXUP_LIMIT_INT_MIC_BOOST fixup to the machine to limit the gain. Signed-off-by: Edson Juliano Drosdeck <edson.drosdeck@gmail.com> Link: https://patch.msgid.link/20260511181558.670563-1-edson.drosdeck@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: seq: Use flexible array for MIDI channelsRosen Penev2-35/+14
Store MIDI channel entries in the MIDI channel set allocation instead of allocating them separately. This ties the channel array lifetime directly to the channel set, removes a separate allocation failure path, and lets __counted_by() describe the array bounds. Move the embedded emux channel set to the end of its containing structure so it can carry the flexible array. Assisted-by: Codex:GPT-5.5 Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://patch.msgid.link/20260511075447.445350-1-rosenp@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: usb-audio: qcom: Check offload mapping failuresCássio Gabriel1-6/+25
uaudio_transfer_buffer_setup() calls dma_get_sgtable() and then passes the sg_table to uaudio_iommu_map_xfer_buf() without checking whether sg table construction succeeded. If dma_get_sgtable() fails, the sg_table contents are not valid. uaudio_iommu_map_pa() also ignores iommu_map() failures for the event and transfer rings and still returns the allocated IOVA to the QMI response. That can expose an unmapped IOVA to the audio DSP. For transfer rings, the failed mapping also leaves the IOVA allocator state marked in use. Check both operations. Free the coherent transfer buffer when sg table construction fails, free the sg table when transfer-buffer IOMMU mapping fails, and release the transfer-ring IOVA if iommu_map() fails. Also return the existing event-ring IOVA when the event ring is already mapped, matching the pre-split helper behavior. Fixes: 326bbc348298 ("ALSA: usb-audio: qcom: Introduce QC USB SND offloading support") Fixes: 44499ecb4f28 ("ALSA: usb: qcom: Fix false-positive address space check") Cc: stable@vger.kernel.org Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com> Link: https://patch.msgid.link/20260511-alsa-usb-qcom-offload-map-errors-v1-1-6502695e58bc@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: hda/realtek: Add micmute quirk to Acer Nitro AN515-58Dirga Yuza1-1/+20
The Acer Nitro AN515-58 uses GPIO 4 in active-low configuration to control the mic-mute LED. This patch adds a fixup to register the LED classdev and associate it with the mic-mute trigger, while chaining to the existing headset mic fixup. Signed-off-by: Dirga Yuza <dirgayuza123@gmail.com> Link: https://patch.msgid.link/20260510055951.9035-1-dirgayuza123@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: hda/realtek: Fix Legion 7 16ITHG6 speaker amp bindingNicholas Bonello1-2/+3
The Lenovo Legion 7 16ITHG6 uses codec SSID 17aa:3855, but its PCI SSID is 17aa:3811. The latter is now also used by the Legion S7 15IMH05 quirk, which is matched before codec SSID fallback and incorrectly routes Legion 7 16ITHG6 machines to ALC287_FIXUP_LEGION_15IMHG05_SPEAKERS. That fixup does not bind the CLSA0101 CS35L41 companion amplifiers, making the built-in speakers silent even though playback appears to be active. Add a codec SSID quirk for 17aa:3855 before the conflicting PCI SSID quirk so that the Legion 7 16ITHG6 uses ALC287_FIXUP_LEGION_16ITHG6. This restores CS35L41 firmware loading and binds both speaker amplifiers. Fixes: 67f4c61a73e9 ("ALSA: hda/realtek: Add quirk for Legion S7 15IMH") Cc: stable@vger.kernel.org Tested-by: Nicholas Bonello <hadobedo@gmail.com> Assisted-by: Codex:GPT-5 Signed-off-by: Nicholas Bonello <hadobedo@gmail.com> Link: https://patch.msgid.link/20260508225507.47667-1-hadobedo@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ALSA: usb-audio: Add iface reset and delay quirk for TTGK Technology USB-C AudioLianqin Hu1-0/+2
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=3302, idProduct=17c2 usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1: Product: USB-C Audio usb 1-1: Manufacturer: TTGK Technology usb 1-1: SerialNumber: 170120210706 Signed-off-by: Lianqin Hu <hulianqin@vivo.com> Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/TYUPR06MB621720E4E8F99A42E162FD51D23D2@TYUPR06MB6217.apcprd06.prod.outlook.com
2026-05-15ALSA: scarlett2: Add missing error check when initialise Autogain StatusRobertus Diawan Chris1-0/+2
When initialise new control with scarlett2_add_new_ctl() function for Autogain Status, scarlett2_add_new_ctl() might throw an error. So, add error check after initialise new control for Autogain Status. This is reported by Coverity Scan with CID 1598781 as UNUSED_VALUE. Fixes: 0a995e38dc44 ("ALSA: scarlett2: Add support for software-controllable input gain") Signed-off-by: Robertus Diawan Chris <robertusdchris@gmail.com> Link: https://patch.msgid.link/20260508033914.111596-1-robertusdchris@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-05-15ASoC: Intel: sof_sdw: add es9356 supportZhang Yi1-0/+1
add Everest-semi ES9356 support Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20260514075206.3483-6-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-15ASoC: Intel: soc-acpi: arl: Add es9356 supportZhang Yi1-0/+52
Add support for the es9356 codec in the ARL board configuration. Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev> Link: https://patch.msgid.link/20260514075206.3483-5-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-15ASoC: es9356-sdca: Add ES9356 SDCA driverZhang Yi4-0/+1368
This is the codec driver for es9356-sdca. Signed-off-by: Zhang Yi <zhangyi@everest-semi.com> Link: https://patch.msgid.link/20260514075206.3483-4-zhangyi@everest-semi.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-15ASoC: codecs: fs210x: fix possible buffer overflowAlexander A. Klimov1-1/+1
In fs210x_effect_scene_info(), a string was copied like this: strscpy(DST, SRC, strlen(SRC) + 1); A buffer overflow would happen if strlen(SRC) >= sizeof(DST). Actually, strscpy() must be used this way: strscpy(DST, SRC, sizeof(DST)); strscpy(DST, SRC); // defaults to sizeof(DST) Fixes: 756117701779 ("ASoC: codecs: Add FourSemi FS2104/5S audio amplifier driver") Signed-off-by: Alexander A. Klimov <grandmaster@al2klimov.de> Link: https://patch.msgid.link/20260513190852.196723-2-grandmaster@al2klimov.de Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-15ASoC: cs35l56: Log SoundWire status updates only on changesSimon Trimmer1-2/+3
The SoundWire slave update_status() callback can be invoked when the status has not changed. To prevent large amounts of log noise with debug enabled, log them only when the status changes. This also helps with understanding them, because they now log an actual change in state. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://patch.msgid.link/20260514151854.695145-1-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-15ASoC: ti: omap-dmic: Fix IS_ERR() vs NULL check bug in omap_dmic_select_fclk()Ingyu Jang1-1/+1
clk_get_parent() returns NULL when the clock has no parent (or when the input clk is NULL); it never returns an ERR_PTR. The current IS_ERR(mux) check therefore never triggers - a NULL return falls through silently to clk_set_parent(NULL, parent_clk), which simply fails with -EINVAL. Use a NULL check so the dedicated error path runs and the prior clk_get() reference is released via clk_put(). Signed-off-by: Ingyu Jang <ingyujang25@korea.ac.kr> Acked-by: Sen Wang <sen@ti.com> Link: https://patch.msgid.link/20260514185215.3753998-1-ingyujang25@korea.ac.kr Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-15ASoC: ti: omap-mcbsp: Remove mixed goto/scoped cleanup handlingbui duc phuc1-24/+22
After converting to guard()/scoped_guard() helpers, omap_mcbsp_request() still mixes scoped cleanup with goto based error handling. Remove the remaining goto based cleanup paths for a more consistent cleanup flow. Suggested-by: Mark Brown <broonie@kernel.org> Signed-off-by: bui duc phuc <phucduc.bui@gmail.com> Acked-by: Sen Wang <sen@ti.com> Link: https://patch.msgid.link/20260514110602.30480-1-phucduc.bui@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-15ASoC: cs35l56: Drop malformed default N from KconfigAndy Shevchenko1-3/+0
First of all, it has to be 'default n' (small letter n), otherwise it looks for CONFIG_N which is absent and in case of appearance will enable something unrelated. Second and most important is that 'n' *is* the default 'default' already. Hence just drop malformed line. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260513162612.365729-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-05-15ASoC: tac5xx2-sdw: Use new SoundWire enumeration helperCharles Keepax1-13/+3
Update the driver to use the new core helper that waits for the device to enumerate on SoundWire and be initialised by the SoundWire core. Suggested-by: Niranjan H Y <niranjan.hy@ti.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Tested-by: Niranjan H Y <niranjan.hy@ti.com> Link: https://patch.msgid.link/20260514083358.2559733-1-ckeepax@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>