[alsa-devel] [RFC] ALSA vs. dedicated char device for a USB Audio Class gadget driver

Clemens Ladisch clemens at ladisch.de
Fri May 15 09:01:48 CEST 2009

Laurent Pinchart wrote:
> To copy data from the ALSA ring buffer I need to know how much data is 
> available at that particular moment, in order to avoid buffer underruns.

This is not how ALSA drivers are supposed to work.  The framework was
designed for DMA devices that run asynchronously and just take data out
of the ring buffer whenever they need them.  Your driver should work in
the same way, i.e., you queue a packet of data when you need to queue

Best regards,

More information about the Alsa-devel mailing list