espressif / esp-iot-solution

Espressif IoT Library. IoT Device Drivers, Documentations And Solutions.
Apache License 2.0
1.93k stars 767 forks source link

Example usb_camera_mic_spk does not work, prints "Setting format: 0 NOT found" (AEGHB-781) #397

Closed frka1204 closed 2 months ago

frka1204 commented 2 months ago

Answers checklist.

General issue report

I've tested my usb camera with the example provided in _esp-iot-solution/examples/usb/host/usb_camera_micspk. However it seems that the program complains about that format 0 (UVC_FORMAT_JPEG) is an unsupported format for this camera. When the camera is connected to a computer with a usb port run in full speed mode frames are received.

lsusb -v shows this: lsusb_log.txt

The program in usb_camera_mic_spk prints this information:

--- esp-idf-monitor 1.4.0 on /dev/ttyUSB0 2000000 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
I (27) boot: ESP-IDF v5.3 2nd stage bootloader
I (27) boot: compile time Aug 13 2024 01:30:17
I (27) boot: Multicore bootloader
I (27) boot: chip revision: v0.1
I (27) boot.esp32s3: Boot SPI Speed : 80MHz
I (27) boot.esp32s3: SPI Mode       : DIO
I (28) boot.esp32s3: SPI Flash Size : 2MB
I (28) boot: Enabling RNG early entropy source...
I (28) boot: Partition Table:
I (28) boot: ## Label            Usage          Type ST Offset   Length
I (29) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (29) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (30) boot:  2 factory          factory app      00 00 00010000 00100000
I (30) boot: End of partition table
I (30) esp_image: segment 0: paddr=00010020 vaddr=3c030020 size=12960h ( 76128) map
I (45) esp_image: segment 1: paddr=00022988 vaddr=3fc94b00 size=02e94h ( 11924) load
I (47) esp_image: segment 2: paddr=00025824 vaddr=40374000 size=0a7f4h ( 42996) load
I (57) esp_image: segment 3: paddr=00030020 vaddr=42000020 size=28adch (166620) map
I (87) esp_image: segment 4: paddr=00058b04 vaddr=4037e7f4 size=0627ch ( 25212) load
I (100) boot: Loaded app from partition at offset 0x10000
I (100) boot: Disabling RNG early entropy source...
V (101) mmap: after coalescing, 1 regions are left
I (101) cpu_start: Multicore app
D (101) cpu_start: Pro cpu up
D (101) cpu_start: Starting app cpu, entry point is 0x403754d0
0x403754d0: call_start_cpu1 at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_system/port/cpu_start.c:195

D (0) cpu_start: App cpu up
V CACHE_ERR: illegal error intr clr & ena mask is: 0x3f
V CACHE_ERR: core 1 access error intr clr & ena mask is: 0x1f
D (110) clk: RTC_SLOW_CLK calibration value: 3912371
V CACHE_ERR: illegal error intr clr & ena mask is: 0x3f
V CACHE_ERR: core 0 access error intr clr & ena mask is: 0x1f
D (111) cpu_start: calling init function: 0x420022dc on core: 0
0x420022dc: __esp_system_init_fn_init_efuse_check at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/efuse/src/esp_efuse_startup.c:31

D (111) cpu_start: calling init function: 0x42002420 on core: 0
0x42002420: __esp_system_init_fn_init_show_cpu_freq at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_system/startup_funcs.c:58

I (111) cpu_start: Pro cpu start user code
I (112) cpu_start: cpu freq: 240000000 Hz
D (112) cpu_start: calling init function: 0x4200220c on core: 0
0x4200220c: __esp_system_init_fn_init_show_app_info at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_app_format/esp_app_desc.c:104

I (112) app_init: Application information:
I (112) app_init: Project name:     usb_camera_mic_spk
I (113) app_init: App version:      1
I (113) app_init: Compile time:     Aug 13 2024 02:34:39
I (113) app_init: ELF file SHA256:  10cb7478b...
I (114) app_init: ESP-IDF:          v5.3
D (114) cpu_start: calling init function: 0x420022f0 on core: 0
0x420022f0: __esp_system_init_fn_init_efuse_show_app_info at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/efuse/src/esp_efuse_startup.c:41

I (114) efuse_init: Min chip rev:     v0.0
I (115) efuse_init: Max chip rev:     v0.99 
I (115) efuse_init: Chip rev:         v0.1
D (115) cpu_start: calling init function: 0x42003fcc on core: 0 (115) memory_layout: reserved range is 0x3c0428b8 - 0x3c0428e0ry ranges:
0x42003fcc: __esp_system_init_fn_init_heap at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/heap/heap_caps_init.c:25

D (116) memory_layout: Reserved memory range 0x
D (116) memory_layout: Reserved memory range 0x3fc94b00 - ory range 0x3fceee34 - 0x3fcf0000
D (117) memory_layout: Rex40374000 - 0x40384b00
D (118) memory_layout: Reserved memoy_layout: Reserved memory range 0x600fffe8 - 0x60100000
D (uilding list of available memory regions:
V (119) memory_la00
V (119) memory_layout: Region 0x3fc88000 - 0x3fc90000 inc84000 - 0x3fc94b00
V (120) memory_layout: Examining memory_layout: Start of region 0x3fc90000 - 0x3fca0000 overlaps reserv94b00
V (120) memory_layout: Start of region 0x3fc94b00 - 0
D (121) memory_layout: Available memory region 0x3fc98348 121) memory_layout: Examining memory region 0x3fca0000 - 0x3fcb0gion 0x3fca0000 - 0x3fcb0000
V (122) memory_layout: Examinicb0000 - 0x3fcc0000
D (123) memory_layout: Available memory_layout: Examining memory region 0x3fcc0000 - 0x3fcd0000
D Available memory region 0x3fcc0000 - 0x3fcd0000
V (124) mem3fce0000
D (124) memory_layout: Available memory region 0x3[0m
V (124) memory_layout: Examining memory region 0x3fce0000 -emory region 0x3fce0000 - 0x3fce9710
V (125) memory_layout:ion 0x3fce9710 - 0x3fcf0000
V (126) memory_layout: End of rfceee34 - 0x3fcf0000
D (126) memory_layout: Available memor 0x3fceee34
V (127) memory_layout: Examining memory region  Available memory region 0x3fcf0000 - 0x3fcf8000
V (127) meg memory region 0x600fe000 - 0x60100000
V (128) memory_layos reserved 0x600fe000 - 0x600fe100
V (128) memory_layout: E00 - 0x60100000 overlaps reserved 0x600fffe8 - 0x60100000
Dfe100 - 0x600fffe8
I (129) heap_init: Initializing. amic allocation:
D (130) heap_init: New heap initialised at348 len 000513C8 (324 KiB): RAM
I (130) heap_init: A24 (21 KiB): RAM
D (131) heap_init: New heap initialised at000 len 00008000 (32 KiB): DRAM
D (131) heap_init: New heapfe100
I (131) heap_init: At 600FE100 len 00001EE8 (7function: 0x42007494 on core: 0
0x42007494: __esp_system_init_fn_esp_timer_init_nonos at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_timer/src/esp_timer_init.c:28

D (132) cpu_start: calling 6fb8 on core: 0
D (133) cpu_start: calling init function: 0ntr_alloc_intrstatus (cpu 0): checking args
V (133) intr_alntrstatus (cpu 0): Args okay. Resulting flags 0x40E
D (134)
D (134) cpu_start: calling init function: 0x42002478 on core: 0rt: calling init function: 0x420084f4 on core: 0
0x42002478: __esp_system_init_fn_init_newlib_time at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_system/startup_funcs.c:81
0x420084f4: __esp_system_init_fn_init_vfs_uart at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_driver_uart/src/uart_vfs.c:1080

D (135) cp 0
D (135) cpu_start: calling init function: 0x420093a8 on cpu_start: calling init function: 0x42007020 on core: 0
0x420093a8: __esp_system_init_fn_init_vfs_console at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_vfs_console/vfs_console.c:222
0x42007020: __esp_system_init_fn_init_newlib_stdio at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/newlib/newlib_init.c:207

D (n core: 0
D (136) cpu_start: calling init function: 0x42002 (137) memspi: raw_chip_id: 174020

V (137) memspi: chip_i0

V (137) memspi: chip_id: 204017

D (137) spi_flas[0m
D (137) spi_flash: trying chip: gd
D (138) spi_flash: ip: winbond
D (138) spi_flash: trying chip: boya
D (13chip: th
D (139) spi_flash: trying chip: mxic (opi)
D  (139) spi_flash: detected chip: generic
I (139) spi
W (139) spi_flash: Detected size(8192k) larger thanthe size in the binary image header.
D (140) cpu_start: calx4200238c on core: 0
D (141) cpu_start: calling init functiD (182) cpu_start: calling init function: 0x4037a90c
0x4037a90c: enable_timer_group0_for_calibration at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_hw_support/port/esp32s3/rtc_time.c:199

D (182) cpu_start: calling init function: 0x42003814
0x42003814: esp_ipc_init at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_system/esp_ipc.c:113

D (183) cpu_start: calling init function: 0x42002a14
0x42002a14: esp_reset_reason_init at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_system/port/soc/esp32s3/reset_reason.c:63

D (183) cpu_start: calling init function: 0x42005018 on core: 0
0x42005018: __esp_system_init_fn_esp_sleep_startup_init at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_hw_support/sleep_gpio.c:185

I (183) sleep: Configure to isolate all GPIO pins in sleep state
I (184) sleep: Enable automatic switching of GPIO sleep configuration
D (184) cpu_start: calling init function: 0x420024ac on core: 0
0x420024ac: __esp_system_init_fn_init_apb_dma at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_system/startup_funcs.c:125

D (184) cpu_start: calling init function: 0x42008df0 on core: 0
0x42008df0: __esp_system_init_fn_usb_serial_jtag_conn_status_init at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_driver_usb_serial_jtag/src/usb_serial_jtag_connection_monitor.c:75

D (184) cpu_start: calling init function: 0x420024b8 on core: 0
0x420024b8: __esp_system_init_fn_init_disable_rtc_wdt at /home/fredrik/ESP-IDF/esp-idf-v5.3/components/esp_system/startup_funcs.c:143

V (185) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (185) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x40E
D (186) intr_alloc: Connected src 79 to int 2 (cpu 0)
D (186) app_start: Starting scheduler on CPU0
V (186) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): checking args
V (186) intr_alloc: esp_intr_alloc_intrstatus (cpu 0): Args okay. Resulting flags 0x402
D (186) intr_alloc: Connected src 57 to int 3 (cpu 0)
V (186) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): checking args
V (186) intr_alloc: esp_intr_a40E
I (D (187) intr_alloc: Connected src 80 to int 087) app_start: Starting scheduler on CPU1
V (187) intr_allom
V (188) intr_alloc: esp_intr_alloc_intrstatus (cpu 1): Args ogs 0x402
186) mainD (188) intr_alloc: Connected src 58 to iheap_init: New heap initialised at 0x3fce9710
V (189) intr__intrstatus (cpu 0): checking args
V (189) intr_alloc: esp_ flags 0xE
D (190) intr_alloc: Connected src 52 to int 5 (c190) main_task: Calling app_main()
I (191) USB_STREA
I (191) USB_STREAM: USB streaming callback register suc91) USB_STREAM: Pre-alloc ctrl urb succeed, size = 2048
SB_STREAM: USB stream task start
I (222) USB_STREAM: USB Streaming Start Succeed
I (222) USB_STREAM: Waiting USB Device Connection
I (472) USB_STREAM: line 151 HCD_PORT_EVENT_CONNECTION
I (472) USB_STREAM: Action: ACTION_DEVICE_CONNECT
I (522) USB_STREAM: Resetting Port
I (582) USB_STREAM: Setting Port FIFO, 1
I (582) USB_STREAM: USB Speed: full-speed
I (583) USB_STREAM: ENUM Stage START, Succeed
I (584) USB_STREAM: ENUM Stage GET_SHORT_DEV_DESC, Succeed
I (586) USB_STREAM: Default pipe endpoint MPS update to 64
I (586) USB_STREAM: ENUM Stage CHECK_SHORT_DEV_DESC, Succeed
I (587) USB_STREAM: ENUM Stage SET_ADDR, Succeed
I (598) USB_STREAM: ENUM Stage CHECK_ADDR, Succeed
I (599) USB_STREAM: ENUM Stage GET_FULL_DEV_DESC, Succeed
*** Device descriptor ***
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0xef
bDeviceSubClass 0x2
bDeviceProtocol 0x1
bMaxPacketSize0 64
idVendor 0xbda
idProduct 0x5844
bcdDevice 2.30
iManufacturer 3
iProduct 1
iSerialNumber 2
bNumConfigurations 1
I (601) USB_STREAM: ENUM Stage CHECK_FULL_DEV_DESC, Succeed
I (602) USB_STREAM: ENUM Stage GET_SHORT_CONFIG_DESC, Succeed
I (614) USB_STREAM: ENUM Stage CHECK_SHORT_CONFIG_DESC, Succeed
I (615) USB_STREAM: ENUM Stage GET_FULL_CONFIG_DESC, Succeed
*** Configuration descriptor ***
bLength 9
bDescriptorType 0x2
wTotalLength 324
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 4
bmAttributes 0x80
bMaxPower 500mA
*** Interface Association Descriptor: Video ***
bLength 8
bDescriptorType 0xb
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 0xe
bFunctionSubClass 0x3
bFunctionProtocol 0x0
iFunction 5
    *** Interface descriptor ***
    bLength 9
    bDescriptorType 0x4
    bInterfaceNumber 0
    bAlternateSetting 0
    bNumEndpoints 1
    bInterfaceClass 0xe (Video)
    bInterfaceSubClass 0x1
    bInterfaceProtocol 0x0
    iInterface 5
        *** Endpoint descriptor ***
        bLength 7
        bDescriptorType 0x5
        bEndpointAddress 0x83   EP 3 IN
        bmAttributes 0x3    INT
        wMaxPacketSize 16
        bInterval 6
    *** Interface descriptor ***
    bLength 9
    bDescriptorType 0x4
    bInterfaceNumber 1
    bAlternateSetting 0
    bNumEndpoints 0
    bInterfaceClass 0xe (Video)
    bInterfaceSubClass 0x2
    bInterfaceProtocol 0x0
    iInterface 0
    *** Class-specific VS Interface Descriptor ***
    bLength 0xe
    bDescriptorType 0x24
    bDescriptorSubType 1
    bNumFormats 1
    wTotalLength 87
    bEndpointAddress 129
    bFunct  bmInfo 0x3
    bTerminalLink 2
    bStillCaptureMethod 1
    bTriggerontrols 0x1b
    *** Interface descriptor ***
    bLength 9
    bDescrrfaceNumber 1
    bAlternateSetting 1
    bNumEndpoints 1
    bInterfaerfaceProtocol 0x0
    iInterface 0
        *** Endpoint descriptor ***criptorType 0x5
        bEndpointAddress 0x81   EP 1 IN
        bmAttributes* Interface descriptor ***
    bLength 9
    bDescriptorType 0x4
    bAlternateSetting 2
    bNumEndpoints 1
    bInterfaceClass 0xe (Vide0
    iInterface 0
        *** Endpoint descriptor ***
        bLength 7
                bEndpointAddress 0x81   EP 1 IN
        bmAttributes 0x5    ISOC
        wMaxiptor ***
    bLength 9
    bDescriptorType 0x4
    bInterfaceNumber 13
    bNumEndpoints 1
    bInterfaceClass 0xe (Video)
    bInterfaceSu
        *** Endpoint descriptor ***
        bLength 7
        bDescriptorType 0s 0x81 EP 1 IN
        bmAttributes 0x5    ISOC
        wMaxPacketSize 384
    th 9
    bDescriptorType 0x4
    bInterfaceNumber 1
    bAlternateSett 1
    bInterfaceClass 0xe (Video)
    bInterfaceSubClass 0x2
    bIntescriptor ***
        bLength 7
        bDescriptorType 0x5
        bEndpointAd bmAttributes 0x5    ISOC
        wMaxPacketSize 512
        bInterval 1
    **rType 0x4
    bInterfaceNumber 1
    bAlternateSetting 5
    bNumEndpoass 0xe (Video)
    bInterfaceSubClass 0x2
    bInterfaceProtocol 0xbLength 7
        bDescriptorType 0x5
        bEndpointAddress 0x81   EP 1 I  ISOC
        wMaxPacketSize 768
        bInterval 1
    *** Interface descrrfaceNumber 1
    bAlternateSetting 6
    bNumEndpoints 1
    bInterfa    bInterfaceSubClass 0x2
    bInterfaceProtocol 0x0
criptorType 0x5ace 0
        bEndpointAddress 0x81   EP 1 IN
        bmAttributesetSize 780
        bInterval 1
    *** Interface descriptor ***
    bLengAlternateSetting 7
    bNumEndpoints 1
    bInterfaceClass 0xe (Videss 0x2
    bInterfaceProtocol 0x0
    iInterface 0
        *** Endpoint d      bEndpointAddress 0x81   EP 1 IN
        bmAttributes 0x5    ISOC
        wMaxterval 1
I (646) USB_STREAM: Actual VS Interface(MPS <= 47) USB_STREAM:  Endpoint(ISOC) Addr = 0x81, MPS = 512
    ndpoint(ISOC) Addr = 0x81, MPS = 512
I (648) USB
M: Setting format: 0 NOT foundrmat: 0 NOT found
E (649) USB_STREAM: _STREAM: Frame: 0, width*height: 65535*65535, NOT found
: ./managed_components/espressif__usb_stream/usb_stream.c:3134 matching configurations
E (650) USB_STREAM: ENUM StaDESC, Failed
E (650) USB_STREAM: ENUM Stage CHECK_FUAM: USB enum failed, retrying in 200 ms...
W (872) USB_STREAM: USB enum failed, retry now
leeebo commented 2 months ago

Setting format: 0 NOT found means your camera has no MJPEG format.

Only MJPEG cameras are supported

frka1204 commented 2 months ago

Setting format: 0 NOT found means your camera has no MJPEG format.

Only MJPEG cameras are supported

Yes, but lsusb shows:

VideoStreaming Interface Descriptor:
        bLength                            30
        bDescriptorType                    36
        bDescriptorSubtype                  7 (FRAME_MJPEG)
        bFrameIndex                         4
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            320
        wHeight                           240
        dwMinBitRate                 36864000
        dwMaxBitRate                 36864000
        dwMaxVideoFrameBufferSize      153600
        dwDefaultFrameInterval         333333
        bFrameIntervalType                  1
        dwFrameInterval( 0)            333333

I can save a frame with: v4l2-ctl -d /dev/video28 --stream-mmap --stream-count=1 --stream-to=output.jpg

leeebo commented 2 months ago

@frka1204 That's because with ESP32-S3 the USB camera can only works in Fullspeed mode. But on your PC it works in Highspeed mode.

The configuration descriptors used by the devices are different for different rate modes

frka1204 commented 2 months ago

Ok, I thought it was enough to set maximum-speed = "full-speed"; in device tree to force full-speed but it seems that's not enough. Instead I disabled USB EHCI in device tree so that only USB OHCI is enabled which forces full-speed mode as shown:

[root@RV1126_RV1109:/]# lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ohci-platform/1p, 12M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=, Driver=hub/4p, 480M
        |__ Port 3: Dev 3, If 0, Class=, Driver=r8152, 480M
        |__ Port 4: Dev 7, If 1, Class=, Driver=uvcvideo, 480M
        |__ Port 4: Dev 7, If 0, Class=, Driver=uvcvideo, 480M

Now the usb descriptors show that MJPEG isn't a supported format for full-speed mode:

Bus 001 Device 004: ID 0bda:5844  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass          239 
  bDeviceSubClass         2 
  bDeviceProtocol         1 
  bMaxPacketSize0        64
  idVendor           0x0bda 
  idProduct          0x5844 
  bcdDevice           12.34
  iManufacturer           3 Generic
  iProduct                1 USB Camera
  iSerial                 2 200901010001
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          324
    bNumInterfaces          2
    bConfigurationValue     1
    iConfiguration          4 USB Camera
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              500mA
    Interface Association:
      bLength                 8
      bDescriptorType        11
      bFirstInterface         0
      bInterfaceCount         2
      bFunctionClass         14 
      bFunctionSubClass       3 
      bFunctionProtocol       0 
      iFunction               5 USB Camera
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass        14 
      bInterfaceSubClass      1 
      bInterfaceProtocol      0 
      iInterface              5 USB Camera
      VideoControl Interface Descriptor:
        bLength                13
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdUVC               1.00
        wTotalLength           78
        dwClockFrequency       15.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           0x0000200e
          Auto-Exposure Mode
          Auto-Exposure Priority
          Exposure Time (Absolute)
          Roll (Absolute)
      VideoControl Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      5 (PROCESSING_UNIT)
      Warning: Descriptor too short
        bUnitID                 2
        bSourceID               1
        wMaxMultiplier          0
        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     0x09
          None
          SECAM - 625/50
      VideoControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               4
        iTerminal               0 
      VideoControl Interface Descriptor:
        bLength                27
        bDescriptorType        36
        bDescriptorSubtype      6 (EXTENSION_UNIT)
        bUnitID                 4
        guidExtensionCode         {1229a78c-47b4-4094-b0ce-db07386fb938}
        bNumControl             2
        bNrPins                 1
        baSourceID( 0)          2
        bControlSize            2
        bmControls( 0)       0x00
        bmControls( 1)       0x06
        iExtension              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               6
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass        14 
      bInterfaceSubClass      2 
      bInterfaceProtocol      0 
      iInterface              0 
      VideoStreaming Interface Descriptor:
        bLength                            14
        bDescriptorType                    36
        bDescriptorSubtype                  1 (INPUT_HEADER)
        bNumFormats                         1
        wTotalLength                       87
        bEndPointAddress                  129
        bmInfo                              0
        bTerminalLink                       3
        bStillCaptureMethod                 2
        bTriggerSupport                     1
        bTriggerUsage                       0
        bControlSize                        1
        bmaControls( 0)                     0
      VideoStreaming Interface Descriptor:
        bLength                            27
        bDescriptorType                    36
        bDescriptorSubtype                  4 (FORMAT_UNCOMPRESSED)
        bFormatIndex                        1
        bNumFrameDescriptors                1
        guidFormat                            {32595559-0000-0010-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                            30
        bDescriptorType                    36
        bDescriptorSubtype                  5 (FRAME_UNCOMPRESSED)
        bFrameIndex                         1
        bmCapabilities                   0x00
          Still image unsupported
        wWidth                            160
        wHeight                           120
        dwMinBitRate                  3072000
        dwMaxBitRate                  3072000
        dwMaxVideoFrameBufferSize       38400
        dwDefaultFrameInterval        1000000
        bFrameIntervalType                  1
        dwFrameInterval( 0)           1000000
      VideoStreaming Interface Descriptor:
        bLength                            10
        bDescriptorType                    36
        bDescriptorSubtype                  3 (STILL_IMAGE_FRAME)
        bEndpointAddress                    0
        bNumImageSizePatterns               1
        wWidth( 0)                        160
        wHeight( 0)                       120
        bNumCompressionPatterns             0
      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 
      bInterfaceSubClass      2 
      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     0x0080  1x 128 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       2
      bNumEndpoints           1
      bInterfaceClass        14 
      bInterfaceSubClass      2 
      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     0x0100  1x 256 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       3
      bNumEndpoints           1
      bInterfaceClass        14 
      bInterfaceSubClass      2 
      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     0x0180  1x 384 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       4
      bNumEndpoints           1
      bInterfaceClass        14 
      bInterfaceSubClass      2 
      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     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       5
      bNumEndpoints           1
      bInterfaceClass        14 
      bInterfaceSubClass      2 
      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     0x0300  1x 768 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       6
      bNumEndpoints           1
      bInterfaceClass        14 
      bInterfaceSubClass      2 
      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     0x030c  1x 780 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       7
      bNumEndpoints           1
      bInterfaceClass        14 
      bInterfaceSubClass      2 
      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     0x0320  1x 800 bytes
        bInterval               1