[alsa-devel] Question to sophisticated alsa developer

Jon Smirl jonsmirl at gmail.com
Wed Aug 5 16:26:53 CEST 2009

On Wed, Aug 5, 2009 at 10:02 AM, Andreas
Bießmann<biessmann at corscience.de> wrote:
> Hi Jon,
> Jon Smirl schrieb:
>> When the last sample plays it generates an interrupt. ALSA sends a
>> STOP back after this interrupt. But the audio hardware continues
>> playing between this interrupt and receiving the STOP. Since the last
>> valid sample generated the interrupt, the hardware is playing garbage
>> (stale data) while waiting on the STOP. Probably  500us worth of stale
>> data.,
> This sounds correct an I will investigate this. But I wonder why the
> stale data does not appear when I use aplay without dmix layer. Have you
> some explanation for this?

You might have a different problem. I heard the problem with both dmix
and aplay.

Batch mode ALSA drivers can't tell the current position of the DMA
pointer while DMA is active. They only know the DMA position when the
DMA hardware generates an interrupt.

I don't know if AVR32 needs to be batch mode or not. Also the AVR32
driver may have been written as a batch driver even when it didn't
need to be.

> regards
> Andreas Bießmann

Jon Smirl
jonsmirl at gmail.com

More information about the Alsa-devel mailing list