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

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Muffinman <news@...>
Cc: <linux-audio-dev@...>
Date: Tuesday, January 29, 2013 - 8:40 am

Muffinman wrote:

You are supposed to call snd_hctl_poll_descriptors_count() to get the
number of descriptors.

> if (poll_fds[0].revents & POLLIN)

You are supposed to call snd_hctl_poll_descriptors_revents() to get the
events from the descriptors.

> While I can get the first mixer event fine, in all subsequent rounds,

You should call snd_hctl_handle_events() to read all the events.

> However, calling snd_hctl_handle_events here never returns

See amixer/amixer.c in the alsa-utils package for an example.

"amixer events" is undocumented for some reason; but does it work?

Regards,
Clemens
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

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

Messages in current thread:
Re: [LAD] Alsa: poll mixer events, always returns true in su..., Clemens Ladisch, (Tue Jan 29, 8:40 am)