[LAD] Alsa: poll mixer events, always returns true in subsequent calls

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-dev@...>
Date: Monday, January 28, 2013 - 10:22 pm


I'm trying to poll mixer events in Alsa using C. I've used the following
functions within an infinite while loop:

if (snd_hctl_wait(hctl,-1))

###### and

snd_hctl_poll_descriptors(hctl, poll_fds, 1);
err = poll (poll_fds, 1, -1);
if (poll_fds[0].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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Alsa: poll mixer events, always returns true in subseq..., Muffinman, (Mon Jan 28, 10:22 pm)