You are not logged in.

#26 2012-12-06 13:01:37

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

Re: PULSEAUDIO Crackling / Distortion

It seems I solved this by changing the default sample rate from 44100 to 48000 big_smile

Nevermind... after a reboot it stills does some crackling, with and without tsched=0 sad

Last edited by Mixu (2012-12-06 16:00:29)

Offline

#27 2012-12-06 16:02:33

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

Re: PULSEAUDIO Crackling / Distortion

Mixu wrote:

It seems I solved this by changing the default sample rate from 44100 to 48000 big_smile

Nevermind... after a reboot it stills does some crackling, with and without tsched=0 sad

If you don't use the features of pulseaudio, I find just using plain ALSA to be the best.


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

#28 2012-12-06 16:04:57

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

Re: PULSEAUDIO Crackling / Distortion

I don't know what are the benefits of pulseadio... so... I thinkg I won't be using it much tongue
How can I go without PulseAudio? Because IIRC it was a dependency of Gnome3.

Offline

#29 2012-12-08 09:39:17

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

Re: PULSEAUDIO Crackling / Distortion

I've just tried stopping pulseaudio (which took some doing, seeing as it was set to autospawn=yes), and as I should have expected, the crackling sound went away.  Also, more surprisingly, I was able to play sound in multiple apps at once, without problems!  It would seem that ALSA's been significantly "fixed" over the last 5 years or so.  So, unless something comes up I have no further use for Pulse (thank goodness).  Removed and happy.

Thanks, all.

--Dane

Offline

#30 2012-12-08 13:06:31

caarlos0
Member
Registered: 2012-08-02
Posts: 4

Re: PULSEAUDIO Crackling / Distortion

Same here

carlos in carlos/  
› lspci | grep audio -i
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 06)

Any fix/workaround?


---

BTW: Pulseaudio from testing is broken too.

Last edited by caarlos0 (2012-12-08 21:30:23)

Offline

#31 2015-04-28 09:08:15

cbxbiker61
Member
Registered: 2015-04-28
Posts: 2

Re: PULSEAUDIO Crackling / Distortion

While some of the above discussion is good it is missing an essential ingredient....specifically that the user has to be granted the authority to run real-time.

The pulse audio daemon in almost all installations (unless starting it as a system daemon as root) runs with the access granted to a particular user, so we have to give that user the right to run real-time processes.  We can do that by creating /etc/security/limits.d/pulse-rt.conf consisting of the following (the critical parts are nice, rtprio ahd rttime):

@pulse-rt        -    core            unlimited
@pulse-rt        -    memlock         512000
@pulse-rt        -    nice            -11
@pulse-rt        -    rtprio          99
@pulse-rt        -    rttime          1000000

Create a pulse-rt group and put users that you want to grant real-time priority in that group.

The only other thing you may want to do is uncomment and change rlimit-rttime to 1000000 in /etc/pulse/daemon.conf.  Theoretically you shouldn't really need to allow pulse-audio to run for 1sec uninterrupted, although the only pitfall of setting this would be if pulse audio's code was faulty and started eating 100% of a core.

An additional benefit to these changes, for those of us using the wine-pulse port, is that it also likes rtprio and rttime to be bumped up.

With these changes (and the default.pa tsched change) wine-pulse sounds nice and clean on my AMD Kabini 5350 systems.

/etc/pulse/default.pa:load-module module-udev-detect tsched=0

Regards

Offline

#32 2015-04-28 20:09:57

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,196

Re: PULSEAUDIO Crackling / Distortion

Hi cbxbiker61,

Welcome to Arch Linux.  Thank you for the relevant input.    This thread is a few years old and it is not likely the original posters are still fighting this -- Things have changes a lot since the last post.

I am going to go ahead and close this thread.  If the conversation needs to continue, feel free to start a new thread and reference this one.  That way the owner of the thread will be an active participant. 

Thanks


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#33 2015-04-29 14:08:39

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,196

Re: PULSEAUDIO Crackling / Distortion

Reopened after communication with cbxbiker61


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

#34 2015-04-30 12:50:07

cbxbiker61
Member
Registered: 2015-04-28
Posts: 2

Re: PULSEAUDIO Crackling / Distortion

OK, this should close out this problem on Kabini/Kaveri hardware.

I wasn't really satisfied that all of the above approaches were truly ideal, so I decided to dig into the kernel code and fix it properly.  I came up with a test patch that worked perfectly on Kabini/Kaveri.  Once I had a good test patch I fired off a copy to Alex Deucher at AMD for his review, and he came back with an official patch.  This will be rolled into the stable linux trees at some point, in the meantime here it is.

0001-hda-set-proper-caps-for-newer-AMD-hda-audio-in-KB-KV.patch                             

From f8bfb9ccda6134d56eaa41500b48b2afd1787868 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Tue, 28 Apr 2015 14:56:07 -0400
Subject: [PATCH] hda: set proper caps for newer AMD hda audio in KB/KV

Fixes audio problems on newer asics.

Noticed by: Kelly Anderson <kelly@xilka.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
sound/pci/hda/hda_intel.c | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index a8a1e14..479ee25 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2056,6 +2056,8 @@ static const struct pci_device_id azx_ids[] = {
        { PCI_DEVICE(0x1022, 0x780d),
          .driver_data = AZX_DRIVER_GENERIC | AZX_DCAPS_PRESET_ATI_SB },
        /* ATI HDMI */
+       { PCI_DEVICE(0x1002, 0x1308),
+         .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
        { PCI_DEVICE(0x1002, 0x793b),
          .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
        { PCI_DEVICE(0x1002, 0x7919),
@@ -2064,6 +2066,8 @@ static const struct pci_device_id azx_ids[] = {
          .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
        { PCI_DEVICE(0x1002, 0x970f),
          .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
+       { PCI_DEVICE(0x1002, 0x9840),
+         .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
        { PCI_DEVICE(0x1002, 0xaa00),
          .driver_data = AZX_DRIVER_ATIHDMI | AZX_DCAPS_PRESET_ATI_HDMI },
        { PCI_DEVICE(0x1002, 0xaa08),
--
1.8.3.1

Last edited by cbxbiker61 (2015-04-30 12:51:15)

Offline

#35 2015-05-20 19:49:26

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

Re: PULSEAUDIO Crackling / Distortion

Great!  Thanks for your work, cbxbiker61!

Offline

#36 2015-05-23 00:29:57

fixles
Member
Registered: 2012-09-15
Posts: 101

Re: PULSEAUDIO Crackling / Distortion

Hello,

I used to have similar problems with distorted sound in certain applications. It seemed to be that from either version 3 or 4 of pulseaudio they moved to a time based thing that needs to sync with hardware. Here are my notes on how I fixed it, Maybe it will work for you if it gets worse or better maybe these are the settings you need to change with different values.

Hope this helps.

# Problem slow recording with audacity etc from pulseaudio on laptop.
  - uncomment these 2 lines in /etc/pulse/daemon.conf
  (77) default-sample-rate = 44100             
  (78) alternate-sample-rate = 48000

# PULSE AUDIO UNDERRUN USB HEADSET
  - uncomment or add to /etc/pulse/daemon.conf
  default-fragment-size-msec = 5

# Arch not recording flash / web videos
  - Flash uses alsa
  - install pulseaudio-alsa

Offline

#37 2015-06-16 14:08:14

harryharryharry
Member
Registered: 2015-06-16
Posts: 4

Re: PULSEAUDIO Crackling / Distortion

I have a similar but not identical issue: crackling / choppy playback with vlc, and audio stops within 1 second with amarok when using pulseaudio over LAN. (pulseaudio via local soundcard works fine)

When I use a backup of a couple of weeks ago audio plays over network without any problems, but whenever I do a fresh install I get the sound issue, even when I copy over the /etc/pulse and ~/.config/pulse directories from the backup.

Does anyone have any suggestions ? Logically I assume I must be missing some package when doing the fresh install since its not a config issue (or else using the config dirs from the backup would have solved the issue).

(btw I can perform "sudo pacman -Syu" when using the backup and sound works without problems, so I don't think it's a problem in newer versions of some package.)

Offline

#38 2015-12-30 13:27:19

ifch0o1
Member
Registered: 2015-12-30
Posts: 1

Re: PULSEAUDIO Crackling / Distortion

Hello, I have similar problem, but with the difference - I got bad sound quality and crackling everywhere (system wide) (Windows 7 too). I am using ubuntu.

My sound also have one more common issue: (it's common but without the crackling)
1. while the sound output is low, no sound produced.
2. while the output hit medium dB only little crackling/noice is produced (with almost no other sound).
3. while the output hit high dB the sound is very poor. for example: 150% volume - I can hear the song, but with very bad quality and little distortion.

I think my issue is mixed and may have hardware problem, but i'm not sure. As I see Azalia HDAs have many issues with crackling and noise.

Device:

80:01.0 Audio device: VIA Technologies, Inc. VT8237A/VT8251 HDA Controller (rev 10)

I think is not very good recognized, cuz ubuntu says the card is:

snd_hda_intel
#and also founded but not used:
snd_hda_intel_realtek_codec

The codec is: Realtek ALC861

BIOS says: Azalia HDA Controller (yup)
Windows 7 says: I got no drivers for this thing. Windows XP drivers Installed on Windows 7 says: The issue above.

I am currently installing win XP live on USB to try it.

Last edited by ifch0o1 (2015-12-30 13:35:11)

Offline

#39 2015-12-30 14:06:59

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: PULSEAUDIO Crackling / Distortion

3. while the output hit high dB the sound is very poor. for example: 150% volume - I can hear the song, but with very bad quality and little distortion.

uhm, this is to be expected? distortions already begin at around 80% normally

also when you experience this in linux and windows, why post in a pulseaudio thread?

Last edited by Rasi (2015-12-30 14:07:44)


He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.

Douglas Adams

Offline

#40 2015-12-30 16:57:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,196

Re: PULSEAUDIO Crackling / Distortion

ifch0o1,

Welcome to Arch Linux.  Unfortunately, there is not much we can do to help you.  Certainly not with Windows and probably not with Ubuntu.
Closing this old thread.
https://wiki.archlinux.org/index.php/Fo … bumping.22
https://wiki.archlinux.org/index.php/Fo … pport_ONLY


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Online

Board footer

Powered by FluxBB