Skip to content

USB3 Vision Camera Not Streaming on RK3588 (DWC3 USB3 Controller Issue) #349

@openedev

Description

@openedev

We are encountering a compatibility issue with USB3 Vision cameras on RK3588-based boards. The same camera works flawlessly on an x86_64 AMD laptop but fails to stream or even get detected reliably on RK3588.

Hardware Setup:

Board: RK3588 (Edgeble-6A), ROCK-5B, ITX-RK3588 Firefly
Camera: Cypress-based USB3 Vision camera
VendorID:ProductID = 04b4:d003
Model: MV-518UC85-GS
Port: USB3.0 port (verified SuperSpeed in DT)
Cable: USB 3.0 certified (0.5m to 2m tested)
Kernel: 5.10.110, 6.1.115, Mainline Linux

Host System (Works):

Laptop: AMD Ryzen Cezanne (x86_64)
USB Controller: AMD USB 3.1 xHCI
OS: Ubuntu 22.04
Kernel: 6.11
Software: aravis and gstreamer pipelines work reliably.

X86_64 Host: working

gst-launch-1.0 -v   aravissrc do-timestamp=true !   video/x-bayer,format=gbrg,width=2448,height=2048 !   bayer2rgb !   videoconvert n-threads=4 !   fpsdisplaysink sync=false text-overlay=true
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstXvImageSink:fps-display-video_sink-actual-sink-xvimage: sync = false
/GstPipeline:pipeline0/GstAravis:aravis0: camera = (null)
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstAravis:aravis0: stream = (null)
/GstPipeline:pipeline0/GstAravis:aravis0.GstPad:src: caps = video/x-bayer, format=(string)gbrg, width=(int)2448, height=(int)2048, framerate=(fraction)20/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-bayer, format=(string)gbrg, width=(int)2448, height=(int)2048, framerate=(fraction)20/1
/GstPipeline:pipeline0/GstBayer2RGB:bayer2rgb0.GstPad:src: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)20/1, format=(string)RGBx
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)20/1, format=(string)YV12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)20/1, format=(string)YV12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:src: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)20/1, format=(string)YV12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink.GstGhostPad:sink.GstProxyPad:proxypad1: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)20/1, format=(string)YV12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstXvImageSink:fps-display-video_sink-actual-sink-xvimage.GstPad:sink: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)20/1, format=(string)YV12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink.GstGhostPad:sink: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)20/1, format=(string)YV12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:video_sink: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)20/1, format=(string)YV12
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)20/1, format=(string)YV12
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)20/1, format=(string)RGBx
/GstPipeline:pipeline0/GstBayer2RGB:bayer2rgb0.GstPad:sink: caps = video/x-bayer, format=(string)gbrg, width=(int)2448, height=(int)2048, framerate=(fraction)20/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-bayer, format=(string)gbrg, width=(int)2448, height=(int)2048, framerate=(fraction)20/1
Redistribute latency...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstXvImageSink:fps-display-video_sink-actual-sink-xvimage: sync = false
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay: text = rendered: 12, dropped: 0, current: 22.19, average: 22.19

RK3588 failing:

gst-launch-1.0 -v aravissrc do-timestamp=true ! video/x-bayer,format=gbrg,width=2448,height=2048 ! bayer2rgb ! videoconvert ! fpsdisplaysink sync=false text-overlay=true video-sink="kmssink"
Setting pipeline to PAUSED ...
[19:06:27.334] ð interface> Found 1 USB3Vision device (among 11 USB devices)
[19:06:27.356] ð device> [UvDevice::new] GUID    = 04B400000209
[19:06:27.358] ð device> [UvDevice::new] USB 3.0
[19:06:27.358] ð device> [UvDevice::new] Using control endpoint 2, interface 0
[19:06:27.358] ð device> [UvDevice::new] Using data endpoint 1, interface 1
[19:06:27.358] ð device> Get genicam
[19:06:27.358] ð device> MANUFACTURER_NAME =        'Hifly Technology'
[19:06:27.359] ð device> MAX_DEVICE_RESPONSE_TIME = 0x000001f4
[19:06:27.359] ð device> DEVICE_CAPABILITY        = 0x0000000000000a09
[19:06:27.359] ð device> SRBM_ADDRESS =             0x0000000002000000
[19:06:27.359] ð device> MANIFEST_TABLE_ADDRESS =   0x0000000004000000
[19:06:27.360] ð device> U3VCP_CAPABILITY =         0x0000000000000001
[19:06:27.360] ð device> MAX_CMD_TRANSFER =         0x00004000
[19:06:27.360] ð device> MAX_ACK_TRANSFER =         0x00004000
[19:06:27.360] ð device> SIRM_OFFSET =              0x0000000003000000
[19:06:27.362] ð device> SIRM_INFO =                0x00000000
[19:06:27.362] ð device> SIRM_CONTROL =             0x00000000
[19:06:27.362] ð device> SIRM_REQ_PAYLOAD_SIZE =    0x00000000004c8000
[19:06:27.362] ð device> SIRM_REQ_LEADER_SIZE =     0x00000040
[19:06:27.362] ð device> SIRM_REQ_TRAILER_SIZE =    0x00000020
[19:06:27.362] ð device> SIRM_MAX_LEADER_SIZE =     0x00000400
[19:06:27.362] ð device> SIRM_PAYLOAD_SIZE =        0x00004000
[19:06:27.362] � device> SIRM_PAYLOAD_COUNT =       0x00000132
[19:06:27.363] ð device> SIRM_TRANSFER1_SIZE =      0x00000000
[19:06:27.363] ð device> SIRM_TRANSFER2_SIZE =      0x00000000
[19:06:27.363] ð device> SIRM_MAX_TRAILER_SIZE =    0x00000400
[19:06:27.363] ð device> MANIFEST_N_ENTRIES =       0x0000000000000001
[19:06:27.363] ð device> MANIFEST ENTRY
                         00000000 00 00 00 01 00 04 01 01 00 00 00 05 00 00 00 00  ................
                         00000010 c8 2b 00 00 00 00 00 00 00 00 00 00 00 00 00 00  .+..............
                         00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
                         00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
[19:06:27.363] ð device> genicam address =          0x0000000005000000
[19:06:27.363] ð device> genicam size    =          0x0000000000002bc8
[19:06:27.365] ð device> zip file =                 M3S518.xml
[19:06:27.387] ð misc> [PixelFormat::to_gst_caps_string] 0x010c0055 not found
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0: display-width = 2560
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0: display-height = 1440
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0: sync = false
/GstPipeline:pipeline0/GstAravis:aravis0: camera = (null)
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[19:06:27.396] � stream> SIRM_INFO             = 0x00000000
[19:06:27.396] ð stream> SIRM_REQ_PAYLOAD_SIZE = 0x00000000004c8000
[19:06:27.396] ð stream> SIRM_REQ_LEADER_SIZE  = 0x00000040
[19:06:27.396] ð stream> SIRM_REQ_TRAILER_SIZE = 0x00000020
[19:06:27.396] ð stream> Required alignment    = 1
[19:06:27.397] ð stream> SIRM_PAYLOAD_SIZE     = 0x00100000
[19:06:27.397] ð stream> SIRM_PAYLOAD_COUNT    = 0x00000004
[19:06:27.397] ð stream> SIRM_TRANSFER1_SIZE   = 0x000c8000
[19:06:27.397] ð stream> SIRM_TRANSFER2_SIZE   = 0x00000000
[19:06:27.397] ð stream> SIRM_MAX_LEADER_SIZE  = 0x00000040
[19:06:27.397] ð stream> SIRM_MAX_TRAILER_SIZE = 0x00000020
[19:06:27.398] ð stream-thread> Start async USB3Vision stream thread
/GstPipeline:pipeline0/GstAravis:aravis0: stream = (null)
/GstPipeline:pipeline0/GstAravis:aravis0.GstPad:src: caps = video/x-bayer, format=(string)gbrg, width=(int)2448, height=(int)2048, framerate=(fraction)10/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-bayer, format=(string)gbrg, width=(int)2448, height=(int)2048, framerate=(fraction)10/1
/GstPipeline:pipeline0/GstBayer2RGB:bayer2rgb0.GstPad:src: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)10/1, format=(string)BGRA
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)10/1, format=(string)BGRA
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)10/1, format=(string)BGRA
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:src: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)10/1, format=(string)BGRA
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0.GstPad:sink: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)10/1, format=(string)BGRA
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:video_sink: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)10/1, format=(string)BGRA
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)10/1, format=(string)BGRA
/GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, width=(int)2448, height=(int)2048, framerate=(fraction)10/1, format=(string)BGRA
/GstPipeline:pipeline0/GstBayer2RGB:bayer2rgb0.GstPad:sink: caps = video/x-bayer, format=(string)gbrg, width=(int)2448, height=(int)2048, framerate=(fraction)10/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-bayer, format=(string)gbrg, width=(int)2448, height=(int)2048, framerate=(fraction)10/1
0:00:00.0 / 99:99:99.Redistribute latency...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstKMSSink:kmssink0: sync = false
0:00:00.5 / 99:99:99.0:00:00.6 / 99:99:99.[19:06:28.233] ð stream-thread> Payload transfer failed (LIBUSB_TRANSFER_STALL)
[19:06:28.233] ð stream-thread> Trailer transfer failed (LIBUSB_TRANSFER_ERROR)
[19:06:28.233] ð stream-thread> Leader transfer failed (LIBUSB_TRANSFER_ERROR)
[19:06:28.234] ð stream-thread> Payload transfer failed (LIBUSB_TRANSFER_ERROR)
[19:06:28.235] ð stream-thread> Payload transfer failed (LIBUSB_TRANSFER_ERROR)
[19:06:28.235] ð stream-thread> Payload transfer failed (LIBUSB_TRANSFER_ERROR)
[19:06:28.236] ð stream-thread> Payload transfer failed (LIBUSB_TRANSFER_ERROR)

Tried setting up lower resolutions, used mpp, rga pipelines. all showing similar issues.

Any help?
Jagan.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions