On Tue, Mar 15, 2011 at 03:17:58PM +0100, Clemens Ladisch wrote:
Doing this outside the semaphore doesn't look good.
Yes, I was thinking about the same thing, wasn't sure about nesting rw semaphores though.
I wonder whether snd_ctl_add() is the right function to use, because it will assign a different numid event if the control didn't change.
Hm, indeed. I can probably inline a slightly different version of snd_ctl_add()?
A separate patch needs to be made to make ALSA Mixer cope with this.
What happens?
It doesn't break or anything hopefully. It will probably need support for handling the update of the controls (without exiting and starting it again). I've only tested it against alsa-utils 1.0.20 and it worked fine with a few changes (updating the controls on the fly).
Thanks, Dimitris