Package: pulseaudio Version: 0.9.5-4 Severity: normal Tags: patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
See also http://www.pulseaudio.org/ticket/26, when using the ALSA sink, pulseaudio does not recover from a suspend to disk, which means I have to restart pulseaudio at least daily (after each resume). Simple (not perfect, but fixes the problem for me and can't make it worse) patch: 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); } - -- System Information: Debian Release: 4.0 APT prefers testing APT policy: (9999, 'testing') Architecture: amd64 (x86_64) Shell: /bin/sh linked to /bin/bash Kernel: Linux 2.6.20-rc5-amd64 Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Versions of packages pulseaudio depends on: ii adduser 3.101 Add and remove users and groups ii libasound2 1.0.13-1 ALSA library ii libasyncns0 0.1-1 Asyncronous name service query lib ii libc6 2.3.6.ds1-8 GNU C Library: Shared libraries ii libcap1 1:1.10-14 support for getting/setting POSIX. ii libltdl3 1.5.22-4 A system independent dlopen wrappe ii liboil0.3 0.3.10-1 Library of Optimized Inner Loops ii libsamplerate0 0.1.2-2 audio rate conversion library ii libsndfile1 1.0.16-1 Library for reading/writing audio ii libwrap0 7.6.dbs-11 Wietse Venema's TCP wrappers libra Versions of packages pulseaudio recommends: ii libasound2-plugins 1.0.13-3 ALSA library additional plugins ii pulseaudio-module-hal 0.9.5-4 HAL device detection module for Pu ii pulseaudio-module-x11 0.9.5-4 X11 module for PulseAudio sound se - -- no debconf information -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFFqT9aWeSjpYPhJEoRAoiwAJ41t/5ClS6l56dxY80APIZ3BA0NvACfXhWF nscVYv9UHU5dDtv9o/6/qkg= =kt8d -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

