[alsa-devel] [PATCH] Wrong latency in pulseaudio plugin breaks Adobe Flash Player

Philip Spencer pspencer at fields.utoronto.ca
Fri Feb 17 22:15:40 CET 2012

I have pulseaudio logs from two runs of FlashPlayer. In each one I 
commented out the plugin's call to pa_stream_trigger just to avoid the
irrelevant problem of FlashPlayer starting the stream a little too early;
I merely patched it to set prebuf low.

In the first run, logged at www.fields.utoronto.ca/~pspencer/pulsebad.log,
I made no changes to tlength so it was left at 500ms. This resulted in
audio with several hiccups during the first two seconds and latency
rising to 500ms after two seconds.

In the second run I altered the patch to lower tlength. This resulted in
smooth audio with no discernible latency. The log is at


Unfortunately, there is no discernible difference between the two logs. A 
diff of the log files (with the initial timestamp removed before diffing) 
is at www.fields.utoronto.ca/~pspencer/pulse.diff. The only changes are

   (a) different addresses for things like bus ids
   (b) the different tlength and latency values being reported
   (c) minor differences (on the order of a few bytes / a few microseconds)
       in some of the rewinds and volume adjustments.

So I am still at a loss as to why lowering tlength produces smooth audio
and raising it causes hiccups and -- presumably -- hardware underruns that 
aren't getting logged.

- Philip

Philip Spencer  pspencer at fields.utoronto.ca | Director of Computing Services
Room 336        (416)-348-9710  ext3036     | The Fields Institute for
222 College St, Toronto ON M5T 3J1 Canada   | Research in Mathematical Sciences

More information about the Alsa-devel mailing list