geoffreybennett / alsa-scarlett-gui

alsa-scarlett-gui is a Gtk4 GUI for the ALSA controls presented by the Linux kernel Focusrite Scarlett2 Mixer Driver
637 stars 37 forks source link

Add Focusrite Scarlett Gen 4 support #61

Open geoffreybennett opened 1 year ago

geoffreybennett commented 1 year ago

Focusrite recently released 3 new models: Scarlett Gen 4 Solo, 2i2, and 4i4.

I've created a fundraiser to request assistance purchasing one of each so I can add support for them: https://gofund.me/ae997781

If you are able to donate or share the link with others, that would be greatly appreciated. Thank you!

geoffreybennett commented 11 months ago

First draft of Scarlett Gen 4 support is ready for the brave: Kernel driver: https://github.com/geoffreybennett/scarlett-gen2/releases/tag/v6.5.11-g4.1 Firmware update utility: https://github.com/geoffreybennett/scarlett2 Please email me if you'd like to help test.

Updates to alsa-scarlett-gui for Gen 4 aren't ready yet. That's the next thing to work on.

geoffreybennett commented 10 months ago

Second draft of Scarlett Gen 4 support is ready. You don't need to be so brave this time; a few people have reported that the first draft worked, and I'm getting ready to submit this upstream:

https://github.com/geoffreybennett/scarlett-gen2/releases/tag/v6.7-rc2-g4.2

geoffreybennett commented 10 months ago

Third draft, and I've submitted it upstream now; 57 emails, with 4059 lines added and 798 lines deleted!

Use the code from here if you want to try it out: https://github.com/geoffreybennett/scarlett-gen2/releases/tag/v6.7-rc2-g4.3

MagicLike commented 10 months ago

I both patched my kernel and installed the update utility (both recognise my Scarlett Solo Gen 4), but the GUI still says "Sorry, I don't recognise the controls on this card". Am I missing something or is this a bug? (And should I open a separate issue for this, or is this one fine?)

geoffreybennett commented 10 months ago

@MagicLike What does dmesg | grep -i focusrite -A 5 -B 5 show? And, are you trying the dev branch?

MagicLike commented 10 months ago

@MagicLike What does dmesg | grep -i focusrite -A 5 -B 5 show? And, are you trying the dev branch?

The grep command outputs nothing and yes I am using the dev branch already - I can try to rebuild just to be sure...

geoffreybennett commented 10 months ago

Maybe it's been a while since you plugged in the interface and the messages are gone from the kernel ring buffer? Try unplugging/replugging it; there should definitely be kernel messages like this:

usb 3-6.4.1: New USB device found, idVendor=1235, idProduct=821a, bcdDevice= 8.29
usb 3-6.4.1: New USB device strings: Mfr=1, Product=3, SerialNumber=2
usb 3-6.4.1: Product: Scarlett 4i4 4th Gen
usb 3-6.4.1: Manufacturer: Focusrite

And after that there should be something from the mixer driver with its status.

MagicLike commented 10 months ago

Maybe it's been a while since you plugged in the interface and the messages are gone from the kernel ring buffer? Try unplugging/replugging it; there should definitely be kernel messages like this:

usb 3-6.4.1: New USB device found, idVendor=1235, idProduct=821a, bcdDevice= 8.29
usb 3-6.4.1: New USB device strings: Mfr=1, Product=3, SerialNumber=2
usb 3-6.4.1: Product: Scarlett 4i4 4th Gen
usb 3-6.4.1: Manufacturer: Focusrite

And after that there should be something from the mixer driver with its status.

Just replugged it:

usb 3-2.3.3: New USB device found, idVendor=1235, idProduct=8218, bcdDevice= 7.b6
usb 3-2.3.3: New USB device strings: Mfr=1, Product=3, SerialNumber=2
usb 3-2.3.3: Product: Scarlett Solo 4th Gen
usb 3-2.3.3: Manufacturer: Focusrite
usb 3-2.3.3: SerialNumber: ***
usb 3-2.3.3: Focusrite Scarlett Gen 4 Mixer Driver 6.2-g4.3 enabled (pid=0x8218); report any issues to https://github.com/geoffreybennett/scarlett-gen2/issues
usb 3-2.3.3: Firmware version 1974
usb 3-2.3.3: Focusrite Scarlett Gen 4 firmware version 1974 is too old; need 2115
geoffreybennett commented 10 months ago

Yes, you don't get the controls until you upgrade the firmware. I don't have permission to share those publicly yet. Please email me.

MagicLike commented 10 months ago

Yes, you don't get the controls until you upgrade the firmware. I don't have permission to share those publicly yet. Please email me.

Oh I am sorry, I did not read properly. Sending you the e-mail!

geoffreybennett commented 10 months ago

No probs. Thanks for trying this out.

Videl commented 10 months ago

Hello @geoffreybennett, need another beta tester? I am on the 4th Gen 2i2 and would like to disable the loopback :). FWIW I am on NixOS and I used flatpak-builder to run the application, the startup worked great.

mjhowell commented 10 months ago

I have a 4th gen 4i4. I like the handy "direct monitor" button on the new 2i2, so I was hoping to figure out how to accomplish same on Linux without the Focusrite Control 2 app.

Built and installed your kernel module and built this app using your current dev branch. (Ubuntu 22.04, 6.5.0-14)

All seems to be working, except I mistakenly cleared my routing config. I don't know what the standard factory routing state looks like and can't recover it. The device remembers its state, so when i plugged it in to my Windows machine to light up Focusrite Control 2, the mixing window was empty (i.e. seems this thing is configured in a way that is unusable and confuses the FC2 app). I don't know how to get the original state back; FC2 doesn't have a reset option that I can find; the widget doesn't have a physical reset button that I can find.

So a default ".state" file to reload would be a handy thing, but in the meantime, can some kind soul who is also testing this with a 4th gen 4i4 perhaps post a screenshot of their routing state before making changes?

geoffreybennett commented 10 months ago

@Videl please email me if you'd like to assist testing. Although, note that it's better to configure your PulseAudio/PipeWire to record only from channels 1/2 so that you don't have to disable loopback. I'm guessing your recordings are including looped-back audio? If you just disable loopback then you'll be recording your desired audio + silence & your levels will be too low (at least, that's what I found with PulseAudio).

geoffreybennett commented 10 months ago

@mjhowell, please install scarlett2 from https://github.com/geoffreybennett/scarlett2 and run scarlett2 reset-config. Also, email me if you'd like to test the unreleased stuff.

geoffreybennett commented 9 months ago

Wow, we're coming up to 6 months since I sent out that call for help, and I think we're just about done with this!

Next up: documentation, release the new version of alsa-scarlett-gui, then on to the Vocaster and Gen 1 support.

lyderic commented 9 months ago

Excellent! Thanks Goeffrey!

unhappy-ending commented 8 months ago

Wow, we're coming up to 6 months since I sent out that call for help, and I think we're just about done with this!

  • Linux 6.8 will have the updated driver with 4th Gen support.
  • The dev branch of alsa-scarlett-gui is supporting all the 4th Gen features, including firmware update now.
  • Focusrite have given me permission to distribute the firmware under a pretty standard firmware license.

Next up: documentation, release the new version of alsa-scarlett-gui, then on to the Vocaster and Gen 1 support.

Howdy, I'm very thankful for your work on this! I've been waiting since 6.6 for support for the 4i4 because my 18i20 2nd gen died and ended up replacing it through Focusrite with the newer 4th gen interface.

Linux 6.8 is working very well with the interface. Dev branch (version 0.3.3-128-g1bc0) of alsa-scarlett-gui is amazing and works perfectly with my interface so far. I love the new GUI! More so than the official one on Windows. I'm on Gentoo and made some custom ebuilds for scarlett2 and scarlett2-firmware, and they both work perfect with my interface. I've used all the firmware options and they all seem to work without a hitch.

Oh, one thing I did come across was with a custom kernel that has MIDI 2.0 compiled in would cause issue during boot while the interface was connected. dmesg would show an error message about no MIDI 2.0 support and a quirk. Boot would stop at that point and proceed no further. Unplugging the device during boot and plugging in after the system was up and running was fine though. Having compiled out support for MIDI 2.0, boot is back to working while the device is plugged in.

geoffreybennett commented 8 months ago

That's great to hear! Thank you very much for the feedback!

I'm still working on that documentation before I consider this "done" and tag a release. I tried to get Vocaster kernel support done in time for 6.9, but it seems I was a couple days late and it's bumped to 6.10.

For that MIDI 2.0 boot hang problem, if you can reproduce it, then I'd suggest reporting it to linux-sound@vger.kernel.org

Thanks again!

unhappy-ending commented 8 months ago

For that MIDI 2.0 boot hang problem, if you can reproduce it, then I'd suggest reporting it to linux-sound@vger.kernel.org

I can easily reproduce it. I'll send the error that way when I get a chance.

Edit: Nevermind. I guess it booted fine even with the notice. Here's the notification if you're interested.

usb 1-6: Quirk or no altset; falling back to MIDI 1.0

Not sure what caused the error before.

ndrewGele commented 8 months ago

Hi there, I'm using the dev branch for my 4th gen solo, so I figured I would comment here rather than starting a new issue. There seems to be some overlapping text int he Hardware Outputs section.

I also think there might be an issue with the direct preset and/or the reset-config'd settings on a solo gen 4. Routing Analogue 2 input to this overlapped field is the only way to get the gain halo to light up when using my microphone. Wondering if the gain halo has it's own routing output separate from an audio output. The overlap also seems to break the "one sink cant have multiple sources" rule stated in USAGE.md.

I want to say that the routing config looked different before I accidentally cleared it for the first time, but I know memories can be wrong. I tried looking around for a way to factory reset the device to confirm, but didn't find anything.

Screenshot_20240322_195924

geoffreybennett commented 8 months ago

Hi @ndrewGele,

That's definitely not the dev branch you've got there. All those problems are what you'd see if you were using the master branch which is lacking all the code you need to use the 4th Gen interfaces.

If you're not familiar with git, then I'd suggest deleting your cloned directory and then starting again:

git clone https://github.com/geoffreybennett/alsa-scarlett-gui.git
cd alsa-scarlett-gui/src
git checkout dev
make -j12
./alsa-scarlett-gui

Once you are running the code from the dev branch it's going to look a whole lot better and:

Regards, Geoffrey.

geoffreybennett commented 7 months ago

I've released 0.4.0 now which I think is the last piece of this.

adfernandes commented 1 month ago

@geoffreybennett 🥳 Thank you!

Do you have a gofundme or equivalent for the 4th Gen Scarlett 16i16 and Scarlett 18i20 that were just released?

~(Or just continue with the existing gofundme link?~ I just realized that you disabled that gofundme...

geoffreybennett commented 1 month ago

Yep! I put the announcement here: https://linuxmusicians.com/viewtopic.php?p=170653#p170653

Hi all,

I'm very excited to now be able to share with you that, true to their word (see this post), last month Focusrite sent me pre-release units of their long-anticipated "big" 4th Gen models: the 16i16, 18i16, and 18i20!

This early access allowed me to get a head-start on adding Linux support for these devices. As usual, they are all USB Audio Class compliant, so basic audio I/O functionality works out of the box without any special drivers. However, the advanced routing and mixing features do require kernel support like I've previously added for the Scarlett 2nd Gen, 3rd Gen, Clarett, and Vocaster series.

Over the past month, I've implemented nearly all the features in the driver, including support for firmware updates. My goal is to have the driver and updated GUI ready for public release by the time these units hit the shelves (the Focusrite web site says pre-orders will ship mid-October).

Many thanks to all of you who have contributed to this project of mine. Your support was what got the attention of Focusrite and made it possible for this to happen!

For those interested, their announcement video is here.

Happy recording!

Regards, Geoffrey.