Bug 84667 - sound is choppy and high-pitched after suspend+resume
Summary: sound is choppy and high-pitched after suspend+resume
Status: RESOLVED MOVED
Alias: None
Product: PulseAudio
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: pulseaudio-bugs
QA Contact: pulseaudio-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-04 17:11 UTC by Adam Borowski
Modified: 2018-07-30 10:27 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Adam Borowski 2014-10-04 17:11:15 UTC
Once my computer is suspended then resumed, pulseaudio makes all sound
high-pitched and choppy.  It's hard to diagnose this by ear, but it
-appears- to me that a few times per second a buffer is played at a
multiple of proper speed, with a pause until the buffer fills again.
Issuing 'killall pulseaudio' and restarting clients solves this issue
until next resume.

This worked correctly with the same sound card with a 5.1 speaker setup,
the problem started only after I replaced them by regular two speakers.

[this is forwarded https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763985, that bug report includes some debug info which I did not copy here to reduce spam]
Comment 1 Raymond 2014-10-05 02:15:14 UTC
post the output of alsa-info.sh


the first thing is to check whether your sound card can suspend and resume normally without pulseaudio

force a suspend and resume while playing stereo using aplay or 5.1 using mplayer

aplay -D. hw:0,0 any.wav

mplayaer -ao alsa:device=hw=0 dvd://

examine the system log to find any any driver error messages
Comment 2 Adam Borowski 2014-10-05 17:49:13 UTC
Without pulseaudio, it works correctly (clementine: output=Alsa sink, device=hw:2; mplayer -ao alsa:device=hw=2) -- sound is not garbled after resuming.

I don't have 5.1 speakers anymore so I can't test that -- but on 5.1 with this sound card sound after resume was ok, the problem started only after going back to stereo.

This computer does also have regular built-in audio without 5.1 capability that I use for headphones, it doesn't exhibit this problem.

I suspected this might be a case of left-over configuration from 5.1 times, but purging all pulseaudio configuration I know of didn't help (~/.config/pulse, purging+reinstalling pulse packages).
Comment 3 Raymond 2014-10-06 00:39:22 UTC
if the sound card can suspend and resume properly without pulseaudio 

you need to provide 

1)pulseaudio verbose log during suspend and resume cycle,

 2)the system log during suspend and resume cycle

3) Do your card 2 using timer scheudling or not ?

device.product.name = "CMI8738/CMI8768 PCI Audio (CMI8738/C3DX PCI Audio Device)"
		device.string = "front:2"
		device.buffering.buffer_size = "65536"
		device.buffering.fragment_size = "32768"


can the sound card report dma residue which is better than the hwptr increase by one period at 170 ms interval
Comment 4 Raymond 2014-10-06 00:47:03 UTC
try suspend and resume while

aplay -D pulse any.wav

paplay any.wav

mplayer -ao alsa :device=pulse any.wav

mplayer -ao pulse any.wav
Comment 5 GitLab Migration User 2018-07-30 10:27:48 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/436.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.