大家好
我们使用的是 德州仪器(TI) TUSB73x0超高速 USB 3.0 xHCI 主机控制器(修订版02)。 每个 xHCI HC 可直接连接到3个 USB 摄像头。
摄像机1: 1200*1200*16*30=691200000b/s ~ 700MB/s
摄像机2: 1200*1200*16*30=691200000b/s ~ 700MB/s
摄像机3:1920*1200*16*20=737280000b/s ~ 740Mb/s
1200 x 1200或1920 x 1200是图片分辨率(每张图片的像素数)。
16是 YUV 编码、每个像素需要16位。
30/20为帧速率。
批量传输可以完成。 有时、我们会在内核消息中遇到以下错误、重现此错误并不容易、但我们会不时遇到这些错误。
[Thu Apr 6 20:28:53 2023] uvcvideo: Non-zero status (-71) in video completion handler. [Thu Apr 6 20:28:53 2023] xhci_hcd 0000:77:00.0: Transfer error for slot 2 ep 6 on endpoint [Thu Apr 6 20:28:53 2023] uvcvideo: Non-zero status (-71) in video completion handler. [Thu Apr 6 20:28:53 2023] xhci_hcd 0000:77:00.0: Transfer error for slot 2 ep 6 on endpoint
usb 10-2: Not enough bandwidth for new device state. usb 10-2: Not enough bandwidth for altsetting 1
[176505.200808] uvcvideo: Device requested 46080 B/frame bandwidth. [176505.200811] uvcvideo: Selecting alternate setting 1 (46080 B/frame bandwidth). [176505.200812] uvcvideo: Device requested 46080 B/frame bandwidth. [176505.200814] uvcvideo: Selecting alternate setting 1 (46080 B/frame bandwidth). [176505.200860] xhci_hcd 0000:49:00.0: add ep 0x83, slot id 3, new drop flags = 0x0, new add flags = 0x81 [176505.200864] xhci_hcd 0000:49:00.0: xhci_check_bandwidth called for udev 00000000dfb1a7cc [176505.200876] xhci_hcd 0000:49:00.0: // Ding dong! [176505.201309] xhci_hcd 0000:49:00.0: Successful Endpoint Configure command [176505.201469] xhci_hcd 0000:49:00.0: add ep 0x83, slot id 2, new drop flags = 0x0, new add flags = 0x81 [176505.201473] xhci_hcd 0000:49:00.0: xhci_check_bandwidth called for udev 000000004bbf2dcd [176505.201483] xhci_hcd 0000:49:00.0: // Ding dong! [176505.201542] usb 10-2: Not enough bandwidth for new device state. [176505.201547] xhci_hcd 0000:49:00.0: xhci_reset_bandwidth called for udev 000000004bbf2dcd [176505.201620] usb 10-2: Not enough bandwidth for altsetting 1 [176505.201625] xhci_hcd 0000:49:00.0: xhci_check_bandwidth called for udev 000000004bbf2dcd [176505.330084] xhci_hcd 0000:49:00.0: xhci_hub_status_data: stopping port polling. [176505.687380] uvcvideo: Allocated 64 URB buffers of 8x46080 bytes each. [176505.687615] xhci_hcd 0000:49:00.0: ERROR no room on ep ring, try ring expansion [176505.687629] xhci_hcd 0000:49:00.0: ring expansion succeed, now has 4 segments
lsusb -d 04b4:1103 -v
Bus 012 Device 040: ID 04b4:1103 Cypress Semiconductor Corp.
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 3.10
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 9
idVendor 0x04b4 Cypress Semiconductor Corp.
idProduct 0x1103
bcdDevice 0.00
iManufacturer 1
iProduct 2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 218
bNumInterfaces 2
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 14 Video
bFunctionSubClass 3 Video Interface Collection
bFunctionProtocol 0
iFunction 2
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 14 Video
bInterfaceSubClass 1 Video Control
bInterfaceProtocol 0
iInterface 2
VideoStreaming Interface Descriptor:
bLength 30
bDescriptorType 36
bDescriptorSubtype 5 (FRAME_UNCOMPRESSED)
bFrameIndex 1
bmCapabilities 0x01
Still image supported
wWidth 1920
wHeight 1200
dwMinBitRate 737280000
dwMaxBitRate 737280000
dwMaxVideoFrameBufferSize 4608000
dwDefaultFrameInterval 1000000
bFrameIntervalType 1
dwFrameInterval( 0) 1000000
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 0x83 EP 3 IN
bmAttributes 5
Transfer Type Isochronous
Synch Type Asynchronous
Usage Type Data
wMaxPacketSize 0x0400 1x 1024 bytes
bInterval 1
bMaxBurst 14
Mult 2

