[alsa-devel] HCTL element callback

Camilo Polymeris cpolymeris at gmail.com
Thu Sep 2 23:48:29 CEST 2010


Hello.
I am writing this mixer app:
http://emutrix.googlecode.com

I have trouble with callbacks. So far I have implemented callbacks for
the master volume fader and clock rate selection (integer and enum,
resp.)
But "pad" callbacks (boolean) won't work. In fact, I have noticed that
alsamixer 1.0.22 also doesn't react to pad changes from the application.
But the driver reacts to both as expected, so we're dealing with the
same element.

I set callbacks with this:
snd_hctl_elem_set_callback(el, cb);

And periodically poll them with:
    if (snd_hctl_wait(hctl, 10))
        snd_hctl_handle_events(hctl);

As I said, integers and enums I have tried so far, work.

Thanks for any help,
Camilo



More information about the Alsa-devel mailing list