[alsa-devel] Possible bug in snd_mixer_selem_set_playback_switch_all

Tim Burrell tim.burrell at gmail.com
Mon Apr 30 19:19:30 CEST 2007


Hi there,

I've encountered a situation where if I very quickly, and repeatedly
make calls to snd_mixer_selem_set_playback_switch_all I get some strange
undefined behavior.

The situation is I'm looping over all mixer elements (on all sound
cards) to do a system wide mute / unmute.  If I make numerous calls to
this function it ends up that some mixers only toggle switches on
specific channels (right or left), and sometimes the volume on certain
(random) channels gets set to some also random (usually 0, but can be
anywhere between 0 and max) level.

I've been able to remedy the situation by inserting a 10ms delay in
between calls to snd_mixer_selem_set_playback_switch_all.  Clearly
though this is undesirable.

I don't have more than one sound card to test on so I can't be sure if
it's a problem with all drivers or just mine (hda-intel).

I can certainly provide more information if requested, just let me know
what I can do.  Or if I'm doing something wrong I'd love to be made
aware of something I can do to fix this behavior.

Thanks,

Tim.


More information about the Alsa-devel mailing list