[pulseaudio-discuss] Alsa-plugins-pulse revisited: remove underrun handling

David Henningsson launchpad.web at epost.diwic.se
Tue Feb 2 20:45:35 PST 2010


Somewhat due to the lack of feedback and better ideas in this forum, I'm
proposing Ubuntu to remove the underrun handling in alsa-plugins-pulse.
If you think this is a bad idea and/or have a better one, now is the
time to speak up.

The reasoning behind this is:

1) If pulseaudio gets an underrun, the normal way to end that underrun
is to feed it with more buffers. This is different from the ALSA way of
dealing with underruns (in a assumed MMAP buffer), which requires
hardware buffer pointers to be reset.

2) In addition, underrun signals are delivered asynchronously from
pulseaudio. This means that there might be more buffers on the way to
pulseaudio when the underrun is reported, making the underrun obsolete.
Unfortunately, there is currently no known way to determine whether this
is the case or not.

This patch solves, among other things, the mpg123 problem discussed
recently. (I've considered other ways to solve this problem, as
requiring a larger buffer before starting playback, or not to
disconnect/connect the stream when it is prepared, but my gut feeling
tells me those two solutions are going to cause more regressions than
this one.)

The patch is here, if you would like to try it (but it just comments out
all underrun handling, so rewriting it could be done in five minutes):

http://bazaar.launchpad.net/%7Ediwic/alsa-plugins/ubuntu.new/download/head%3A/pulseignoreunderruns-20100130094748-ycky1oj4y1rd23pc-1/pulse-ignore-underruns.patch

// David



More information about the pulseaudio-discuss mailing list