I'm trying to poll mixer events in Alsa using C. I've used the following
functions within an infinite while loop:
snd_hctl_poll_descriptors(hctl, poll_fds, 1);
err = poll (poll_fds, 1, -1);
if (poll_fds.revents & POLLIN)
While I can get the first mixer event fine, in all subsequent rounds,
both snd_hctl_wait and poll always return immediately.
With the snd_mixer functions one has to call snd_mixer_handle_events to
clear events. However, calling snd_hctl_handle_events here never returns
and I can't quite figure out why. Nonetheless, I'm not even sure that's
the key to my solution.
Can anyone give me some advice on how to get this working?
Kind regards, Maarten
Linux-audio-dev mailing list