Linux AVB Support

Yes, tried jackd, direct Ardour ALSA backend, and zita-a2j, all require MMAP access.
Have not tried Audacity yet, but if I do I’m not sure I’ll admit it in the Ardour forums. :slight_smile:

Funny, an AVB thread and most people are talking about AES67 and Dante.

So for an intermezzo here is something about AVB on Linux.

AVB, like USB2/3 and firewire, sends/receives packets at 125 microseconds intervals in cable based networks.
Therefore at 48kHz 6 samples/per channel are transmitted per interval (or 12 at 96kHz, 24 at 192kHz …)
For the multiple of 44.1kHz rates Motu is using an interval of 125*48000/44100 = ca 136 microseconds.

The ALSA driver (based on the intel igb driver) can use any buffersize down to a single interval.
The lowest round trip latencies (analog to analog) on my 16A therefore are 1.5ms at 6/48kHz to 0.75 ms at 24/192kHz measured with jack2 in synchronous mode.
Usability of such low buffersizes is limited by HW/SW, same as with any other driver.

Yes, we kind of hijacked the thread into more of a Ethernet audio thread, not just AVB.

Where is this ALSA driver? Do you have a link to a repository?

Alsa can be set up to emulate mmap functionality for drivers that don’t support it.

The examples you will find demonstrating how to set it up generally look something like this:

pcm.mmap0 {
  type mmap_emul
  slave {
    pcm "hw:0,0"
  }
}

pcm.!default {
  type plug
  slave {
    pcm mmap0
  }
}

or like this:

pcm.card0 {
    type hw
    card 0
    mmap_emulation true
}

I still never saw a link to the ALSA AVB driver. Is there a public source repository somewhere? I thought I would see more people mentioning it in the context of the MOTU AVB devices, but still have not seen anyone else mention using it yet.

So possibly new developments here as well…

I will be heading to Infocomm in a couple of weeks, gonna try to swing by and find out more information on whether this could be useful or not to us.

      Seablade

So I tried to meet with folks, sadly the day I saw the head of this effort there he was swamped by hardware manufacturers, and I had to run to keep doing what I needed to for my consulting. I did talk to some other folks there and expressed the interest for Linux, and was told by one person that that was part of what they were researching at the show was how much of an interest there was for DVS on Linux, so maybe some good news there, but it would take a lot more than just me (Though I did push for it) to get it supported by Audinate I think.

I think in my piles of documentation I may have the card of the guy to contact, but not sure, and will be a couple of weeks before I am home and get a chance to really go through all of this.

      Seablade

There is a dante compatible PCIe card that has alsa support: http://www.four-audio.com/en/products/dante-pcie-card.html
I could not find a price… and don’t personally have a need.

I actually know that price as I have asked them about it about 3 years ago IIRC, at the time there was no US distributor, so unless something has changed it may not have shifted much. Suffice to say not cheap would be doing a great disservice to calling it that as I am more in tune with common pricing of AV equipment than most (As my job as a consultant requires me to do lots of budgeting and purchasing) and when I contacted them with a budget that was 2x the going price of similar devices, I found out their price was 2x that. A bit over my price range sadly, but if you can afford it and it is worth it I do encourage you to support companies willing to support Linux with that.

     Seablade

Wonderful, that fully explains why the price is not advertised anywhere. I expected somewhere in the range of other PCIe network sound cards. Which is still not cheap. Basically, the cost of a PCIe network sound card (network plug on one end looks like audio card to the computer) seems to be similar to a PCIe sound card for audio/aes3 with a similar number of i/o from what I have seen looking at what Audio science and focusrite rednet both in the 1K region. Rednet is dante, not sure about ALSA drivers. Audio Science has livewire (newer stuff is aes67) in PCIe with alsa drivers… they do have a dante box, but it is an end box (audio i/o). Dante is new(er) to audio science so maybe a pcie card will show in future and most of their cards do have alsa and control drivers/api.

No ALSA drivers as of yet to my knowledge. Though Focusrite is a manufacturer that has been open to Linux development and even supported it with donations of Firewire devices in the past, so maybe someone could reach out to them, not sure.

I talked to them at Infocomm actually IIRC. While they don’t have a Dante specific solution for this purpose IIRC (And I would have to go back and glance through any notes I took) since many of their solutions are AES compliant they might be able to be utilized in this situation, but do NOT quote me on this, I don’t have my notes in front of me. They did have a very nice looking device I could use to monitor wireless mics over AES67 conceivably that I am keeping in the back of my head for use in theater.

    Seablade

Only price list from 2016 shows the Fourfront Dante card at 1000€ ex VAT.
The alsa driver is binary only. Would be interesting to see the reaction if a customer demanded the source code (because it must be GPL v2), makes small changes and redistributes it…

Wonder why people waste their time and money on the proprietary Dante bullshit, when they can buy a 40€ i210 card and use AVB.

The biggest impediment to AVB right now is the fairly limited switch support.
Most new Dante has an AES67 compatible mode, which is open and has an AES67 compatible Ravenna ALSA driver available from Merging Technologies (although currently not usable with Ardour because of lack of mmap support). There are enough similarities between all of the network protocols that there could be some code sharing appropriate between the different protocols. I think the current ALSA drivers are too immature at this point for the right sharing division points to be obvious yet.

The comments from people at LAC who use the ALSA AVB setup were not great. The cpu usage is very high (50%ish in the way they were using it) The network stack has to deal with 6 packets/ms even if jackd (or an application) is only being called every 1.4ms. That is only one stream (up to 8channels), if there are more streams each one is another 6 packets in the same time frame. On top of that, media clock is not HW generated but derived from the media stream so more cpu work there. So I have a choice, I can get an AVB audio end (like the MOTU) and use an i210 running my cpu like crazzy, or I can plug the same interface in as a USB box that takes some cpu but barely noticeable even at lower latencies. I have two i210s here, but the switch and an end point make me wonder if I could spend my time (and money) more profitably on something else. I am sure that the excess cpu use can be lowered a great deal with work in the right places, and I would like to see that happen. It’s not there yet though.

Here is the LAC paper:

The reason people spend money on proprietary sw/hw often has more to do with having someone to hold “sue-able”. The last company I worked for used windows for that reason. If you pay money for something, it does give certain legal rights… aside from the feeling of “you get what you pay for”.

Because out of the multiple sound systems, ranging from a few thousand dollars, to many hundreds of thousands of dollars to millions of dollars, I am involved with, not a single one uses AVB natively, and ALL of them use Dante. Add that on to what Len has mentioned, and the fact that to my knowledge there isn’t a great AVB solution for laptops yet which is what I have to work off of when I go to one of these sound systems. Finally while I haven’t spent enough time researching it yet, I suspect Ravenna is probably a more technically capable solution on Linux than AVB at this time, but that is pure guesswork right now based off a few conversations with different manufacturers.

Oh and if Dante was supported, you really wouldn’t need special hardware for the most part, just a $30 piece of software if that is the route taken (And even that might be debatable depending on how it was implemented).

         Seablade

I take that back, there are two systems that use AVB through DSPs from Biamp, of course both of them the AVB ports sit unused as Dante made a more efficient backbone for the one that interfaces with the audio console and amps, and for the other no backbone was needed, and no other AVB devices are on the network.

Dang it you told me about the MMAP support before and I forget to ask them about it, sorry about that. I agree with you that this seems to be the most promising solution, particularly for an open solution.

   Seablade

Or you use my driver that i linked above and run the Motu at almost 0% cpu. But if all you want to do is connecting a single endpoint to your computer then i wonder why you are interested in any kind of network based audio at all.

Which apparently is a Window laptop. Since, if it were a Macbook, it would have builtin AVB support already.

And if it were a Macbook I would probably use Mac OS since I would likely be running SMAART etc. at that point. But at the moment I am running on Chromebooks, and I would venture a guess that most people using Linux in these situations are running them off of Laptops intended for Windows originally and not likely to have AVB support. Again the same shortcomings apply.

  Seablade

By the way, Mac’s USB chipset can’t support AVB according to MOTU, so you have to use Thunderbolt to Ethernet on a Mac laptop. Not sure as to the status of that on Linux honestly, but also at that point you could just use USB or Thunderbolt if running a MOTU device. And of course that is still looking at a MOTU which is an additional cost on top compared to a software only solution.

    Seablade