linux-IllusionX/sound/core
Takashi Iwai b1e055f676 ALSA: control: Introduce unlocked version for snd_ctl_find_*() helpers
For reducing the unnecessary use of controls_rwsem in the drivers,
this patch adds a new variant for snd_ctl_find_*() helpers:
snd_ctl_find_id_locked() and snd_ctl_find_numid_locked() look for a
kctl element inside the card->controls_rwsem -- that is, doing the
very same as what snd_ctl_find_id() and snd_ctl_find_numid() did until
now.  snd_ctl_find_id() and snd_ctl_find_numid() remain same,
i.e. still unlocked version, but they will be switched to locked
version once after all callers are replaced.

The patch also replaces the calls of snd_ctl_find_id() and
snd_ctl_find_numid() in a few places; all of those are places where we
know that the functions are called properly with controls_rwsem held.
All others are without rwsem (although they should have been).

After this patch, we'll turn on the locking in snd_ctl_find_id() and
snd_ctl_find_numid() to be more race-free.

Link: https://lore.kernel.org/r/20230718141304.1032-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2023-07-20 10:03:00 +02:00
..
oss ALSA: control: Introduce unlocked version for snd_ctl_find_*() helpers 2023-07-20 10:03:00 +02:00
seq Merge branch 'topic/midi20' into for-linus 2023-07-05 11:50:56 +02:00
compress_offload.c ALSA: compress: allow setting codec params after next track 2023-06-21 07:28:31 +02:00
control.c ALSA: control: Introduce unlocked version for snd_ctl_find_*() helpers 2023-07-20 10:03:00 +02:00
control_compat.c ALSA: control: Introduce unlocked version for snd_ctl_find_*() helpers 2023-07-20 10:03:00 +02:00
control_led.c ALSA: control: Introduce unlocked version for snd_ctl_find_*() helpers 2023-07-20 10:03:00 +02:00
ctljack.c
device.c
hrtimer.c
hwdep.c
hwdep_compat.c
info.c
info_oss.c
init.c sound: make all 'class' structures const 2023-06-21 07:29:10 +02:00
isadma.c
jack.c ALSA: control: Take controls_rwsem lock in snd_ctl_remove() 2023-07-20 10:01:27 +02:00
Kconfig ALSA: ump: Add legacy raw MIDI support 2023-05-23 12:11:09 +02:00
Makefile ALSA: ump: Add legacy raw MIDI support 2023-05-23 12:11:09 +02:00
memalloc.c ALSA: memalloc: Workaround for Xen PV 2023-01-27 09:16:24 +01:00
memalloc_local.h ALSA: memalloc: remove snd_dma_sg_ops declaration 2022-09-09 09:09:40 +02:00
memory.c
misc.c
pcm.c ALSA: control: Take controls_rwsem lock in snd_ctl_remove() 2023-07-20 10:01:27 +02:00
pcm_compat.c ALSA: pcm: Avoid reference to status->state 2022-09-27 08:44:05 +02:00
pcm_dmaengine.c ALSA: dmaengine: increment buffer pointer atomically 2022-09-27 08:55:05 +02:00
pcm_drm_eld.c ALSA: pcm: fix ELD constraints for (E)AC3, DTS(-HD) and MLP formats 2023-06-25 08:42:53 +02:00
pcm_iec958.c
pcm_lib.c ALSA: pcm: use exit controlled loop in snd_pcm_playback_silence() 2023-05-05 18:23:53 +02:00
pcm_local.h ALSA: pcm: Revert "ALSA: pcm: rewrite snd_pcm_playback_silence()" 2023-05-05 18:23:48 +02:00
pcm_memory.c ALSA: pcm: Fix potential data race at PCM memory allocation helpers 2023-07-03 14:52:27 +02:00
pcm_misc.c
pcm_native.c Revert "ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter)" 2023-05-18 07:29:41 +02:00
pcm_param_trace.h
pcm_timer.c
pcm_trace.h ALSA: pcm: fix tracing reason in hw_ptr_error 2022-11-28 14:55:41 +01:00
rawmidi.c ALSA: ump: Additional proc output 2023-05-23 12:10:59 +02:00
rawmidi_compat.c ALSA: rawmidi: UMP support 2023-05-23 12:10:54 +02:00
seq_device.c
sound.c
sound_oss.c ALSA: oss: Fix potential deadlock at unregistration 2022-10-11 09:02:43 +02:00
timer.c ALSA: timer: minimize open-coded access to hw.resolution 2023-06-13 07:43:38 +02:00
timer_compat.c
ump.c ALSA: ump: Export MIDI1 / UMP conversion helpers 2023-06-23 09:56:11 +02:00
ump_convert.c ALSA: ump: Correct wrong byte size at converting a UMP System message 2023-06-28 11:44:30 +02:00
vmaster.c