You are not logged in.

#1 2011-04-03 04:44:47

me4tw
Member
Registered: 2009-01-25
Posts: 3

PULSEAUDIO Crackling / Distortion

This distortion is like a crackly echoey distortion. It actually has an echo component to it, When I change the output and it goes normal for a few seonds and tehre is a song playing, then it kicks in, the sound quality goes way down, it has this crackling sound, and very noticeable echo comes on the voices and the drums (which you can barely make out over the crackling). Output is perfect if forced to use ALSA directly, or if I boot into windows Seven. This is all pulse audio (probably), the piece of crap.

When I go "pulseaudio --kill" and then "mplayer -ao alsa:device=hw=0.0 <file>" it plays perfectly without distortion. When I go alsamixer -c0 none of the sliders have any gain, they are all at 0db or -1db or so.

To stop the distortion, chanigng from 44100 to 48000 and so on in the /etc/pulse/ whatever file doesnt work. What does work is opening pavucontrol and changing the internal audio on the configuration page. I hav a Barts thing that is turned off and an Internal Audio that can be set to a huge list of things like Analog Surround 5.0 Out, Analog Stereo Duplex, Analog Surround 7.1 Output + Analog Stereo Input, so on and so forth.

Now changing from one to another will randomly make the distortion go away for 30 seconds, until I open a new program, close pavucontrol, or just wait a while, then it will come back on, and I'll have to change it to another, which won't work at first usually but randomly will. There is NO CORRELATION between what is actually chosen and what does and doesnt have distortion straight away.

Basically PulseAudio is $#!+ all the sudden, and I don't know why. I have a fully updated system, hardware is as follows:

$ lspci | grep udio
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)
01:00.1 Audio device: ATI Technologies Inc Barts HDMI Audio [Radeon HD 6800 Series]

Also plays it fine as testing with mplayer, so this is a pulseaudio thing (i think). WTH????

[EDIT] And here is the lsmod:

$ lsmod
Module                  Size  Used by
uas                     8170  0
usb_storage            43628  1
ipv6                  280362  48
md5                     4127  2
hmac                    2937  1
nls_utf8                1320  5
cifs                  265094  6
fscache                39883  1 cifs
it87                   28123  0
hwmon_vid               2796  1 it87
usbhid                 36375  0
hid                    78087  1 usbhid
snd_hda_codec_hdmi     22857  1
snd_hda_codec_realtek   295717  1
snd_seq_dummy           1479  0
snd_seq_oss            29240  0
fglrx                2679751  87
snd_seq_midi_event      5516  1 snd_seq_oss
vboxdrv              1760035  0
snd_seq                50562  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_hda_intel          21837  6
snd_hda_codec          74609  3 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_hda_intel
snd_seq_device          5281  3 snd_seq_dummy,snd_seq_oss,snd_seq
r8169                  36414  0
ohci_hcd               21338  0
ppdev                   5854  0
firewire_ohci          26921  0
snd_hwdep               6222  1 snd_hda_codec
snd_pcm_oss            39509  0
parport_pc             31800  1
snd_mixer_oss          17730  1 snd_pcm_oss
lp                      8992  0
firewire_core          50038  1 firewire_ohci
snd_pcm                72321  6 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_pcm_oss
mii                     3842  1 r8169
evdev                   9361  12
fuse                   65179  5
xhci_hcd               65218  0
parport                30087  3 ppdev,parport_pc,lp
edac_core              35034  0
i2c_piix4               8176  0
ehci_hcd               38878  0
crc_itu_t               1313  1 firewire_core
snd_timer              19537  2 snd_seq,snd_pcm
button                  4882  1 fglrx
i2c_core               19217  1 i2c_piix4
processor              25265  0
wmi                     8061  0
pcspkr                  1835  0
sg                     25972  0
k10temp                 2771  0
serio_raw               4566  0
usbcore               139496  7 uas,usb_storage,usbhid,ohci_hcd,xhci_hcd,ehci_hcd
edac_mce_amd            9223  0
shpchp                 26725  0
snd                    58906  22 snd_hda_codec_hdmi,snd_hda_codec_realtek,snd_seq_oss,snd_seq,snd_hda_intel,snd_hda_codec,snd_seq_device,snd_hwdep,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
soundcore               6161  1 snd
snd_page_alloc          7361  2 snd_hda_intel,snd_pcm
pci_hotplug            24687  1 shpchp
ext4                  334690  1
mbcache                 5802  1 ext4
jbd2                   69898  1 ext4
crc16                   1313  1 ext4
sd_mod                 27120  4
ahci                   20465  1
pata_jmicron            2464  0
libahci                17952  1 ahci
pata_acpi               3296  0
libata                169396  4 ahci,pata_jmicron,libahci,pata_acpi
scsi_mod              125814  5 uas,usb_storage,sg,sd_mod,libata

Also my last message on dmesg is:

hda-intel: IRQ timing workaround is activated for card #0. Suggest a bigger bdl_pos_adj.

But there is only one of these lines in the output and the distortion kicks in several times. This was right after the line:

chromium-sandbo (2511): /proc/2509/oom_adj is deprecated, please use /proc/2509/oom_score_adj instead.

So it happened after I opened my web browser (I only just booted this pc up I had it turned off over the night). This is a recurring problem over the past couple of days, BTW. It was probably the last update because when I done it I didn't reboot for awhile.

Last edited by me4tw (2011-04-03 05:03:26)

Offline

#2 2011-04-10 14:56:06

Niclas
Member
Registered: 2010-06-24
Posts: 5

Re: PULSEAUDIO Crackling / Distortion

Hi,

I have the exact same problem. Did you find any solution yet?

Here is my onboard soundcard:

$ lspci | grep Audio
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

Switching the audio profile randomly does help, until the problem occures again after ~30 seconds.
If I just use plain alsa (without pulse) everything works fine.

Any suggestions? I've also tried to set the default-sample-rate to other values, and I tried what is suggested here http://pulseaudio.org/ticket/697#comment:2 . Maybe we should fill in a bug report?

Offline

#3 2011-04-10 15:11:16

swanson
Member
From: Sweden
Registered: 2011-02-05
Posts: 759

Re: PULSEAUDIO Crackling / Distortion

A long time ago I had this exaxt problem on Ubuntu and it was the pulseaudio module module-x11-xsmp that didn't get loaded at boot/login. I might be way out here but it might be worth checking since pulseaudio can be tricky. Try this command and see;
pactl list | grep module
or
pactl list | grep module-x11-xsmp

With pactl you can also load pulse modules, do a pactl -h and see. I used to load this; pactl load-module module-x11-xsmp  when starting X.

Last edited by swanson (2011-04-10 15:12:26)

Offline

#4 2011-04-10 19:42:50

clearloon
Member
Registered: 2009-01-07
Posts: 79

Re: PULSEAUDIO Crackling / Distortion

I'm getting this behaviour too, but only with vlc & skype... kaffeine & mplayer are fine.

FWIW, my onboard audio is ATI Technologies Inc SBx00 Azalia (Intel HDA)

Last edited by clearloon (2011-04-10 19:44:01)

Offline

#5 2011-04-11 18:08:53

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: PULSEAUDIO Crackling / Distortion

I have also stumbled upon this problem.

Hardware: Audio device [0403]: ATI Technologies Inc SBx00 Azalia (Intel HDA) [1002:4383]
Codec: ALC660-VD

I did notice that both vlc and skype were having trouble outputting to pulse directly, skype worked fine with a usb headset though.

I have edited /etc/pulse/daemon.conf and uncommented 'enable-remixing = yes' and it seems to have helped at the expense of slight increase of cpu usage.

My /etc/pulse/daemon.conf (only the uncommented parts)

resample-method = ffmpeg
enable-remixing = yes
flat-volumes = no

R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#6 2011-04-11 21:51:18

Technotux
Member
Registered: 2011-04-11
Posts: 9

Re: PULSEAUDIO Crackling / Distortion

I have this problem too, with VLC, Skype and me-tv, although I think me-tv uses VLC components. The sound is aweful, heavily distorted, and crackly until I change the profile, then a few minutes later it happens again. I happen to have the same audio hardware as the others above, and using pulseaudio, I've tried all the tricks, the only thing that did seem to help was adding 'tsched=0', to the end of the line, '#load-module module-udev-detect' in the file '/etc/pulse/default.pa', uncomment it, and restart pulseaudio. As I said it seems to help but I had pulseaudio die playing some games in WINE after adding this, so its not a fix. I think pulseaudio has a bug with these applications as they are supposed to use pulseaudio directly.

$ lspci | grep Audio
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

Last edited by Technotux (2011-04-11 21:59:19)

Offline

#7 2011-04-12 19:50:06

clearloon
Member
Registered: 2009-01-07
Posts: 79

Re: PULSEAUDIO Crackling / Distortion

[EDIT: appears to be messed up again...]

Today's update has resolved this for me.

Last edited by clearloon (2011-04-15 19:04:51)

Offline

#8 2011-04-15 06:31:07

bluej774
Member
Registered: 2011-04-15
Posts: 8

Re: PULSEAUDIO Crackling / Distortion

Oops.  My problem isn't strictly related.

Last edited by bluej774 (2011-04-15 06:32:36)

Offline

#9 2011-04-16 21:56:11

Ichimonji10
Member
Registered: 2010-11-07
Posts: 32
Website

Re: PULSEAUDIO Crackling / Distortion

I'm affected by nearly this exact problem as well. Here's the sound cards I have in my system:

~$ lspci | grep Audio
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
02:00.1 Audio device: ATI Technologies Inc HD48x0 audio

And only certail apps are affected by the crackling, popping, and distortion. VLC is affected, while mplayer and aplay are not.

I've seen this line pop up in dmesg:

hda-intel: IRQ timing workaround is activated for card #1. Suggest a bigger bdl_pos_adj.

(I've also seen a similar message with card #0 instead) But I did not have any line related to chromium-sandbox pop up. FWIW, I don't have chrome installed, only firefox 3.

Changing my Internal Audio profile with pavucontrol helps, but only for a while. Attempting this fix did not help, nor did editing /etc/pulse/daemon.conf help. Loading module-x11-xsmp with pactl did not help either (I unloaded it after trying the fix).

I've been using my computer for months with alsa alone, with no problems. However, I recently installed gnome3, and pulseaudio along with it. That's when this problem started.

Offline

#10 2011-04-17 08:52:02

benny_kenobi
Member
From: poland
Registered: 2011-04-15
Posts: 17

Re: PULSEAUDIO Crackling / Distortion

I'm experiancing same symtopms as Ichimonji10 on the same hardware. So far only vlc is affected.

However I noticed 2 things: 1st when I let the video play, after 2-5 minutes the sound clears - stops crackling and echoing. I know it might not sound likly, but anyway. The other thing is that according to pavucontrol vlc is trying to output sound of 5.1 speaker system - and I only have to speakers. The configuration checks out everywhere and the outputs is set to stereo.

I've tried almost every available sound configuration in vlc to no avail. When I thought something worked it didn't next time I tried it. Seems like after that magical couple of minutes the issue goes away.

--
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)
02:00.1 Audio device: ATI Technologies Inc HD48x0 audio

Offline

#11 2011-04-18 10:40:21

heftig
Developer
From: Germany
Registered: 2010-04-19
Posts: 159

Re: PULSEAUDIO Crackling / Distortion

Try adding tsched=0 to the load-module module-udev-detect line in /etc/pulse/default.pa so it reads:

load-module module-udev-detect tsched=0

Offline

#12 2011-04-18 17:41:32

benny_kenobi
Member
From: poland
Registered: 2011-04-15
Posts: 17

Re: PULSEAUDIO Crackling / Distortion

@heftig : It seems to be working for me. I'll try it a couple times more to be 'sure'. Thanks! I have no idea what these 8 chars do, but it must be something close to magic smile

Offline

#13 2011-04-18 17:59:28

debijan
Member
Registered: 2010-09-14
Posts: 37

Re: PULSEAUDIO Crackling / Distortion

hi - i had the same problem, but only with vlc - but I love vlc *sad*.

00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)
        Subsystem: Micro-Star International Co., Ltd. Device 7599
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 64, Cache Line Size: 64 bytes
        Interrupt: pin ? routed to IRQ 16
        Region 0: Memory at f9ff4000 (64-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: HDA Intel
        Kernel modules: snd-hda-intel


lsmod | grep -i snd:
snd_seq_dummy           1455  0
snd_seq_oss            28052  0
snd_seq_midi_event      5332  1 snd_seq_oss
snd_seq                48705  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device          5100  3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            37890  0
snd_mixer_oss          14851  1 snd_pcm_oss
snd_hda_codec_realtek   294053  1
snd_hda_intel          21738  2
snd_hda_codec          73739  2 snd_hda_codec_realtek,snd_hda_intel
snd_hwdep               6134  1 snd_hda_codec
snd_pcm                71032  3 snd_pcm_oss,snd_hda_intel,snd_hda_codec
snd_timer              18992  2 snd_seq,snd_pcm
snd                    55132  15 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_codec_realtek,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_pcm,snd_timer
soundcore               5986  1 snd
snd_page_alloc          7017  2 snd_hda_intel,snd_pcm

uname -r : 2.6.38-ARCH


the hint with pulse an tsched=0 does help too :-)

@heftig: danke ;-)

Last edited by debijan (2011-04-18 18:03:43)

Offline

#14 2011-04-19 10:57:50

heftig
Developer
From: Germany
Registered: 2010-04-19
Posts: 159

Re: PULSEAUDIO Crackling / Distortion

tsched=0 disables PulseAudio's timer-based scheduling and uses the classic interrupt-driven approach. Timer-based scheduling allows for better latency management and reduced CPU usage. It puts very strict requirements on the ALSA drivers. Unfortunately, some drivers do not handle it well.

More information:
http://0pointer.de/blog/projects/pulse-glitch-free.html

Offline

#15 2012-05-21 03:35:40

tokoro
Member
From: Mexico City
Registered: 2011-11-30
Posts: 51

Re: PULSEAUDIO Crackling / Distortion

heftig wrote:

Try adding tsched=0 to the load-module module-udev-detect line in /etc/pulse/default.pa so it reads:

load-module module-udev-detect tsched=0

This worked amazingly well. Is this a fix or just a workaround?


Non native English speaker [in, on, at are the same to me]

Offline

#16 2012-05-21 19:39:46

maverick340
Member
Registered: 2011-05-03
Posts: 6

Re: PULSEAUDIO Crackling / Distortion

Same problem for me too. It was working fine, all of a sudden (maybe one week) it started this awful crackling sound with a delay after the normal sound plays. Affected programs are Skype and VLC. It also makes some noise when switching between different system sound effects rapidly.
Audio device is

lspci | grep Audio
00:07.0 Audio device: NVIDIA Corporation MCP67 High Definition Audio (rev a1)

I am running an update as we speak, Will let you know if that fixes the problem. If not will try the workaround suggested by heftig.
Wonder why the problem started all of as sudden.

Offline

#17 2012-05-22 21:38:40

king.flasher.dave
Member
From: Berlin
Registered: 2008-11-25
Posts: 140
Website

Re: PULSEAUDIO Crackling / Distortion

I have the same issue with VLC, but not with Skype. VLC has become unusable because of this.
Is this related to pulseaudio 2.0? https://bugs.archlinux.org/task/29906

As soon as VLC is running and playing video with audio this will also effect other sound sources.
If I start a video (will crack and noise), then pause it and play music using an audio player like gmusicbrowser (using gstreamer), pause and unpause it, the audio stream will also be effected as long as VLC is opened.
As soon as VLC is closed all works fine again.

Might this just be a VLC and pulse problem? I don't have any other audio/video player acting up so far, since the update to pulse 2.0.

And: heftig's fix/workaround works for me as well. It's ugly to have a higher CPU load though hmm

Last edited by king.flasher.dave (2012-05-22 22:14:13)


Speak when you are angry and you will make the best speech you'll ever regret.

Offline

#18 2012-06-03 13:53:30

mandog
Member
From: Peru
Registered: 2008-09-17
Posts: 218

Re: PULSEAUDIO Crackling / Distortion

This is very dirty it only achieves the goal of cleaning up sound in skype/vlc at the expense of killing sound in wine


I'm dyslexic Please do not complain about puntuation or spelling and remember most dyslexic people have above average iq.

Offline

#19 2012-09-01 14:51:24

boast
Member
Registered: 2010-09-28
Posts: 219

Re: PULSEAUDIO Crackling / Distortion

any new info on this? or a bug report or something?


Asus M4A785TD-V ;; Phenom II X4 @ 3.9GHz ;; Ripjaws 12GB DDR3-1600 ;; 128GB Samsung 830 ;; MSI GTX460 v2 w/ blob ;; Arch Linux + KDE 4.x

Offline

#20 2012-11-19 19:48:23

DaneM
Member
Registered: 2012-11-19
Posts: 6

Re: PULSEAUDIO Crackling / Distortion

Hello.  I was just searching for a fix for this problem, and this was the first thread that came up on Google.  The solutions mentioned herein didn't work for me, but I did find something that does, so I think it only fair to post back.  (Note: I'm a Linux Mint user, but since this was the first thing on Google's results page, and since the problem isn't Mint/Ubuntu-specific, I figure it's good form to post my solution here, anyway.)

Here's what I've discovered: there's a "proper" workaround, and a very dirty hack.  Both are below.  (The hack was mentioned here, previously.)

"Proper" workaround:
Run:

sudo -H alsamixer

...and set PCM to something substantially below maximum.  Having PCM at or near maximum causes crackling and distortion.  Mine is at "-4.40, -4.80"--whatever that means.  Then:

sudo -H alsactl store

The "-H" option tells sudo to use the current user's home directory instead of setting it to "/root".  Not using this option will result in a "home directory /home/blah is not ours" error.  This isn't necessary on all systems, presumably, and it can probably be done with "su", instead.



DIRTY hack:
To reduce the "crackling" in (some) multimedia apps at the expense of realtime performance, do this:

In /etc/pulse/default.pa, change this:

load-module module-udev-detect

...to this:

load-module module-udev-detect tsched=0

This is a very dirty workaround that bypasses PulseAudio's scheduling mechanisms in favor of the traditional interrupt approach.  Use with caution.


I hope this helps you all, in case you haven't yet solved this problem.  There's one other thread I found in Arch Forums that seems to need this information, so I hope a "double post" is OK just this once.  :-)

Offline

#21 2012-11-19 20:09:50

beroal
Member
From: Ukraine
Registered: 2009-06-07
Posts: 359
Website

Re: PULSEAUDIO Crackling / Distortion

DaneM wrote:

set PCM to something substantially below maximum.  Having PCM at or near maximum causes crackling and distortion.  Mine is at "-4.40, -4.80"--whatever that means

You are just changing a volume level in the analog mixer of your sound card.

Once I encountered distortion caused by high PCM volume. That occurred in a sound card embedded into a motherboard. I think that it was because of clipping audio signal.


we are not condemned to write ugly code

Offline

#22 2012-11-19 20:18:07

DaneM
Member
Registered: 2012-11-19
Posts: 6

Re: PULSEAUDIO Crackling / Distortion

You are just changing a volume level in the analog mixer of your sound card.

Once I encountered distortion caused by high PCM volume. That occurred in a sound card embedded into a motherboard. I think that it was because of clipping audio signal.

Thanks for the reply, beroal.  I'm not entirely clear on what you're saying, though; can you elaborate?

I've found that there's certainly more than one type and cause of "crackling," and I am using onboard audio (Intel HD Audio, with Realtek audio codec); is that what you mean?  While the above solutions seem to help both kinds of crackling in my case, I do suspect that the remaining periodic "tick" sound is because of a signal interruption/delay/something.  (This doesn't happen in Windows 7, so I suspect it's a Linux sound thing.)  Thoughts?

Offline

#23 2012-11-20 07:35:57

beroal
Member
From: Ukraine
Registered: 2009-06-07
Posts: 359
Website

Re: PULSEAUDIO Crackling / Distortion

DaneM wrote:

I'm not entirely clear on what you're saying, though; can you elaborate?

The operation you did in "alsamixer" sounds like a volume adjusting. I will be more sure if you supply a screenshot. Should I elaborate on "analog mixer" or "clipping audio signal"?

DaneM wrote:

I've found that there's certainly more than one type and cause of "crackling,"

I also think so.


we are not condemned to write ugly code

Offline

#24 2012-11-20 10:28:14

DaneM
Member
Registered: 2012-11-19
Posts: 6

Re: PULSEAUDIO Crackling / Distortion

Here's a screenshot:

http://s1183.beta.photobucket.com/user/ … r.png.html

As I understand it, PCM is the software equivalent of "gain," such as one would find on an amplifier or mixer board.  I think it's a sort of "pre-amp."  As such, it adds amplitude to the signal at the cost of signal clarity.  Keeping it down to a reasonable level doesn't significantly harm the sound, but cranking it up does the same as an "overdriven" amplifier--it distorts the sound, just like with an electric guitar.  (I'm a guitarist, FYI. :-)  Using no PCM at all will give you basically no sound, though, so you can't really get away with turning it down to 0.

I hope that makes more sense than my previous posts.  :-)

As for "clipping audio" and "analog mixer," I think I could use some clarification on how you're using those terms.

Have a nice day.

Offline

#25 2012-12-03 19:42:13

Mixu
Member
Registered: 2012-12-03
Posts: 26

Re: PULSEAUDIO Crackling / Distortion

Hi people!

I've got a similar problem, but only when I play some audio, and only at the begginning.
It happens to me for Spotify, webpages like youtube, grooveshark and so.
Whe I click on play it goes doing crackling sounds and the video playing is fast, after some time (sometimes minutes, sometimes seconds) it plays fine and without speed increase.

Anyone knows anything about it?

I have tried the tsched=0 and the daemon.conf changes, but still happens the same sad

Thanks!

Last edited by Mixu (2012-12-03 19:43:00)

Offline

Board footer

Powered by FluxBB