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

Jarkko Nikula jarkko.nikula at bitmer.com
Wed Mar 21 09:13:32 CET 2012


On 03/21/2012 09:57 AM, Peter Ujfalusi wrote:
> On 03/20/2012 09:47 PM, Trent Piepho wrote:
>>> To me this looks more like a correct fix. At quick test I got single
>>> xrun when starting up but not endless loop of them. Maybe need to tune a
>>> bit with CONFIG_SND_PCM_XRUN_DEBUG=y.
>>
>> Does the ALSA API allow the driver to change start_threshold in the
>> prepare function?  It seems what is needed is a minimum
>> start_threshold constraint, but there aren't constaints for sw_params.
> 
> I did as well looked at the start_threshold, and came to the same
> conclusion. It is sw_param, and the driver should not modify it.
> The OSS emulation layer sets the start_threshold to 1, most application
> sets the start threshold to the size of the buffer. Some legacy
> application might not care about this at all. Others might want specific
> threshold to start the actual playback.
> 
Oh yes. I guess start_threshold is not even known yet when we are ruling
the buffer size so we cannot use it as a source for alternative rules?

-- 
Jarkko


More information about the Alsa-devel mailing list