[alsa-devel] [PATCH] Alsa-plugins: Pulse: Fix snd_pcm_avail returning 0 in some cases
david.henningsson at canonical.com
Tue Apr 26 10:01:23 CEST 2011
On 2011-04-22 01:25, Raymond Yau wrote:
> 2011/4/21 David Henningsson<david.henningsson at canonical.com>
>> Due to a round-off error, snd_pcm_avail could in some cases
>> return 0 even though more data could be written to the stream.
>> This was discovered by Maarten Lankhorst , and there is also a test
>> program available that triggers this error .
> if the test program can force under-run occur with "hw" device and "pulse"
> device with his patch in
> Is it normal that underrun does not occur with the test program and your
Yes; underruns are not reported to the application due to the risk of
the underrun being obsolete at that time. As for Maarten's patch in the
post you refer to,
1) if underruns are being reported (this is configurable), it might be a
good idea to call "pulse_start".
2) it changes underruns to being reported by default, which is what I'm
David Henningsson, Canonical Ltd.
More information about the Alsa-devel