Very large value suggested by jack_iodelay

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
windowsrefund
Established Member
Posts: 64
Joined: Mon Jul 30, 2018 11:04 pm

Very large value suggested by jack_iodelay

Post by windowsrefund »

Hello Linux Musicians,

I followed the advice on https://wiki.linuxaudio.org/wiki/latency in order to determine the best i/o extra latency values for Jack and see this suggestion:

Code: Select all

3111.564 frames     64.824 ms total roundtrip latency
	extra loopback latency: 4294966313 frames
	use 2147483156 for the backend arguments -I and -O
The problem is that the suggested value is too large to plug into either qjackctl or Cadence. This makes me think something is very "off" and I'm wondering what to do. The audio in and out is directly attached to my new Gigabyte H370M DS3H motherboard. Am I missing something obvious or am I just evil for using this type of audio in the first place (non dedicated card or external device). Any help or ideas most welcome.

Thanks in advance
Pablo
Established Member
Posts: 1274
Joined: Thu Apr 17, 2008 9:57 pm
Been thanked: 3 times

Re: Very large value suggested by jack_iodelay

Post by Pablo »

If I remember correctly, the original jack_delay didn't even show the "extra loopback latency" information nor the suggestion of using some number of frames for -I and -O arguments, so that might be just a false indication, but it is strange.

Still, you can calculate the extra loopback latency yourself and then divide by two to put those numbers in the -I and -O arguments.

Make sure to run jack_iodelay with latency I/O at zero (default).

When you make the virtual connections, you will see a message in the output of jack_iodelay:
"new playback latency" and "new capture latency". The numbers depend on jack settings. In my case:

Code: Select all

Signal below threshold...
Signal below threshold...
new playback latency: [2048, 2048]
Signal below threshold...
Signal below threshold...
new capture latency: [1024, 1024]
  4075.994 frames     84.917 ms total roundtrip latency
	extra loopback latency: 1003 frames
	use 501 for the backend arguments -I and -O
As shown above, somehow, I have 2048 frames of playback latency and 1024 frames of capture latency, so my total round trip latency would be 2048 + 1024 = 3072 frames... if there were not the extra latency caused by the hardware.

Jack_iodelay measures 4076 frames, so I would calculate 4076 - 3072 = 1004 frames of extra loopback latency and I would use 502 for -I and -O. Jack_iodelay calculates 1003 and 501, which is practically the same.

In any case, this guide [1] recommends against using a simple cable for closing the loop on onboard cards. This is not mentioned in the guide you linked:
If you want to measure the latency of a cheap, integrated sound card that only has line-output and mic-input you cannot close the loop with a simple patch cable: both connectors may be mechanically compatible, but electrically they are not designed to work together, so attempting to connect them may harm your audio interface.
[1] https://wiki.linuxaudio.org/wiki/jack_latency_tests

EDIT: My test is made with a USB audio card (Cakewalk UA-25 EX). An integrated card will probably give much less extra latency.
windowsrefund
Established Member
Posts: 64
Joined: Mon Jul 30, 2018 11:04 pm

Re: Very large value suggested by jack_iodelay

Post by windowsrefund »

Hi,

Thanks for the response. I read up on, and ran jack_delay and can confirm what you said about it not reporting a suggestion. After re-reading your response, I realized you're still advocating I use jack_iodelay so I went back to using that tool. After making sure jack's latency i/o settings were reset to 0 and running jack_iodelay, I see the following:

Code: Select all

$ jack_iodelay 
new capture latency: [0, 0]
new playback latency: [0, 0]
Signal below threshold...
Signal below threshold...
At that point, inside Carla, I connect system/capture_1 to jack_delay/in and see

Code: Select all

new capture latency: [1024, 1024]
Then I connect jack_delay/out to system/playback_1 and see

Code: Select all

new playback latency: [2048, 2048]
Now I see much different (lower) values than what I saw when I first posted

Code: Select all

3111.564 frames     64.824 ms total roundtrip latency
	extra loopback latency: 39 frames
	use 19 for the backend arguments -I and -O
Next, I reran the test after reconfiguring qjackctl to use a value of 19 for both input and output latency. Here's what I see

Code: Select all

3111.564 frames     64.824 ms total roundtrip latency
	extra loopback latency: 1 frames
	use 0 for the backend arguments -I and -O
So I guess I'm in good shape now. Thanks for the info. I'm still not entirely sure why my first round of tests were producing those really high suggestions but things look good at this time.
Jack Winter
Established Member
Posts: 381
Joined: Sun May 28, 2017 3:52 pm

Re: Very large value suggested by jack_iodelay

Post by Jack Winter »

Oh, that's nice and low. What kind of card is that if I may ask?

You could use 19/20 for a perfect result :)

You could also playback and record a square wave or a single sample spike and zoom-in in your daw for extra verification.
Reaper/KDE/Archlinux. i7-2600k/16GB + i7-4700HQ/16GB, RME Multiface/Babyface, Behringer X32, WA273-EQ, 2 x WA-412, ADL-600, Tegeler TRC, etc 8) For REAPER on Linux information: https://wiki.cockos.com/wiki/index.php/REAPER_for_Linux
Post Reply