LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-07-2007, 06:21 PM   #1
mykrob
Member
 
Registered: Jun 2004
Location: Jackson, TN
Distribution: Kubuntu Feisty
Posts: 606

Rep: Reputation: 31
Ardour and the clicking noise


Hey-

I am running Kubuntu 7.04 on my Compaq Presario V5204NR laptop. I have installed the low latency kernel from the universe repositories and have also installed Ardour 2 from getdeb.

I am able to record my guitar, but there is a terrible clicking noise, which makes the sound "stutter". I had this problem with the generic kernel and thoughtthe low latency kernel would fix it... My question is, is this just crappy hardware, or is there something I can do to remvoe the "click" in my recorder sound? I know this laptop is not a studio workhorse, I just want to record some of my guitar tracks from the comfort of my bedroom, so I i get an idea for a song, I can semi-document it.

Thanks for any help whatsoever..

-myk
 
Old 05-08-2007, 11:22 AM   #2
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
if you are using qjackctl try setting the jack buffer larger.
otherwise adjust command line jack settings.
try setting rate to 44100 instead of 48000.
i am going to give you a copy of my ~/.asoundrc and there are some settings in there for you to play with as well. You wil see where i have commented out various alternative settings.
Code:
 pcm.jackplug {
	        type plug
	        slave { pcm "jack" }
	}

	pcm.jack {
	        type jack
	        playback_ports {
 	               0 alsa_pcm:playback_1
 	               1 alsa_pcm:playback_2
 	       }
 	       	capture_ports {
 	               0 alsa_pcm:capture_1
                	1 alsa_pcm:capture_2
        	}

	}

pcm.dsp {
    type plug
   # slave.pcm "dmixer"
    slave.pcm "duplex"
}

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



# this makes native ALSA apps default to using dmix
pcm.!default {
    type plug
   # slave.pcm "dmixer"
    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 128
	 #   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
        }
    }

pcm.ladspadelay {
type ladspa
slave.pcm "plughw:0,0";
path "/usr/lib/ladspa";
plugins [
{
label delay_5s
input {
controls [ 0.8 0.3 ]
}
}
]
}

pcm.delay {

type plug

slave.pcm "ladspadelay";
}


pcm.ladspacompress {
type ladspa
slave.pcm "plughw:0,0";

path "/usr/lib/ladspa";

plugins [
{
label dysonCompress
input {
#peak limit, release time, fast ratio, ratio
controls [1.0 0.1 0.1 0.9]
}
}
]
} 

pcm.compress {

type plug

slave.pcm "ladspacompress";
}
 
Old 05-08-2007, 03:15 PM   #3
mykrob
Member
 
Registered: Jun 2004
Location: Jackson, TN
Distribution: Kubuntu Feisty
Posts: 606

Original Poster
Rep: Reputation: 31
Thank you, I will try.

I have located how to adjust the sample rate, but what about the buffer? I see an option for "Periods/Buffer",which is set at 2 by default. Is this the one I should change? If so, what value would you recommend? I see in your asound file, you have 2052 set.. I just want to make sure that this is the right thing to change, because going from 2 to 2000 is drastic.

Thanks,.
-myk
 
Old 05-08-2007, 03:20 PM   #4
mykrob
Member
 
Registered: Jun 2004
Location: Jackson, TN
Distribution: Kubuntu Feisty
Posts: 606

Original Poster
Rep: Reputation: 31
me again.. Also, i do not have the file .asoundrc..

should i make one, or is everything for this configurable through the qjackctl interface?
 
Old 05-08-2007, 05:54 PM   #5
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
yea just make above a new file named ~/.asoundrc
the jack settings are something different.
how it all interacts is the great mystery
in qjackctl buffer is called Frames/Period
mine is set to 512
thats a good place to start and moving up from there
Periods/buffer 2 is good
that makes the buffer 1024
read the slash as per

generally slower hardware requires more buffering
 
Old 05-09-2007, 05:33 PM   #6
mykrob
Member
 
Registered: Jun 2004
Location: Jackson, TN
Distribution: Kubuntu Feisty
Posts: 606

Original Poster
Rep: Reputation: 31
better than before, but still a clicking noise. I think it may be the sound card. My laptop has Intel HDA, and I am using alsa 1.0.14rc2 ( i think)

Since this driver is a release candidate, and I know this particular sound chipset has been a bit fruity, perhaps this is the problem.. I know I have successfully used Ardour on lesser hardware in the past, and it worked fine...


I guess all I can do is wait for a better driver, but if anyone can confirm or deny my driver theory, that would help.

thanks,
-myk
 
Old 05-09-2007, 06:23 PM   #7
studioj
Member
 
Registered: Oct 2006
Posts: 460

Rep: Reputation: 31
i don't know about the driver but there a few other tricks to try.
first try to make xorg a bit nicer
renice +2 -p `ps -C Xorg -o pid=`
if that makes the video or mouse real choppy try +1 or if all is ok try +5 and see what happens etc. just play with it so x eats up less bandwidth.

also try to increase the hardware latency settings for larger bursts (seems counter intuitive)
look up the soundcard with
lspci -v
mine is 04:08.0
so i insrease latency with the command
setpci -v -s '04:08.0' latency_timer=48
use value ff for maximum
setpci -v -s '04:08.0' latency_timer=ff
just play with the values and check lspci -v to see results
the command sees the values as sugestions only !
some drivers you can't change etc.
just play with it and see if it helps
you can also try to increase latence across the pci bus controllers and see if that helps
you can also try to decrease latency on the video controller and see if it helps

and one last tweek to try
look at
cat /proc/interrupts
set realtime priorities for the soundcard -- mine is on IRQ 11 so i set
chrt -f -p 82 `pidof "IRQ 11"`
next set rt prioritier for yur real time clock (rtc)
mine is on IRQ 8 so i set
chrt -f -p 98 `pidof "IRQ 8"`

if you don't have chrt just get it from your distribution package thingy
 
  


Reply



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
jack has been either shutdown or it disconnected ardour because ardour wasnt fast eno thisisquincyorjim Linux - Software 0 07-28-2006 01:28 PM
Ardour vous Linux - Software 3 09-20-2005 02:41 AM
Clicking noise on WD raptor w/ raid 0 provokator Linux - Hardware 2 06-21-2005 03:12 AM
Anyone here use Ardour? little_penguin Linux - Software 4 04-07-2005 12:02 AM
Horrible clicking noise with mouse movement SteelWheel Mandriva 0 06-26-2004 03:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:30 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
Open Source Consulting | Domain Registration