Skip to contentSkip to conversation

Duplicate endpoint : Sound Devices MixPre-D (sound interface)

PATCH New Jean-Christophe Barnoud 2 participants 5 messages Aug 24, 2020 – Aug 26, 2020 1 message not in the archive USB

lore
Share & tools
lore
#0 lore raw

Hello.

The team at libusb says that this is a kernel issue so here it is.
Device : Sound Devices MixPre-D
This is an external audio interface that worked simultaneously as input and output with older kernels and libusb versions (see far below with fedora 26, kernel 4.13.13-200, libusb 0.1.5-8 from an older mothballed machine). With newer versions of the kernel and libusb it works only as output (see just below with a current fedora 32, kernel 5.7.15-200, libusb-0.1.5-16).

An online search shows that the dmesg output "duplicate endpoint" is identical to the one referenced in this permalink :
http://archive.lwn.net:8080/linux-kernel/[email protected]/
So I guess that the solution is the same, adding in drivers/usb/core/quirks.c (adapted to the specific hardware identification) :
+    /* Sound Devices MixPre-D */
+    { USB_DEVICE(0x0926, 0x0208), .driver_info = USB_QUIRK_ENDPOINT_BLACKLIST },
+
Would it be possible to add this exception to quirks.c ?
Thanks

Fedora 32

[jcb@localhost ~]$ dmesg

[181470.940975] usb 3-9: new high-speed USB device number 6 using xhci_hcd
[181471.067606] usb 3-9: config 1 interface 2 altsetting 1 has a duplicate endpoint with address 0x85, skipping
[181471.067609] usb 3-9: config 1 interface 2 altsetting 2 has a duplicate endpoint with address 0x85, skipping
[181471.067913] usb 3-9: New USB device found, idVendor=0926, idProduct=0208, bcdDevice= 1.00
[181471.067915] usb 3-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[181471.067916] usb 3-9: Product: MixPre-D
[181471.067918] usb 3-9: Manufacturer: Sound Devices
[181471.067919] usb 3-9: SerialNumber: JP0713320007
[181471.074743] usb 3-9: 1:3 : UAC_AS_GENERAL descriptor not found
[181471.076196] hid-generic 0003:0926:0208.0021: hiddev99,hidraw7: USB HID v1.01 Device [Sound Devices MixPre-D] on usb-0000:00:14.0-9/input3

[jcb@localhost ~]$ rpm -qi libusb
Name        : libusb
Epoch       : 1
Version     : 0.1.5
Release     : 16.fc32
Architecture: x86_64
Install Date: mar. 04 août 2020 12:55:36
Group       : Unspecified
Size        : 73011
License     : LGPLv2+
Signature   : RSA/SHA256, jeu. 30 janv. 2020 06:10:05, Key ID 6c13026d12c944d0 Source RPM  : libusb-0.1.5-16.fc32.src.rpm
Build Date  : mer. 29 janv. 2020 12:47:36
Build Host  : buildhw-12.phx2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://sourceforge.net/projects/libusb/
Bug URL     : https://bugz.fedoraproject.org/libusb
Summary     : A library which allows userspace access to USB devices Description :
This package provides a way for applications to access USB devices. Legacy libusb-0.1 is no longer supported by upstream, therefore content of this package was replaced by libusb-compat. It provides compatibility layer allowing applications written for libusb-0.1 to work with libusb-1.0.

[jcb@localhost ~]$ rpm -qi kernel
Name        : kernel
Version     : 5.7.15
Release     : 200.fc32
Architecture: x86_64
Install Date: mer. 19 août 2020 07:01:19
Group       : Unspecified
Size        : 0
License     : GPLv2 and Redistributable, no modification permitted Signature   : RSA/SHA256, mer. 12 août 2020 18:52:02, Key ID 6c13026d12c944d0 Source RPM  : kernel-5.7.15-200.fc32.src.rpm
Build Date  : mar. 11 août 2020 18:20:17
Build Host  : bkernel01.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://www.kernel.org/
Bug URL     : https://bugz.fedoraproject.org/kernel
Summary     : The Linux kernel
Description :
The kernel meta package

Fedora 26

[jcb@localhost ~]$ dmesg
[  439.668052] usb 5-2: new full-speed USB device number 2 using uhci_hcd
[  439.800080] usb 5-2: not running at top speed; connect to a high speed hub
[  439.829086] usb 5-2: New USB device found, idVendor=0926, idProduct=0208
[  439.829090] usb 5-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  439.829093] usb 5-2: Product: MixPre-D
[  439.829096] usb 5-2: Manufacturer: Sound Devices
[  439.829099] usb 5-2: SerialNumber: JP0713320007
[  439.843083] usb 5-2: 1:3 : UAC_AS_GENERAL descriptor not found
[  439.855889] hid-generic 0003:0926:0208.0002: hiddev96,hidraw0: USB HID v1.01 Device [Sound Devices MixPre-D] on usb-0000:00:1d.0-2/input3

[root@lund ~]# rpm -qi libusb
Name        : libusb
Epoch       : 1
Version     : 0.1.5
Release     : 8.fc26
Architecture: x86_64
Install Date: sam. 26 août 2017 09:20:08 CEST
Group       : System Environment/Libraries
Size        : 64043
License     : LGPLv2+
Signature   : RSA/SHA256, dim. 12 févr. 2017 00:30:17 CET, Key ID 812a6b4b64dab85d Source RPM  : libusb-0.1.5-8.fc26.src.rpm
Build Date  : sam. 11 févr. 2017 05:07:06 CET
Build Host  : buildvm-21.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://sourceforge.net/projects/libusb/
Summary     : A library which allows userspace access to USB devices Description :
This package provides a way for applications to access USB devices. Legacy libusb-0.1 is no longer supported by upstream, therefore content of this package was replaced by libusb-compat. It provides compatibility layer allowing applications written for libusb-0.1 to work with libusb-1.0.

[root@lund ~]# rpm -qi kernel
Name        : kernel
Version     : 4.13.13
Release     : 200.fc26
Architecture: x86_64
Install Date: sam. 25 nov. 2017 10:02:52 CET
Group       : System Environment/Kernel
Size        : 0
License     : GPLv2 and Redistributable, no modification permitted Signature   : RSA/SHA256, mer. 15 nov. 2017 22:47:36 CET, Key ID 812a6b4b64dab85d Source RPM  : kernel-4.13.13-200.fc26.src.rpm
Build Date  : mer. 15 nov. 2017 18:16:48 CET
Build Host  : bkernel01.phx2.fedoraproject.org
Relocations : (not relocatable)
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : http://www.kernel.org/
Summary     : The Linux kernel
Description :
The kernel meta package

#1 lore raw
Quoted 10 lines · Jean-Christophe Barnoud

Hello.

The team at libusb says that this is a kernel issue so here it is. Device : Sound Devices MixPre-D
This is an external audio interface that worked simultaneously as input and output with older kernels and libusb versions (see far below with fedora 26, kernel 4.13.13-200, libusb 0.1.5-8 from an older mothballed machine). With newer versions of the kernel and libusb it works only as output (see just below with a current fedora 32, kernel 5.7.15-200, libusb-0.1.5-16).

Quoted 9 lines

An online search shows that the dmesg output "duplicate endpoint" is identical to the one referenced in this permalink :
http://archive.lwn.net:8080/linux-kernel/[email protected]/
So I guess that the solution is the same, adding in drivers/usb/core/quirks.c (adapted to the specific hardware identification) :
+    /* Sound Devices MixPre-D */
+    { USB_DEVICE(0x0926, 0x0208), .driver_info = USB_QUIRK_ENDPOINT_BLACKLIST },

More than just this entry is needed; there also has to be an entry listing the endpoints to be ignored. But that's straightforward to add.

Quoted 5 lines

+
Would it be possible to add this exception to quirks.c ? Thanks

Quoted 8 lines

Fedora 32

[jcb@localhost ~]$ dmesg

[181470.940975] usb 3-9: new high-speed USB device number 6 using xhci_hcd
[181471.067606] usb 3-9: config 1 interface 2 altsetting 1 has a duplicate
endpoint with address 0x85, skipping
[181471.067609] usb 3-9: config 1 interface 2 altsetting 2 has a duplicate

endpoint with address 0x85, skipping

Can you provide the output from "lsusb -v" for this device? We'd like to know exactly what's being added to the ignore list and why, before doing it.

Alan Stern

A message that is not in the archive (sent off-list or not yet received): [email protected]

#3 lore raw

Please use Reply-To-All so that your message gets sent to the mailing list as well as to me.

Quoted 433 lines · Jean-Christophe Barnoud

Le 25/08/2020 à 02:48, Alan Stern a écrit :

Quoted 36 lines · Jean-Christophe Barnoud
Quoted 10 lines

Hello.

The team at libusb says that this is a kernel issue so here it is. Device : Sound Devices MixPre-D
This is an external audio interface that worked simultaneously as input and output with older kernels and libusb versions (see far below with fedora 26, kernel 4.13.13-200, libusb 0.1.5-8 from an older mothballed machine). With newer versions of the kernel and libusb it works only as output (see just below with a current fedora 32, kernel 5.7.15-200, libusb-0.1.5-16).

Quoted 9 lines

An online search shows that the dmesg output "duplicate endpoint" is identical to the one referenced in this permalink :
http://archive.lwn.net:8080/linux-kernel/[email protected]/
So I guess that the solution is the same, adding in drivers/usb/core/quirks.c (adapted to the specific hardware identification) :
+    /* Sound Devices MixPre-D */
+    { USB_DEVICE(0x0926, 0x0208), .driver_info = USB_QUIRK_ENDPOINT_BLACKLIST },

More than just this entry is needed; there also has to be an entry listing the endpoints to be ignored. But that's straightforward to add.

Quoted 5 lines

+
Would it be possible to add this exception to quirks.c ? Thanks

Quoted 8 lines

Fedora 32

[jcb@localhost ~]$ dmesg

[181470.940975] usb 3-9: new high-speed USB device number 6 using xhci_hcd
[181471.067606] usb 3-9: config 1 interface 2 altsetting 1 has a duplicate
endpoint with address 0x85, skipping
[181471.067609] usb 3-9: config 1 interface 2 altsetting 2 has a duplicate

endpoint with address 0x85, skipping

Quoted 5 lines

Can you provide the output from "lsusb -v" for this device? We'd like to know exactly what's being added to the ignore list and why, before doing it.

Alan Stern

The output of lsusb -v was quite long so here is the part related to the MixPre-D :

Bus 003 Device 004: ID 0926:0208 Sound Devices MixPre-D Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device bDeviceSubClass         2
  bDeviceProtocol         1 Interface Association bMaxPacketSize0        64
  idVendor           0x0926
  idProduct          0x0208
  bcdDevice            1.00
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x015a
    bNumInterfaces          4 bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         3
      bFunctionClass          1 Audio bFunctionSubClass       0 bFunctionProtocol       0
      iFunction               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0 bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio bInterfaceSubClass      1 Control Device bInterfaceProtocol      0
      iInterface              0
      AudioControl Interface Descriptor:
        bLength                10 bDescriptorType        36 bDescriptorSubtype      1 (HEADER) bcdADC               1.00
        wTotalLength       0x0034
        bInCollection           2 baInterfaceNr(0)        1 baInterfaceNr(1)        2
      AudioControl Interface Descriptor:
        bLength                12 bDescriptorType        36 bDescriptorSubtype      2 (INPUT_TERMINAL) bTerminalID             1
        wTerminalType      0x0101 USB Streaming bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9 bDescriptorType        36 bDescriptorSubtype      3 (OUTPUT_TERMINAL) bTerminalID             2
        wTerminalType      0x0301 Speaker bAssocTerminal          0
        bSourceID               1
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                12 bDescriptorType        36 bDescriptorSubtype      2 (INPUT_TERMINAL) bTerminalID             3
        wTerminalType      0x0602 Digital Audio Interface bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9 bDescriptorType        36 bDescriptorSubtype      3 (OUTPUT_TERMINAL) bTerminalID             4
        wTerminalType      0x0101 USB Streaming bAssocTerminal          0
        bSourceID               3
        iTerminal               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1 bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1 bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7 bDescriptorType        36 bDescriptorSubtype      1 (AS_GENERAL) bTerminalLink           1
        bDelay                  1 frames wFormatTag         0x0001 PCM AudioStreaming Interface Descriptor:
        bLength                14 bDescriptorType        36 bDescriptorSubtype      2 (FORMAT_TYPE) bFormatType             1 (FORMAT_TYPE_I) bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            2 Discrete tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x06  EP 6 OUT bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               4
        bRefresh                0
        bSynchAddress         129
        AudioStreaming Endpoint Descriptor:
          bLength                 7 bDescriptorType        37 bDescriptorSubtype      1 (EP_GENERAL) bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         2 Decoded PCM samples wLockDelay         0x0000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x81  EP 1 IN bmAttributes            1
          Transfer Type            Isochronous Synch Type               None
          Usage Type               Data wMaxPacketSize     0x0003  1x 3 bytes bInterval               4
        bRefresh                5
        bSynchAddress           0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1 bAlternateSetting       2
      bNumEndpoints           2
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7 bDescriptorType        36 bDescriptorSubtype      1 (AS_GENERAL) bTerminalLink           1
        bDelay                  1 frames wFormatTag         0x0001 PCM AudioStreaming Interface Descriptor:
        bLength                14 bDescriptorType        36 bDescriptorSubtype      2 (FORMAT_TYPE) bFormatType             1 (FORMAT_TYPE_I) bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            2 Discrete tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x06  EP 6 OUT bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               4
        bRefresh                0
        bSynchAddress         129
        AudioStreaming Endpoint Descriptor:
          bLength                 7 bDescriptorType        37 bDescriptorSubtype      1 (EP_GENERAL) bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         2 Decoded PCM samples wLockDelay         0x0000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x81  EP 1 IN bmAttributes            1
          Transfer Type            Isochronous Synch Type               None
          Usage Type               Data wMaxPacketSize     0x0003  1x 3 bytes bInterval               4
        bRefresh                5
        bSynchAddress           0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1 bAlternateSetting       3
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class bInterfaceSubClass      0 bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7 bDescriptorType         5 bEndpointAddress     0x85  EP 5 IN bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               1
      Endpoint Descriptor:
        bLength                 7 bDescriptorType         5 bEndpointAddress     0x06  EP 6 OUT bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2 bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2 bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7 bDescriptorType        36 bDescriptorSubtype      1 (AS_GENERAL) bTerminalLink           4
        bDelay                  1 frames wFormatTag         0x0001 PCM AudioStreaming Interface Descriptor:
        bLength                14 bDescriptorType        36 bDescriptorSubtype      2 (FORMAT_TYPE) bFormatType             1 (FORMAT_TYPE_I) bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            2 Discrete tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x85  EP 5 IN bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               4
        bRefresh                0
        bSynchAddress           0
        AudioStreaming Endpoint Descriptor:
          bLength                 7 bDescriptorType        37 bDescriptorSubtype      1 (EP_GENERAL) bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         2 Decoded PCM samples wLockDelay         0x0000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2 bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7 bDescriptorType        36 bDescriptorSubtype      1 (AS_GENERAL) bTerminalLink           4
        bDelay                  1 frames wFormatTag         0x0001 PCM AudioStreaming Interface Descriptor:
        bLength                14 bDescriptorType        36 bDescriptorSubtype      2 (FORMAT_TYPE) bFormatType             1 (FORMAT_TYPE_I) bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            2 Discrete tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x85  EP 5 IN bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               4
        bRefresh                0
        bSynchAddress           0
        AudioStreaming Endpoint Descriptor:
          bLength                 7 bDescriptorType        37 bDescriptorSubtype      1 (EP_GENERAL) bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         2 Decoded PCM samples wLockDelay         0x0000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3 bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device bInterfaceSubClass      0 bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9 bDescriptorType        33
          bcdHID               1.01
          bCountryCode            0 Not supported bNumDescriptors         1 bDescriptorType        34 Report wDescriptorLength      66
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7

Quoted 8 lines

        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               4

Okay, this device does look a lot like the Sound Device USBPre2, so the patch below should work. Please test it and let me know.

Warning: This patch was written for 5.9-rc2. It will require a little adaptation to work with earlier kernel versions.

Alan Stern

drivers/usb/core/quirks.c +5 -0
Index: usb-devel/drivers/usb/core/quirks.c
===================================================================
@@ -370,6 +370,10 @@ static const struct usb_device_id usb_qu
 	{ USB_DEVICE(0x0926, 0x0202), .driver_info =
 			USB_QUIRK_ENDPOINT_IGNORE },
 
+	/* Sound Devices MixPre-D */
+	{ USB_DEVICE(0x0926, 0x0208), .driver_info =
+			USB_QUIRK_ENDPOINT_IGNORE },
+
 	/* Keytouch QWERTY Panel keyboard */
 	{ USB_DEVICE(0x0926, 0x3333), .driver_info =
 			USB_QUIRK_CONFIG_INTF_STRINGS },
@@ -509,6 +513,7 @@ static const struct usb_device_id usb_am
  */
 static const struct usb_device_id usb_endpoint_ignore[] = {
 	{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 },
+	{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0208, 1), .driver_info = 0x85 },
 	{ }
 };
 
#4 lore raw

Le 25/08/2020 à 16:57, Alan Stern a écrit :

Quoted 470 lines

Please use Reply-To-All so that your message gets sent to the mailing list as well as to me.

Quoted 432 lines · Jean-Christophe Barnoud

Le 25/08/2020 à 02:48, Alan Stern a écrit :

Quoted 36 lines · Jean-Christophe Barnoud
Quoted 10 lines

Hello.

The team at libusb says that this is a kernel issue so here it is. Device : Sound Devices MixPre-D
This is an external audio interface that worked simultaneously as input and output with older kernels and libusb versions (see far below with fedora 26, kernel 4.13.13-200, libusb 0.1.5-8 from an older mothballed machine). With newer versions of the kernel and libusb it works only as output (see just below with a current fedora 32, kernel 5.7.15-200, libusb-0.1.5-16).

Quoted 9 lines

An online search shows that the dmesg output "duplicate endpoint" is identical to the one referenced in this permalink :
http://archive.lwn.net:8080/linux-kernel/[email protected]/
So I guess that the solution is the same, adding in drivers/usb/core/quirks.c (adapted to the specific hardware identification) :
+    /* Sound Devices MixPre-D */
+    { USB_DEVICE(0x0926, 0x0208), .driver_info = USB_QUIRK_ENDPOINT_BLACKLIST },

More than just this entry is needed; there also has to be an entry listing the endpoints to be ignored. But that's straightforward to add.

Quoted 5 lines

+
Would it be possible to add this exception to quirks.c ? Thanks

Quoted 8 lines

Fedora 32

[jcb@localhost ~]$ dmesg

[181470.940975] usb 3-9: new high-speed USB device number 6 using xhci_hcd
[181471.067606] usb 3-9: config 1 interface 2 altsetting 1 has a duplicate
endpoint with address 0x85, skipping
[181471.067609] usb 3-9: config 1 interface 2 altsetting 2 has a duplicate

endpoint with address 0x85, skipping

Quoted 5 lines

Can you provide the output from "lsusb -v" for this device? We'd like to know exactly what's being added to the ignore list and why, before doing it.

Alan Stern

The output of lsusb -v was quite long so here is the part related to the MixPre-D :

Bus 003 Device 004: ID 0926:0208 Sound Devices MixPre-D Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device bDeviceSubClass         2
  bDeviceProtocol         1 Interface Association bMaxPacketSize0        64
  idVendor           0x0926
  idProduct          0x0208
  bcdDevice            1.00
  iManufacturer           1
  iProduct                2
  iSerial                 3
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x015a
    bNumInterfaces          4 bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                0mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         3
      bFunctionClass          1 Audio bFunctionSubClass       0 bFunctionProtocol       0
      iFunction               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0 bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio bInterfaceSubClass      1 Control Device bInterfaceProtocol      0
      iInterface              0
      AudioControl Interface Descriptor:
        bLength                10 bDescriptorType        36 bDescriptorSubtype      1 (HEADER) bcdADC               1.00
        wTotalLength       0x0034
        bInCollection           2 baInterfaceNr(0)        1 baInterfaceNr(1)        2
      AudioControl Interface Descriptor:
        bLength                12 bDescriptorType        36 bDescriptorSubtype      2 (INPUT_TERMINAL) bTerminalID             1
        wTerminalType      0x0101 USB Streaming bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9 bDescriptorType        36 bDescriptorSubtype      3 (OUTPUT_TERMINAL) bTerminalID             2
        wTerminalType      0x0301 Speaker bAssocTerminal          0
        bSourceID               1
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                12 bDescriptorType        36 bDescriptorSubtype      2 (INPUT_TERMINAL) bTerminalID             3
        wTerminalType      0x0602 Digital Audio Interface bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9 bDescriptorType        36 bDescriptorSubtype      3 (OUTPUT_TERMINAL) bTerminalID             4
        wTerminalType      0x0101 USB Streaming bAssocTerminal          0
        bSourceID               3
        iTerminal               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1 bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1 bAlternateSetting       1
      bNumEndpoints           2
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7 bDescriptorType        36 bDescriptorSubtype      1 (AS_GENERAL) bTerminalLink           1
        bDelay                  1 frames wFormatTag         0x0001 PCM AudioStreaming Interface Descriptor:
        bLength                14 bDescriptorType        36 bDescriptorSubtype      2 (FORMAT_TYPE) bFormatType             1 (FORMAT_TYPE_I) bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            2 Discrete tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x06  EP 6 OUT bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               4
        bRefresh                0
        bSynchAddress         129
        AudioStreaming Endpoint Descriptor:
          bLength                 7 bDescriptorType        37 bDescriptorSubtype      1 (EP_GENERAL) bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         2 Decoded PCM samples wLockDelay         0x0000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x81  EP 1 IN bmAttributes            1
          Transfer Type            Isochronous Synch Type               None
          Usage Type               Data wMaxPacketSize     0x0003  1x 3 bytes bInterval               4
        bRefresh                5
        bSynchAddress           0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1 bAlternateSetting       2
      bNumEndpoints           2
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7 bDescriptorType        36 bDescriptorSubtype      1 (AS_GENERAL) bTerminalLink           1
        bDelay                  1 frames wFormatTag         0x0001 PCM AudioStreaming Interface Descriptor:
        bLength                14 bDescriptorType        36 bDescriptorSubtype      2 (FORMAT_TYPE) bFormatType             1 (FORMAT_TYPE_I) bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            2 Discrete tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x06  EP 6 OUT bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               4
        bRefresh                0
        bSynchAddress         129
        AudioStreaming Endpoint Descriptor:
          bLength                 7 bDescriptorType        37 bDescriptorSubtype      1 (EP_GENERAL) bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         2 Decoded PCM samples wLockDelay         0x0000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x81  EP 1 IN bmAttributes            1
          Transfer Type            Isochronous Synch Type               None
          Usage Type               Data wMaxPacketSize     0x0003  1x 3 bytes bInterval               4
        bRefresh                5
        bSynchAddress           0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1 bAlternateSetting       3
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class bInterfaceSubClass      0 bInterfaceProtocol      0
      iInterface              0
      Endpoint Descriptor:
        bLength                 7 bDescriptorType         5 bEndpointAddress     0x85  EP 5 IN bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               1
      Endpoint Descriptor:
        bLength                 7 bDescriptorType         5 bEndpointAddress     0x06  EP 6 OUT bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2 bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2 bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7 bDescriptorType        36 bDescriptorSubtype      1 (AS_GENERAL) bTerminalLink           4
        bDelay                  1 frames wFormatTag         0x0001 PCM AudioStreaming Interface Descriptor:
        bLength                14 bDescriptorType        36 bDescriptorSubtype      2 (FORMAT_TYPE) bFormatType             1 (FORMAT_TYPE_I) bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            2 Discrete tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x85  EP 5 IN bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               4
        bRefresh                0
        bSynchAddress           0
        AudioStreaming Endpoint Descriptor:
          bLength                 7 bDescriptorType        37 bDescriptorSubtype      1 (EP_GENERAL) bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         2 Decoded PCM samples wLockDelay         0x0000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2 bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass         1 Audio bInterfaceSubClass      2 Streaming bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7 bDescriptorType        36 bDescriptorSubtype      1 (AS_GENERAL) bTerminalLink           4
        bDelay                  1 frames wFormatTag         0x0001 PCM AudioStreaming Interface Descriptor:
        bLength                14 bDescriptorType        36 bDescriptorSubtype      2 (FORMAT_TYPE) bFormatType             1 (FORMAT_TYPE_I) bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            2 Discrete tSamFreq[ 0]        44100
        tSamFreq[ 1]        48000
      Endpoint Descriptor:
        bLength                 9 bDescriptorType         5 bEndpointAddress     0x85  EP 5 IN bmAttributes            5
          Transfer Type            Isochronous Synch Type               Asynchronous Usage Type               Data wMaxPacketSize     0x0126  1x 294 bytes bInterval               4
        bRefresh                0
        bSynchAddress           0
        AudioStreaming Endpoint Descriptor:
          bLength                 7 bDescriptorType        37 bDescriptorSubtype      1 (EP_GENERAL) bmAttributes         0x01
            Sampling Frequency
          bLockDelayUnits         2 Decoded PCM samples wLockDelay         0x0000
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3 bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device bInterfaceSubClass      0 bInterfaceProtocol      0
      iInterface              0
        HID Device Descriptor:
          bLength                 9 bDescriptorType        33
          bcdHID               1.01
          bCountryCode            0 Not supported bNumDescriptors         1 bDescriptorType        34 Report wDescriptorLength      66
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7

Quoted 8 lines

        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               4

Okay, this device does look a lot like the Sound Device USBPre2, so the patch below should work. Please test it and let me know.

Warning: This patch was written for 5.9-rc2. It will require a little adaptation to work with earlier kernel versions.

Alan Stern

Index: usb-devel/drivers/usb/core/quirks.c
===================================================================

drivers/usb/core/quirks.c +4 -0
@@ -370,6 +370,10 @@ static const struct usb_device_id usb_qu
  	{ USB_DEVICE(0x0926, 0x0202), .driver_info =
  			USB_QUIRK_ENDPOINT_IGNORE },
 
+	/* Sound Devices MixPre-D */
+	{ USB_DEVICE(0x0926, 0x0208), .driver_info =
+			USB_QUIRK_ENDPOINT_IGNORE },
+
  	/* Keytouch QWERTY Panel keyboard */
  	{ USB_DEVICE(0x0926, 0x3333), .driver_info =
  			USB_QUIRK_CONFIG_INTF_STRINGS },

drivers/usb/core/quirks.c static const struct usb_device_id usb_am · line 519

Quoted 7 lines
drivers/usb/core/quirks.c +1 -0
@@ -509,6 +513,7 @@ static const struct usb_device_id usb_am
   */
  static const struct usb_device_id usb_endpoint_ignore[] = {
  	{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 },
+	{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0208, 1), .driver_info = 0x85 },
  	{ }
  };
 

It works!

I had to adapt the patch replacing USB_QUIRK_ENDPOINT_IGNORE by USB_QUIRK_ENDPOINT_BLACKLIST to compile with a 5.7.16 kernel.

Here is the dmesg output :

[   71.735873] usb 3-9: new high-speed USB device number 4 using xhci_hcd
[   71.862556] usb 3-9: config 1 interface 1 altsetting 3 has a blacklisted endpoint with address 0x85, skipping
[   71.862930] usb 3-9: New USB device found, idVendor=0926, idProduct=0208, bcdDevice= 1.00
[   71.862933] usb 3-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   71.862934] usb 3-9: Product: MixPre-D
[   71.862936] usb 3-9: Manufacturer: Sound Devices
[   71.862937] usb 3-9: SerialNumber: JP0713320007
[   71.865678] usb 3-9: 1:3 : UAC_AS_GENERAL descriptor not found
[   71.868693] hid-generic 0003:0926:0208.000F: hiddev99,hidraw7: USB HID v1.01 Device [Sound Devices MixPre-D] on usb-0000:00:14.0-9/input3

Tested with Audacity, input and output through the MixPre-D both work normally.

Thanks a lot.

#5 lore raw

PATCH 1/1 USB: quirks: Ignore duplicate endpoint on Sound Devices MixPre-D

The Sound Devices MixPre-D audio card suffers from the same defect as the Sound Devices USBPre2: an endpoint shared between a normal audio interface and a vendor-specific interface, in violation of the USB spec. Since the USB core now treats duplicated endpoints as bugs and ignores them, the audio endpoint isn't available and the card can't be used for audio capture.

Along the same lines as commit bdd1b147b802 ("USB: quirks: blacklist duplicate ep on Sound Devices USBPre2"), this patch adds a quirks entry saying to ignore ep5in for interface 1, leaving it available for use with standard audio interface 2.

Fixes 3e4f8e21c4f2 ("USB: core: fix check for duplicate endpoints")

---

[as1943]

 drivers/usb/core/quirks.c |    5 +++++
 1 file changed, 5 insertions(+)
drivers/usb/core/quirks.c +5 -0
Index: usb-devel/drivers/usb/core/quirks.c
===================================================================
@@ -370,6 +370,10 @@ static const struct usb_device_id usb_qu
 	{ USB_DEVICE(0x0926, 0x0202), .driver_info =
 			USB_QUIRK_ENDPOINT_IGNORE },
 
+	/* Sound Devices MixPre-D */
+	{ USB_DEVICE(0x0926, 0x0208), .driver_info =
+			USB_QUIRK_ENDPOINT_IGNORE },
+
 	/* Keytouch QWERTY Panel keyboard */
 	{ USB_DEVICE(0x0926, 0x3333), .driver_info =
 			USB_QUIRK_CONFIG_INTF_STRINGS },
@@ -509,6 +513,7 @@ static const struct usb_device_id usb_am
  */
 static const struct usb_device_id usb_endpoint_ignore[] = {
 	{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0202, 1), .driver_info = 0x85 },
+	{ USB_DEVICE_INTERFACE_NUMBER(0x0926, 0x0208, 1), .driver_info = 0x85 },
 	{ }
 };