1 (edited by cigame 2024-08-13 09:13:06)

Topic: What is the latency of Apple's native AVB implementation?

Hi
I'm constantly testing the latest beta releases on Apple M1 Macs using RME 12Mic and 1610 Pro devices.
If I measure the RTL on AVB connection I get 9.708ms.
On the e other hand, with MADI I get 4.729ms.
Both buffer 64,  48 kHz measured with RTL Utility
Is this normal?
I thought AVB should be faster.

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X

2 (edited by ramses 2024-08-11 06:44:58)

Re: What is the latency of Apple's native AVB implementation?

Hi Cigame.

If you measure with 44.1 then you can compare with me:
https://www.tonstudio-forum.de/blog/ent … cts-en-de/

But all I can offer in this article are the values from the RME driver which are usually very accurate.

Those values are only for directly attached (analog) ports.

If you chain MADI devices on one bus you have to add a few samples for the forwarding of packets to the next MADI device, 3 samples at single speed. Substract the converter latency of the main recording interface for AD and DA and add the converter latency for the MADI device (for AD and DA).

Or, as you did, use RTL utility. But sorry, there I can't help at the moment. No time for that.

But if you look at the values in my table I also got/calculated RTL values of "around 4 ms" for ADI-8 QS (via ADAT and MADI).

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub14

Re: What is the latency of Apple's native AVB implementation?

Hi Ramses
My main interest is in trying to use AVB in my setup.
But at the moment ...
...and the winner is:
MADI

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X

4 (edited by ramses 2024-08-11 08:36:08)

Re: What is the latency of Apple's native AVB implementation?

cigame wrote:

Hi Ramses
My main interest is in trying to use AVB in my setup.
But at the moment ...
...and the winner is:
MADI

One thing where you might need to investigate further.
I heard AVB has a configurable value to support also larger network diameters with up to 8 bridges.
This safety buffer (creating higher latency) can be reduced for small networks.
Maybe this brings your RTL down.

If you had the Digiface AVB it has an RME AVB controller (AVDECC Controller).
There you can configure the so called "Presentation Time Offset".

"Allows setting of the delay of outgoing data per stream in steps of 8 nanoseconds. Maximum value is 2 ms, lowest theoretical value is about 0.25 ms. Similar to the ASIO buffer size, higher values are more reliable but cause additional latency. However, unlike ASIO low values do not lead to crackling, but to a complete failure of the audio stream"

It looks as if this could save you 2ms if you use the RME controller.

You didn't mention an RME AVB recording interface, do I assume correctly that you try to use Apples native AVB capabilities?
If this is the case maybe their presentation time offset has higher default values? Just a guess.

Maybe you should explain your exact setup more verbose, how the devices are connected to each other
and what you are using as AVDECC Controller.

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub14

Re: What is the latency of Apple's native AVB implementation?

I'm using the Apple controller.
Setting is 2 ms.
So Guess I would not get near the values I get when using MADI, if I change anything below 2 ms.

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X

6 (edited by ramses 2024-08-11 10:00:38)

Re: What is the latency of Apple's native AVB implementation?

cigame wrote:

I'm using the Apple controller.
Setting is 2 ms.
So Guess I would not get near the values I get when using MADI, if I change anything below 2 ms.

Only speculating, but maybe you get better values when using a Digiface AVB over USB in combination with RME AVB controller.
Maybe worth a try.
Not sure whether an AVB switch is needed or if it would be possible to cable like this

Apple---USB3---Digiface AVB--------------Prim.LAN---AVBdevice#1---Sec.LAN---------------AVBdevice#2

Maybe better

                                                         VDSL Router/Internet
                                                              |
Apple---USB3---Digiface AVB----------AVB Switch------AVBdevice#1
                                                                         ------AVBdevice#2

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub14

Re: What is the latency of Apple's native AVB implementation?

PTO 1 ms
RTL : 9.792

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X

Re: What is the latency of Apple's native AVB implementation?

But the gold medal goes to:
12 Mic to Digiface USB via ADAT,48000, buffer 64, 4.396  ms

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X

9 (edited by ramses 2024-08-11 14:55:18)

Re: What is the latency of Apple's native AVB implementation?

Nice, nice :-) For comparison MADI.

PC - UFX III - MADI - Octamic XTC - MADI - 12Mic and back to UFX III
  Src: 12Mic Phones Output
  Dst: 12Mic Inst Input

https://www.dropbox.com/scl/fi/uiurd24kuhann9x37b3ze/2024-08-11-RTL-12Mic-Phones-to-Inst.jpg?rlkey=ozafqiimjmkuc4l4vr8tsh9gf&dl=1

PC - UFX III - MADI - Octamic XTC - MADI - 12Mic and back to UFX III
  Src: UFX III AN3 OUT
  Dst: 12Mic Inst Input

https://www.dropbox.com/scl/fi/mfk1iqr5vzknzfqh0fw6j/2024-08-11-RTL-UFXIII-AN3-to-12Mic-Inst.jpg?rlkey=o2ax8hsjsgrj4614nbgo2p9xz&dl=1

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub14

Re: What is the latency of Apple's native AVB implementation?

cigame wrote:

I thought AVB should be faster.

Out of interest: What lead you to this assumption?

Re: What is the latency of Apple's native AVB implementation?

Mostly because it is used in live systems where low latency is a must.
And articles like these:
https://www.sweetwater.com/insync/avb-v … nterfaces/

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X

12

Re: What is the latency of Apple's native AVB implementation?

Mostly because it is used in live systems where low latency is a must.

There are a number of reasons why live systems switched from point-to-point connections (like MADI) to network systems, such as cabling, routing, and endpoint control; one of the reasons AVB was chosen above Dante was the fact that it is by design deterministic. You can alter latency between two Dante endpoints by running other traffic on the network, which can become audible under some circumstances.

The latency itself (2 ms) comes from one of the AVB standards and was calculated as a worst case connection from talker to listener over seven 100 Mbit switches. Bringing this to Gigabit networks, it scales to roughly a dozen switches if I recall correctly. This means that you can safely connect ten switches in a row, and one 12Mic to each switch. Route the mic input of the first 12Mic to the phones output of all other 12Mics in the network - they will play the signal from the first 12Mic at the same time, sample and phase accurate, even if you run long cable distances between each switch and are downloading Windows or macOS updates from the internet on the same network. This is the out of the box behavior without any configuration.

You can reduce the PTO (nowadays referred to as MTT, maximum transit time) to a lower value on each talker. For manufacturers, a higher latency means they have to buffer all the incoming audio for up to 2 ms in hardware. That translates to a benefit for the end user, because it means that they get guaranteed latency in very large networks (and can reduce it if they are on a small network). If a manufacturer claims that they have a "super low latency AVB" implementation, it simply means that they use a non-standard default MTT, which in turn reduces the size where the network can reliably operate (in a best case, the stream will simply not be established when the calculated transit time exceeds the MTT settings).

Some AVB devices have already implemented MTT auto negotiation, which reduces the latency to a minimum automatically. That is only useful for static 1-1 connections, because when adding more listeners with higher distance to the talker, the latency would have to increase (you have to stop running streams to the first device).

It is really all about deterministic latency, not so much about the actual value of the latency. 2 ms is very low and acceptable for PA; it translates to sound traveling less than a meter. For monitoring applications where low latency is very important, you can reduce it if needed.

13 (edited by cigame 2024-08-13 09:19:05)

Re: What is the latency of Apple's native AVB implementation?

Thank you max.
As always, very informative.

2 ms is far away from what I get.
It's almost 10 ms with a 1-1 connection and even gets worse if I change PTO to 1 ms.

What am I doing wrong in my setup or measuring?

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X

14

Re: What is the latency of Apple's native AVB implementation?

Yes, well, the 2 ms MTT is the time for the network transmission per direction. For a round trip, it's 4 ms (2 ms per direction). All the other buffers come on top of that.

If I measure the RTL on AVB connection I get 9.708ms.
On the e other hand, with MADI I get 4.729ms.
Both buffer 64,  48 kHz measured with RTL Utility
Is this normal?

The MADI RTL looks correct. At this time, I do not know what the buffer structure of the internal mac AVB adapter looks like, but I can only guess that it's not optimized for low latency but for stable operation. With a Digiface AVB/short safety offset/0.125ms MTT I get 5.44ms RTL.

15 (edited by cigame 2024-08-12 09:53:49)

Re: What is the latency of Apple's native AVB implementation?

Thanks Max
I'll try changing the offset to 0.125 ms.
See if it changes anything RTL wise.
Changing from 2 ms to 1 ms did not.
btw.
For changing the PTO you have to pull out primary and plug in to secondary LAN input.
Glad I found that out my own.

Another thing.
Yesterday I tried changing the streams from 8 to 16 channels to see if it makes a difference.
Could not use it because there I got white noise on the first channel.
Any idea what causes this?

Have a nice day

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X

16

Re: What is the latency of Apple's native AVB implementation?

According to MILAN, you have to fully disconnect streams in order to change the PTO/MTT. It seems it's implemented like that in macOS as well (that's why plugging it into a different port works). So rather than changing the network ports, you should just disconnect the stream, change the MTT and then re-connect it.
If macOS does not change when the incoming stream's MTT is changed, it could be a design decision by Apple (because for recording and processing on the mac, it might be preferable to process the incoming audio as quickly as possible, rather than artificially delaying the processing). Not sure.

Re: What is the latency of Apple's native AVB implementation?

With 0.125 MTT I get 7.917 ms.
I have to test if it's safe with 32 ins and outs

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X

Re: What is the latency of Apple's native AVB implementation?

cigame wrote:

With 0.125 MTT I get 7.917 ms.
I have to test if it's safe with 32 ins and outs

Seems to work flawlessly!

Even at 96 kHz
Buffer 64
6.354 ms

In Logic with software monitoring on. 16 tracks 96 kHz. Channel EQ and Compressor on all tracks. One Space Designer and stereo Delay.
Activity Monitor showing something between 14 and 20 % cpu. M1 13" MacBook Pro.
Latest Sequoia beta.
Recording a band on Wednesday and checking if it works recording and live mixing.

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X

Re: What is the latency of Apple's native AVB implementation?

Recording went without any issues.
So now I am sure that I can use my AVB rig in case I forgot my Mackie DL 16S. ;-)

UFX+, FireFace 802 FS, Digiface USB
12 Mic, M1610 pro, Micstasy
MacBookPro M1
Logic Pro X