[alsa-devel] hw_ptr accuracy with intel8x0 -> PulseAudio issue

pl bossart bossart.nospam at gmail.com
Fri Dec 4 01:50:58 CET 2009


>>   17. hwptr 24351 buffer 16384 appl 24332, avail=16403
>
> appl pointer is behind hwprtr (  underrun ) , need timestamp to find out
> whether PA is unable to write audio data in time since

Nah, it's not an audio underflow. In the default PulseAudio code, the
timer value is increased by 20ms each time this errror condition is
reached. PA ends-up waking-up 150ms or so before the deadline and yet
it still encounters this error. I don't think it's a problem with PA
not refilling the buffer on time, it's more that the information
provided by snd_pcm_avail() is misleading. I commented out the portion
of the code that increases the watermark and clamped the number of
available samples to the buffer size, and it works just fine, no audio
underflows.
- P


More information about the Alsa-devel mailing list