Page 55 of 60

Re: Ultralite AVB

Posted: Fri Jan 06, 2023 2:42 am
by nandoll
nandoll wrote: Fri Jan 06, 2023 1:37 am
AudioNarwhal wrote: Thu Dec 29, 2022 9:02 pm
stanlea wrote: Thu Dec 29, 2022 7:49 pm

Edit : the first hardware input (microphone 1 on the front side of the 828ES) is still routed to input 17 in Carla or Ardour.

While audio is running can you try this utility (motu-sync-rec) to see if it corrects the input channel mapping? Can you also share the output logs from this tool?
motu-sync-rec

Example:

Code: Select all

$ ./motu-sync-rec 169.254.231.248
USB Channel Count (-1): 23
USB State: 0x11
USB Record Delta: 36
Forcing Record Sync...
USB Record Delta: 36

@AudioNarwhal: holy cow, this is magical!!
...
This alone makes my life much easier in the sense that it looks like I no longer would have to try to start jackd multiple times until the channel order happens to be right. Wow. Thanks!

Would it be possible to share the source to this utility? (I try to never rely on binaries alone if possible, for example this program did not run on an older version of Fedora because of GLIB version incompatibility).


Re: Ultralite AVB

Posted: Fri Jan 06, 2023 11:03 am
by trakuna
nandoll wrote: Fri Jan 06, 2023 2:42 am

Would it be possible to share the source to this utility? (I try to never rely on binaries alone if possible, for example this program did not run on an older version of Fedora because of GLIB version incompatibility).

Seems like it just makes a UDP connection on port 9999, checks if the device is actively streaming via USB and if so sends the following bytes to force the sync:

Code: Select all

0000   4d 4f 54 55 0b 00 00 00 00 00 00 00 55 02 00 00   MOTU........U...
0010   10 00 00 00                                       ....

Should be doable with this (untested):

Code: Select all

echo '4d4f54550b000000000000005502000010000000' | xxd -r -p | nc -u -N 192.168.ccc.ddd 9999

Re: Ultralite AVB

Posted: Fri Jan 06, 2023 8:41 pm
by nandoll
trakuna wrote: Fri Jan 06, 2023 11:03 am
nandoll wrote: Fri Jan 06, 2023 2:42 am

Would it be possible to share the source to this utility? (I try to never rely on binaries alone if possible, for example this program did not run on an older version of Fedora because of GLIB version incompatibility).

Should be doable with this (untested):

Code: Select all

echo '4d4f54550b000000000000005502000010000000' | xxd -r -p | nc -u -N 192.168.ccc.ddd 9999

Thanks, confirmed that this incantation works...

Yes, I fired up tcpdump & wireshark yesterday and looked around :-)


Re: Ultralite AVB

Posted: Sun Jan 08, 2023 1:40 pm
by shellwalker
trakuna wrote: Fri Jan 06, 2023 11:03 am

Seems like it just makes a UDP connection on port 9999, checks if the device is actively streaming via USB and if so sends the following bytes to force the sync:

Code: Select all

0000   4d 4f 54 55 0b 00 00 00 00 00 00 00 55 02 00 00   MOTU........U...
0010   10 00 00 00                                       ....

How does it do the check whether the device is actively streaming via USB?


Re: Ultralite AVB

Posted: Mon Jan 09, 2023 9:04 pm
by supereb

@AudioNarwhal

Running 1.4.5 in my 8pre-ES. It has been rock solid. On the previous firmware it would have acted up at least a couple of times and often more than that during the past 10 days.

Thanks again!


Re: Ultralite AVB

Posted: Tue Jan 10, 2023 7:07 am
by shellwalker
supereb wrote: Mon Jan 09, 2023 9:04 pm

@AudioNarwhal

Running 1.4.5 in my 8pre-ES. It has been rock solid. On the previous firmware it would have acted up at least a couple of times and often more than that during the past 10 days.

Thanks again!

Nice to hear that superb
Could you please add whether you are running with or without a kernel driver patch and on which kernel you are running?
Thx.


Re: Ultralite AVB

Posted: Tue Jan 10, 2023 10:37 pm
by supereb
shellwalker wrote: Tue Jan 10, 2023 7:07 am
supereb wrote: Mon Jan 09, 2023 9:04 pm

@AudioNarwhal

Running 1.4.5 in my 8pre-ES. It has been rock solid. On the previous firmware it would have acted up at least a couple of times and often more than that during the past 10 days.

Thanks again!

Nice to hear that superb
Could you please add whether you are running with or without a kernel driver patch and on which kernel you are running?
Thx.

I'm running 6.0.0-13.3-liquorix-amd64 without a kernel driver patch.


Re: Ultralite AVB

Posted: Sun Jan 15, 2023 5:24 pm
by KREAM

@AudioNarwhal

Thanks for your help here! I also have a 1248 that I would love to get working in Linux again. I posted years ago in here, but since the Touch Mixer firmware update I have the issue of the channel hopping, bitcrushing, etc. Since installing the Drumfix driver and running in class compliant mode things are more stable but I'm stuck with only 24 channels I/O. Please, let me know if there is anything I can do to help with a new firmware for the 1248!


Re: Ultralite AVB

Posted: Tue Jan 17, 2023 5:27 pm
by AudioNarwhal
KREAM wrote: Sun Jan 15, 2023 5:24 pm

Thanks for your help here! I also have a 1248 that I would love to get working in Linux again.

Here is a build for the 8M, 16A, 1248 and 112D devices.

MOTU AVB 1.4.5+92559 for 8M, 16A, 1248 and 112D.update


Re: Ultralite AVB

Posted: Tue Jan 17, 2023 5:32 pm
by AudioNarwhal
Musinux wrote: Sun Jan 01, 2023 5:55 pm

I have a question regarding the buffer settings.
How does one set "Host Buffer Size" ,"Host Safety Offset" and alsa/jack frames/period "right" ?

If you are talking about the "Host Buffer Size" and "Host Safety Offset" options in the web app, these settings don't actually do anything on the hardware, they are there as a user interface to control the MOTU driver on windows. The windows driver reads these settings and configures itself accordingly.

For ALSA/Jack settings, I am unable to provide any guidance right now as I am trying to figure that out myself.


Re: Ultralite AVB

Posted: Tue Jan 17, 2023 7:18 pm
by nandoll
AudioNarwhal wrote: Tue Jan 17, 2023 5:27 pm

Here is a build for the 8M, 16A, 1248 and 112D devices.

MOTU AVB 1.4.5+92559 for 8M, 16A, 1248 and 112D.update

Thanks!! Hopefully I will be able to run some tests this coming weekend... ("motu" driver + vendor mode = 1)...


Re: Ultralite AVB

Posted: Wed Jan 18, 2023 1:46 pm
by baptiste

Great initiative !

I'm back after upgrading my laptop to a brand new 12th gen Intel laptop from http://frame.work.
I also upgraded my system to Linux Mint 21.1.
Since the latest Intels may be not be fully supported by 5.15 and 5.19 kernels and because the motu patch was made for 6.0.3, i upgraded to the oem kernel line, version 6.1.
The system is brand new, a good place to start a tutorial about patching and building the snd-usb-audio module !

Here we go !
Install the linux-oem kernel :

Code: Select all

sudo apt install linux-oem-22.04c

Reboot.

Install stuff :

Code: Select all

sudo apt install linux-source libssl-dev libelf-dev gcc-12

Download the kernel source in /usr/src :

Code: Select all

cd /usr/src
sudo apt-get source linux-image-unsigned-$(uname -r)
cd linux-oem-6.1-6.1.0/

Clean and prepare. If the final module building fails because you miss some dependency, redo this before trying again :

Code: Select all

sudo make mrproper &&
sudo make olddefconfig &&
sudo make prepare &&
sudo make scripts

Move :

Code: Select all

cd sound/usb

Patch the module (manually, because the 6.0.3 patch won't work on 6.1 endpoint.c) :
see the patched card.h and endpoint.c attached.

(NOTE : the function that is patched in endpoint.c (snd_usb_queue_pending_output_urbs) is not strictly identical to the one in the patch.
Patch looks for

Code: Select all

snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep, int err, i;

While 6.1 endpoint.c reads

Code: Select all

snd_usb_queue_pending_output_urbs(struct snd_usb_endpoint *ep, bool in_stream_lock)

I don't know how and if it will have consequences on your system's behaviour.)

Let's build the module now :

Code: Select all

sudo cp /usr/src/linux-headers-$(uname -r)/Module.symvers .
sudo make -C /lib/modules/`uname -r`/build M=$PWD

Backup of the current module :

Code: Select all

cd /usr/lib/modules/$(uname -r)/kernel/sound/usb
sudo mv snd-usb-audio.ko snd-usb-audio.ko.bkp

Unplug any usb audio device.

Move the new module :

Code: Select all

sudo cp /usr/src/linux-oem-6.1-6.1.0/sound/usb/snd-usb-audio.ko .

Launch tail :

Code: Select all

sudo tail -f /var/log/syslog

Then plug back the usb audio interface and check the module is loaded (should print "MOTU Patch")


Re: Ultralite AVB

Posted: Sat Jan 21, 2023 2:28 pm
by AudioNarwhal
nandoll wrote: Tue Jan 17, 2023 7:18 pm

Thanks!! Hopefully I will be able to run some tests this coming weekend... ("motu" driver + vendor mode = 1)...

Just clarifying since I might be misunderstanding what you mean by vendor mode = 1, but the posted firmwares (1.4.5+92559) will only address issues that occur in 24 channel UAC mode operation.


Re: Ultralite AVB

Posted: Sun Jan 22, 2023 12:55 pm
by supereb

@AudioNarwhal

The latest firmware has been working flawlessness until the other night when immediately upon startup audio had a bit crushing sound. I've never had it happen immediately. I restarted jack and it was fine for the rest of the session. It has not happened since. I don't know if it happening on the input or output side.


Re: Ultralite AVB

Posted: Sun Jan 22, 2023 7:16 pm
by stanlea

@baptiste : is your laptop AVB capable ?