In light of the recent USB threads, I decided now would be a good time to bring up my USB-controlled speakers. I have ADA-305 speakers by Altec Lansing. Allegedly they support the USB audiocontrol interface, and FreeBSD's uaudio driver attempts to recognize them, but ultimately fails. (In windows there is a nifty little utility that lets me adjust the volume of each speaker.) They don't send any audio over USB, they only do volume control. Here's what uaudio says about the speakers when I plug them in: uaudio0: audio descriptors make no sense, error=4 device_attach: uaudio0 attach returned 6 Here's what udesc_dump says about the speakers: Standard Device Descriptor: bLength 18 bDescriptorType 01 bcdUSB 0100 bDeviceClass ff bDeviceSubClass 00 bDeviceProtocol 00 bMaxPacketSize 8 idVendor 04d2 idProduct 0305 bcdDevice 0000 iManufacturer 1 iProduct 2 iSerialNumber 0 bNumConfigurations 1 Configuration 0: Standard Configuration Descriptor: bLength 9 bDescriptorType 02 wTotalLength 25 bNumInterface 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 40 (self-powered) bMaxPower 0 (0 mA) Standard Interface Descriptor: bLength 9 bDescriptorType 04 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 1 bInterfaceClass 01 bInterfaceSubClass 01 bInterfaceProtocol 00 iInterface 0 Standard Endpoint Descriptor: bLength 7 bDescriptorType 05 bEndpointAddress 81 (in) bmAttributes 03 (Interrupt) wMaxPacketSize 2 bInterval 32 bRefresh 208 bSynchAddress d0 Codes Representing Languages by the Device: bLength 4 bDescriptorType 03 wLANGID[0] 0409 String (index 1): ALTEC LANSING Multimedia String (index 2): ADA305 Speakers I added some debugging, and the attach fails in uaudio_identify_ac on the following: id = uaudio_find_iface(buf, size, &offs, UISUBCLASS_AUDIOCONTROL); if (id == NULL) return (USBD_INVAL); if (offs + sizeof *acdp > size) return (USBD_INVAL); /* BOOM! */ Here are the values it failed on: uaudio_identify_ac: offs + sizeof *acdp > size uaudio_identify_ac: offs = 18 uaudio_identify_ac: sizeof *acdp = 9 uaudio_identify_ac: size = 25 It looks like uaudio_find_iface is incrementing offs even if it found the correct interface descriptor, so I moved the *offsp += d->bLength; after the return. (See the lengths from udesc_dump above, is this a correct fix?.) I now die just below that here: ibuf = buf + offs; acdp = (struct usb_audio_control_descriptor *)ibuf; if (acdp->bDescriptorType != UDESC_CS_INTERFACE || acdp->bDescriptorSubtype != UDESCSUB_AC_HEADER) return (USBD_INVAL); /* BOOM! */ Looking at the endpoint descriptor above, the DescriptorType is a UDESC_ENDPOINT, not a UDESC_CS_INTERFACE. It also has no DescriptorSubtype. Are these speakers just pretending to be USB audiocontrol devices and have some proprietary implementation underneath, or could there be something mis-detected somewhere else? -- Eric Hodel - drbrain_at_segment7.net - http://segment7.net All messages signed with fingerprint: FEC2 57F1 D465 EB15 5D6E 7C11 332A 551C 796C 9F04
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:06 UTC