[alsa-devel] DMA buffer gets played only once

Markus Franke markus.franke at s2002.tu-chemnitz.de
Thu Sep 6 08:10:46 CEST 2007


Trent Piepho wrote:
> You need to make sure the buffer size is an integer multiple of the period
> size if you wrap like this.

Yeah I have to take care of this but right now my buffersize is 32768 
bytes and the period size is 4096 bytes which should work I think.

> I found that ALSA would call TRIGGER_STOP if it detected an overrun.

Yeah that's right. I guess this is my case because xrun() is getting 
called somewhere. So how can I fix this underrun problem?

> Check the value returned for every call of your pointer callback.  I found out
> that ALSA was calling the pointer callback before the first IRQ, which was
> something I hadn't planned on and the values confused ALSA.

That's not my case. pcm_pointer gets called after the first DMA 
transaction is finished. (DMA transfer finished callback gets called 
before pcm_pointer) Also the values which are returned by pcm_pointer 
look quite reasonable. (see also my very first posting in this thread, 
look for the printk's "pcm_pointer returns <value>")

Thanks for your effort,

Markus Franke

More information about the Alsa-devel mailing list