Drumfix / motu-avb-usb

Linux USB driver for the MOTU AVB series interfaces
GNU General Public License v2.0
66 stars 9 forks source link

More context info to get it working #6

Open ozel opened 3 years ago

ozel commented 3 years ago

Thanks for your awesome work @Drumfix!

This driver runs well in my setup with an UltraLite AVB (old one, non-ESS) and Ubuntu 20.04 LTS using the latetst Liquorix kernel. I am using UAC, regular USB audio class mode, so no further system/kernel modifications besides loading this module. In order to compile the module for Liquorix, I had to download the correspondung full sources from https://github.com/zen-kernel/zen-kernel/tags and extracted them into/lib/modules/`uname -r`/source.

Initially, the module did not work after compile & loading, because the snd_usb-audio module kept precendce in controling my Ultralite AVB interface. If anyone runs into this issue, the corresponding fix is unload via sudo rmmod snd_usb-audio motu (unplug the device if it complains) followed by sudo modprobe motu samplerate=48000 midi=1 vendor=0 && sudo modprobe snd_usb-audio.

Drumfix explained the reloading in this post, along with a way how to find out which module controls the hardware ( lsusb -t): https://linuxmusicians.com/viewtopic.php?p=122974#p122974 Also note the second post below that one, it explains how to make the module auto load after reboot with correct precedence over snd_usb-audio. Just remember to replace 'snd_ua101' with 'motu' in those instructions if the module from this repo is being used (the thread discussed an earlier version of this code when the module had a different name)

I just spent quite some time reading through the long thread on linuxmusicians, hopefully this is helpfull to someone. Maybe the Discussions feature could be enabled for this repo? It's certainly nicer than a pile of issues that are rather comments. :-) Or even the Wiki feature, for gathering more context collaboratively if edit rights are set to public. Yes, there's a fork of this repo with few more infos in its wiki but I guess it should be better stored within here.

side note: Initially, I wasn't sure if I have the older Ultralite AVB hardware or the new one with Sabre ESS DACs (are the newer ones labled differnetly on the device?). This is important to know, because the newer ESS version doesn't seem to work reliably in UAC mode with this module and using the vendor mode requires further kernel hacks as exlained in issue 1. After following the nice telnet 'root hack' (see here), I diffed the two different UltraLite AVB device descriptors in "/opt/motu/DeviceDescription". It looks like module id 12 is the older version and module id 18 marks the newer ESS version. You can check which one you have like this: curl <ip address>/datastore -so /tmp/datastore && grep -e 'model_id_l32' /tmp/datastore

m3astwood commented 2 years ago

@ozel this is super helpful thank you. Finally have my UltraLite AVB working on my Arch setup. Can't get the auto loading on reboot working yet - but surely that is a me problem...