summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCássio Gabriel <cassiogabrielcontato@gmail.com>2026-03-16 16:39:38 +0300
committerTakashi Iwai <tiwai@suse.de>2026-03-17 11:16:24 +0300
commit785639b5bf2a87eaf0cda14baaa068b3728c7be2 (patch)
tree6608f20cdb8a3e190865f1109a8aa3c37575f72e /include
parent032322b44c02f5e8a127d1dca6798f91cc72eb1d (diff)
downloadlinux-785639b5bf2a87eaf0cda14baaa068b3728c7be2.tar.xz
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>
Diffstat (limited to 'include')
-rw-r--r--include/sound/timer.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sound/timer.h b/include/sound/timer.h
index 760e132cc0cd..83bafe70cf33 100644
--- a/include/sound/timer.h
+++ b/include/sound/timer.h
@@ -102,6 +102,7 @@ struct snd_timer_instance {
unsigned int slave_id;
struct list_head open_list;
struct list_head active_list;
+ struct list_head master_list;
struct list_head ack_list;
struct list_head slave_list_head;
struct list_head slave_active_head;