[pulseaudio-discuss] Alsa-plugins-pulse revisited: remove underrun handling
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
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):
More information about the pulseaudio-discuss