[alsa-devel] [PATCH 1/2 v2] ALSA: Add snd_ctl_update() to dynamically update a control

Takashi Iwai tiwai at suse.de
Tue Mar 15 15:25:04 CET 2011

At Tue, 15 Mar 2011 15:17:58 +0100,
Clemens Ladisch wrote:
> > +	up_write(&card->controls_rwsem);
> > +	ret = snd_ctl_add(card, kcontrol);
> Doing this outside the semaphore doesn't look good.

Using an internal function without semaphore would be preferred, yes.

> 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, actually the function can compare whether it's really changed or
not.  If any change, it makes really sense to assign a different


More information about the Alsa-devel mailing list