Package: pulseaudio Version: 9.0-2 Severity: wishlist Tags: patch There should be a way for an ALSA application not to be intercepted by PulseAudio; for instance, by setting an environment variable. One example is the ALSA back end of LMMS, where the interception is buggy ( https://bugs.debian.org/781479 ). With this patch, setting PULSE_ALSA_HOOK_CONF=/dev/null disables the interception.
diff -Nru pulseaudio-9.0.orig/debian/pulse-alsa.conf pulseaudio-9.0/debian/pulse-alsa.conf --- pulseaudio-9.0.orig/debian/pulse-alsa.conf 2016-08-13 04:40:38.000000000 +0200 +++ pulseaudio-9.0/debian/pulse-alsa.conf 2016-08-28 18:57:34.000000000 +0200 @@ -1,5 +1,5 @@ -# This file is referred to by /usr/share/alsa/pulse.conf to set pulseaudio as -# the default output plugin for applications using alsa when PulseAudio is +# This file is referred to by /usr/share/alsa/pulse-hook.conf to set pulseaudio +# as the default output plugin for applications using alsa when PulseAudio is # running. pcm.!default { diff -Nru pulseaudio-9.0.orig/debian/pulse.conf pulseaudio-9.0/debian/pulse.conf --- pulseaudio-9.0.orig/debian/pulse.conf 2016-08-13 04:40:38.000000000 +0200 +++ pulseaudio-9.0/debian/pulse.conf 2016-08-28 19:01:55.000000000 +0200 @@ -1,15 +1,15 @@ -# PulseAudio alsa plugin configuration file to set the pulseaudio plugin as -# default output for applications using alsa when pulseaudio is running. -hook_func.pulse_load_if_running { - lib "libasound_module_conf_pulse.so" - func "conf_pulse_hook_load_if_running" -} - +# Enable PulseAudio hook if PULSE_ALSA_HOOK_CONF is not set. @hooks [ { - func pulse_load_if_running + func load files [ - "/usr/share/alsa/pulse-alsa.conf" + { + @func getenv + vars [ + PULSE_ALSA_HOOK_CONF + ] + default "/usr/share/alsa/pulse-hook.conf" + } ] errors false } diff -Nru pulseaudio-9.0.orig/debian/pulse-hook.conf pulseaudio-9.0/debian/pulse-hook.conf --- pulseaudio-9.0.orig/debian/pulse-hook.conf 1970-01-01 01:00:00.000000000 +0100 +++ pulseaudio-9.0/debian/pulse-hook.conf 2016-08-13 04:40:38.000000000 +0200 @@ -0,0 +1,16 @@ +# PulseAudio alsa plugin configuration file to set the pulseaudio plugin as +# default output for applications using alsa when pulseaudio is running. +hook_func.pulse_load_if_running { + lib "libasound_module_conf_pulse.so" + func "conf_pulse_hook_load_if_running" +} + +@hooks [ + { + func pulse_load_if_running + files [ + "/usr/share/alsa/pulse-alsa.conf" + ] + errors false + } +] diff -Nru pulseaudio-9.0.orig/debian/rules pulseaudio-9.0/debian/rules --- pulseaudio-9.0.orig/debian/rules 2016-08-13 04:40:38.000000000 +0200 +++ pulseaudio-9.0/debian/rules 2016-08-28 19:07:54.000000000 +0200 @@ -16,7 +16,7 @@ mkdir -p $(CURDIR)/debian/tmp/usr/share/alsa/alsa.conf.d cp -a $(CURDIR)/debian/pulse.conf \ $(CURDIR)/debian/tmp/usr/share/alsa/alsa.conf.d - cp -a $(CURDIR)/debian/pulse-alsa.conf $(CURDIR)/debian/tmp/usr/share/alsa + cp -a $(CURDIR)/debian/pulse-alsa.conf $(CURDIR)/debian/pulse-hook.conf $(CURDIR)/debian/tmp/usr/share/alsa install -d $(CURDIR)/debian/tmp/usr/share/apport/package-hooks cp $(CURDIR)/debian/apport-hook.py $(CURDIR)/debian/tmp/usr/share/apport/package-hooks/source_pulseaudio.py
smime.p7s
Description: S/MIME cryptographic signature