LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2005, 04:29 PM   #1
mailmaldi
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Rep: Reputation: 0
Sound Crackling


theres crackling coming on any sound output on my linux distro only...

the sound is clear on windowsXP....

when i goto system settings--> soundcard detection

it shows my sound card & plays teh test sound Clearly...no crackling there at all...but everywhere else it crackles....

this crackling was present all day yesterday....somehow today all day it stopped crackling(after rebooting i.e.) & now after i rebooted, crackling has resumed...
 
Old 08-21-2005, 05:15 PM   #2
NetRAVEN5000
Member
 
Registered: May 2005
Distribution: Ubuntu 9.04
Posts: 320

Rep: Reputation: 30
Are you using KDE? In the KDE Control Center's Sound configuration module, you might want to try playing with the settings (such as the sound buffer size, sound quality. . .).
 
Old 08-21-2005, 10:45 PM   #3
mailmaldi
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Original Poster
Rep: Reputation: 0
no i am on Gnome..
 
Old 08-22-2005, 12:00 AM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
there are a couple of ways to deal with this i think
(remember i don't know whats going on but i think it's the bus getting overloaded)
also on my machine the alsa output for xmms just sucks and i have to use either oss emulation or jack to get consistent sound out of xmms. so try different outs.

first use the command
lspci -v
to see how the bus sees your components
the audio card will have some name like 02:0a.0 or something to the left of it
i will refer to this as <audiocardname>
as root try
(first thing increases bandwidth for all devices second increases bandwidth for sound device to max)
setpci -v -d '*:*' latency_timer=b0
setpci -v -s <audiocardname> latency_timer=ff

see if that fixes it -- if it does you can add it to boot scripts
the first command increases latency across the bus and some people disagree with that for sound so you decide -- if you are running a video driver with a very high setting it will reduce it also so you have to decide that as well. reduced not increased latency seems on the surface to be better for audio but it actually reduces bandwidth or burst size.. anyway enough of my ramblings.

you can also mess with buffersizes and whatnot in ~/.asoundrc here is mine because it contains left over cruft where i tweeked mine
the output buffer junk is in the plugin named dmixer
latency and buffersize are all intertwined .. alsa uses a ring buffer so if it overruns or underuns it sounds all weird.
Code:
pcm.dsp {
    type plug
    slave.pcm "duplex"
}

pcm.dsp0 {
    type plug
    slave.pcm "duplex"
}



# this makes native ALSA apps default to using dmix
pcm.!default {
    type plug
    slave.pcm "duplex"
   
}

ctl.!default {
	type hw           
	card 0
        }

pcm.dmixer  {
	type dmix
	ipc_key 1024
	slave {
	    pcm "hw:0,0"
	 #   period_time 0 # set to 0 lets period size and buffer size do everything
             period_time 2 # this is the general standard even though often is set to 0
         #   period_time 84000
         #   period_size 512
             period_size 1024 # oss period frames this is the one shown as hardware
	 #   period_size 2048
         #   period_size 4096 # not great to go over this 
         #   buffer_time 340000
	 #   buffer_size 16384 # this is the one shown as hardware but causes huge mess
         #   buffer_size 8192
         #   buffer_size 4096
             buffer_size 2052 # this is the one i use
             rate 44100 # can let card decide this on it's own this one is what hardware says
	 #   rate 48000

	}
	bindings {
	    0 0
	    1 1
	}
    }
 
    ctl.dmixer {
	type hw
	card 0
    }

    ctl.mixin {
        type hw
        card 0
     }

    pcm.duplex{
         type asym
         playback.pcm "dmixer"
         capture.pcm "mixin"
      }

pcm.mixin {
        type dsnoop
        ipc_key 5978293	# must be unique for all dmix plugins!!!!
        ipc_key_add_uid yes
        slave {
                pcm "hw:0,0"
		channels 2
	#	period_size 1024
                period_size 1026
	#	buffer_size 4096
                buffer_size 2052
		rate 44100
      #		periods 0 
		period_time 2
        }
        bindings {
                0 0
                0 1
        }
    }

Last edited by foo_bar_foo; 08-22-2005 at 02:26 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crackling Sound Quality in XMMS matt_com911 Linux - Software 1 06-19-2005 01:59 PM
Doom 3 Sound Crackling B0mb Linux - Games 1 04-28-2005 03:45 AM
Audigy2 NX Crackling Sound erikwebb Linux - Hardware 3 10-16-2004 10:18 PM
Sound Crackling Audigy 2 redneon Linux - Hardware 7 10-06-2004 12:07 AM
Playing MP3's with crackling sound snoopyswiss Linux - Newbie 1 08-18-2004 08:53 AM


All times are GMT -5. The time now is 06:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration