[LAD] zita-ajbridge and aloop
fons at linuxaudio.org
Wed Jul 17 20:09:01 UTC 2013
On Wed, Jul 17, 2013 at 05:21:12PM +0200, IOhannes m zmoelnig wrote:
> when running zita-a2j resp. -j2a in verbose mode, i understand that
> the 1st number (the "loop error") should be as close to zero as possible.
> in practice they are varying wildly betweeen +16 and -10.
> how bad is this?
It's not that bad, it just indicates that there is some timing
jitter. This can happen for a variety of reasons, see below.
> more troubling however, is that whenever i start an alsa application
> (e.g. alsa_delay), one or both zita-*2* applications complain with:
> Detected excessive timing errors, waiting 15 seconds.
> This may happen with current Jack1 after freewheeling.
You could try playing with the value in jclient.cc, line 437
to avoid this. Note that the delay error value printed by -v
is averaged over 1/4 second, while the one tested is not.
> (btw, i'm using robin's jackd2-1.9.10+nobus+20130114gite4730c6c-NMU1)
> after 15 or so seconds the waiting application recovers, only to
> hick-up again after some seconds (see end of email).
> i'm running the programs as follows:
> jackd -dalsa -dhw:0,0 -r44100 -p1024 -n2
> zita-j2a -v -d hw:Loopback,0,1 -c2 -r44100 -Q16 -p2048 -n2
> zita-a2j -v -d hw:Loopback,0,0 -c2 -r44100 -Q16 -p2048 -n2
> alsa_delay hw:Loopback,1,0 hw:Loopback,1,1 44100 2048 2
This is really a combination of all possible worst-case scenarios.
* Does your HW have a high resolution timer that Jack can use
for its microseconds timer ? If not there will be trouble.
* Same for the aloop device. It emulates a HW device at some
configured sample rate, and therefore depends on an accurate
timer in order to do this without loads of jitter.
* I have *no* idea of the correct implementation of the DLL used
in Jack2, but zita-ajbridge does critically depend on it.
* For anything USB, 44.1 kHz is really asking for trouble. With
48 kHz you have at least a a simpler relation to the USB interrupt
rate of 1 kHz, and if that doesn't help using -n 3 probably will.
I don't know 'Andrea Electronics'...
* Keep in mind that zita-ajbridge was not designed to be used
this way. Its primary use is to add an additional (decent)
soundcard to Jack, and I have my doubts about aloop.
> finally: i'm wondering a bit on how to choose proper values for
> period-size and fragement size.
> that is: should zita-*a* period/nfrags match those of jack and/or
> those of alsa_delay?
For Jack vs. zita-*2* there are no restrictions. In normal use
(that is adding a real sound card to Jack), you would make the
period size of zita-*2* shorter than the one used by Jack
(unless that is already quite small) to avoid additional latency.
I don't know how having different period sizes on both ends of
an aloop would affect it.
A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)
More information about the Linux-audio-dev