Re: [PATCH 3/3] ALSA: emu10k1: (re-)add mixer locking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 13, 2023 at 10:33:26AM +0200, Takashi Iwai wrote:
We may optimize out the whole locking conditionally for the known-good drivers,

well, that would work, though obviously someone would still have to check the drivers and set the flag. also, this kind of technically unnecessary fragmentation doesn't really help.

instead of relying on a (hackish) big iron lock that wasn't considered to be used originally at all.

i think you're focusing on the wrong thing here.
the fact that the lock was originally meant to do something else is meaningless. you could just as well create a dedicated lock specifically for that task - the important thing is that the core would provide a guarantee to the drivers that mixer callbacks are locked, just like it does for some pcm callbacks unless the driver opts out. given that mixer operations are rare in the big picture, fine-grained locking in the drivers is unnecessary (except where not mixer-only data is accessed). given the amount of code this saves, this seems like a rather worthwhile trade-off with the formal cleanness of drivers having self-contained locking.

regards



[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux