[alsa-devel] ALSA calling pcm_pointer excessively?

Clemens Ladisch clemens at ladisch.de
Thu May 10 20:43:40 CEST 2012


Russell King - ARM Linux wrote:
> On Thu, May 10, 2012 at 07:13:59PM +0200, Clemens Ladisch wrote:
>> I wrote:
>>> This (untested) patch tries to avoid too many busy looping.
>>
>> Oops, off-by-one error (avail == avail_min should not wait).
>
> This is better - it now sits around 2-14% system time.  I guess the
> five loops is rather arbitary?

Yes.  The minimum loop limit is two (to handle wraparound at the end of
the buffer); more than that probably does not actually make sense.

Jassi Brar wrote:
> If we really want to change the behavior of play, wouldn't we want to do that
> for capture(snd_pcm_lib_read1) as well ?

Indeed.  And we'd want to reuse the twake calculation.


Regards,
Clemens


More information about the Alsa-devel mailing list