linux/sound/pci/ctxfi
Cássio Gabriel 456ad3cdaf ALSA: ctxfi: Keep line/mic notification controls per mixer
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>
2026-05-18 15:43:17 +02:00
..
ct20k1reg.h
ct20k2reg.h
ctamixer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ctamixer.h ALSA: ctxfi: avoid casting function pointers 2024-02-13 14:21:50 +01:00
ctatc.c ALSA: ctxfi: Add fallback to default RSR for S/PDIF 2026-04-06 10:46:13 +02:00
ctatc.h ALSA: ctxfi: Add support for dedicated RCA switching 2025-11-25 08:02:16 +01:00
ctdaio.c ALSA: ctxfi: Use correct DAIO type for da_desc 2026-04-01 14:43:54 +02:00
ctdaio.h ALSA: ctxfi: Rename SPDIFI1 to SPDIFI_BAY 2026-04-01 14:43:54 +02:00
cthardware.c
cthardware.h ALSA: ctxfi: Add support for Onkyo SE-300PCIE (OK0010) 2025-11-25 08:02:16 +01:00
cthw20k1.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cthw20k1.h
cthw20k2.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cthw20k2.h
ctimap.c
ctimap.h
ctmixer.c ALSA: ctxfi: Keep line/mic notification controls per mixer 2026-05-18 15:43:17 +02:00
ctmixer.h ALSA: ctxfi: Keep line/mic notification controls per mixer 2026-05-18 15:43:17 +02:00
ctpcm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ctpcm.h
ctresource.c ALSA: ctxfi: Fix out-of-range access 2021-11-18 22:57:55 +01:00
ctresource.h ALSA: ctxfi: Fix out-of-range access 2021-11-18 22:57:55 +01:00
ctsrc.c ALSA: ctxfi: Use flexible array for SRCIMP imappers 2026-05-15 08:56:18 +02:00
ctsrc.h ALSA: ctxfi: Use flexible array for SRCIMP imappers 2026-05-15 08:56:18 +02:00
cttimer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
cttimer.h
ctvmem.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ctvmem.h ALSA: ctxfi: Limit PTP to a single page 2026-04-06 10:44:47 +02:00
Makefile ALSA: pci: Use *-y instead of *-objs in Makefile 2024-05-08 18:17:37 +02:00
xfi.c ALSA: ctxfi: Replace deprecated strcpy() with strscpy() 2025-06-09 09:53:30 +02:00