#788535 pulseaudio: after suspend to ram sound turns to rubbish

Package:
pulseaudio
Source:
pulseaudio
Description:
PulseAudio sound server
Submitter:
Jayson
Date:
2015-06-12 15:48:06 UTC
Severity:
normal
#788535#5
Date:
2015-06-12 13:47:37 UTC
From:
To:
Hello. On my Debian Stable system (I have also tried upgrading first to Testing, then to Unstable. Problem also reproduces on Debian Stable Live, so I have tested kernels 3.16.0 and 4.0.4) if any sound is played and I suspend my system to RAM, after I resume it, sound turns to rubbish. I can hardly recognize the melody. Running "pasuspender true" or restarting pulseaudio solves the problem. This problem reproduces with my usb-speakers (snd_usb_audio), but does not reproduce if I connect bluetooth-heaphones using Blueman and pulseaudio-module-bluetooth. However, this problem does not reproduce in Ubuntu 15.04 (linux 3.19.0) with both usb-speakers and bluetooth heaphones. These speakers are Logitech Z-5 (about 4 years old). Here is a logfile created with "pulseaudio -D --log-level=debug --log-target=file:pulseaudio.log": https://gist.githubusercontent.com/anonymous/a5248c0428fe7d09ab63/raw/gistfile1.txt
#788535#10
Date:
2015-06-12 14:38:46 UTC
From:
To:
Hi Jayson,
And please add the --log-time flag to the command.

However, the following lines suggest the bug is in the kernel and not
pulseaudio:

E: [alsa-sink-USB Audio] alsa-sink.c: ALSA woke us up to write new
data to the device, but there was actually nothing to write!
E: [alsa-sink-USB Audio] alsa-sink.c: Most likely this is a bug in the
ALSA driver 'snd_usb_audio'. Please report this issue to the ALSA
developers.
E: [alsa-sink-USB Audio] alsa-sink.c: We were woken up with POLLOUT
set -- however a subsequent snd_pcm_avail() returned 0 or another
value < min_avail.

#788535#19
Date:
2015-06-12 15:45:15 UTC
From:
To:
Hi, Felipe! Here it is:
https://gist.githubusercontent.com/anonymous/5174bd669936210a8802/raw/gistfile1.txt

A little comment: to test this bug with Pulseaudio 6 and kernel 4.0 I have
created a separate installation of Debian Stable and upgraded pulseaudio
(with all dependencies), kernel, SDL and all alsa packages.

Somehow this bug doesn't reproduce every time, but each second time (so, I
had to make my system suspend twice to reproduce it).