Skip to contentSkip to conversation

MOTU Ultralite AVB: Modulo-8 output channel hopping

PATCH Holger Marzen 1 participant 1 message Jul 28, 2020

lore
Share & tools
lore
#0 lore raw

Hi all,

I am using the MOTU Ultralite AVB USB audio interface. With recent firmwares MOTU uses implicit feedback. Kernel 5.8-rc6 can handle it when I apply the attached patch with the MOTU signatures.

But both with the old and the new firmware there is an occasional modulo 8 output channel hopping. What goes out to system:playback_1 in jackd ends on channel 1, 9 or 17 in the interface. Same for system:playback_2.

I can force a hop when changing jackd's buffer size on the fly with jack_bufsize.

One user reports this issue with ALSA clients, too, so it's probably no jackd issue.

Since I never found this issue reported from a Windows or Mac user it may be buried deep in the ALSA kernel code.

For me it seems that flaws/timeouts in the USB communication force this hopping in the ALSA kernel.

Any ideas how to find out where the hopping happens? sound/usb/endpoint.c ?
sound/usb/stream.c?

Regards
Holger

usb/clock.c renamed from usb/clock.c.orig +2 -1
@@ -186,7 +186,8 @@
 	 * Sample rate changes takes more than 2 seconds for this device. Clock
 	 * validity request returns false during that period.
 	 */
-	if (chip->usb_id == USB_ID(0x07fd, 0x0004)) {
+  if (chip->usb_id == USB_ID(0x07fd, 0x0004) ||
+      chip->usb_id == USB_ID(0x07fd, 0x0005)) {
 		count = 0;
 
 		while ((!ret) && (count < 50)) {
usb/pcm.c renamed from usb/pcm.c.orig +4 -0
@@ -366,6 +366,10 @@
 		ep = 0x84;
 		ifnum = 0;
 		goto add_sync_ep_from_ifnum;
+  case USB_ID(0x07fd, 0x0005): /* MOTU AVB Series */
+    ep = 0x87;
+    ifnum = 2;
+    goto add_sync_ep_from_ifnum;
 	case USB_ID(0x07fd, 0x0008): /* MOTU M Series */
 	case USB_ID(0x31e9, 0x0002): /* Solid State Logic SSL2+ */
 	case USB_ID(0x0d9a, 0x00df): /* RTX6001 */