Ardour/JACK-Settings for Firewire-Interface

Hello friends,

I’m setting up my soundsystem under linux right now and I have some general questions about the JACK- and the Ardour-settings for firewire interfaces.

As I learned there are in principle two ways to use firewire interfaces:

-FFADO-drivers (need Jack as soundserver) and
-ALSA-drivers (kernelmodules which can be used by all soundservers)

So, my questions are:

  1. In the ardour audio/MIDI-properties I can choose between the MIDI-systems:
  • (legacy) ALSA raw devices
  • (legacy) ALSA sequencer
  • ALSA (JACK1, 0.124 and later)
  • ALSA (JACK2, 1.9.8 and later)
  • None
    -> What is the right choice for ‘Ardour with JACK and ALSA-drivers’ respectively 'Ardour with JACK and FFADO-drivers?
  1. In the JACK-settings -> properties -> parameters I can choose between different “drivers”. Interesting for firewire-interfaces seems to be:
  • ALSA and
  • Firewire
    -> Again, what is the right choice for ‘Ardour with JACK and ALSA-drivers’ respectively 'Ardour with JACK and FFADO-drivers? Or is it equal? Is THIS property the same like “FFADO-drivers” and “ALSA-drivers” in the Ardour-Audio/Midi-Settings and it is overwritten by ardour?
  1. In the JACK-settings -> properties -> parameters I can choose between different “MIDI-drivers”:
  • none
  • raw
  • seq
    -> What does this mean? Does it have anything in common with the MIDI-system, that I can choose in the Ardour audio/MIDI-settings?

Thank you so far for taking the time to read this post.

Rüttelplatte

I am on Debian Bullseye. Bullseye is the testing version of what will be the next stable version of Debian. I migrated a month ago. At this very moment i go with kernel 5.6.2 compiled with the realtime patches. Kernel 5.6 was released 30 Mars. The realtime patches for kernel 5.6.x was released 3 April for the 5.6.2 kernel. And with the realtime 5.6.2 i can launch jack with sample rate 48K, 64 Frames, 2 perions. Latency 2.67ms. Driver firewire. No xruns.

The Firewire interface is a Focusrite Saffire Pro 26.

Pre Bullseye i was on Debian Buster with kernels 4.9,X (shipped with Debain). They had a tendency to hang on shutdown and produce some xruns about every 45 - 50 seconds. Samplerate 48K, 512 frames, 3 periods, latency 10.6ms. the 5.5 kernels compiled low latency desktop did not hang on shutdown but produced xruns.

In my opinion the firewire driver is to prefer. Then there is no need to disable Pulseaudio during jack sessions. It is possible to have a Youtube video playing at the computers sound card while recording. A not so good idea but possible, With firewire driver and realtime kernels 5.6.x I can get very low latency and no xruns.

An important question is if your firewire interface is supported?

With the Saffire, I have to blacklist snd_dice.

This link is explaining a lot. Some obsolete, Some that doesn’t work, And i think some make no sense at all.
https://wiki.linuxaudio.org/wiki/system_configuration#solve_irq_conflict_by_unbinding_devices

I have to blacklist snd-dice in /etc/modprobe.d/blacklist.conf
blacklist snd_dice

in qjackclt
Driver: firewire
Samplerate 48000
Frames 64
Periods 2

under tab Options
Execute script after Startup; a2jmidid -e &

The a2jmimid is bridging USB MIDI. The Saffire’s MIDI was rather useless. (keyboard in to Ardour).

There are some kernel options that should be compiled into the kernel so building your own custom cernel could be an idea.

Forsland

1 Like

MIDI support with FFADO can be hit or miss. My FCA1616 works perfectly while my M-audio 2626 can be iffy and the Presonus Firestudio flat-out refuses to do anything unless using the ALSA driver. This is with a X-Touch Compact & Mackie MCU control surface.

I second using a2jmidid. Picked up a USB MIDI adapter and never looked back.

Note: Needed to launch a2jmidid with -eu when using multiple control surfaces so Ardour could keep track of them during reboots.

If you go with the FFADO-driver, you can,… use it and forget most of your questions.

Question 1. (legacy). You stand in front of a cobweb wit a big fat spider in it. Should i walk through it, or go somewhere else?

ALSA, JACK1, JACK2. A bit like US politics and Democrats vs Republicans. Both sides claiming to be bipartisan. JACK2 is probably the best choice.

Question 2. ALSA and Firewire.
ALSA is fighting against a bastard called Pulseaudio and is tangled up in the cobweb mentioned above.
Firewire, The FFADO-driver.

Question 3. None is probably the right choice.

If you use the Firewire driver, Set the samplerate and latency and start your session.

If you use the ALSA driver, you have to set samplerate and latency and a lot of other settings. And you need to disable Puseaeaudio during the session.

raw, seq. Who knows? The cobweb again??

If you have a firewire interface, you have a device you can communicate with via the firewire card using the FFADO-driver.

If you go with the ALSA driver you are tangled up inside the cobweb that need to be tweaked to communicate with the firewire card.

Wow thanks for your detailed replies!

@Forsland: Indeed I’m searching for the right settings and I’m at the beginning now. I have installed a common Ubuntu 18.04 LTS without addidional ppas or realtime patches and - in standard properties - the ALSA driver, which is part of the module snd_dice. With this non-adjusted settings I have a latence of 5,8 ms when I choose the 256 frames and 2 periods. But it produces xruns (short noise-impulses, I think these are xruns) about every 10 seconds. For a little test I installed and booted “linux-lowlatency” but it didn’t change anything. But I didn’t get much in detail yet, maybe I forgot a simple option to make Ardour use the benefit of the kernel.

But the first thing I want to understand is, how are the qjackctl- and the Ardour-settings related? Are they

  1. independent (I don’t how that should work in that case)
  2. Or are the qjackctl-settings overwritten by the Ardour-settings (if I choose differrent framerates or drivers in the two settings sections -> will the Ardour-settings “win”? So do the property parameters of qjackctl even matter, when I start Ardour?
  3. Related to this last question I’m not sure how these settings handle the drivers. If Ardour-settings overwrite the qjackctl-settings, then I think it doesn’t matter if in qjackctl the “firewire”- or “ALSA”-driver is activated (since the ardour-settings will overwrite it. If this is not the case, I would like to understand how the realtionship is between the drivers in Ardour- and the qjackctl-properties is.

Furthermore I have some questions about your detailed explanation for the right settings.

I had the same idea and I’m thinking about to take the same properties, to be free to use pulseaudio and JACK simultaneously. I red about another way to route the pulseaudio-stream to JACK via a bridge. I think for this way you wouldn’t even need the computer sound card, but the manual I followed didn’t work immediately (maybe I have to tinker a bit). But for the beginning I can chum up with pulseaudio pausing while ardour is running.

I’m not sure - did you use the low-latency- or the realtime-kernel? My first tries with the low-latency-kernel didn’t make a change but I think the realtime-kernel is much harder to install - isn’t it?

That is nice to hear! I run the 5.3.0-46-generic-kernel now And it would be very nice if the next Ubuntu LTS version (which was released yesterday) would have a better performance out of the box!

Yes. I have a Saffire Pro 24 and it is supported - by FFADO- and ALSA-drivers (via snd_dice). So I had to blacklist the snd_dice too, when I wanted to use the FFADO-drivers. I tried it already and it worked well - but I didn’t do perfomance comparison yet.

Here again the question: Do this properties (within qjackctl) matter, when starting Ardour with it’s own properties? I will try your settings today but even with 256 samples I get xruns, so I think with my actual properties (kernel for exmaple) I can’t reduce the xruns by reducing the samplerate that much. But I didn’t play with the periods!! Do you know what “periods” mean?

Good news. I thought I have to do it like you said (because it seems to be the official way refering to this https://manual.ardour.org/setting-up-your-system/setting-up-midi/midi-on-linux/), But in my system offered three capture-ins and the “capture3” was connected to the MIDI-keyboard out of the box like magic. So I didn’T try to use the MIDI-port of the interface.

So compiling a kernel would maybe be little bit to hard for me … I’m only a musician :slight_smile:

Have a nice weekend and keep healthy,
Rüttelplatte

There’s some deep confusion here.

If you start JACK with qjackctl and then tell Ardour to use JACK, there are no parameters except buffer size in Ardour. Whatever you chose via qjackctl is what JACK will be using (except buffer size, and to be honest I’m not sure why we allow you to modify even that from Ardour).

If you start Ardour without JACK running, and tell it to use JACK, then the settings used by JACK will all come from Ardour.

If you start Ardour and tell it to use ALSA for audio/MIDI I/O, then neither JACK nor qjackctl have any role or influence, and settings related to JACK are irrelevant.

The things are getting more clearly!

I tried out different options and I found out, that ardour with JACK and ALSA drivers (snd_dice), pianoteq and low-latency-kernel permanently was creating xruns (as I think: very quiet, periodic noisy clicks even if I only play one note). By blacklisting it and using the FFADO driver the sound is perfect, even with the generic-kernel!

As @Forsland and @Venn already told I need a2jmidid now. But a2jmidid -e & doesn’t work, when I type it into “after-startup-scripts” in qjackctl, what makes sense since the explanation of @paul. It automatically starts when I start JACK by qjackctl (what only works in 1 out of 50 times). But not automatically by starting Ardour yet. Is there any way to do it? Something like a “start-up-script”-section within Ardour? I use Ardour 5 and Ubuntu 18.04 LTS.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.