[alsa-devel] [PATCH 3/3] ASoC: omap-mcbsp: Add period size protection mode

Grazvydas Ignotas notasas at gmail.com
Tue Mar 20 17:15:34 CET 2012


On Tue, Mar 20, 2012 at 6:01 PM, Mark Brown
<broonie at opensource.wolfsonmicro.com> wrote:
> On Tue, Mar 20, 2012 at 01:13:41PM +0200, Peter Ujfalusi wrote:
>> Certain application can experience underrun right after the playback start.
>> This is caused by the McBSP FIFO/sDMA integration:
>> The sDMA will push samples to the FIFO till it has threshold amount of free
>> slots available in the FIFO. If the application picks period size which is
>> smaller than the FIFO size, and it did not prepared multiple periods, or
>> it did not set the start_threshold for the stream to cover the FIFO size
>> the hw pointer will move forward, which is causing the underrun.
>
> Acked-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
>
> though this should probably have the note about working around broken
> applications from the cover letter in the changelog as with the
> changelog alone it's really not apparent why we're doing this here as a
> driver specific thing.

I wouldn't really call them broken, it's enough to set period size to
512 with smaller start_threshold (something like 50ms) to have
problems, those parameters are perfectly valid for a program trying to
achieve low latency.

It's a shame this still won't work out-of-the box, but at least there
will be some solution.

-- 
Gražvydas


More information about the Alsa-devel mailing list