Open PA3FUN opened 3 months ago
Hi @PA3FUN,
No need to apologise; I accidentally used some constructs in the code that I shouldn't have, which causes it to not build on older distros.
Can you try the new v1.3a that I uploaded for you here:
https://github.com/geoffreybennett/scarlett-gen2/releases/tag/v6.9-v1.3
Let me know how you go please.
Regards, Geoffrey.
Hi Geoffrey.
Thanks for your prompt reply! I'd love to give the v1.3a a try right-away, but:
Since I obviously don't have physical access to the keyboard I'm not able to boot the box in its original 5.8.15-kernel again, and therefore not able to do the test right now :( .
The good news related to the kernel-update mentioned is that a) the scarlett-gen2 driver is indeed present in this kernel and b) building the alsa-scarlet-gui on this kernel went perfectly well, following the "flatpak-build" route described in the associated READ.me-file. So basically I'm able to configure the Focusrite connected to the box :).
Despite having a working set-up already; I expect to be back home in roughly two weeks, will then do the test and get back to you with an update!
Greetings from Meuzac, France. Christiaan PA3FUN
No problem, and that's great news!
Enjoy your holiday!
Hi Geoffrey. I suddenly remembered having a 2nd Ubuntu 20.04.6 box available/on-line at my home address, that box still running kernel 5.15.0-117-generic. So - I gave it a try. Though the compilation in itself seems to work okay now, still no success, pse check the following output resulting from the command $ make -j4 -C $KSRCDIR M=$(pwd)
Please let me know if you need any more info.
kind regards, Christiaan PA3FUN
musician@Junctionbox:~/Downloads/snd-usb-audio-kmod-5.15-v1.3a$ make -j4 -C $KSRCDIR M=$(pwd) make: Entering directory '/usr/src/linux-headers-5.15.0-117-generic' CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/misc/ua101.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/usbusx2y.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/caiaq/device.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/chip.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/comm.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/usX2Yhwdep.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/caiaq/audio.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/misc/snd-ua101.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/midi.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/control.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/usx2yhwdeppcm.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/firmware.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/caiaq/midi.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/pcm.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/caiaq/control.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/caiaq/input.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/us122l.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/snd-usb-6fire.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/hiface/chip.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/hiface/pcm.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/caiaq/snd-usb-caiaq.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/bcd2000/bcd2000.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/capture.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/snd-usb-usx2y.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/snd-usb-us122l.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/card.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/hiface/snd-usb-hiface.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/clock.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/bcd2000/snd-bcd2000.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/endpoint.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/driver.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/format.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/helper.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/implicit.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/midi.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/mixer.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/midibuf.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/pcm.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/mixer_quirks.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/playback.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/pod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/podhd.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/mixer_scarlett.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/mixer_scarlett2.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/toneport.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/mixer_us16x08.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/variax.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-line6.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-pod.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-podhd.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-toneport.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/mixer_s1810c.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-variax.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/pcm.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/power.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/proc.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/quirks.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/stream.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/validate.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/media.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/midi.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/snd-usb-audio.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/snd-usbmidi-lib.o MODPOST /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/Module.symvers CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/snd-usb-6fire.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/bcd2000/snd-bcd2000.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/caiaq/snd-usb-caiaq.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/hiface/snd-usb-hiface.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-line6.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-pod.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-podhd.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-toneport.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-variax.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/misc/snd-ua101.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/snd-usb-audio.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/snd-usbmidi-lib.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/snd-usb-us122l.mod.o CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/snd-usb-usx2y.mod.o LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/snd-usb-6fire.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/snd-usb-6fire.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/6fire/snd-usb-6fire.ko due to unavailability of vmlinux LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/bcd2000/snd-bcd2000.ko LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/caiaq/snd-usb-caiaq.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/bcd2000/snd-bcd2000.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/bcd2000/snd-bcd2000.ko due to unavailability of vmlinux LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/hiface/snd-usb-hiface.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/hiface/snd-usb-hiface.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/hiface/snd-usb-hiface.ko due to unavailability of vmlinux LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-line6.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/caiaq/snd-usb-caiaq.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/caiaq/snd-usb-caiaq.ko due to unavailability of vmlinux LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-pod.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-pod.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-pod.ko due to unavailability of vmlinux LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-podhd.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-line6.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-line6.ko due to unavailability of vmlinux BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-podhd.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-podhd.ko due to unavailability of vmlinux LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-toneport.ko LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-variax.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-variax.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-variax.ko due to unavailability of vmlinux BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-toneport.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/line6/snd-usb-toneport.ko due to unavailability of vmlinux LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/misc/snd-ua101.ko LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/snd-usb-audio.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/misc/snd-ua101.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/misc/snd-ua101.ko due to unavailability of vmlinux LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/snd-usbmidi-lib.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/snd-usbmidi-lib.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/snd-usbmidi-lib.ko due to unavailability of vmlinux BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/snd-usb-audio.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/snd-usb-audio.ko due to unavailability of vmlinux LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/snd-usb-us122l.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/snd-usb-us122l.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/snd-usb-us122l.ko due to unavailability of vmlinux LD [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/snd-usb-usx2y.ko BTF [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/snd-usb-usx2y.ko Skipping BTF generation for /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.3a/usx2y/snd-usb-usx2y.ko due to unavailability of vmlinux make: Leaving directory '/usr/src/linux-headers-5.15.0-117-generic' musician@Junctionbox:~/Downloads/snd-usb-audio-kmod-5.15-v1.3a$
Hi Christiaan,
I agree, that looks like a successful compilation. I'm not sure why you say "no success"? Have you run the following two commands to install the module?
sudo make -j4 -C $KSRCDIR M=$(pwd) INSTALL_MOD_DIR=updates/snd-usb-audio modules_install
sudo depmod
Regards, Geoffrey.
Oops.. I think where I may have gone astray?! After building (and installing) the driver, I issued the "$dmesg ..." command from a terminal. It reported nothing related to a focusrite, and I assumed this being caused by the driver not having been updated. However, giving this a 2nd thought, that's simply because no focusrite is attached?! Being in France on a holiday trip means enjoying one (or two) glasses of wine. That may be the reason for my initial assumption the driver hadn't been updated... Tomorrow my oldest son will go to my place and hook-up an 18i20 interface to the Ubunto-box. I'll let you know the result :)
Greetings again fro France, Christiaan PA3FUN
Yes, the driver initialisation messages ("Focusrite ... Mixer Driver enabled" etc.) will only show when you attach a supported device. You may also need to reboot if the snd-usb-audio module had already been loaded.
Yes! Looking great. Focusrite 18i8 on Ubuntu 20.04.6, kernel 5.15.0-117-generic.
Thanks a lot Geoffrey.
B.t.w. As a volunteer I'm supporting a Dutch ensemble specialized in contemporary music. Should you be interested, please have a look at a registration of one of "our" recent concerts, where four church-organs jointly played a new composition written for a special occasion, and where those organs where interlinked via Internet using a high-speed mesh-network.
Looking good! And thank you for sharing! I'm listening to it now.
Good day Geoffrey. When building the backported version for kernel 5.15 I run into a problem. For most folks here probably something trivial, but not for me, sorry.
Kernel: 5.15.0-117-generic OS: Ubuntu 20.04.6 LTS
When following the instructions I enter the command "make -j4 -C $KSRCDIR M=$(pwd)" building starts but problems arise when compiling "mixer_scarlett2.c", see below. From what I understand, it could be a compiler-version related issue. I therefore checked the compiler in use:
musician@Testbox1:~/Downloads/snd-usb-audio-kmod-5.15-v1.2$ gcc --version gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0 Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Any help appreciated! and thanks for a great job well done!
Christiaan
/home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.c: In function ‘scarlett2_update_autogain’: /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.c:3411:11: error: redeclaration of ‘i’ with no linkage 3411 | for (int i = 0; i < SCARLETT2_AG_TARGET_COUNT; i++) | ^ /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.c:3369:11: note: previous declaration of ‘i’ was here 3369 | int err, i; | ^ /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.c:3411:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode 3411 | for (int i = 0; i < SCARLETT2_AG_TARGET_COUNT; i++) | ^~~ /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.c:3411:2: note: use option ‘-std=c99’, ‘-std=gnu99’, ‘-std=c11’ or ‘-std=gnu11’ to compile your code /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.c:3422:11: error: redefinition of ‘i’ 3422 | for (int i = 0; i < SCARLETT2_AG_TARGET_COUNT; i++) | ^ /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.c:3411:11: note: previous definition of ‘i’ was here 3411 | for (int i = 0; i < SCARLETT2_AG_TARGET_COUNT; i++) | ^ /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.c:3422:2: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode 3422 | for (int i = 0; i < SCARLETT2_AG_TARGET_COUNT; i++) | ^~~ CC [M] /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_us16x08.o /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.c: In function ‘scarlett2_compressor_ctl_put’: /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.c:5408:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] 5408 | const struct compressor_param *param = &compressor_params[param_index]; | ^~~~~ make[1]: [scripts/Makefile.build:297: /home/musician/Downloads/snd-usb-audio-kmod-5.15-v1.2/mixer_scarlett2.o] Error 1 make[1]: Waiting for unfinished jobs....