• Johan Hovold's avatar
    USB: quirks: blacklist duplicate ep on Sound Devices USBPre2 · bdd1b147
    Johan Hovold authored
    This device has a broken vendor-specific altsetting for interface 1,
    where endpoint 0x85 is declared as an isochronous endpoint despite being
    used by interface 2 for audio capture.
    
    Device Descriptor:
      bLength                18
      bDescriptorType         1
      bcdUSB               2.00
      bDeviceClass          239 Miscellaneous Device
      bDeviceSubClass         2
      bDeviceProtocol         1 Interface Association
      bMaxPacketSize0        64
      idVendor           0x0926
      idProduct          0x0202
      bcdDevice            1.00
      iManufacturer           1 Sound Devices
      iProduct                2 USBPre2
      iSerial                 3 [...]
      bNumConfigurations      1
    
    [...]
    
        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
    
    [...]
    
        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                26
            bDescriptorType        36
            bDescriptorSubtype      2 (FORMAT_TYPE)
            bFormatType             1 (FORMAT_TYPE_I)
            bNrChannels             2
            bSubframeSize           2
            bBitResolution         16
            bSamFreqType            6 Discrete
            tSamFreq[ 0]         8000
            tSamFreq[ 1]        16000
            tSamFreq[ 2]        24000
            tSamFreq[ 3]        32000
            tSamFreq[ 4]        44100
            tSamFreq[ 5]        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
    
    Since commit 3e4f8e21 ("USB: core: fix check for duplicate
    endpoints") USB core ignores any duplicate endpoints found during
    descriptor parsing, but in this case we need to ignore the first
    instance in order to avoid breaking the audio capture interface.
    
    Fixes: 3e4f8e21 ("USB: core: fix check for duplicate endpoints")
    Cc: stable <stable@vger.kernel.org>
    Reported-by: default avataredes <edes@gmx.net>
    Tested-by: default avataredes <edes@gmx.net>
    Link: https://lore.kernel.org/r/20200201105829.5682c887@acme7.acmenetSigned-off-by: default avatarJohan Hovold <johan@kernel.org>
    Link: https://lore.kernel.org/r/20200203153830.26394-3-johan@kernel.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    bdd1b147
quirks.c 17.4 KB