Focusrite Scarlett 2nd and 3rd Gen mixer driver

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

User avatar
wvi
Established Member
Posts: 6
Joined: Fri Nov 26, 2021 1:12 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by wvi »

sysrqer wrote: Sat Feb 26, 2022 10:58 am Does anyone know how to configure the headphone outputs on the 6i6? They seem to be outputting the Analogue output 1 & 2 (which I have a mix set up) so if I take down the headphone level in the mixer then the speakers also reduce in volume. I can't see any way to control what feeds the headphone outputs.

Ultimately I would like to have an different output that I can select from my daw as a cue mix essentially.
I am on JACK and I basically aj-snapshot restore the connections I need, my headpohones are output 5&6, I am using the 18i20. But I have second headphone output but that does not seem to work no matter what I do.
vulkanized
Established Member
Posts: 3
Joined: Sat Mar 12, 2022 6:57 am
Has thanked: 4 times
Been thanked: 1 time

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by vulkanized »

geoffrey wrote: Mon Aug 30, 2021 3:36 pm
DarkPoubelle wrote: Thu Aug 26, 2021 8:48 am - Is a GUI planned for this sound-card, i mean like the Focusrite Control Center, for a more user-friendly management than the raw alsa mixer and the thousands of faders. ? I know how to use Qt kinda well and i might be able to recreate the same GUI as the original control software, but idk how to interact with the soundcard .
Yes, there is a GUI planned, and it's almost ready to share! Here's what it's looking like with a Gen 3 18i20:

Screenshot_2021-08-31_00-40-20.jpgScreenshot_2021-08-31_00-40-32.png

Stay tuned!
I am really looking forward to this GUI release! I own a 6i6 2nd gen. As I understand it, some 3rd gen models include a dedicated loopback, but after reading about my 2nd gen, I realized I had to go a bit more old-fashioned and I created a little 2-channel hardware loopback by plugging the S/PDIF channels into each other with a very cute little patch cable I made :)

My use case involved mixing a hardware and software source together (a software piano and a microphone) and having that available as my "microphone" from the PulseAudio/[whatever the heck Windows apps use] perspective while also monitoring the software piano with low latency. I think I saved the preset file from Focusrite Control for reuse on Windows, but - and I'm not proud of this, it's just my mind is a little peculiar I guess - I emotionally avoid setting up this mixing configuration using alsamixer or qasmixer... I guess I get sad and frustrated very easily lol.

Which is why I'm so excited about your tailored GUI! I wasn't exactly fond of Focusrite Control's mixing GUI, but it was compact and had some nice features.

I do have some C programming experience and as well I am open to an excuse to learn a C GUI library. GTK 4 seems like a fine choice for a newcomer such as myself! I am looking forward to reading the code if (when?) you release it! As well I'm happy to test pre-releases if you enjoy that sort of feedback.

Thank you for all of your work!
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

For those interested in the GUI I've been working on, I started a new thread to discuss that: viewtopic.php?f=6&t=24281

First draft is ready for you to check out!

window-main.png
window-main.png (57.15 KiB) Viewed 11027 times
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

wirenoise wrote: Mon Sep 20, 2021 5:25 pm
geoffrey wrote: Mon Aug 30, 2021 3:36 pm [...GUI...]
Will this be able to set pad/inst/line, or is this possible already? Also will this support panning channels like in focusrite control, because I'd like to monitor my digitakt in stereo but since both outputs are mono and centered on the device I can't monitor in stereo.
The kernel mixer driver already supported the pad/inst/line controls, but alsamixer was horrible to use. The now-released GUI lets you do it really easily. Stereo is no problem, but there's no specific pan control (the GUI treats all channels as mono for now, so you just route left input to left output and right input to right output to get stereo).
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

latency-fun wrote: Mon Oct 25, 2021 5:54 am I'm still learning about the kernel/distrubutions ...

Does anyone know if all the work on the focusrite... is in the Arch-Zen 5.14.14 ?

Or would I need to download/install the kernel from geoffreybennett's git ?

Thinking about purchasing a focusrite for testing.

Thanks!
The driver was merged into the mainline Linux kernel version 5.14.0 so no need for my kernel for now.
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

g29 wrote: Sun Oct 31, 2021 1:18 am Geoffrey,

First and foremost, thank you and all who have contributed to this project.

Here is my initial Feedback testing with a Gen 3 Scarlett 8i6.

The CAPTURE [F4] screen's "Analogue [1-N]" labels get truncated making the first 6 entries appear to all be set to the same value "Analogue".

Maybe "Analogue" could be abbreviated, or the "N" could be placed first, or line-wrap to 2 rows, or a combination to show the overall distinctions ? Similar ambiguous truncated display issues appear with other options.

Image

Update: "Clock Source" "S/PDIF" is working (LOCKED) on the 8i6 for sample rates [44.1-176.4]kHz.

Thanks much !!!

Debian 11-64 bit
Kernel: Linux - 5.14.0-0.bpo.2-amd64 #1 SMP Debian 5.14.9-2~bpo11+1 (2021-10-10) x86_64 GNU/Linux
Hi @g29,

Those problems you noticed are all problems of alsamixer, which I have nothing to do with ;). For the reasons you mention and many more, I worked for some months developing https://github.com/geoffreybennett/alsa-scarlett-gui and I think it's now a pretty nice interface to the ALSA mixer controls.

Regards,
Geoffrey.
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

emilio wrote: Wed Nov 03, 2021 2:19 am Hi, @geoffrey. Thanks so much for all the work on this driver.

I'm on Fedora 35 with a kernel 5.14.14-300.fc35.x86_64+debug. I tried to enable the driver (I have a Scarlett 8i6) and I'm seeing frequent driver errors on my log:

Code: Select all

[    9.316002] usb 1-1: Focusrite Scarlett Gen 2/3 Mixer Driver enabled pid=0x8213
[    9.323472] usb 1-1: Scarlett Gen 2/3 USB request result cmd 2001 was -71
[    9.323488] usb 1-1: Error initialising Scarlett Mixer Driver: -22
[    9.323860] snd-usb-audio: probe of 1-1:1.0 failed with error -22
It doesn't happen all the time (after a few unplugs / re-plugs then it starts working, and audio outputs are detected by pulseaudio once I restart wireplumber with `systemctl --user restart wireplumber`). I'm not sure if it's known, but I figured I'd mention it since I don't see it reported here. Let me know if I can help debug.
Hi Emilio,

I'm sorry, I'm not sure what causes that. Error 71 is EPROTO, a generic "protocol" error. Cmd 2001 is SCARLETT2_USB_GET_MIX which is in the middle of initialisation (see scarlett2_read_configs() in the driver source mixer_scarlett_gen2.c). When the problem happens is it always cmd 2001? Maybe it's an odd timing thing that the driver doesn't account for? I checked "journalctl | grep 'request result'" on my dev system and found that it's happened to me once. Can you still reproduce the issue reliably? There might be more tests we can do to narrow down the issue.
emilio wrote: Wed Nov 03, 2021 2:19 am The other thing I see is that analog inputs are not showing up in the GNOME settings, but I believe that's probably an issue with GNOME looking at the journal: https://gist.github.com/emilio/778903b7 ... 8d5542690e

Code: Select all

Nov 03 03:09:21 ryzen gnome-shell[3481]: Couldn't match the portless stream (with card) - 'Scarlett 8i6 USB Multichannel' is it an input ? -> 1, streams card id -> 182
Nov 03 03:09:21 ryzen gsd-media-keys[3866]: Couldn't match the portless stream (with card) - 'Scarlett 8i6 USB Multichannel' is it an input ? -> 1, streams card id -> 182
Nov 03 03:09:21 ryzen gnome-control-c[6439]: Couldn't match the portless stream (with card) - 'Scarlett 8i6 USB Multichannel' is it an input ? -> 1, streams card id -> 182
Nov 03 03:09:21 ryzen gnome-control-c[6439]: gvc_mixer_control_get_stream_from_device: assertion 'GVC_IS_MIXER_UI_DEVICE (device)' failed
I don't think that's related to the mixer driver, but you can check by disabling the driver (remove device_setup option or set device_setup=0) and seeing if the problem stays. The mixer driver doesn't (shouldn't!) affect anything to do with the audio streaming to/from the card.

Thanks,
Geoffrey.
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

reclisten wrote: Wed Dec 01, 2021 7:56 am [...]
In

Code: Select all

alsamixer -cUSB
output I see only MSD Mode
Hi @reclisten,

Disable MSD Mode (press "M") and power cycle the interface to get access to the rest of the functionality of the interface.

Regards,
Geoffrey.
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

tobin wrote: Sat Jan 22, 2022 3:16 am I've just installed the drivers and they seem to work. I have an 8i6 Gen3 and when I set the Analog Outputs to PCM1/2 or any of the Analog Inputs, I can hear what I expect to, although I would echo what other people have said about the shortened names being confusing.

I haven't been able to get mixes to work. I want to listen to my keyboard (Analog Input 3/4) while I listen to my computer (PCM Output 1/2). I set mixer inputs 1/2 to PCM output 1/2 and mixer input 3/4 to analog input 3/4. Then on mix A I turn up the volume on channels 1 and 3. On mix B I turn up the volume on channels 2 and 4. Finally, I set analog output 1 to mix A and analog output 2 to mix B. I don't hear anything. Am I misunderstanding something about routing?
Hi Tobin,

It sounds to me like you're doing the right thing there. I've occasionally seen the mixer do nothing while the rest of it worked, but that was when I was playing with the kernel driver and breaking things, and was always fixed by a reboot & turning the interface off and on again. I'd suggest trying the GUI https://github.com/geoffreybennett/alsa-scarlett-gui to see if you can make it work that way.

Edit: what sample rate are you using? The mixer is disabled at higher sample rates: https://support.focusrite.com/hc/en-gb/ ... mple-rate-

Regards,
Geoffrey.
Last edited by geoffrey on Thu Mar 17, 2022 2:17 pm, edited 1 time in total.
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

slrtbtfs wrote: Fri Jan 28, 2022 2:29 pm Hi @geoffrey

Thanks for writing these drivers!

On my setup (Fedora 35 with pipewire 0.3.43 and kernel version 5.15) audio output and routing the inputs through the internal mixer work quite well with my Scarlett 4i4 3rd Gen.

However what doesn't work most of the time are the audio inputs. [...]
Hi @slrtbtfs,

That looks like an ALSA or pipewire problem. Could you try disabling the mixer driver (device_setup=0) and see if you can still reproduce the issue?

Thanks,
Geoffrey.
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

jediselector wrote: Sun Jan 30, 2022 2:50 pm Hi Geoffrey,

Loving your work on this! Everything started great with the latest Arch amd64 - I used alsamixer to set up the mix-minus on my 8i6 Gen3 all good. I then thought, can I run this on a Pi3? I compiled Raspbian with their 5.15.17 tag and connected. Alsamixer presented the controls, but the mixer was not working.
Hi Tim,

Maybe there's a problem with the driver on a Pi3? I don't have one to test with. I see that it's meant to be possible to emulate a Raspberry Pi in QEMU, but I couldn't get that to work.

You mentioned stopping alsa-restore. Did you remove /var/lib/alsa/asound.state ? Perhaps it's being run from elsewhere?

Does PCM audio both in and out work while the mixer isn't working?

What sample rate are you using? The mixer is disabled at higher sample rates: https://support.focusrite.com/hc/en-gb/ ... mple-rate-

Thanks,
Geoffrey.
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

Gps wrote: Tue Feb 01, 2022 1:12 pm I wanted to share this video already last week,, but after seeing the vid, I got the message that the vid was not available. :?

UNFA hooks up a Focusrite 2i2 3rd generation.

https://www.youtube.com/watch?v=5zFA5piXf8Q

Second generation can give some issues, but 3rd generation should work on Linux, according to UNFA.

I found my DAC. :)

With this topic, and the vid from UNFA, I am convinced I can use this dac.
Fingers crossed I won't run into issues because I am on openSUSE tumbleweed, but I doubt the distro will be of much relevance for this.
Since Arch and Tumbleweed are both rolling releases, at least the kernel will be the same.
Hi Gps,

Thanks heaps for sharing that video! It's pretty inspirational! :)

I would disagree that the 2nd gen can give some issues. 2nd Gen and 3rd Gen are really really similar from the kernel point of view, just 3rd Gen has more controls (Air) and more soft-buttons instead of hardware buttons.

Regards,
Geoffrey.
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

sysrqer wrote: Sat Feb 26, 2022 10:58 am Does anyone know how to configure the headphone outputs on the 6i6? They seem to be outputting the Analogue output 1 & 2 (which I have a mix set up) so if I take down the headphone level in the mixer then the speakers also reduce in volume. I can't see any way to control what feeds the headphone outputs.

Ultimately I would like to have an different output that I can select from my daw as a cue mix essentially.
Hi sysrqer,

The headphone 1 and headphone 2 outputs always carry the signal that is routed to analogue outputs 1/2 and 3/4 respectively.

The 4 software analogue output volume controls for analogue outputs 1 through 4 also affect the headphone outputs.

The big volume control on the front of the unit affects only the rear 1/2 outputs (and is applied in addition to the software controls).

The headphone volume controls on the front of the unit affect only the headphone outputs on the front of the unit (and are applied in addition to the software controls).

Therefore:

If you want individual control of headphone 1 and analogue outputs 1 & 2 then you need to set the software control to 0dB and use the front panel knobs only.

It's not possible to change the volume of analogue outputs 3 & 4 without also affecting the headphone 2 output. You can lower the headphone 2 volume independently though using the front panel knob.

Hope this helps!

Regards,
Geoffrey.
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

wvi wrote: Tue Mar 01, 2022 7:34 am
sysrqer wrote: Sat Feb 26, 2022 10:58 am Does anyone know how to configure the headphone outputs on the 6i6? They seem to be outputting the Analogue output 1 & 2 (which I have a mix set up) so if I take down the headphone level in the mixer then the speakers also reduce in volume. I can't see any way to control what feeds the headphone outputs.

Ultimately I would like to have an different output that I can select from my daw as a cue mix essentially.
I am on JACK and I basically aj-snapshot restore the connections I need, my headpohones are output 5&6, I am using the 18i20. But I have second headphone output but that does not seem to work no matter what I do.
Hi wvi,

Hopefully the GUI will help you get the second headphone output working. On the 18i20s, the first and second headphone outputs always carry the signals that are routed to analogue outputs 7/8 and 9/10 respectively.

Regards,
Geoffrey.
geoffrey
Established Member
Posts: 252
Joined: Mon Jul 30, 2018 2:08 am
Has thanked: 33 times
Been thanked: 169 times

Re: Focusrite Scarlett 2nd and 3rd Gen mixer driver

Post by geoffrey »

vulkanized wrote: Sat Mar 12, 2022 7:15 am
geoffrey wrote: Mon Aug 30, 2021 3:36 pm [...GUI...]
I am really looking forward to this GUI release! I own a 6i6 2nd gen. As I understand it, some 3rd gen models include a dedicated loopback, but after reading about my 2nd gen, I realized I had to go a bit more old-fashioned and I created a little 2-channel hardware loopback by plugging the S/PDIF channels into each other with a very cute little patch cable I made :)
Hi Vulkanized,

Now that you have the GUI, there's no excuse for hacks to do loopback (even if it was possible in alsa-mixer, that was very much the opposite of fun).

The hardware of the Gen 2 and Gen 3 both support loopback, but the Focusrite Control software doesn't have the capability to configure it in Gen 2!

Gen 3 has two extra PCM input channels that you can assign in FC. But the Linux driver lets you assign any PCM input channel to any PCM or mixer output on Gen 2 or Gen 3.
vulkanized wrote: Sat Mar 12, 2022 7:15 am My use case involved mixing a hardware and software source together (a software piano and a microphone) and having that available as my "microphone" from the PulseAudio/[whatever the heck Windows apps use] perspective while also monitoring the software piano with low latency. I think I saved the preset file from Focusrite Control for reuse on Windows, but - and I'm not proud of this, it's just my mind is a little peculiar I guess - I emotionally avoid setting up this mixing configuration using alsamixer or qasmixer... I guess I get sad and frustrated very easily lol.

Which is why I'm so excited about your tailored GUI! I wasn't exactly fond of Focusrite Control's mixing GUI, but it was compact and had some nice features.
nodnod. My use case is similar. Mix PCM-out + HW-in back in to PCM-in. You can do similar things with e.g. qjackctl, but it's nice to set it up in the Scarlett.
vulkanized wrote: Sat Mar 12, 2022 7:15 am I do have some C programming experience and as well I am open to an excuse to learn a C GUI library. GTK 4 seems like a fine choice for a newcomer such as myself! I am looking forward to reading the code if (when?) you release it! As well I'm happy to test pre-releases if you enjoy that sort of feedback.

Thank you for all of your work!
You're very welcome! Enjoy the GUI! (and if you like, enjoy sending pull requests! :))

Regards,
Geoffrey.
Post Reply