USB-A abnormal behavior
Posted: 2025-03-04 15:43
Hi,
When usb camera is attached, and relevant modules are loaded no video source is detected. However I can see the usb device in LSUSB stdout.
After removing both usb and ethernet cable, and attaching the usb cable first and ethernet cable after, video device is available. The board is powered via lab power supply @ 5VDC on POW, PWR pins. How can I troubleshoot the issue?
I'm not sure if this is related but I also observe abnormal behavior using ffmpeg with this specific usb device.
ffmpeg throws same info on STDOUT, at the same time kernel messages also indicate frame overflow (ov534 1-1:1.0: frame overflow 614872 > 614400).
Additional info on the usb device :
When usb camera is attached, and relevant modules are loaded no video source is detected. However I can see the usb device in LSUSB stdout.
Code: Select all
[root@luckfox root]# insmod /oem/usr/ko/gspca_main.ko
[root@luckfox root]# insmod /oem/usr/ko/gspca_ov534.ko
[root@luckfox root]# lsusb
Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 003: ID 1415:2000
Bus 002 Device 001: ID 1d6b:0003
[root@luckfox root]# v4l2-ctl --list-devices
rkisp-statistics (platform: rkisp):
/dev/video19
/dev/video20
rkcif-mipi-lvds (platform:rkcif):
/dev/media0
rkisp_mainpath (platform:rkisp-vir0):
/dev/video11
/dev/video12
/dev/video13
/dev/video14
/dev/video15
/dev/video16
/dev/video17
/dev/video18
/dev/media1
Failed to open /dev/video0: No such device
Code: Select all
[root@luckfox root]# v4l2-ctl --list-devices
...
...
USB Camera-B4.09.24.1 (usb-xhci-hcd.0.auto-1):
/dev/video21
Failed to open /dev/video0: No such device
ffmpeg throws same info on STDOUT, at the same time kernel messages also indicate frame overflow (ov534 1-1:1.0: frame overflow 614872 > 614400).
Code: Select all
frame= 355 fps= 26 q=29.0 size= 675kB time=00:00:13.30 bitrate= 415.5kbits/s s
frame= 370 fps= 26 q=23.1 size= 693kB time=00:00:13.80 bitrate= 411.5kbits/s s
frame= 386 fps= 27 q=16.0 size= 721kB time=00:00:14.33 bitrate= 411.9kbits/s s
frame= 400 fps= 27 q=23.7 size= 738kB time=00:00:14.80 bitrate= 408.4kbits/s s
frame= 416 fps= 27 q=23.2 size= 757kB time=00:00:15.33 bitrate= 404.2kbits/s s
frame= 431 fps= 27 q=25.4 size= 775kB time=00:00:15.86 bitrate= 399.9kbits/s s
frame= 447 fps= 27 q=31.0 size= 803kB time=00:00:16.40 bitrate= 401.0kbits/s s
frame= 462 fps= 27 q=28.7 size= 821kB time=00:00:16.90 bitrate= 397.8kbits/s s
frame= 478 fps= 27 q=29.4 size= 839kB time=00:00:17.43 bitrate= 394.3kbits/s s
frame= 494 fps= 27 q=21.4 size= 865kB time=00:00:17.96 bitrate= 394.4kbits/s s
frame= 508 fps= 27 q=25.8 size= 881kB time=00:00:18.46 bitrate= 391.0kbits/s s
frame= 524 fps= 27 q=26.3 size= 899kB time=00:00:19.00 bitrate= 387.4kbits/s s
frame= 537 fps= 27 q=26.1 size= 914kB time=00:00:19.43 bitrate= 385.2kbits/s s
[video4linux2,v4l2 @ 0x556960] Dequeued v4l2 buffer contains 2064 bytes, but 614400 were expected. Flags: 0x00002001.
frame= 537 fps= 27 q=26.1 size= 914kB time=00:00:19.43 bitrate= 385.2kbits/s s
[video4linux2,v4l2 @ 0x556960] Dequeued v4l2 buffer contains 2072 bytes, but 614400 were expected. Flags: 0x00002001.
Code: Select all
[root@luckfox root]# v4l2-ctl --device=/dev/video21 --all
Driver Info:
Driver name : ov534
Card type : USB Camera-B4.09.24.1
Bus info : usb-xhci-hcd.0.auto-1
Driver version : 5.10.160
Capabilities : 0x85200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x05200001
Video Capture
Read/Write
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (ov534: ok)
Format Video Capture:
Width/Height : 640/480
Pixel Format : 'YUYV' (YUYV 4:2:2)
Field : None
Bytes per Line : 1280
Size Image : 614400
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Limited Range)
Flags :
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 2
User Controls
brightness 0x00980900 (int) : min=0 max=255 step=1 default=0 value=0 flags=slider
contrast 0x00980901 (int) : min=0 max=255 step=1 default=32 value=32 flags=slider
saturation 0x00980902 (int) : min=0 max=255 step=1 default=64 value=64 flags=slider
hue 0x00980903 (int) : min=-90 max=90 step=1 default=0 value=0 flags=slider
white_balance_automatic 0x0098090c (bool) : default=1 value=1
exposure 0x00980911 (int) : min=0 max=255 step=1 default=120 value=120 flags=inactive, volatile
gain_automatic 0x00980912 (bool) : default=1 value=1 flags=update
gain 0x00980913 (int) : min=0 max=63 step=1 default=20 value=20 flags=inactive, volatile
horizontal_flip 0x00980914 (bool) : default=0 value=0
vertical_flip 0x00980915 (bool) : default=0 value=0
power_line_frequency 0x00980918 (menu) : min=0 max=1 default=0 value=0 (Disabled)
0: Disabled
1: 50 Hz
sharpness 0x0098091b (int) : min=0 max=63 step=1 default=0 value=0 flags=slider
Camera Controls
auto_exposure 0x009a0901 (menu) : min=0 max=1 default=0 value=0 (Auto Mode) flags=update
0: Auto Mode
1: Manual Mode
[root@luckfox root]# v4l2-ctl -d 21 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'GRBG' (8-bit Bayer GRGR/BGBG)
Size: Discrete 320x240
Interval: Discrete 0.005s (187.000 fps)
Interval: Discrete 0.007s (150.000 fps)
Interval: Discrete 0.007s (137.000 fps)
Interval: Discrete 0.008s (125.000 fps)
Interval: Discrete 0.010s (100.000 fps)
Interval: Discrete 0.013s (75.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.020s (50.000 fps)
Interval: Discrete 0.027s (37.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.020s (50.000 fps)
Interval: Discrete 0.025s (40.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)
[1]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 320x240
Interval: Discrete 0.005s (187.000 fps)
Interval: Discrete 0.007s (150.000 fps)
Interval: Discrete 0.007s (137.000 fps)
Interval: Discrete 0.008s (125.000 fps)
Interval: Discrete 0.010s (100.000 fps)
Interval: Discrete 0.013s (75.000 fps)
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.020s (50.000 fps)
Interval: Discrete 0.027s (37.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 640x480
Interval: Discrete 0.017s (60.000 fps)
Interval: Discrete 0.020s (50.000 fps)
Interval: Discrete 0.025s (40.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.067s (15.000 fps)