]> git.alsa-project.org Git - alsa-plugins.git/commit
pulse: Add handle_underrun option
authorTakashi Iwai <tiwai@suse.de>
Fri, 9 Jul 2010 12:05:03 +0000 (14:05 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 9 Jul 2010 12:05:03 +0000 (14:05 +0200)
commitc20d516e229620129ee20175d8fee8511cc3a4bd
treebf33c6e8cabb757d8f37b446f3e1ec59388f35d9
parent1675414eca06dcfc20899adf104ace05acfe26a0
pulse: Add handle_underrun option

Added a config option "handle_underrun" to specify whether pulse plugin
handles the underrun reported from PA.  The default value is now set to
false, i.e. it will ignore underruns in PA (for good reasons below).
You can take back to the old behavior by setting handle_underrun true.

The original idea was brought by David Henningsson <diwic@ubuntu.com>,
while this patch is simplified and makes the behavior configurable.

The reasons for avoiding underruns (cited from David's original patch):

 Reporting underruns to ALSA seems to do more bad than good, for these reasons:
 * 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, which requires hardware buffer pointers to be reset.
 * 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.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
pulse/pcm_pulse.c