[linux-audio-dev] snd_pcm_poll_descriptors_revents() question

Clemens Ladisch cladisch at fastmail.net
Thu Nov 9 08:30:25 UTC 2006


Fons Adriaensen wrote:
> On Wed, Nov 08, 2006 at 05:58:40PM +0100, Clemens Ladisch wrote:
> > > In that case, how can one test if *all* pollfd for a given
> > > pcm are ready ?
> > 
> > You cannot.  The state of the file descriptors is not necessarily
> > related to the state of the PCM device (which is why this function
> > exists).
> 
> So a loop waiting for both capture and playback being ready
> could be something like (cut down to the bare minimum):
> [...]

Yes.  The various snd_pcm_poll* functions just make the descriptors look
like a single poll descriptor.  The logic should always be the same as
if it were using a single fd.


Regards,
Clemens



More information about the Linux-audio-dev mailing list