Is the limitation me, or ffado support for my Saffire Pro 24 DSP?

Optimize your system for ultimate performance.

Moderators: MattKingUSA, khz

Post Reply
phfactor
Established Member
Posts: 17
Joined: Tue Jan 01, 2019 12:08 am

Is the limitation me, or ffado support for my Saffire Pro 24 DSP?

Post by phfactor »

I'm new to LinuxMusicians (see my post in "New? We're glad you're here!"), so excuse me if I'm posting to the wrong place.

I'm SLOWLY shifting my recording work from Mac to Linux. My current attempt is to learn Mixbus. My current interface is a Saffire Pro 24 DSP from Focusrite. So I've installed ffado, and the thing works. My big question is: can I get it to work better, or am I limited by FFADO's support for the Saffire, which, as of today, is still listed as "experimental."

On the platform I'm trying to leave, MacOS, the Saffire Pro 24 can sample at 96k with a frame buffer set to 128.

Now, Mixbus will allow me to run using JACK or it will just sit on top of ALSA. Using either, the best I can do is either 44.1 kHz or 48kHz at a frame buffer of 256. If my understanding is correct, including the "period" setting of 2, that means a total of 512 samples, and my latency is at, I think about 11ms. I have three questions:

1. Is that it? Have I gotten it as good as I can get it?
2. If not, how can I decrease the latency?
3. If so, who makes a decent interface for Linux audio? My research so far is pointing me towards class-compliant USB interfaces, but I have been traditionally skeptical of USB as a robust port for audio.
Ubuntu 18.04 low-latency kernel.
Focusrite Saffire Pro 24 DSP Firewire interface
Mixbus 5
Jack Winter
Established Member
Posts: 381
Joined: Sun May 28, 2017 3:52 pm

Re: Is the limitation me, or ffado support for my Saffire Pro 24 DSP?

Post by Jack Winter »

IMO on linux the cards with the best low latency are either PCI/PCIe or FW, USB seems to add quite a lot of extra latency. The latency reported by JACK and it's clients only take the buffersize and samplerate into account. To get an idea about the actual real world latency including usb/fw overhead, hardware buffers, conversion time, etc, it would be best to connect a cable from an output to an input and actually measure it with something like jack_iodelay.

My personal hobby horses are to run JACK at a high priority like 80 and the thread servicing the soundcard hardware interrupt at an even higher like 95. The idea is to make sure that nothing can interrupt your audio processing, like disk i/o, gpu processing etc.

Though disputed by some, IMO using a realtime kernel also helps for making sure that there are no xruns when using really small buffer sizes.

Other reasons for xruns are substandard drivers/hardware for instance some WIFI cards can cause problems with kernel scheduling which translates to xruns. CPU powersaving can also cause problems on some systems. SMT (hyper threading) can also lead to cache depletion and might be better turned off on some systems.

Much of this is a matter of YMMV and some of it often a contentious issue among us :)

Ideal is probably to just use a higher buffer size like 1024 and to monitor through hardware instead of software.

Edit: I wonder if the saffire pro 40 isn't already supported by alsa directly, so if you have an up to date kernel/alsa stack it might also be worth a try with jack's alsa backend instead of ffado. There is an effort underway to add support directly into alsa but I have no idea of what's supported since I don't have any working FW devices.
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
phfactor
Established Member
Posts: 17
Joined: Tue Jan 01, 2019 12:08 am

Re: Is the limitation me, or ffado support for my Saffire Pro 24 DSP?

Post by phfactor »

I don't think my Pro 24 DSP can do hardware monitoring. My frustration is still around being stuck at a buffer of 256 and best period of 2. I found a post by @dufflespank titled Focusrite Saffire Pro 40: Tips and tricks where they recommended steps to use "firewire" as the driver rather than "alsa" in QjackCtl. But, for whatever reason, what worked on their Pro 40 did not work on my Pro 24 DSP. But at least they confirmed that it's a problem in the ffado support for the device. I am resigned to working with it and upgrading my audio interface, but I will keep trying to find a workaround!
Ubuntu 18.04 low-latency kernel.
Focusrite Saffire Pro 24 DSP Firewire interface
Mixbus 5
Jack Winter
Established Member
Posts: 381
Joined: Sun May 28, 2017 3:52 pm

Re: Is the limitation me, or ffado support for my Saffire Pro 24 DSP?

Post by Jack Winter »

Heh, don't know why I read your post as referring to a pro 40 and not the pro 24... Still I'm afraid that I can't really offer any help in this respect as I've never tried the device. If you need help with other stuff though, I'll try to contribute with my meager understanding :)

What I meant with hardware monitoring, was monitoring through external equipment such as mixer and external FX. This is what I'm doing with our X32 mixer, as it's IMO much easier and reliable than trying to set up realtime monitoring at low latency with FX in the DAW.
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
phfactor
Established Member
Posts: 17
Joined: Tue Jan 01, 2019 12:08 am

Re: Is the limitation me, or ffado support for my Saffire Pro 24 DSP?

Post by phfactor »

I agree with you about hardware monitoring, but for a variety of reasons, I prefer to avoid it. Money is one. Simplicity is another. And by simplicity, I mean a certain reserve when it comes to purchasing and maintaining additional hardware.

Also, there's a kind of aspirational thing when it comes to Linux. I have no problems on a MacOS platform with acceptable latency and software monitoring. I want to push for that kind of ease and functionality on Linux.
Ubuntu 18.04 low-latency kernel.
Focusrite Saffire Pro 24 DSP Firewire interface
Mixbus 5
varpa
Established Member
Posts: 509
Joined: Fri Feb 25, 2011 6:40 pm
Been thanked: 13 times

Re: Is the limitation me, or ffado support for my Saffire Pro 24 DSP?

Post by varpa »

I have a Saffire Pro24. I use AVLinux2018 which is well configured for pro audio work. The alsa firewire driver does not go lower than 256 frames/period. Could be done but alsa developer has not implemented it. Consequently, I always use ffado which I've gotten to go as low as 32 frames/period. One thing that can affect firewire performance is the host controller - see documentation: http://subversion.ffado.org/wiki/HostControllers. Also, recent Saffire Pro firmware does not work with FFADO, so if you have a newer model it may not work. Unfortunately, Focusrite will not provide any information on there firmware so FFADO has not been updated for the newer firmware. The DSP functions on the Pro24DSP are not accessible in linux also due to lack of documentation from Focusrite. The one defect the firmware+FFADO I have is that it does not support midi out, but luckily I don't need this. I always run at 48k. I've never tried 96k, but maybe I will just to see what happens.
varpa
Established Member
Posts: 509
Joined: Fri Feb 25, 2011 6:40 pm
Been thanked: 13 times

Re: Is the limitation me, or ffado support for my Saffire Pro 24 DSP?

Post by varpa »

I did some tests with my Saffire Pro24. My test consisted of starting Jack at various settings and playing Pianotoeq with a midi keyboard. This is with AVLinux2018, FFADO driver. Not a definitive test of all functionality, but gives you some idea of the performance. I used 2 periods/buffer for all tests
Freq Frames Latency Pianoteq Comments
48k 64 2.67msec 23% no xruns
48k 32 1.33msec 30% no xruns
48k 16 0.67msec 60% many xruns when playing pianoteq
96k 128 2.67msec 23% no xruns
96k 64 1.33msec 30% 1 xrun starting Pianoteq, then 0
96k 32 0.67msec 30% many xruns when playing pianoteq
(the Pianoteq column is the approximate DSP when playing Pianoteq)

For comparison I also tested a Native Instruments Komplete Audio 6 (USB)
48k 128 5.33 msec 20% no xruns
48k 64 2.67 msec 23% no xruns
48k 32 1.33 msec 33% some xruns (10/minute)
48k 16 0.67 msec 60% many xruns when playing pianoteq
96k 128 2.67 msec 23% no xruns
96k 64 1.33 msec many xruns just running jack without Pianoteq

So Saffire Pro24 can go to 1.33 msec latency with no xruns, whereas Komplete Audio 6 can only get to 2.67 msec.
phfactor
Established Member
Posts: 17
Joined: Tue Jan 01, 2019 12:08 am

Re: Is the limitation me, or ffado support for my Saffire Pro 24 DSP?

Post by phfactor »

Have you blacklisted snd-dice? I have tried this to no avail. Now, when I start up jack and select firewire as the driver, I do not see my device in the interface list. My only choice is "default" and jack won't start.

Here are the crucial lines:

21:50:13.329 D-BUS: JACK server could not be started. Sorry
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Ubuntu 18.04 low-latency kernel.
Focusrite Saffire Pro 24 DSP Firewire interface
Mixbus 5
phfactor
Established Member
Posts: 17
Joined: Tue Jan 01, 2019 12:08 am

Re: Is the limitation me, or ffado support for my Saffire Pro 24 DSP?

Post by phfactor »

varpa wrote:I have a Saffire Pro24. I use AVLinux2018 which is well configured for pro audio work. The alsa firewire driver does not go lower than 256 frames/period. Could be done but alsa developer has not implemented it. Consequently, I always use ffado which I've gotten to go as low as 32 frames/period. One thing that can affect firewire performance is the host controller - see documentation: http://subversion.ffado.org/wiki/HostControllers. Also, recent Saffire Pro firmware does not work with FFADO, so if you have a newer model it may not work. Unfortunately, Focusrite will not provide any information on there firmware so FFADO has not been updated for the newer firmware. The DSP functions on the Pro24DSP are not accessible in linux also due to lack of documentation from Focusrite. The one defect the firmware+FFADO I have is that it does not support midi out, but luckily I don't need this. I always run at 48k. I've never tried 96k, but maybe I will just to see what happens.
Varpa, thanks for this info. I'm thinking of going to one of the dedicated distros, either AVLinux or KXStudio. I started with Manjaro, then went to Ubuntu (not Studio, just LTS 18.04). I figured I'd understand the architecture better if I learned how to tweak a plain system for audio. So I've added the Low-latency kernel, the audio group tweaks, the priority tweaks, etc. I'm still learning. But the fact that you run AVLinux and get the Saffire Pro 24 to run as low as 32frames/period is intriguing. I either need to understand how AV is tweaked as compared to what I've done in Ubuntu, or consider simply installing AV. I have two worries. Both AVL and KX are maintained by one person. I worry about how they will be supported over the long term. Secondly, I dual boot with a hackintosh system on a separate drive. But making OS changes can cause boot problems, as they often overwrite existing UEFI settings.

On the hackintosh side, I use Logic Pro mostly. I have run 44.1 and 96. I prefer 96, but I'd think that it depends on how you use the studio. I've realized that 95% of what I do is record audio. I don't do MIDI, and I rarely use loops or virtual instruments, with the exception of percussion sometimes. But I DO sometimes tweak the audio for pitch, rhythm and volume; and of course there is processing: EQ, compression, reverb, etc. I have found that when I record at 96k, I can push certain kinds of audio processing harder without hearing artifacts. I think of it like working on a TIFF file vs. a decent JPG. I can zoom in more on the TIFF without it pixelating.
Ubuntu 18.04 low-latency kernel.
Focusrite Saffire Pro 24 DSP Firewire interface
Mixbus 5
Post Reply