[Pkg-pulseaudio-devel] r101 - in /pulseaudio/trunk/debian:
changelog patches/00list patches/06_pulseaudio-0.9.5-suspend.dpatch
neurocyte-guest at users.alioth.debian.org
neurocyte-guest at users.alioth.debian.org
Mon Feb 12 14:01:05 CET 2007
Author: neurocyte-guest
Date: Mon Feb 12 15:01:04 2007
New Revision: 101
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/?sc=1&rev=101
Log:
Handle -ESTRPIPE correctly. Allows pulseaudio to survive suspend operations on ALSA devices (e.g. s2disk). (Closes: #406768)
Added:
pulseaudio/trunk/debian/patches/06_pulseaudio-0.9.5-suspend.dpatch
Modified:
pulseaudio/trunk/debian/changelog
pulseaudio/trunk/debian/patches/00list
Modified: pulseaudio/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/changelog?rev=101&op=diff
==============================================================================
--- pulseaudio/trunk/debian/changelog (original)
+++ pulseaudio/trunk/debian/changelog Mon Feb 12 15:01:04 2007
@@ -1,3 +1,12 @@
+pulseaudio (0.9.5-6) unstable; urgency=low
+
+ * debian/patches/06_pulseaudio-0.9.5-suspend.dpatch:
+ + Added. Handle -ESTRPIPE correctly. Allows pulseaudio to survive suspend
+ operations on ALSA devices (e.g. s2disk). Thanks to Tobias Diedrich.
+ (Closes: #406768)
+
+ -- CJ van den Berg <cj at vdbonline.com> Mon, 12 Feb 2007 11:24:50 +0100
+
pulseaudio (0.9.5-5) unstable; urgency=low
* debian/control: Make Build-deps more specific. (Closes: #401111)
Modified: pulseaudio/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/patches/00list?rev=101&op=diff
==============================================================================
--- pulseaudio/trunk/debian/patches/00list (original)
+++ pulseaudio/trunk/debian/patches/00list Mon Feb 12 15:01:04 2007
@@ -3,3 +3,4 @@
03_r1352_firefox_workaround.dpatch
04_r1373_JavaSound_support.dpatch
05_t28_wrong-endian-convert.dpatch
+06_pulseaudio-0.9.5-suspend.dpatch
Added: pulseaudio/trunk/debian/patches/06_pulseaudio-0.9.5-suspend.dpatch
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/patches/06_pulseaudio-0.9.5-suspend.dpatch?rev=101&op=file
==============================================================================
--- pulseaudio/trunk/debian/patches/06_pulseaudio-0.9.5-suspend.dpatch (added)
+++ pulseaudio/trunk/debian/patches/06_pulseaudio-0.9.5-suspend.dpatch Mon Feb 12 15:01:04 2007
@@ -1,0 +1,61 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 06_pulseaudio-0.9.5-suspend.dpatch.dpatch by <ranma+debianbts at tdiedrich.de>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Handle -ESTRPIPE correctly. Allows pulseaudio to survive suspend
+## DP: operations on ALSA devices (e.g. s2disk).
+
+ at DPATCH@
+
+diff -Naru pulseaudio-0.9.5-orig/src/modules/module-alsa-sink.c pulseaudio-0.9.5/src/modules/module-alsa-sink.c
+--- pulseaudio-0.9.5-orig/src/modules/module-alsa-sink.c 2006-08-18 23:38:48.000000000 +0200
++++ pulseaudio-0.9.5/src/modules/module-alsa-sink.c 2007-01-13 21:01:07.000000000 +0100
+@@ -138,6 +138,23 @@
+ return ret;
+ }
+
++static int suspend_recovery(struct userdata *u) {
++ int ret;
++ assert(u);
++
++ pa_log_info("*** ALSA-SUSPEND (playback) ***");
++
++ if ((ret = snd_pcm_prepare(u->pcm_handle)) < 0) {
++ pa_log("snd_pcm_prepare() failed: %s", snd_strerror(-ret));
++
++ clear_up(u);
++ pa_module_unload_request(u->module);
++ return -1;
++ }
++
++ return ret;
++}
++
+ static void do_write(struct userdata *u) {
+ assert(u);
+
+@@ -169,6 +186,13 @@
+ continue;
+ }
+
++ if (frames == -ESTRPIPE) {
++ if (suspend_recovery(u) < 0)
++ return;
++
++ continue;
++ }
++
+ pa_log("snd_pcm_writei() failed: %s", snd_strerror(-frames));
+
+ clear_up(u);
+@@ -200,6 +224,10 @@
+ if (xrun_recovery(u) < 0)
+ return;
+
++ if (snd_pcm_state(u->pcm_handle) == SND_PCM_STATE_SUSPENDED)
++ if (suspend_recovery(u) < 0)
++ return;
++
+ do_write(u);
+ }
+
More information about the Pkg-pulseaudio-devel
mailing list