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

Working with motu LP32 ! but only 24 channels #5

Open FabriceLapeyrere opened 3 years ago

FabriceLapeyrere commented 3 years ago

Hi, Thank you for this module. It fixes the drifting channel issue with my MOTU LP32. Though I cannot get the 32 channels, only 24. I tried various combinations but still no luck. Can you summarize how to get the vendor mode right ? In the module and with curl commands. Thanks again !!

Drumfix commented 3 years ago

1.Unfortunately vendor mode requires an additional patch in the usb core, namely in the file

<your-kernel>/drivers/usb/core/config.c

edit the function config_endpoint_is_duplicate so that it just returns false, like this:

static bool config_endpoint_is_duplicate(struct usb_host_config *config,
        int inum, int asnum, struct usb_endpoint_descriptor *d)
{
   return false;
}
  1. The device must be set to vendor mode using the curl command

curl --data 'json={"value":"USB2"}' <ip address of the device>/datastore/host/mode

Then specifying the kernel parameter vendor=1 will set the driver to the default vendor mode with 64 in/out at 44100/48000, 32 in/out at 88200/96000 and 24 in/out at 176400/192000.

If you want what MOTU calls the "low bandwidth mode", i.e. 32 in/out at 44100/48000 instead of the 64, then

Set both "from computer" and "to computer" in the MOTU routing page to 32 and set the kernel parameters ins=32 and outs=32 (note: these are the only valid values right now).

e.g.

sudo insmod motu-avb.ko samplerate=44100 vendor=1 ins=32 outs=32

FabriceLapeyrere commented 2 years ago

Hi, After a few months, I'm trying to make it work in vendor mode. I patched the kernel 5.11.22 (/drivers/usb/core/config.c) but if I set the module with vendor=1 "lsusb -t" always shows "Driver=snd-usb-audio"...

I get the "invalid capture endpoint" message in syslog

the motu LP32 firmware is 1.3.4+169

any idea ?

FabriceLapeyrere commented 2 years ago

Actually this was my mistake : I did not save the file (/drivers/usb/core/config.c) when I first built the kernel ;) Everything is working ! Thank you so much ! My steps :

- build the new kernel. Restart with the new kernel.
- load the module :

sudo modprobe motu samplerate=44100 midi=0 vendor=1

- plug in the motu LP32
- send the curl command :

curl --data 'json={"value":"USB2"}' /datastore/host/mode


- start jackd
- enjoy 64 ins 64 outs !
jean-emmanuel commented 1 year ago

@FabriceLapeyrere Hey, are you still using the LP32 with this driver ? Is it stable ? Does it perfom well at low latencies (<5ms) ? I'm considering getting one but there's not much feedback out there yet.

circuitikzuser commented 4 months ago

I currently have the same problem. Has this solution been included in distros ? If so after which date was the update included ? I really dont want to recompile my kernel as I get stupendously good latencies and dont want to lose that.