Re: [Jack-Devel] Jack on ARM with low-latency USB

PrevNext  Index
DateThu, 21 Nov 2013 20:06:57 +0100
From Jeremy Jongepier <[hidden] at autostatic dot com>
To[hidden] at lists dot jackaudio dot org
In-Reply-ToFabian Schlieper [Jack-Devel] Jack on ARM with low-latency USB
On 11/21/2013 05:17 PM, Fabian Schlieper wrote:
> Hi everyone,
> 
> I'm trying to build a low-latency audio processor on ODROID-X2 with an 
> external USB sound card (Behringer UCA-202).
> I can't get jack working stable with a period size of 128 samples.
> 
> I compiled a real-time kernel (with full preemption) and installed the rtirq 
> script.
> Command line starting jack:
> jackd -R -P80 -p16 -t2000 -dalsa -dhw:$USB_SOUND_CARD_INDEX,0 -p128 -n3 -
> r4441000 -i2 -o2 -s
> 
> It's running without audio glitches, but after some time (or when other USB 
> devices are heavily active) the sound gets disturbed and keeps crackling until 
> jack is restarted.
> 
> I know I could increase the period size, but I want to have low-latency, Is 
> 128 period size even realistic with USB sound?
> 
> Thanks for any comments and hints.

Hello Fabian,

What other optimizations did you do besides running a real-time kernel
and installing rtirq? Which RT kernel are you using? And could you post
the contents of /etc/default/rtirq? What software are you using to test?
And I assume -r4441000 is a typo :) And you don't need the -R option,
it's a JACK default.

Other things you could try:
* Setting CPU scaling governor to performance
* Overclocking the CPU
* Check if the USB controller shares its IRQ or not and on which bus it
sits. For instance on my Cubieboard the ethernet controller sits on the
same bus as the audio codec. If network traffic goes up (ssh -X and then
opening Hydrogen for example) audio can get distorted.
* Increase IO by using a good SD card and Ext4 with the noatime and
nobarrier flags and the rootflags=data=writeback kernel parameter.

You can try to get clean audio again by reseting the buffer size with
jack_bufsize 128. And yes, -p128 should be realistic, I can run a
UCG-102 with -p64 on a Cubieboard2 (Allwinner A20).

Best,

Jeremy
PrevNext  Index

1385060829.26332_0.ltw:2,a <528E59D1.2030607 at autostatic dot com>