[LAU] xrun killing: ubuntu realtime kernel, layla 3g card combining ADAT and analog i/o

Sean Corbett seanbutnotheard at gmail.com
Tue Feb 5 21:16:53 EST 2008

Hello all,

I've been racking my brains over this for some time now.  I have an
older (2003 or so, but still pretty decent) dual processor AMD machine
with an Echo Layla 3G audio interface, and connected to the Layla via
ADAT, an Alesis AI3 A/D converter.  So after some hunting, I
discovered that the Echo driver is written so that the analog and
digital parts of the I/O appear on hw:0,0 and hw:0,1, respectively.
So I learned how to make an .asoundrc file using the "multi" plugin to
combine all 32 channels (16 analog, total ins and outs, and 16 ADAT)
into a single interface.  So far, so good... Jack sees all 16 ins and
16 outs, and i can get audio to pass at various sample rates through
all the channels (so I'm assuming it's not a sync problem).  However,
running UbuntuStudio's realtime kernel, I get about 3-4 xruns per
second.  I have so far tried:

-editing /etc/security/limits.conf with appropriate values for the audio group
-tweaking the realtime priority of jack, various timer threads, and
the IRQ thread for Layla, using chrt (jack is set to RT via qjackctl)
-setting the frames/period as high as 2048 seems to have little, if
any, effect, though setting it way down (32-64 frames) gives hundreds
of xruns per second.

The problem does not seem to be present when i use either  hw:0,0 or
hw:0,1 directly as the device (with no other settings changed)... in
fact, i can run Jack reliably at 32 frames when i do so, leading me to
think it's either a) something with the multi plugin or asoundrc?  or,
b) perhaps a slight ADAT clock jitter? (the AI3 syncs to whatever
clock it finds on its inputs, plus Layla's clock is set to internal,
so this seems unlikely.)

Anyone have any suggestions as to what to try next?

Thanks in advance for any help whatsoever...

here are some more details:
running alsa version 1.0.14, jack version 0.103.0

contents of my .asoundrc:
# create a virtual sixteen-channel device with layla's
# analog and digital i/o:
pcm.layla16 {
        type multi;
        slaves.a.pcm "hw:0,0";
        slaves.a.channels 8;
        slaves.b.pcm "hw:0,1";
        slaves.b.channels 8;

        bindings.0.slave a;
        bindings.0.channel 0;
        bindings.1.slave a;
        bindings.1.channel 1;
        bindings.2.slave a;
        bindings.2.channel 2;
        bindings.3.slave a;
        bindings.3.channel 3;
        bindings.4.slave a;
        bindings.4.channel 4;
        bindings.5.slave a;
        bindings.5.channel 5;
        bindings.6.slave a;
        bindings.6.channel 6;
        bindings.7.slave a;
        bindings.7.channel 7;
        bindings.8.slave b;
        bindings.8.channel 0;
        bindings.9.slave b;
        bindings.9.channel 1;
        bindings.10.slave b;
        bindings.10.channel 2;
        bindings.11.slave b;
        bindings.11.channel 3;
        bindings.12.slave b;
        bindings.12.channel 4;
        bindings.13.slave b;
        bindings.13.channel 5;
        bindings.14.slave b;
        bindings.14.channel 6;
        bindings.15.slave b;
        bindings.15.channel 7;
# Create a fake mixer for Jack to talk to
ctl.layla16 {
        type hw;
        card 0;

Some JACK output:

20:49:28.832 JACK is starting...
20:49:28.832 jackd -R -P60 -t2000 -dalsa -dlayla16 -r48000 -p1024 -n2
20:49:28.836 JACK was started with PID=6352 (0x18d0).
jackd 0.103.0
Copyright 2001-2005 Paul Davis and others.
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK compiled with System V SHM support.
loading driver ..
apparent rate = 48000
creating alsa driver ...
configuring for 48000Hz, period = 1024 frames, buffer = 2 periods
ALSA: final selected sample format for capture: 32bit little-endian
ALSA: use 2 periods for capture
ALSA: final selected sample format for playback: 32bit little-endian
ALSA: use 2 periods for playback
20:49:30.863 Server configuration saved to "/home/sean/.jackdrc".
20:49:30.864 Statistics reset.
20:49:30.866 Client activated.
20:49:30.869 Audio connection change.
20:49:30.882 Audio connection graph change.
JACK tmpdir identified as [/dev/shm]
20:49:30.984 XRUN callback (1).
20:49:32.285 XRUN callback (2).
20:49:32.883 XRUN callback (4 skipped).
20:49:35.740 XRUN callback (6).
20:49:37.259 Client deactivated.
20:49:37.261 JACK is stopping...
jack main caught signal 15
no message buffer overruns
20:49:37.283 JACK was stopped successfully.

More information about the Linux-audio-user mailing list