[alsa-devel] xrun on sdp340 with small buffers
jarkko.nikula at nokia.com
Fri Mar 27 07:56:13 CET 2009
On Fri, 27 Mar 2009 05:02:29 +0100
"ext Lopez Cruz, Misael" <x0052729 at ti.com> wrote:
> I use the sdp3430 machine driver for my board, which connects twl4030
> codec and OMAP McBSP/DMA drivers. Everything works fine, I can play
> audio files (using aplay).
> However, I tried to force 'aplay' to use a different buffer size and
> period count, and it misbehaves. My experiment was setting buffer time
> to 10ms and periods to 4, and play a 8kHz sample file; this only
> generates underrun messages. Under that configuration, for 8kHz, it
> means a buffer size of 320B (16-bits, stereo) divided into 4 periods
> of 80B each. omap-pcm driver will report interrupts each 80B, as it
> uses a single DMA transfer for the buffer and generates interrupts
> each frame.
Am I right that SDP3430 is using McBSP2 for audio codec? We had similar
issues sometime ago and I obviously forgot to report it here... grr.
McBSP2 in OMAP3 has 1 ksample (1k x 32 bit) internal FIFO. During
initial playback startup, this FIFO is keeping the DMA request active
until the FIFO is full.
So now if ALSA buffer size is smaller, DMA is looping around it while
filling up the HW FIFO, generating burst of interrupts as well and SW
doesn't have any change to fill enough data.
Hmm. We better to have a patch setting constraint for minimum buffer
size in case McBSP2 in OMAP3.
More information about the Alsa-devel