]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: timer: keep a list of open masters for slave lookup
authorCássio Gabriel <cassiogabrielcontato@gmail.com>
Mon, 16 Mar 2026 13:39:38 +0000 (10:39 -0300)
committerTakashi Iwai <tiwai@suse.de>
Tue, 17 Mar 2026 08:16:24 +0000 (09:16 +0100)
commit785639b5bf2a87eaf0cda14baaa068b3728c7be2
tree6608f20cdb8a3e190865f1109a8aa3c37575f72e
parent032322b44c02f5e8a127d1dca6798f91cc72eb1d
ALSA: timer: keep a list of open masters for slave lookup

snd_timer_check_slave() still walks all registered timers and all open
timer instances to find a matching master for a newly opened slave.

Maintain a global list of open master instances that can accept slave
links and use it for the slave lookup path instead. This keeps the
existing matching semantics while avoiding the nested walk over
snd_timer_list and each timer open_list_head.

The reverse path in snd_timer_check_master() already scans only the
pending slave list, so this makes both lookup paths closer in shape
without changing the master/slave linking logic.

Signed-off-by: Cássio Gabriel <cassiogabrielcontato@gmail.com>
Link: https://patch.msgid.link/20260316-alsa-timer-master-list-v1-1-fb95e547110a@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/timer.h
sound/core/timer.c