Re: [PATCH] ALSA: timer: keep a list of open masters for slave lookup

From: Takashi Iwai

Date: Tue Mar 17 2026 - 04:20:42 EST


On Mon, 16 Mar 2026 14:39:38 +0100,
Cássio Gabriel wrote:
>
> 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@xxxxxxxxx>

Thanks, applied to for-next branch now.


Takashi