Re: [PATCH] ALSA: hda: Serialize virtual-master hook registration
From: Cen Zhang
Date: Tue Oct 13 2026 - 15:22:33 EST
Hi Takashi,
Takashi Iwai <tiwai@xxxxxxx> 于2026年10月13日周二 17:53写道:
>
> It's not nice to use such a low-level guard here in the upper driver.
> So I guess it's better to move the rwsem guard into
> snd_ctl_add_vmaster_hook(). But it'd need to pass the card pointer,
> too.
>
> Alternatively, you can rearrange the assignment in
> snd_ctl_add_vmaster_hook() and put a barrier to assure the
> hook_private_data store, too.
>
>
> thanks,
>
> Takashi
Thank you for the review and suggestion. I have prepared v2 using the first
approach.
Best regards,
Cen Zhang