kernel_samsung_a53x/sound/usb
Takashi Iwai cb27493df1 ALSA: us122l: Use snd_card_free_when_closed() at disconnection
[ Upstream commit b7df09bb348016943f56b09dcaafe221e3f73947 ]

The USB disconnect callback is supposed to be short and not too-long
waiting.  OTOH, the current code uses snd_card_free() at
disconnection, but this waits for the close of all used fds, hence it
can take long.  It eventually blocks the upper layer USB ioctls, which
may trigger a soft lockup.

An easy workaround is to replace snd_card_free() with
snd_card_free_when_closed().  This variant returns immediately while
the release of resources is done asynchronously by the card device
release at the last close.

The loop of us122l->mmap_count check is dropped as well.  The check is
useless for the asynchronous operation with *_when_closed().

Fixes: 030a07e44129 ("ALSA: Add USB US122L driver")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20241113111042.15058-3-tiwai@suse.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-17 13:24:07 +01:00
..
6fire Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
bcd2000 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
caiaq Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hiface Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
line6 Revert "ALSA: line6: add hw monitor volume control to POD HD500X" 2024-11-24 00:23:04 +01:00
misc Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usx2y ALSA: us122l: Use snd_card_free_when_closed() at disconnection 2024-12-17 13:24:07 +01:00
card.c Revert "ALSA: usb-audio: Add logitech Audio profile quirk" 2024-11-24 00:23:07 +01:00
card.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clock.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
clock.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
endpoint.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
endpoint.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_usb_audio.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
exynos_usb_audio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
format.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
format.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
helper.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
helper.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
media.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
media.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
midi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
midi.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer_maps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer_quirks.c ALSA: usb-audio: Add endianness annotations 2024-11-30 02:33:27 +01:00
mixer_quirks.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer_s1810c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer_s1810c.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer_scarlett.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer_scarlett.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer_scarlett_gen2.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer_scarlett_gen2.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer_us16x08.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mixer_us16x08.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pcm.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
power.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
proc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
quirks-table.h ALSA: usb-audio: Fix Yamaha P-125 Quirk Entry 2024-12-17 13:23:58 +01:00
quirks.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
quirks.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stream.c ALSA: usb-audio: Correct surround channels in UAC1 channel map 2024-11-23 23:20:21 +01:00
stream.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usbaudio.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
validate.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00