On Jul 01 15:07:48, a...@caoua.org wrote:
> On Sun, Jun 30, 2024 at 08:26:06AM +0200, Jan Stary wrote:
> > This is current/amd64 on a PC (full dmesg below).
> > I got my hands on an M-Audio Fast Track Ultra 8R,
> > an USB audio interface; eight tracks, 24/96, nice.
> > 
> > It doesn't seem to be supported though:
> > it attaches as an ugen, but no uaudio.
> > 
> > umidi0 at uhub4 port 2 configuration 1 interface 3 "M-Audio Fast Track 
> > Ultra 8R" rev 2.00/1.51 addr 3
> > umidi0: (genuine USB-MIDI)
> > umidi0: out=1, in=1
> > midi0 at umidi0: <USB MIDI I/F>
> > ugen0 at uhub4 port 2 configuration 1 "M-Audio Fast Track Ultra 8R" rev 
> > 2.00/1.51 addr 3
> > 
> > This happens in any USB slot.
> > 
> > What can I do to debug this?
> > Is anyone using this on OpenBSD?
> > 
> > It is an USB-compliant audio device,
> > macOS and Windows use it just fine.
> 
> It seems that the uaudio driver doesn't even try to attach. You could
> instrument the uaudio_match() kernel function, and try to figure out
> why it returns UMATCH_NONE for your device.

With UAUDIO_DEBUG in GENERIC and the following diff to uaudio.c
(see below, just some DPRINTFs), the device attaches (not) as follows:


uaudio_match: iface or device NULL
serial (null), vendor M-Audio, product Fast Track Ultra 8R
uaudio_match: not an audio device
serial (null), vendor M-Audio, product Fast Track Ultra 8R
uaudio_match: not an audio device
serial (null), vendor M-Audio, product Fast Track Ultra 8R
uaudio_match: not an audio device
serial (null), vendor M-Audio, product Fast Track Ultra 8R
uaudio_match: not an audio device
umidi0 at uhub4 port 2 configuration 1 interface 3 "M-Audio Fast Track Ultra 
8R" rev 2.00/1.51 addr 3
umidi0: (genuine USB-MIDI)
umidi0: out=1, in=1
midi0 at umidi0: <USB MIDI I/F>
serial (null), vendor M-Audio, product Fast Track Ultra 8R
uaudio_match: not an audio device
uaudio_match: iface or device NULL
ugen0 at uhub4 port 2 configuration 1 "M-Audio Fast Track Ultra 8R" rev 
2.00/1.51 addr 3


I suspect it doesn't even report itself as an audio device
(see the FreeBSD dmessages in this thread), so uaudio_match()
gives up in (idesc->bInterfaceClass != UICLASS_AUDIO)
at the lastest. But I don't really know how usb devices
attach, and why it would even get to uaudio.c then.

I will ask the FreeBSD audio people - perhaps they
have a quirk for this specific device ("treat as
an uaudio anyway, we know this is a soundcard").

At any rate, thanks for the hint.

        Jan



Index: sys/dev/usb//uaudio.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/uaudio.c,v
diff -u -p -r1.178 uaudio.c
--- sys/dev/usb//uaudio.c       7 Jan 2025 12:49:40 -0000       1.178
+++ sys/dev/usb//uaudio.c       4 Feb 2025 20:39:14 -0000
@@ -3834,8 +3834,15 @@ uaudio_match(struct device *parent, void
        struct usb_attach_arg *arg = aux;
        struct usb_interface_descriptor *idesc;
 
-       if (arg->iface == NULL || arg->device == NULL)
+       if (arg->iface == NULL || arg->device == NULL) {
+               DPRINTF("%s: iface or device NULL\n", __func__);
                return UMATCH_NONE;
+       }
+
+       DPRINTF("serial %s, vendor %s, product %s\n",
+               arg->device->serial, 
+               arg->device->vendor, 
+               arg->device->product);
 
        idesc = usbd_get_interface_descriptor(arg->iface);
        if (idesc == NULL) {
@@ -3844,8 +3851,10 @@ uaudio_match(struct device *parent, void
        }
 
        if (idesc->bInterfaceClass != UICLASS_AUDIO ||
-           idesc->bInterfaceSubClass != UISUBCLASS_AUDIOSTREAM)
+           idesc->bInterfaceSubClass != UISUBCLASS_AUDIOSTREAM) {
+               DPRINTF("%s: not an audio device\n", __func__);
                return UMATCH_NONE;
+       }
 
        return UMATCH_VENDOR_PRODUCT_CONF_IFACE;
 }

Reply via email to