[pulseaudio-discuss] [PATCH] Do not use tsched watermark if tsched is disabled

David Henningsson david.henningsson at canonical.com
Tue Aug 17 11:20:27 PDT 2010


2010-08-17 20:03, Colin Guthrie skrev:
> 'Twas brillig, and David Henningsson at 17/08/10 19:00 did gyre and gimble:
>> The tsched watermark variable was incorrectly used even for sinks
>> with timer scheduling disabled, causing XRUNs on every rewind. This
>> patch sets a fixed margin of 20 msec for such rewinds, thus avoiding
>> the underrun.
>>
>> One could argue that the margin should be adjustable somehow (or based
>> on fragment-size, or something else), but this patch at least fixes the
>> immediate problem, causing "crackling" output on (at least) one machine.
> 
> /me wonders if this fixes
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=537378
> 

It seems likely to me. I got a feeling that it isn't the whole story
though, that there could be some additional bug in ALSA causing sound to
remain distorted, if the XRUN is merely "touched" and afterwards
immediately resolved by writing more data. So it could have been a
combination of these two bugs causing the crackling sound, and by
resolving the PA bug the problem does not appear anymore.

According to what you say in that bug, you could reproduce it yourself
by setting tsched=0, so I'm eager to hear if this fix fixes your issue
as well.

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic



More information about the pulseaudio-discuss mailing list