Ultralite AVB

Talk about your MIDI interfaces, microphones, keyboards...

Moderators: MattKingUSA, khz

supereb
Established Member
Posts: 93
Joined: Fri Aug 17, 2018 10:55 pm
Has thanked: 36 times
Been thanked: 5 times

Re: Ultralite AVB

Post by supereb »

bluebell wrote: Sun Nov 12, 2023 7:32 pm

Since I am completely happy with @Drumfix's ua101-replacement I didn't try other solutions (except for his dkms driver which isn't that stable as the ua101-replacement).

Although the dkms driver has been fairly stable for me, the ua101 patch was rock solid. I never had a single problem. I have since updated my system to a much newer version/kernel but don't know how much trouble it will be to patch the kernel. What kernel are you using?

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: Ultralite AVB

Post by bluebell »

supereb wrote: Sat Nov 18, 2023 2:11 pm
bluebell wrote: Sun Nov 12, 2023 7:32 pm

Since I am completely happy with @Drumfix's ua101-replacement I didn't try other solutions (except for his dkms driver which isn't that stable as the ua101-replacement).

Although the dkms driver has been fairly stable for me, the ua101 patch was rock solid. I never had a single problem. I have since updated my system to a much newer version/kernel but don't know how much trouble it will be to patch the kernel. What kernel are you using?

Kernel 5.15.134 with the ua101-patch.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

supereb
Established Member
Posts: 93
Joined: Fri Aug 17, 2018 10:55 pm
Has thanked: 36 times
Been thanked: 5 times

Re: Ultralite AVB

Post by supereb »

bluebell wrote: Sat Nov 18, 2023 2:17 pm

Kernel 5.15.134 with the ua101-patch.

Thanks. I was using 4.19.xxx with the ua101 patch. Currently running AVLinux with 6.2 Liquorix kernel. When I get some time I'll have to look into how to apply that patch to the kernel I'm currently running.

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: Ultralite AVB

Post by bluebell »

supereb wrote: Sat Nov 18, 2023 9:45 pm
bluebell wrote: Sat Nov 18, 2023 2:17 pm

Kernel 5.15.134 with the ua101-patch.

Thanks. I was using 4.19.xxx with the ua101 patch. Currently running AVLinux with 6.2 Liquorix kernel. When I get some time I'll have to look into how to apply that patch to the kernel I'm currently running.

I had to comment out the line with

Code: Select all

MODULE_SUPPORTED_DEVICE("{{Motu, AVB Series}}");

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

supereb
Established Member
Posts: 93
Joined: Fri Aug 17, 2018 10:55 pm
Has thanked: 36 times
Been thanked: 5 times

Re: Ultralite AVB

Post by supereb »

bluebell wrote: Sun Nov 19, 2023 8:00 am

I had to comment out the line with

Code: Select all

MODULE_SUPPORTED_DEVICE("{{Motu, AVB Series}}");

Thanks for the tip!

elahn
Posts: 2
Joined: Fri Nov 24, 2023 11:46 pm
Been thanked: 2 times

Re: Ultralite AVB

Post by elahn »

AudioNarwhal wrote: Fri Mar 10, 2023 4:14 pm

The sample rate switching during enumeration is an unfortunate outcome of the USB Audio Class 2 specification. This is because USB audio class streaming interfaces can have multiple "alternate settings" each with a different number of channels and audio format. Each "alternate setting" may or may not be available at a given sampling frequency, so the host has to set the sampling rate then ask the device what the valid alternate settings are in order to build a list of what channel counts, formats, etc are available at each sampling frequency. This should be resolved in the USB Audio Class 4 specification with the addition of the "Valid Frequency Range Descriptor" that will accompany each alternate setting, however the specification is still being finalized.

The USB Audio Class 4 specification has been published with "Valid Frequency Range Descriptor" accompanying each alternate setting. 🎉

IIUC this needs to be implemented in the linux audio class driver, alsa and the MOTU firmware. If some capable community members do the first two, perhaps Dylan will be motivated to do the firmware. 🤞

driedstr
Established Member
Posts: 6
Joined: Wed Dec 21, 2016 2:43 am
Has thanked: 5 times

Re: Ultralite AVB

Post by driedstr »

Can audio class 4 be implemented on USB 2.0? Looks to me like it's part of the USB4 spec, which requires type C hardware connections, which the AVB Ultralite doesn't have. But I would be happy to be misunderstanding!

supereb
Established Member
Posts: 93
Joined: Fri Aug 17, 2018 10:55 pm
Has thanked: 36 times
Been thanked: 5 times

Re: Ultralite AVB - Drumfix driver

Post by supereb »

So I realized that I did not properly install @Drumfix's motu-avb driver, and that all of this time things have worked with only occasional dropouts. Today I set out to do things right and compiled the latest Liquorix kernel with the necessary edits for vendor mode. I ran into problems using the driver. motu is in the lsmod list, and lsusb shows motu as the driver for the USB connected 8pre-ES.

When attempting to set module to low bandwidth mode, I discovered that the system could not find motu-avb.ko.

Playback is on correct channels but with severe bitcrushing. I have tried both motu devices shown in Jack.

Any ideas what I did wrong?

Not shown are the curl commands to put the unit into vendor mode.

Code: Select all

foo@bar:~
$ sudo cp -r motu-avb-usb /usr/src/motu-avb-usb-1.0
foo@bar:~
$ sudo dkms add motu-avb-usb/1.0
Creating symlink /var/lib/dkms/motu-avb-usb/1.0/source -> /usr/src/motu-avb-usb-1.0
foo@bar:~
$ sudo dkms build motu-avb-usb/1.0 --verbose

Building module:
make clean
make -C /lib/modules/6.6.2-lqx1-motu/build M=/var/lib/dkms/motu-avb-usb/1.0/build clean
make[1]: Entering directory '/home/foo/Liquorix-6.6.2/zen-kernel-6.6.2-lqx1'
make[1]: Leaving directory '/home/foo/Liquorix-6.6.2/zen-kernel-6.6.2-lqx1'

{ make -j8 KERNELRELEASE=6.6.2-lqx1-motu all KVERSION=6.6.2-lqx1-motu; } >> /var/lib/dkms/motu-avb-usb/1.0/build/make.log 2>&1

make clean
make -C /lib/modules/6.6.2-lqx1-motu/build M=/var/lib/dkms/motu-avb-usb/1.0/build clean
make[1]: Entering directory '/home/foo/Liquorix-6.6.2/zen-kernel-6.6.2-lqx1'
  CLEAN   /var/lib/dkms/motu-avb-usb/1.0/build/Module.symvers
make[1]: Leaving directory '/home/foo/Liquorix-6.6.2/zen-kernel-6.6.2-lqx1'

foo@bar:~
$ sudo dkms install motu-avb-usb/1.0

motu.ko.xz:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/6.6.2-lqx1-motu/updates/dkms/
depmod.....
foo@bar:~
$ sudo insmod motu-avb.ko samplerate=44100 vendor=1 ins=32 outs=32
insmod: ERROR: could not load module motu-avb.ko: No such file or directory

foo@bar:~
$ sudo rmmod snd_usb-audio motu
foo@bar:~
$ sudo modprobe motu samplerate=44100 midi=0 vendor=1 && sudo modprobe snd_usb-audio
foo@bar:~
foo@bar:~
$ sudo insmod motu-avb.ko samplerate=44100 vendor=1 ins=32 outs=32
insmod: ERROR: could not load module motu-avb.ko: No such file or directory
foo@bar:~
$ lsmod
Module                  Size  Used by
snd_usb_audio         405504  0
motu                   32768  0
...


foo@bar:~
$ lsusb -t | grep motu
    |__ Port 3: Dev 2, If 0, Class=Audio, Driver=motu, 480M
    |__ Port 3: Dev 2, If 5, Class=Vendor Specific Class, Driver=motu, 480M
    |__ Port 3: Dev 2, If 3, Class=Vendor Specific Class, Driver=motu, 480M
    |__ Port 3: Dev 2, If 1, Class=Audio, Driver=motu, 480M
    |__ Port 3: Dev 2, If 4, Class=Vendor Specific Class, Driver=motu, 480M
    |__ Port 3: Dev 2, If 2, Class=Audio, Driver=motu, 480M
Last edited by supereb on Sun Nov 26, 2023 2:56 am, edited 1 time in total.
elahn
Posts: 2
Joined: Fri Nov 24, 2023 11:46 pm
Been thanked: 2 times

Re: Ultralite AVB

Post by elahn »

driedstr wrote: Sat Nov 25, 2023 2:29 pm

Can audio class 4 be implemented on USB 2.0?

Yes. Audio device class 4 and 3 are compatible with USB 2.0 and USB type A connection.

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: Ultralite AVB - Drumfix driver

Post by bluebell »

supereb wrote: Sat Nov 25, 2023 9:44 pm

So I realized that I did not properly install @Drumfix's motu-avb driver, and that all of this time things have worked with only occasional dropouts. Today I set out to do things right and compiled the latest Liquorix kernel with the necessary edits for vendor mode. I ran into problems using the driver. motu is in the lsmod list, and lsusb shows motu as the driver for the USB connected 8pre-ES.

When attempting to set module to low bandwidth mode, I discovered that the system could not find motu-avb.ko.

Playback is on correct channels but with severe bitcrushing. I have tried both motu devices shown in Jack.

Any ideas what I did wrong?

Did you blacklist ua101?

Isn't the dkms-module called motu.ko?

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

supereb
Established Member
Posts: 93
Joined: Fri Aug 17, 2018 10:55 pm
Has thanked: 36 times
Been thanked: 5 times

Re: Ultralite AVB - Drumfix driver

Post by supereb »

bluebell wrote: Sun Nov 26, 2023 2:16 pm

Did you blacklist ua101?

Isn't the dkms-module called motu.ko?

Thanks for your reply. Following @Drumfix's advise in resolving an issue(https://github.com/Drumfix/motu-avb-usb ... -873286608, it is motu-avb.ko, which is confusing because I do find a motu.ko.xz located in /var/lib/dkms/motu-avb-usb/1.0/6.6.2-lqx1-motu/x86_64/module/, but when I type locate motu.ko.xz my system can't seem to find it. I thought maybe I wasn't looking in the right place to find motu.ko.

The instructions for the dkms module do not mention blacklisting ua101, only blacklisting motu in card.c and config.c the function config_endpoint_is_duplicate so that it always returns false in config.c. (issue:https://github.com/Drumfix/motu-avb-usb ... 839164217)

Drumfix/motu-avb: https://github.com/Drumfix/motu-avb-usb

buonamorte.records
Established Member
Posts: 101
Joined: Tue Apr 07, 2020 4:31 am
Has thanked: 11 times
Been thanked: 11 times

Re: Ultralite AVB

Post by buonamorte.records »

Hi LMs!

When we say the Ultralite is class compliant, in means 24 input and 24 output, right? What about mixer channels (postFX on the routing in the webapp)?

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: Ultralite AVB

Post by bluebell »

buonamorte.records wrote: Tue Nov 28, 2023 1:26 pm

Hi LMs!

When we say the Ultralite is class compliant, in means 24 input and 24 output, right? What about mixer channels (postFX on the routing in the webapp)?

Yes, 24 in and 24 out.

The mixer controls are not exposed to ALSA. For me it's ok to use the interface's web interface. Mixer's ins and outs can be assigned there.

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

supereb
Established Member
Posts: 93
Joined: Fri Aug 17, 2018 10:55 pm
Has thanked: 36 times
Been thanked: 5 times

Re: Ultralite AVB - Drumfix driver

Post by supereb »

supereb wrote: Sat Nov 25, 2023 9:44 pm

So I realized that I did not properly install @Drumfix's motu-avb driver, and that all of this time things have worked with only occasional dropouts. Today I set out to do things right and compiled the latest Liquorix kernel with the necessary edits for vendor mode. I ran into problems using the driver. motu is in the lsmod list, and lsusb shows motu as the driver for the USB connected 8pre-ES.

When attempting to set module to low bandwidth mode, I discovered that the system could not find motu-avb.ko.

Playback is on correct channels but with severe bitcrushing. I have tried both motu devices shown in Jack.

Any ideas what I did wrong?

Original post in quoted text above.

Still cannot set low bandwidth mode, but the bitcrushing issue has been fixed. I mistakenly assumed that although pulseaudio is part of the default AVLinux install, that its presence would not be a problem. No surprise, after removing pulseaudio, my audio problems went away.

In Jack, there are two devices shown:

hw:MOTUAVB / MOTUAVB(hw:0)
hw:MOTUAVB,0 / MOTUAVB(hw:0,0)

Only one works - hw:MOTUAVB,0 / MOTUAVB(hw:0,0)

But when I attempt to use ALSA directly in Ardour/Mixbus, I get no sound in/out. Only MOTU-AVB shows up. It is like it can only see the non-working port, the one without ",0" on the end. Any ideas on how I can make this port to be the ALSA default?

User avatar
bluebell
Established Member
Posts: 1927
Joined: Sat Sep 15, 2012 11:44 am
Location: Saarland, Germany
Has thanked: 113 times
Been thanked: 122 times

Re: Ultralite AVB

Post by bluebell »

On my machine I use hw:0 with jack, not hw:0,0 and it works.

Pulseaudio makes no problems since I configured it to use jack_sink and never try to access the Ultralite directly.

See also http://marzen.de/Holger/pulseaudio_and_jack/

One reason having problems to use ALSA may be a system wide redirection of ALSA clients to Pulseaudio. But configuring Pulseaudio to use jack cures all problems. On my system I can show it with "aplay -L": The "default" setting is redirecting ALSA clients to Pulseaudio.

Code: Select all

hm@bubu:~$ aplay -L
default
    Playback/recording through the PulseAudio sound server
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
sysdefault:CARD=MOTUAVB
    MOTU-AVB, MOTU-AVB
    Default Audio Device
dmix:CARD=MOTUAVB,DEV=0
    MOTU-AVB, MOTU-AVB
    Direct sample mixing device
dsnoop:CARD=MOTUAVB,DEV=0
    MOTU-AVB, MOTU-AVB
    Direct sample snooping device
hw:CARD=MOTUAVB,DEV=0
    MOTU-AVB, MOTU-AVB
    Direct hardware device without any conversions
plughw:CARD=MOTUAVB,DEV=0
    MOTU-AVB, MOTU-AVB
    Hardware device with all software conversions

Linux – MOTU UltraLite AVB – Qtractor – http://suedwestlicht.saar.de/

Post Reply