[alsa-devel] non-blocking mode example

Clemens Ladisch clemens at ladisch.de
Fri Aug 18 12:37:53 CEST 2017


ThomasJF wrote:
> I could change the code (attached a short part)

This mailing list does not have attachments.

> After stop, the stream stops and everything looks good(?), but with this message from snd_pcm_writei:
> -77 (-EBADFD)

You cannot write to a device in the stopped state. This is to be expected.


And you must actually use the return value of snd_pcm_poll_descriptors_count()
(there are device types with more than one fd), and you must not look at the
returned event flags except with snd_pcm_poll_descriptors_revents().


Regards,
Clemens


More information about the Alsa-devel mailing list