[Jack-Devel] Problems with variable latency
Hello,
I am using jack in an application where I need sample accurate
synchronization between capture and playback. I am using jack_delay and
jack_iodelay to precisely measure the roundtrip latency in frames. On my
better machine (core i7, maudio delta 66, 64-bit Debian, jackdmp 1.9.9) the
latency in frames reported by jack_delay or jack_iodelay increases slowly
over time by up to 12 frames. For example, it will start at 3132.66 frames
but after ~5 minutes, it will jump up to 3133.66 frames. This will continue
until about 3144.66 frames is reached and then it may return back to
3132.66 or 3.133.66 frames latency. It may take hours for it to go through
this cycle. If I restart jack_delay, it does not go back to 3132.66 frames,
but continues with whatever the last delay I saw was. There are seldom
xruns or other errors produced during a jump. It happens at various
frames/period and periods/buffer settings. It happens at whatever CPU
governor setting I use (performance, on demand). It happens whether or not
I assign the ice1712 IRQ to a specific processor with smp_affinity. My
cheap netbook with built-in sound (atom, 32-bit Debian, jackdmp 1.9.9) does
not exhibit this problem! Any idea of what is going on?
Here is text output for jack_iodelay when it goes from 3140.66 frames back
to 3133.6 frames. There was an xrun.
3140.667 frames 65.431 ms total roundtrip latency
extra loopback latency: 68 frames
use 34 for the backend arguments -I and -O
3140.669 frames 65.431 ms total roundtrip latency
extra loopback latency: 68 frames
use 34 for the backend arguments -I and -O
Signal below threshold...
Signal below threshold...
Signal below threshold...
3133.719 frames 65.286 ms total roundtrip latency
extra loopback latency: 61 frames
use 30 for the backend arguments -I and -O
3133.691 frames 65.285 ms total roundtrip latency
extra loopback latency: 61 frames
use 30 for the backend arguments -I and -O
Here is text output for jack_iodelay when it goes from 3136.6 to 3137.6
frames. There was no xrun.
3136.669 frames 65.347 ms total roundtrip latency
extra loopback latency: 64 frames
use 32 for the backend arguments -I and -O
3136.669 frames 65.347 ms total roundtrip latency
extra loopback latency: 64 frames
use 32 for the backend arguments -I and -O
3137.187 frames 65.358 ms total roundtrip latency
extra loopback latency: 65 frames
use 32 for the backend arguments -I and -O
3137.432 frames 65.363 ms total roundtrip latency
extra loopback latency: 65 frames
use 32 for the backend arguments -I and -O
1367903793.16359_0.ltw:2,a <CAPmdav9030mvJSXcPC6230D=o4-s6cMaP13_WDnkdeFKXqaT1g at mail dot gmail dot com>