linux/sound/synth
Takashi Iwai 8a5d87c2ba ALSA: emux: Stop voices before freeing zones in all cases
The emux voice caches the soundfont zone pointer in vp->zone, which
is referred to later, e.g. in snd_emux_send_effect().  For avoiding
dangling pointers, the soundfont code calls the sample_reset callback
to stop all voices before freeing zones.  However, in a few cases
(e.g. emu10k1's missing sample_reset or the call path via
remove_info()), the sample reset isn't called properly, leaving the
playing voices.

Fix it by always registering the sample_reset callback, falling back
to snd_emux_terminate_all() when the driver has no own ops, and by
calling sample_reset in remove_info() before freeing the zones.

Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20261020101624.205638-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-10-20 12:58:39 +02:00
..
emux ALSA: emux: Stop voices before freeing zones in all cases 2026-10-20 12:58:39 +02:00
Kconfig
Makefile ALSA: misc: Use *-y instead of *-objs in Makefile 2024-05-08 18:18:13 +02:00
util_mem.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00