Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

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

Moderators: khz, MattKingUSA

User avatar
dawitti
Established Member
Posts: 8
Joined: Wed Mar 14, 2018 3:23 pm
Location: Austria
Contact:

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby dawitti » Fri Jun 28, 2019 2:33 pm

Here's a little update:

I finally managed to get a prepackaged 5.1.9 kernel running. When loading the compiled snd_usb_audio module, dmesg says:
[ 48.966843] snd_usb_audio: version magic '5.1.0-rc1+ SMP preempt mod_unload ' should be '5.1.9-050109-generic SMP mod_unload '
[ 48.967895] snd_usb_audio: version magic '5.1.0-rc1+ SMP preempt mod_unload ' should be '5.1.9-050109-generic SMP mod_unload '
[ 48.987209] snd_usb_audio: version magic '5.1.0-rc1+ SMP preempt mod_unload ' should be '5.1.9-050109-generic SMP mod_unload '

This and grepping the repository told me that some version constants were set incorrectly so I replaced them and recompiled snd_usb_audio.
Interestingly the file size is still the same but comparing md5 hashes tells me they're different.

Anyway afterwards the error is quite similar:
[ 46.721515] snd_usb_audio: version magic '5.1.9-050109-generic SMP preempt mod_unload ' should be '5.1.9-050109-generic SMP mod_unload '

Am I correct in assuming that the kernel in your repository is a lowlatency kernel (in that context I often read preemptive)?

The kernel I'm actually running / testing against is not. It's from: https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.1.9/

@geoffrey Do you know how to fix this?

geoffrey
Established Member
Posts: 55
Joined: Mon Jul 30, 2018 2:08 am

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby geoffrey » Sat Jun 29, 2019 3:50 am

dawitti wrote:Here's a little update:

I finally managed to get a prepackaged 5.1.9 kernel running. When loading the compiled snd_usb_audio module, dmesg says:
[ 48.966843] snd_usb_audio: version magic '5.1.0-rc1+ SMP preempt mod_unload ' should be '5.1.9-050109-generic SMP mod_unload '
[ 48.967895] snd_usb_audio: version magic '5.1.0-rc1+ SMP preempt mod_unload ' should be '5.1.9-050109-generic SMP mod_unload '
[ 48.987209] snd_usb_audio: version magic '5.1.0-rc1+ SMP preempt mod_unload ' should be '5.1.9-050109-generic SMP mod_unload '

This and grepping the repository told me that some version constants were set incorrectly so I replaced them and recompiled snd_usb_audio.
Interestingly the file size is still the same but comparing md5 hashes tells me they're different.

Anyway afterwards the error is quite similar:
[ 46.721515] snd_usb_audio: version magic '5.1.9-050109-generic SMP preempt mod_unload ' should be '5.1.9-050109-generic SMP mod_unload '

Am I correct in assuming that the kernel in your repository is a lowlatency kernel (in that context I often read preemptive)?

The kernel I'm actually running / testing against is not. It's from: https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.1.9/

@geoffrey Do you know how to fix this?

Sorry, no idea... those errors are indicating that the module you built is for a "5.1.0-rc1+ SMP preempt" or a "5.1.9-050109-generic SMP preempt" kernel respectively, but you are running a "5.1.9-050109-generic SMP" kernel. The kernel in my repo isn't a lowlatency kernel. It's a regular stable Linux kernel taken from git://git.kernel.org/pub/scm/linux/kern ... /linux.git

If you want to try building your own kernel still, you could try doing "make -j6 bindeb-pkg LOCALVERSION=s6" instead of "make install". That will create a deb package that you can install. No idea if that would break your grub install again though.

But... I updated the scarlett-gen2 branch in my repo to 5.1.15 and have built an Ubuntu package for you. You can try the deb from https://github.com/geoffreybennett/scar ... /v5.1.15s6 (and for anyone else following along who is running Fedora, you can try the RPM there). That kernel will at least boot (on my test Ubuntu 1810 server) and load the snd-usb-audio module without error for me. Again, I have no idea what happened to your grub when you did a "make install" so I can only hope this works better for you and wish you good luck!

User avatar
dawitti
Established Member
Posts: 8
Joined: Wed Mar 14, 2018 3:23 pm
Location: Austria
Contact:

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby dawitti » Sat Jun 29, 2019 8:01 am

@geoffrey you are amazing!!!

I just tested the kernel you packaged and can confirm that the scarlett 6i6 hardware mixer can be controlled via alsamixer using this kernel! this is AWESOME!
The only thing that did not work as far as I can tell now is setting the -20db pads. I created a short screencast with usb dumps attached for this and to quickly show what we see in alsamixer for this device: https://youtu.be/7ndpuj-TOlI

This was just a quick test to check wether it's working in principal and I probably have not yet fully understood what exactly each setting does. But I will test this in more detail in the next days.

Thank you so much!

geoffrey
Established Member
Posts: 55
Joined: Mon Jul 30, 2018 2:08 am

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby geoffrey » Sat Jun 29, 2019 1:32 pm

dawitti wrote:@geoffrey you are amazing!!!

I just tested the kernel you packaged and can confirm that the scarlett 6i6 hardware mixer can be controlled via alsamixer using this kernel! this is AWESOME!
The only thing that did not work as far as I can tell now is setting the -20db pads. I created a short screencast with usb dumps attached for this and to quickly show what we see in alsamixer for this device: https://youtu.be/7ndpuj-TOlI

This was just a quick test to check wether it's working in principal and I probably have not yet fully understood what exactly each setting does. But I will test this in more detail in the next days.

Thank you so much!

Woo-hoo again! That's so good! I'm really happy we got this far this fast with your 6i6!

The USB dump file was empty save for an error message; could you re-upload that?

For the pad issue, I'm wondering if you pressed the correct key? It's really not obvious, but you need to use Space to toggle the pad in alsamixer, not Up/Down like it is to control the level select.

If all the mixer controls (Mix Inputs 1-18, Mix Outputs A-J) work, that's really interesting. As far as I can tell, the 6i6, 18i8, and 18i20 all have the same 18-in/10-out internal mixer and there's no reason for the FC software to not let you assign a custom mix to every output (that "Max Mixes Reached" message you saw after you assigned 5 outputs) on the 6i6 and 18i8. I guess it uses 2 of the mixer outputs for every custom mix, even when you've got every output set to mono. The hardware supports having the same mix on multiple outputs, but the FC software doesn't support this (presumably for simplicity). We have the potential for a better GUI than FC!

If you haven't looked at it yet, the diagram at the top of the mixer_scarlett_gen2.c file will help you understand what the controls do: https://github.com/geoffreybennett/scar ... ett_gen2.c — if you have any questions about the controls after studying the diagram and the alsamixer controls, please ask! And I hope you don't mind, I credited you in the source (lines 43–44).

Thanks again!

Regards,
Geoffrey.

geoffrey
Established Member
Posts: 55
Joined: Mon Jul 30, 2018 2:08 am

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby geoffrey » Sun Jun 30, 2019 1:53 pm

geoffrey wrote:For the pad issue, I'm wondering if you pressed the correct key? It's really not obvious, but you need to use Space to toggle the pad in alsamixer, not Up/Down like it is to control the level select.

Something rather amusing last night... I added support for controlling the Mute/Dim buttons on the 18i20 but was having a *lot* of trouble making it work. Many module compilations later, I figured out that you need to press "M" (for "Mute") to toggle Playback booleans, not Space like you do for Capture booleans (facepalm).

So, I've made another release: https://github.com/geoffreybennett/scar ... /v5.1.15s7

It'd be great if anyone reading this could test it out. Something important is that I made this new mixer driver *not* enabled by default because it was causing breakage for a couple of people. To enable it you need to create a file "/etc/modprobe.d/scarlett.conf" containing the line "options snd_usb_audio scarlett_gen2_mixer_enable=1".

Thanks!

User avatar
sysrqer
Established Member
Posts: 1821
Joined: Thu Nov 14, 2013 11:47 pm
Contact:

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby sysrqer » Sun Jun 30, 2019 2:19 pm

I will be able to test this in the next few days, I have one on order.

geoffrey
Established Member
Posts: 55
Joined: Mon Jul 30, 2018 2:08 am

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby geoffrey » Sun Jun 30, 2019 2:49 pm

sysrqer wrote:I will be able to test this in the next few days, I have one on order.

Hi sysrqer,

Thanks! Could you do me a favour please? If you wouldn't mind *not* plugging it into a Windows or Mac computer and *not* trying the Focusrite software before trying my driver, that'd be great. Some people have had issues with my driver, and I suspect that it's because they might be Linux-only users and there might be some one-time initialisation that the Focusrite software does, or maybe firmware versions, or something, and I've not gotten enough info to track down the problem yet.

If my driver doesn't work for you, would you be willing to work with me to get a usbmon capture of whatever the Focusrite software does the first time it sees a new device?

Thanks,
Geoffrey.

User avatar
sysrqer
Established Member
Posts: 1821
Joined: Thu Nov 14, 2013 11:47 pm
Contact:

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby sysrqer » Sun Jun 30, 2019 3:21 pm

Yeah no worries. So I just install the kernel, boot into it and open alsamixer?

I'm more than happy to help however I can, no problem.

geoffrey
Established Member
Posts: 55
Joined: Mon Jul 30, 2018 2:08 am

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby geoffrey » Sun Jun 30, 2019 3:41 pm

sysrqer wrote:Yeah no worries. So I just install the kernel, boot into it and open alsamixer?
To enable the driver you'll also need to create a file /etc/modprobe.d/scarlett.conf containing the line "options snd_usb_audio scarlett_gen2_mixer_enable=1" before you boot the new kernel.

sysrqer wrote:I'm more than happy to help however I can, no problem.
Thanks!

User avatar
sysrqer
Established Member
Posts: 1821
Joined: Thu Nov 14, 2013 11:47 pm
Contact:

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby sysrqer » Tue Jul 02, 2019 8:01 pm

I've just tried it and it seemed to work, was recognised and there were faders and option switches...I've no idea what it all does yet though. I didn't realise this device was so complex.

I haven't managed to actually get any sound out though so far. The kernel shows a boot error 8 times:

Code: Select all

ima: Error Communicating to TPM chip

I couldn't get the nvidia driver to load and everything was very slow and choppy, something not right at all. But the driver seems to work. I tried to get some sound out but after messing around a bit and rebooting into another kernel I realised that my speakers were turned off :shock: :oops:

I'll boot back in and try again but certainly seems promising.

Edit: yeah, just me being an idiot, sound works fine.

geoffrey
Established Member
Posts: 55
Joined: Mon Jul 30, 2018 2:08 am

Re: Focusrite Scarlett 6i6 and 18i8 2nd Gen mixer driver

Postby geoffrey » Tue Jul 09, 2019 1:35 pm

sysrqer wrote:I've just tried it and it seemed to work, was recognised and there were faders and option switches...I've no idea what it all does yet though. I didn't realise this device was so complex.
[...]
Edit: yeah, just me being an idiot, sound works fine.

@sysrqer Thanks for the feedback!


Return to “Computer Related Hardware”

Who is online

Users browsing this forum: occulkot and 1 guest