[PlanetCCRMA] Low latency kernel?

Fernando Lopez-Lezcano nando@ccrma.Stanford.EDU
Sun Dec 4 17:23:01 2005


On Sun, 2005-12-04 at 23:28 +0100, Paquita wrote:
> Hi,
> 
> I'm running FC4 with the 2.6.13-0.3.rdt.rhfc4.ccrma kernel from the 
> planetedge repository.
> As I don't have a /proc/sys/kernel/lowlatency, should I conclude this 
> kernel does not have the low latency patch?

Things work differently than in the 2.4.x world, you don't see anything
in /proc and it is always active. 

> The reason I'm asking is that currently, I get a 42.7 ms latency when I 
> launch the Jack server with the default settings. 

Ouch...

> If I try to e.g. 
> listen to a Hydrogen demo song, there are very audible clicks. They 
> unsurprisingly get worse if I decrease the period.
> 
> The jack default command is: /usr/bin/jackd -R -dalsa -dhw:0 -r48000 
> -p1024 -n2.
> hw:0 is indeed the device I want to use. It's an external USB interface:
> [paquita@marlon asound]$ cat cards
> 0 [Duo            ]: USB-Audio - USB AudioSport Duo
>                      M Audio USB AudioSport Duo at usb-0000:00:1d.7-3.2, 
> full speed

Ahhh, usb cards... that's the problem. Jack is not happy about the way
that type of hardware works. You are already using sampling rate of
48000 which is the best choice for usb. You could try a period of 480 or
960, see for example:
  http://lalists.stanford.edu/lad/2003/02/0205.html
and/or use a bigger number for the number of periods, for example 3
instead of 2. 

> and I've got this .asoundrc (I do hope to write a better one later):
> [paquita@marlon ~]$ cat .asoundrc
> pcm.usb-audio {
>         type hw
>         card 0
>  }
> 
> ctl.usb-audio {
>         type hw
>         card 0
> }

In general you don't need a .asoundrc for things to work (unless you
want to create nice names for the devices). 

> By the way, what does rdt mean in the kernel name?

It means it is using Ingo Molnar's realtime preemption patch and that it
is configured using PREEMPT_DESKTOP (instead of the better but more
risky PREEMPT_RT - I'm currently running my test kernels with the
latter). 

-- Fernando