[alsa-devel] Query on Audio DMA using DMAEngine

Mike Looijmans mike.looijmans at topic.nl
Thu Jul 4 07:56:25 CEST 2013

On 07/03/2013 08:12 PM, Mark Brown wrote:
> On Wed, Jul 03, 2013 at 12:55:36PM -0500, Joel Fernandes wrote:
>> When would it not be possible to cope with a large period size? Are there any
>> guidelines on what to consider when fixing a period size?
> This is an application issue not a driver issue.  An application that
> wants low latency may need high resolution information about what
> exactly the hardware is doing.

To get low-latency, the best thing from userspace is to mmap the audio 
buffer, and monitor the position of the DMA transfers. If the driver 
reports the DMA position accurately, you can get latencies of only a few 
samples. I must admit that I know next to nothing about how ALSA works 
in userspace, but that's how DirectSound works, for example. And from 
what I've seen, this is also possible with ALSA.

Even without that - I tried with small periods of only 40 samples, this 
invariably fails on the current driver, with or without the ping-ping. 
Using the cyclic DMA I had no problem using such small periods.


More information about the Alsa-devel mailing list