Closed kroll-j closed 8 years ago
i'm a owner of a scarlett 6i6 and i would like to test it with my kernel. How do i generate a patch file from the github master so last commits regarding 6i6 are included? any help is appreciated
In certain circumstances you can compile it even out-of-tree: I use make -C /usr/src/linux-2.6/ M=$PWD modules where $PWD is alsa-driver_scarlett/sound/usb . You'll still have to install and insmod/modprobe the module.
The other option is something like git diff b044dfe . > scarlett.patch in alsa-driver_scarlett/sound (otherwise there will be one superfluous file in the patch) and then applying it to the kernel (e.g. in /usr/src/linux-2.6) via something like patch -p1 < ...scarlett.path (untested...)
On 01/02/14 10:34, Lucio Asnaghi wrote:
i'm a owner of a scarlett 6i6 and i would like to test it with my kernel. How do i generate a patch file from the github master so last commits regarding 6i6 are included? any help is appreciated
— Reply to this email directly or view it on GitHub https://github.com/smilingthax/alsa-driver_scarlett/issues/2#issuecomment-33867485.
Regarding upstreaming into the mainline kernel... I'm all for it... but I'm currently not willing to invest much time into it.
thanx i've been able to make a patch. i initially tried with out of tree compilation, but there were missing symbols when trying to insmod the snd-usb-audio...
wonderful work by the way. the mixer works out of the box on my scarlett with no major drawbacks so far ! the only problems are related to the snd-usb-audio module and kernel's ehci-hcd handling of the device.
Well, if you won't integrate the code into the kernel, are you planning to support the driver outside of the kernel tree, integrating changes from mainline? If you don't, the code will diverge sooner or later and the patch will no longer apply cleanly to newer kernels, making it rather useless. What are we going to do? Should I try to integrate your code into mainline? I would be willing to try, but I haven't done that before.
Well, I'll keep my tree up-to-date so that it works for me -- and I don't expect that many breaking changes in the future.
That being said, I'm all for integrating the code into the kernel, by submitting it to the alsa project; the alsa-devel mailing list is probably the right place to go. As I've extended Robin Gareus' work to support more devices, you can also reference his mail on the subject [1].
[1] http://mailman.alsa-project.org/pipermail/alsa-devel/2013-January/058766.html
On 21/02/14 17:45, j. kroll wrote:
Well, if you won't integrate the code into the kernel, are you planning to support the driver outside of the kernel tree, integrating changes from mainline? If you don't, the code will diverge sooner or later and the patch will no longer apply cleanly to newer kernels, making it rather useless. What are we going to do? Should I try to integrate your code into mainline? I would be willing to try, but I haven't done that before.
— Reply to this email directly or view it on GitHub https://github.com/smilingthax/alsa-driver_scarlett/issues/2#issuecomment-35748461.
I found this thread on alsa-devel http://comments.gmane.org/gmane.linux.alsa.devel/126241, where they are talking about integrating Tobias' code (and yours too, of course) into mainline. Daniel Mack zonque@gmail.com was even looking for his mail address, so I think he is interested and could help.
Edited: I was able to compile and load the modules after modprobe snd_pcm snd_hwdep
.
When I plug the scarlett 6i6, it does not show in alsa.
dmesg shows this:
[ 416.825307] usb 2-1.5: new high-speed USB device number 3 using ehci-pci
[ 416.912108] usb 2-1.5: New USB device found, idVendor=1235, idProduct=8012
[ 416.912113] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 416.912117] usb 2-1.5: Product: Scarlett 6i6 USB
[ 416.912119] usb 2-1.5: Manufacturer: Focusrite
[ 416.912121] usb 2-1.5: SerialNumber: 0000A069
[ 416.990224] BUG: unable to handle kernel paging request at ffffffffa04a3240
[ 416.990275] IP: [
$ aplay -l aplay: device_list:268: no soundcards found...
$ alsamixer cannot open mixer: No such file or directory
It seems not to be smart to try to use the "old" alsa-driver together with parts from the more up-to-date in-kernel alsa. You might want to try the ...-kernel.patch [1] against your current kernel sources (or: a copy of the drivers/sound/ subtree). I'm currently using my 18i8 on a 3.16.0 kernel using that patch. BTW, Daniel gets this as CC.
[1] https://github.com/smilingthax/alsa-driver_scarlett/tree/patches
On 03/09/14 22:49, gabrgomes wrote:
I was able to compile your module (both out-of-tree and patched), and snd-usbmidi-lib.ko loads fine but I'm getting an error when trying to insmod snd-usb-audio.ko:
insmod snd-usb-audio.ko
insmod: ERROR: could not insert module snd-usb-audio.ko: Unknown symbol in module
What am I missing?
I found this thread on alsa-devel http://comments.gmane.org/gmane.linux.alsa.devel/126241 but the modules_prepare did not help.
Also, they are talking about integrating Tobias' code (and yours too, of course) into mainline. Daniel Mack zonque@gmail.com mailto:zonque@gmail.com was even looking for his mail address, so I think he is interested and could help.
— Reply to this email directly or view it on GitHub https://github.com/smilingthax/alsa-driver_scarlett/issues/2#issuecomment-54364354.
I can only encourage you to bring this driver addition to mainline. The Linux kernel is a rapidly moving target, and hence maintaining patches out of tree certainly results in more work eventually. Also, no distribution kernel will ship your patches, so no common user will be able to benefit from them, which is sad and also leads to poorer test coverage.
If you're up for it, please prepare patches for the 'for-next' branch of this tree:
https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/
Checking for style problems with scripts/checkpatch.pl before posting is advisable. The rest can be discussued on the ALSA mailing list then :)
Why patch removes code from quirks-table.h? Is this intented?
The quirks-table in the current kernel contains an entry to block/disable the generic create-mixer-from-usb-descriptor code from creating a mixer for 6i6 devices, because the usb-descriptor delivered by 6i6 is invalid and "crashes" the generic code. To use the mixer in a Scarlett device, the driver (or, for Windows: the mixer app) has to know the internal wiring of each usb device it supports.
My scarlett mixer code has that internal knowledge and is used to create the mixer instead of calls to the generic code. Therefore the quirk entry is no longer needed/wanted.
How do you apply your patch against 3.16? Because even using -F3 fails on quirks-table.h:
patching file sound/usb/quirks-table.h Reversed (or previously applied) patch detected! Assume -R? [n] n Apply anyway? [n] y Hunk #1 FAILED at 3054. 1 out of 1 hunk FAILED -- saving rejects to file sound/usb/quirks-table.h.rej
Also contex of quirks-table.h is different in 3.16: https://github.com/torvalds/linux/blob/v3.16/sound/usb/quirks-table.h
The Scarlett code finishes with: /* Access Music devices */
But in your patch is: * Some USB MIDI devices don't have an audio control interface, * so we have to grab MIDI streaming interfaces here. */
In case you are interested, the 18i20 and 18i8 are being discussed on the alsa-devel mailing list right now: http://thread.gmane.org/gmane.linux.alsa.devel/127579/focus=127579 If you want to help getting this into the kernel, it's now the right time to get involved ( http://www.alsa-project.org/mailman/listinfo/alsa-devel ).
Hello, reading through all the mailing list threads linked above, I understand that this useful work has still not found its way into mainline Linux/ALSA. Owning a Focusrite 18i8 myself, I'm all in for helping with tests.
It should be supported, since Support was added to Linux kernel 3.19. This is also confirmed e.g. in this thread: https://community.ardour.org/node/5751
So what exactly are you missing? Does it simply not work for you?
Ah, thank you. I was brought here from another spot on the web where it looked like there still was some work to do (it linked here). I should have checked it first. alsamixer works perfectly. Only pulseaudio still wants to treat the 18i8 like a 7.1 surround card... Thank you, and sorry for the noise.
Hello,
you guys did some great work here! The patch created by trrichard applies cleanly to a 3.11.0-15-lowlatency Ubuntu kernel as well.
Is there any chance the driver will get merged into the mainline kernel/alsa code? That would be awesome!