All of lore.kernel.org
 help / color / mirror / Atom feed
* non-working UVC device 058f:5608
@ 2014-06-07 21:51 Johannes Berg
  2014-06-08 22:29 ` Laurent Pinchart
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2014-06-07 21:51 UTC (permalink / raw)
  To: linux-media; +Cc: Laurent Pinchart, linux-uvc-devel

I just obtained a new (special-purpose) webcam, and it doesn't seem to
work at all. On kernel torvals/linux.git next branch, it doesn't even
really connect, on 3.13 (which I'm running on my laptop) I get errors
like this:

xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of
current TD

when running uvccapture. When running e.g. cheese or the like, the
screen stays blank. uvccapture also reports:

ioctl querycontrol error 22

and then the kernel message repeats forever, while I can't even exit
uvccapture unless I kill it hard, at which point I get

xhci_hcd 0000:00:14.0: Signal while waiting for configure endpoint command
usb 1-3.4.4.3: Not enough bandwidth for altsetting 0

from the kernel.


The device really is detected as UVC, of course:

[ 3423.299311] usb 1-3.4.4.3: new high-speed USB device number 12 using
xhci_hcd
[ 3423.426280] usb 1-3.4.4.3: New USB device found, idVendor=058f,
idProduct=5608
[ 3423.426286] usb 1-3.4.4.3: New USB device strings: Mfr=3, Product=1, SerialNumber=0
[ 3423.426290] usb 1-3.4.4.3: Product: USB 2.0 PC Camera
[ 3423.426293] usb 1-3.4.4.3: Manufacturer: Alcor Micro, Corp.
[ 3423.432137] uvcvideo: Found UVC 1.00 device USB 2.0 PC Camera
(058f:5608)
[ 3423.435383] input: USB 2.0 PC Camera as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4.4/1-3.4.4.3/1-3.4.4.3:1.0/input/input36

(see also full lsusb below)

I see a device from the same manufacturer has a kernel driver as a
vendor device but actually being UVC, but this one reports being UVC and
doesn't really work.

Any thoughts? Just to rule out hardware defects I connected it to my
windows 7 work machine and it works fine without even installing a
driver.

I can arrange remote access to the device (maybe as a VM to be able to
experiment with the kernel more easily?) if anyone wants it.

johannes

lsusb:

Bus 001 Device 012: ID 058f:5608 Alcor Micro Corp. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  idVendor           0x058f Alcor Micro Corp.
  idProduct          0x5608 
  bcdDevice            0.03
  iManufacturer           3 Alcor Micro, Corp.
  iProduct                1 USB 2.0 PC Camera
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          407
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              200mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 Video
      bFunctionSubClass       3 Video Interface Collection
      bFunctionProtocol       0 
      iFunction               1 USB 2.0 PC Camera
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      1 Video Control
      bInterfaceProtocol      0 
      iInterface              1 USB 2.0 PC Camera
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength           85
        dwClockFrequency       30.000000MHz
        bInCollection           1
        baInterfaceNr( 0)       1
      VideoControl Interface Descriptor:
        bLength                18
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0201 Camera Sensor
        bAssocTerminal          0
        iTerminal               0 
        wObjectiveFocalLengthMin      0
        wObjectiveFocalLengthMax      0
        wOcularFocalLength            0
        bControlSize                  3
        bmControls           0x00000000
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               6
        iTerminal               0 
      VideoControl Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      4 (SELECTOR_UNIT)
        bUnitID                 4
        bNrInPins               1
        baSource( 0)            1
        iSelector               0 
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
      Warning: Descriptor too short
        bUnitID                 5
        bSourceID               4
        wMaxMultiplier      32208
        bControlSize            2
        bmControls     0x0000157f
          Brightness
          Contrast
          Hue
          Saturation
          Sharpness
          Gamma
          White Balance Temperature
          Backlight Compensation
          Power Line Frequency
          White Balance Temperature, Auto
        iProcessing             0 
        bmVideoStandards     0x1b
          None
          NTSC - 525/60
          SECAM - 625/50
          NTSC - 625/50
      VideoControl Interface Descriptor:
        bLength                27
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 6
        guidExtensionCode         {564c97a7-7ea7-904b-8cbf-1c71ec303000}
        bNumControl            16
        bNrPins                 1
        baSourceID( 0)          5
        bControlSize            2
        bmControls( 0)       0xff
        bmControls( 1)       0xff
        iExtension              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval              15
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      VideoStreaming Interface Descriptor:
        bLength                            14
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         1
        wTotalLength                      227
        bEndPointAddress                  129
        bmInfo                              0
        bTerminalLink                       3
        bStillCaptureMethod                 2
        bTriggerSupport                     0
        bTriggerUsage                       0
        bControlSize                        1
        bmaControls( 0)                    27
      VideoStreaming Interface Descriptor:
        bLength                            27
        bDescriptorType                    36
        bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
        bFormatIndex                        1
        bNumFrameDescriptors                5
        guidFormat
{59555932-0000-1000-8000-00aa00389b71}
        bBitsPerPixel                      16
        bDefaultFrameIndex                  1
        bAspectRatioX                       0
        bAspectRatioY                       0
        bmInterlaceFlags                 0x00
          Interlaced stream or variable: No
          Fields per frame: 2 fields
          Field 1 first: No
          Field pattern: Field 1 only
          bCopyProtect                      0
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            640
        wHeight                           480
        dwMinBitRate                 73728000
        dwMaxBitRate                147456000
        dwMaxVideoFrameBufferSize      614400
        dwDefaultFrameInterval         333332
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333332
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         2
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                 18432000
        dwMaxBitRate                 36864000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333332
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333332
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         3
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            160
        wHeight                           120
        dwMinBitRate                  4608000
        dwMaxBitRate                  9216000
        dwMaxVideoFrameBufferSize       38400
        dwDefaultFrameInterval         333332
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333332
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            352
        wHeight                           288
        dwMinBitRate                 24330240
        dwMaxBitRate                 48660480
        dwMaxVideoFrameBufferSize      202752
        dwDefaultFrameInterval         333332
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333332
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            34
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         5
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            176
        wHeight                           144
        dwMinBitRate                  6082560
        dwMaxBitRate                 12165120
        dwMaxVideoFrameBufferSize       50688
        dwDefaultFrameInterval         333332
        bFrameIntervalType                  2
        dwFrameInterval( 0)            333332
        dwFrameInterval( 1)            666666
      VideoStreaming Interface Descriptor:
        bLength                            10
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               1
        wWidth( 0)                        640
        wHeight( 0)                       480
        bNumCompressionPatterns             1
      VideoStreaming Interface Descriptor:
        bLength                             6
        bDescriptorType                    36
        bDescriptorSubtype                 13 (COLORFORMAT)
        bColorPrimaries                     1 (BT.709,sRGB)
        bTransferCharacteristics            1 (BT.709)
        bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1400  3x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1400  3x 1024 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass        14 Video
      bInterfaceSubClass      2 Video Streaming
      bInterfaceProtocol      0 
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x1400  3x 1024 bytes
        bInterval               1
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass          239 Miscellaneous Device
  bDeviceSubClass         2 ?
  bDeviceProtocol         1 Interface Association
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0000
  (Bus Powered)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: non-working UVC device 058f:5608
  2014-06-07 21:51 non-working UVC device 058f:5608 Johannes Berg
@ 2014-06-08 22:29 ` Laurent Pinchart
  2014-06-09  7:33   ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Laurent Pinchart @ 2014-06-08 22:29 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-media, linux-uvc-devel, linux-usb

Hi Johannes,

On Saturday 07 June 2014 23:51:43 Johannes Berg wrote:
> I just obtained a new (special-purpose) webcam, and it doesn't seem to
> work at all. On kernel torvals/linux.git next branch, it doesn't even
> really connect, on 3.13 (which I'm running on my laptop) I get errors
> like this:
> 
> xhci_hcd 0000:00:14.0: ERROR Transfer event TRB DMA ptr not part of
> current TD
> 
> when running uvccapture. When running e.g. cheese or the like, the
> screen stays blank. uvccapture also reports:
> 
> ioctl querycontrol error 22
> 
> and then the kernel message repeats forever, while I can't even exit
> uvccapture unless I kill it hard, at which point I get
> 
> xhci_hcd 0000:00:14.0: Signal while waiting for configure endpoint command
> usb 1-3.4.4.3: Not enough bandwidth for altsetting 0
> 
> from the kernel.

This looks like low-level USB issues, CC'ing the linux-usb mailing list.

> The device really is detected as UVC, of course:
> 
> [ 3423.299311] usb 1-3.4.4.3: new high-speed USB device number 12 using
> xhci_hcd
> [ 3423.426280] usb 1-3.4.4.3: New USB device found, idVendor=058f,
> idProduct=5608
> [ 3423.426286] usb 1-3.4.4.3: New USB device strings: Mfr=3, Product=1,
> SerialNumber=0 [ 3423.426290] usb 1-3.4.4.3: Product: USB 2.0 PC Camera
> [ 3423.426293] usb 1-3.4.4.3: Manufacturer: Alcor Micro, Corp.
> [ 3423.432137] uvcvideo: Found UVC 1.00 device USB 2.0 PC Camera
> (058f:5608)
> [ 3423.435383] input: USB 2.0 PC Camera as
> /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3.4/1-3.4.4/1-3.4.4.3/1-3.4.4.3
> :1.0/input/input36
> 
> (see also full lsusb below)
> 
> I see a device from the same manufacturer has a kernel driver as a
> vendor device but actually being UVC, but this one reports being UVC and
> doesn't really work.
> 
> Any thoughts? Just to rule out hardware defects I connected it to my
> windows 7 work machine and it works fine without even installing a
> driver.

Could you try connecting it to an EHCI controller instead of XHCI on a Linux  
machine ?

> I can arrange remote access to the device (maybe as a VM to be able to
> experiment with the kernel more easily?) if anyone wants it.
> 
> johannes
> 
> lsusb:
> 
> Bus 001 Device 012: ID 058f:5608 Alcor Micro Corp.
> Device Descriptor:
>   bLength                18
>   bDescriptorType         1
>   bcdUSB               2.00
>   bDeviceClass          239 Miscellaneous Device
>   bDeviceSubClass         2 ?
>   bDeviceProtocol         1 Interface Association
>   bMaxPacketSize0        64
>   idVendor           0x058f Alcor Micro Corp.
>   idProduct          0x5608
>   bcdDevice            0.03
>   iManufacturer           3 Alcor Micro, Corp.
>   iProduct                1 USB 2.0 PC Camera
>   iSerial                 0
>   bNumConfigurations      1
>   Configuration Descriptor:
>     bLength                 9
>     bDescriptorType         2
>     wTotalLength          407
>     bNumInterfaces          2
>     bConfigurationValue     1
>     iConfiguration          0
>     bmAttributes         0x80
>       (Bus Powered)
>     MaxPower              200mA
>     Interface Association:
>       bLength                 8
>       bDescriptorType        11
>       bFirstInterface         0
>       bInterfaceCount         2
>       bFunctionClass         14 Video
>       bFunctionSubClass       3 Video Interface Collection
>       bFunctionProtocol       0
>       iFunction               1 USB 2.0 PC Camera
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        0
>       bAlternateSetting       0
>       bNumEndpoints           1
>       bInterfaceClass        14 Video
>       bInterfaceSubClass      1 Video Control
>       bInterfaceProtocol      0
>       iInterface              1 USB 2.0 PC Camera
>       VideoControl Interface Descriptor:
>         bLength                13
>         bDescriptorType        36
>         bDescriptorSubtype      1 (HEADER)
>         bcdUVC               1.00
>         wTotalLength           85
>         dwClockFrequency       30.000000MHz
>         bInCollection           1
>         baInterfaceNr( 0)       1
>       VideoControl Interface Descriptor:
>         bLength                18
>         bDescriptorType        36
>         bDescriptorSubtype      2 (INPUT_TERMINAL)
>         bTerminalID             1
>         wTerminalType      0x0201 Camera Sensor
>         bAssocTerminal          0
>         iTerminal               0
>         wObjectiveFocalLengthMin      0
>         wObjectiveFocalLengthMax      0
>         wOcularFocalLength            0
>         bControlSize                  3
>         bmControls           0x00000000
>       VideoControl Interface Descriptor:
>         bLength                 9
>         bDescriptorType        36
>         bDescriptorSubtype      3 (OUTPUT_TERMINAL)
>         bTerminalID             3
>         wTerminalType      0x0101 USB Streaming
>         bAssocTerminal          0
>         bSourceID               6
>         iTerminal               0
>       VideoControl Interface Descriptor:
>         bLength                 7
>         bDescriptorType        36
>         bDescriptorSubtype      4 (SELECTOR_UNIT)
>         bUnitID                 4
>         bNrInPins               1
>         baSource( 0)            1
>         iSelector               0
>       VideoControl Interface Descriptor:
>         bLength                11
>         bDescriptorType        36
>         bDescriptorSubtype      5 (PROCESSING_UNIT)
>       Warning: Descriptor too short
>         bUnitID                 5
>         bSourceID               4
>         wMaxMultiplier      32208
>         bControlSize            2
>         bmControls     0x0000157f
>           Brightness
>           Contrast
>           Hue
>           Saturation
>           Sharpness
>           Gamma
>           White Balance Temperature
>           Backlight Compensation
>           Power Line Frequency
>           White Balance Temperature, Auto
>         iProcessing             0
>         bmVideoStandards     0x1b
>           None
>           NTSC - 525/60
>           SECAM - 625/50
>           NTSC - 625/50
>       VideoControl Interface Descriptor:
>         bLength                27
>         bDescriptorType        36
>         bDescriptorSubtype      6 (EXTENSION_UNIT)
>         bUnitID                 6
>         guidExtensionCode         {564c97a7-7ea7-904b-8cbf-1c71ec303000}
>         bNumControl            16
>         bNrPins                 1
>         baSourceID( 0)          5
>         bControlSize            2
>         bmControls( 0)       0xff
>         bmControls( 1)       0xff
>         iExtension              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x82  EP 2 IN
>         bmAttributes            3
>           Transfer Type            Interrupt
>           Synch Type               None
>           Usage Type               Data
>         wMaxPacketSize     0x0010  1x 16 bytes
>         bInterval              15
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        1
>       bAlternateSetting       0
>       bNumEndpoints           0
>       bInterfaceClass        14 Video
>       bInterfaceSubClass      2 Video Streaming
>       bInterfaceProtocol      0
>       iInterface              0
>       VideoStreaming Interface Descriptor:
>         bLength                            14
>         bDescriptorType                    36
>         bDescriptorSubtype                  1 (INPUT_HEADER)
>         bNumFormats                         1
>         wTotalLength                      227
>         bEndPointAddress                  129
>         bmInfo                              0
>         bTerminalLink                       3
>         bStillCaptureMethod                 2
>         bTriggerSupport                     0
>         bTriggerUsage                       0
>         bControlSize                        1
>         bmaControls( 0)                    27
>       VideoStreaming Interface Descriptor:
>         bLength                            27
>         bDescriptorType                    36
>         bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
>         bFormatIndex                        1
>         bNumFrameDescriptors                5
>         guidFormat
> {59555932-0000-1000-8000-00aa00389b71}
>         bBitsPerPixel                      16
>         bDefaultFrameIndex                  1
>         bAspectRatioX                       0
>         bAspectRatioY                       0
>         bmInterlaceFlags                 0x00
>           Interlaced stream or variable: No
>           Fields per frame: 2 fields
>           Field 1 first: No
>           Field pattern: Field 1 only
>           bCopyProtect                      0
>       VideoStreaming Interface Descriptor:
>         bLength                            34
>         bDescriptorType                    36
>         bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
>         bFrameIndex                         1
>         bmCapabilities                   0x00
>           Still image unsupported
>         wWidth                            640
>         wHeight                           480
>         dwMinBitRate                 73728000
>         dwMaxBitRate                147456000
>         dwMaxVideoFrameBufferSize      614400
>         dwDefaultFrameInterval         333332
>         bFrameIntervalType                  2
>         dwFrameInterval( 0)            333332
>         dwFrameInterval( 1)            666666
>       VideoStreaming Interface Descriptor:
>         bLength                            34
>         bDescriptorType                    36
>         bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
>         bFrameIndex                         2
>         bmCapabilities                   0x00
>           Still image unsupported
>         wWidth                            320
>         wHeight                           240
>         dwMinBitRate                 18432000
>         dwMaxBitRate                 36864000
>         dwMaxVideoFrameBufferSize      153600
>         dwDefaultFrameInterval         333332
>         bFrameIntervalType                  2
>         dwFrameInterval( 0)            333332
>         dwFrameInterval( 1)            666666
>       VideoStreaming Interface Descriptor:
>         bLength                            34
>         bDescriptorType                    36
>         bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
>         bFrameIndex                         3
>         bmCapabilities                   0x00
>           Still image unsupported
>         wWidth                            160
>         wHeight                           120
>         dwMinBitRate                  4608000
>         dwMaxBitRate                  9216000
>         dwMaxVideoFrameBufferSize       38400
>         dwDefaultFrameInterval         333332
>         bFrameIntervalType                  2
>         dwFrameInterval( 0)            333332
>         dwFrameInterval( 1)            666666
>       VideoStreaming Interface Descriptor:
>         bLength                            34
>         bDescriptorType                    36
>         bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
>         bFrameIndex                         4
>         bmCapabilities                   0x00
>           Still image unsupported
>         wWidth                            352
>         wHeight                           288
>         dwMinBitRate                 24330240
>         dwMaxBitRate                 48660480
>         dwMaxVideoFrameBufferSize      202752
>         dwDefaultFrameInterval         333332
>         bFrameIntervalType                  2
>         dwFrameInterval( 0)            333332
>         dwFrameInterval( 1)            666666
>       VideoStreaming Interface Descriptor:
>         bLength                            34
>         bDescriptorType                    36
>         bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
>         bFrameIndex                         5
>         bmCapabilities                   0x00
>           Still image unsupported
>         wWidth                            176
>         wHeight                           144
>         dwMinBitRate                  6082560
>         dwMaxBitRate                 12165120
>         dwMaxVideoFrameBufferSize       50688
>         dwDefaultFrameInterval         333332
>         bFrameIntervalType                  2
>         dwFrameInterval( 0)            333332
>         dwFrameInterval( 1)            666666
>       VideoStreaming Interface Descriptor:
>         bLength                            10
>         bDescriptorType                    36
>         bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
>         bEndpointAddress                    0
>         bNumImageSizePatterns               1
>         wWidth( 0)                        640
>         wHeight( 0)                       480
>         bNumCompressionPatterns             1
>       VideoStreaming Interface Descriptor:
>         bLength                             6
>         bDescriptorType                    36
>         bDescriptorSubtype                 13 (COLORFORMAT)
>         bColorPrimaries                     1 (BT.709,sRGB)
>         bTransferCharacteristics            1 (BT.709)
>         bMatrixCoefficients                 4 (SMPTE 170M (BT.601))
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        1
>       bAlternateSetting       1
>       bNumEndpoints           1
>       bInterfaceClass        14 Video
>       bInterfaceSubClass      2 Video Streaming
>       bInterfaceProtocol      0
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            5
>           Transfer Type            Isochronous
>           Synch Type               Asynchronous
>           Usage Type               Data
>         wMaxPacketSize     0x1400  3x 1024 bytes
>         bInterval               1
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        1
>       bAlternateSetting       2
>       bNumEndpoints           1
>       bInterfaceClass        14 Video
>       bInterfaceSubClass      2 Video Streaming
>       bInterfaceProtocol      0
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            5
>           Transfer Type            Isochronous
>           Synch Type               Asynchronous
>           Usage Type               Data
>         wMaxPacketSize     0x1400  3x 1024 bytes
>         bInterval               1
>     Interface Descriptor:
>       bLength                 9
>       bDescriptorType         4
>       bInterfaceNumber        1
>       bAlternateSetting       3
>       bNumEndpoints           1
>       bInterfaceClass        14 Video
>       bInterfaceSubClass      2 Video Streaming
>       bInterfaceProtocol      0
>       iInterface              0
>       Endpoint Descriptor:
>         bLength                 7
>         bDescriptorType         5
>         bEndpointAddress     0x81  EP 1 IN
>         bmAttributes            5
>           Transfer Type            Isochronous
>           Synch Type               Asynchronous
>           Usage Type               Data
>         wMaxPacketSize     0x1400  3x 1024 bytes
>         bInterval               1
> Device Qualifier (for other device speed):
>   bLength                10
>   bDescriptorType         6
>   bcdUSB               2.00
>   bDeviceClass          239 Miscellaneous Device
>   bDeviceSubClass         2 ?
>   bDeviceProtocol         1 Interface Association
>   bMaxPacketSize0        64
>   bNumConfigurations      1
> Device Status:     0x0000
>   (Bus Powered)

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: non-working UVC device 058f:5608
  2014-06-08 22:29 ` Laurent Pinchart
@ 2014-06-09  7:33   ` Johannes Berg
  2014-06-09  9:25     ` Laurent Pinchart
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2014-06-09  7:33 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media, linux-usb

Hi Laurent,

Thanks for the quick reply!

> > and then the kernel message repeats forever, while I can't even exit
> > uvccapture unless I kill it hard, at which point I get
> > 
> > xhci_hcd 0000:00:14.0: Signal while waiting for configure endpoint command
> > usb 1-3.4.4.3: Not enough bandwidth for altsetting 0
> > 
> > from the kernel.
> 
> This looks like low-level USB issues, CC'ing the linux-usb mailing list.

Ok.

> > Any thoughts? Just to rule out hardware defects I connected it to my
> > windows 7 work machine and it works fine without even installing a
> > driver.
> 
> Could you try connecting it to an EHCI controller instead of XHCI on a Linux  
> machine ?

Indeed, that works! Interestingly, it works neither on a USB3 port
directly, nor on a USB2 hub behind the USB3 port.

Thanks,
johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: non-working UVC device 058f:5608
  2014-06-09  7:33   ` Johannes Berg
@ 2014-06-09  9:25     ` Laurent Pinchart
  2014-06-09  9:59       ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Laurent Pinchart @ 2014-06-09  9:25 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-media, linux-usb, Mathias Nyman

Hi Johannes,

On Monday 09 June 2014 09:33:06 Johannes Berg wrote:
> Hi Laurent,
> 
> Thanks for the quick reply!

You're welcome.

> > > and then the kernel message repeats forever, while I can't even exit
> > > uvccapture unless I kill it hard, at which point I get
> > > 
> > > xhci_hcd 0000:00:14.0: Signal while waiting for configure endpoint
> > > command
> > > usb 1-3.4.4.3: Not enough bandwidth for altsetting 0
> > > 
> > > from the kernel.
> > 
> > This looks like low-level USB issues, CC'ing the linux-usb mailing list.
> 
> Ok.
> 
> > > Any thoughts? Just to rule out hardware defects I connected it to my
> > > windows 7 work machine and it works fine without even installing a
> > > driver.
> > 
> > Could you try connecting it to an EHCI controller instead of XHCI on a
> > Linux machine ?
> 
> Indeed, that works! Interestingly, it works neither on a USB3 port
> directly, nor on a USB2 hub behind the USB3 port.

I would thus be tempted to classify this as an XHCI controller issue. linux-
usb should be the right list to get help. I've CC'ed Mathias Nyman, the XHCI 
maintainer.

Johannes, could you enable USB debugging in the linus/master kernel and 
provide a kernel log ?

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: non-working UVC device 058f:5608
  2014-06-09  9:25     ` Laurent Pinchart
@ 2014-06-09  9:59       ` Johannes Berg
  2014-06-09 10:27         ` Johannes Berg
  0 siblings, 1 reply; 8+ messages in thread
From: Johannes Berg @ 2014-06-09  9:59 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media, linux-usb, Mathias Nyman

On Mon, 2014-06-09 at 11:25 +0200, Laurent Pinchart wrote:

> > Indeed, that works! Interestingly, it works neither on a USB3 port
> > directly, nor on a USB2 hub behind the USB3 port.
> 
> I would thus be tempted to classify this as an XHCI controller issue. linux-
> usb should be the right list to get help. I've CC'ed Mathias Nyman, the XHCI 
> maintainer.

Yeah, I tend to agree.

> Johannes, could you enable USB debugging in the linus/master kernel and 
> provide a kernel log ?

Sure. Note that linus/next is having even more issues with this device,
to the point where I couldn't even get the lsusb I pasted into the first
email. I used 3.13 (because I had it installed on the system in
question) to get that.

It was also throwing an autosuspend warning:
http://mid.gmane.org/1402177014.8442.1.camel@jlt4.sipsolutions.net

I'll try to get some logs (wasn't there tracing added to xhci too? will
check)

johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: non-working UVC device 058f:5608
  2014-06-09  9:59       ` Johannes Berg
@ 2014-06-09 10:27         ` Johannes Berg
  2014-06-09 10:29           ` Johannes Berg
  2014-07-21 16:34           ` Laurent Pinchart
  0 siblings, 2 replies; 8+ messages in thread
From: Johannes Berg @ 2014-06-09 10:27 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media, linux-usb, Mathias Nyman

On Mon, 2014-06-09 at 11:59 +0200, Johannes Berg wrote:

> > Johannes, could you enable USB debugging in the linus/master kernel and 
> > provide a kernel log ?

> I'll try to get some logs (wasn't there tracing added to xhci too? will
> check)

Here we go - log + tracing:
log: http://p.sipsolutions.net/d5926c43d531e3af.txt
trace: http://johannes.sipsolutions.net/files/xhci.trace.dat.xz

I plugged in the device, waited a bit, tried to run a camera application
(didn't work) and then ran lsusb -t and lsusb -v.

johannes


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: non-working UVC device 058f:5608
  2014-06-09 10:27         ` Johannes Berg
@ 2014-06-09 10:29           ` Johannes Berg
  2014-07-21 16:34           ` Laurent Pinchart
  1 sibling, 0 replies; 8+ messages in thread
From: Johannes Berg @ 2014-06-09 10:29 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media, linux-usb, Mathias Nyman

On Mon, 2014-06-09 at 12:27 +0200, Johannes Berg wrote:

> Here we go - log + tracing:
> log: http://p.sipsolutions.net/d5926c43d531e3af.txt
> trace: http://johannes.sipsolutions.net/files/xhci.trace.dat.xz

Oh, and this was the kernel diff to commit
963649d735c8b6eb0f97e82c54f02426ff3f1f45:

diff --git a/drivers/usb/host/xhci-dbg.c b/drivers/usb/host/xhci-dbg.c
index eb009a4..00621cb 100644
--- a/drivers/usb/host/xhci-dbg.c
+++ b/drivers/usb/host/xhci-dbg.c
@@ -20,6 +20,8 @@
  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#define DEBUG
+
 #include "xhci.h"
 
 #define XHCI_INIT_VALUE 0x0
diff --git a/drivers/usb/host/xhci-hub.c b/drivers/usb/host/xhci-hub.c
index 6231ce6..70b09cd 100644
--- a/drivers/usb/host/xhci-hub.c
+++ b/drivers/usb/host/xhci-hub.c
@@ -20,6 +20,8 @@
  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#define DEBUG
+
 
 #include <linux/slab.h>
 #include <asm/unaligned.h>
@@ -287,7 +289,7 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)
 		if (virt_dev->eps[i].ring && virt_dev->eps[i].ring->dequeue) {
 			struct xhci_command *command;
 			command = xhci_alloc_command(xhci, false, false,
-						     GFP_NOIO);
+						     GFP_ATOMIC);
 			if (!command) {
 				spin_unlock_irqrestore(&xhci->lock, flags);
 				xhci_free_command(xhci, cmd);
diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c
index 8056d90..2ceed51 100644
--- a/drivers/usb/host/xhci-mem.c
+++ b/drivers/usb/host/xhci-mem.c
@@ -20,6 +20,8 @@
  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#define DEBUG
+
 #include <linux/usb.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
diff --git a/drivers/usb/host/xhci-mvebu.c b/drivers/usb/host/xhci-mvebu.c
index 1eefc98..4b289d6 100644
--- a/drivers/usb/host/xhci-mvebu.c
+++ b/drivers/usb/host/xhci-mvebu.c
@@ -7,6 +7,8 @@
  * version 2 as published by the Free Software Foundation.
  */
 
+#define DEBUG
+
 #include <linux/io.h>
 #include <linux/mbus.h>
 #include <linux/of.h>
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index e20520f..aae5dc9 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -20,6 +20,8 @@
  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#define DEBUG
+
 #include <linux/pci.h>
 #include <linux/slab.h>
 #include <linux/module.h>
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
index 29d8adb..2149b0c 100644
--- a/drivers/usb/host/xhci-plat.c
+++ b/drivers/usb/host/xhci-plat.c
@@ -11,6 +11,8 @@
  * version 2 as published by the Free Software Foundation.
  */
 
+#define DEBUG
+
 #include <linux/clk.h>
 #include <linux/dma-mapping.h>
 #include <linux/module.h>
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index d67ff71..a7eda28 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -64,6 +64,8 @@
  *   endpoint rings; it generates events on the event ring for these.
  */
 
+#define DEBUG
+
 #include <linux/scatterlist.h>
 #include <linux/slab.h>
 #include "xhci.h"
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 2b8d9a2..fd350b7 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -20,6 +20,8 @@
  * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#define DEBUG
+
 #include <linux/pci.h>
 #include <linux/irq.h>
 #include <linux/log2.h>


johannes


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: non-working UVC device 058f:5608
  2014-06-09 10:27         ` Johannes Berg
  2014-06-09 10:29           ` Johannes Berg
@ 2014-07-21 16:34           ` Laurent Pinchart
  1 sibling, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2014-07-21 16:34 UTC (permalink / raw)
  To: Mathias Nyman; +Cc: Johannes Berg, linux-media, linux-usb

On Monday 09 June 2014 12:27:37 Johannes Berg wrote:
> On Mon, 2014-06-09 at 11:59 +0200, Johannes Berg wrote:
> > > Johannes, could you enable USB debugging in the linus/master kernel and
> > > provide a kernel log ?
> > 
> > I'll try to get some logs (wasn't there tracing added to xhci too? will
> > check)
> 
> Here we go - log + tracing:
> log: http://p.sipsolutions.net/d5926c43d531e3af.txt
> trace: http://johannes.sipsolutions.net/files/xhci.trace.dat.xz
> 
> I plugged in the device, waited a bit, tried to run a camera application
> (didn't work) and then ran lsusb -t and lsusb -v.

Mathias, would you have time to give this a quick look ?

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-07-21 16:34 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-07 21:51 non-working UVC device 058f:5608 Johannes Berg
2014-06-08 22:29 ` Laurent Pinchart
2014-06-09  7:33   ` Johannes Berg
2014-06-09  9:25     ` Laurent Pinchart
2014-06-09  9:59       ` Johannes Berg
2014-06-09 10:27         ` Johannes Berg
2014-06-09 10:29           ` Johannes Berg
2014-07-21 16:34           ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.