This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3352: USB camera problem

Part Number: AM3352

Tool/software: Linux

Hi.

  I tested SDK5.03 with the AM335 SK EVM + USB Camera.

  And the external USB Cameras will not work.

  May you tell me what's the exact V4L2 command sets to make the External USB Camera working?

Log  is here:

root@am335x-evm:~# [ 92.364476] usb 2-1: USB disconnect, device number 2
[ 94.134348] usb 2-1: new high-speed USB device number 3 using musb-hdrc
[ 94.330467] usb 2-1: New USB device found, idVendor=045e, idProduct=075d
[ 94.337301] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 94.349490] usb 2-1: Product: Microsoft?LifeCam Cinema(TM)
[ 94.363436] usb 2-1: Manufacturer: Microsoft
[ 94.386099] uvcvideo: Found UVC 1.00 device Microsoft?LifeCam Cinema(TM) (045e:075d)
[ 94.425792] uvcvideo 2-1:1.0: Entity type for entity Extension 5 was not initialized!
[ 94.433764] uvcvideo 2-1:1.0: Entity type for entity Processing 4 was not initialized!
[ 94.476600] uvcvideo 2-1:1.0: Entity type for entity Selector 3 was not initialized!
[ 94.499760] uvcvideo 2-1:1.0: Entity type for entity Camera 1 was not initialized!
[ 94.531096] input: Microsoft?LifeCam Cinema(TM): as /devices/platform/ocp/47400000.usb/47401c00.usb/musb-hdrc.1/usb2/2-1/2-1:1.0/input/input3
[ 147.574793] NET: Registered protocol family 15
[ 150.221524] Initializing XFRM netlink socket

BR Rio

  • Hello,

    What v4l2-ctl --list-devices and v4l2-ctl --all shows?

    Could you try to capture via gstreamer with this pipeline:

    gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=10 ! 'video/x-raw,width=320,height=240,framerate=15/1' ! filesink location=test.yuv

    BR
    Margarita

  • Hi M:

    The info is as below:


    _____ _____ _ _
    | _ |___ ___ ___ ___ | _ |___ ___ |_|___ ___| |_
    | | _| .'| . | . | | __| _| . | | | -_| _| _|
    |__|__|_| |__,|_ |___| |__| |_| |___|_| |___|___|_|
    |___| |___|

    Arago Project http://arago-project.org am335x-evm ttyS0

    Arago 2018.10 am335x-evm ttyS0

    am335x-evm login: root
    root@am335x-evm:~# v4l2-ctl --list-devices
    Microsoft?LifeCam Cinema(TM): (usb-musb-hdrc.1-1):
    /dev/video0

    root@am335x-evm:~# v4l2-ctl --all
    Driver Info (not using libv4l2):
    Driver name : uvcvideo
    Card type : Microsoft?LifeCam Cinema(TM):
    Bus info : usb-musb-hdrc.1-1
    Driver version: 4.14.79
    Capabilities : 0x84200001
    Video Capture
    Streaming
    Extended Pix Format
    Device Capabilities
    Device Caps : 0x04200001
    Video Capture
    Streaming
    Extended Pix Format
    Priority: 2
    Video input : 0 (Camera 1: ok)
    Format Video Capture:
    Width/Height : 640/480
    Pixel Format : 'YUYV'
    Field : None
    Bytes per Line : 1280
    Size Image : 54604226
    Colorspace : sRGB
    Transfer Function : Default
    YCbCr Encoding : Default
    Quantization : Default
    Flags :
    Crop Capability Video Capture:
    Bounds : Left 0, Top 0, Width 640, Height 480
    Default : Left 0, Top 0, Width 640, Height 480
    Pixel Aspect: 1/1
    Selection: crop_default, Left 0, Top 0, Width 640, Height 480
    Selection: crop_bounds, Left 0, Top 0, Width 640, Height 480
    Streaming Parameters Video Capture:
    Capabilities : timeperframe
    Frames per second: 0.003 (235/71291)
    Read buffers : 0
    brightness (int) : min=30 max=255 step=1 default=133 value=133
    contrast (int) : min=0 max=10 step=1 default=5 value=5
    saturation (int) : min=0 max=200 step=1 default=83 value=83
    white_balance_temperature_auto (bool) : default=1 value=1
    power_line_frequency (menu) : min=0 max=2 default=2 value=2
    white_balance_temperature (int) : min=2800 max=10000 step=1 default=4500 value=5632 flags=inactive
    sharpness (int) : min=0 max=50 step=1 default=25 value=25
    backlight_compensation (int) : min=0 max=10 step=1 default=0 value=1
    exposure_auto (menu) : min=0 max=3 default=1 value=3
    exposure_absolute (int) : min=5 max=20000 step=1 default=156 value=156 flags=inactive
    pan_absolute (int) : min=-201600 max=201600 step=3600 default=0 value=0
    tilt_absolute (int) : min=-201600 max=201600 step=3600 default=0 value=0
    focus_absolute (int) : min=0 max=40 step=1 default=0 value=0 flags=inactive
    focus_auto (bool) : default=0 value=1
    zoom_absolute (int) : min=0 max=10 step=1 default=0 value=0
    root@am335x-evm:~#

    And if I try the Capture command as yours, the kernel will crash, and never works.

    root@am335x-evm:~# gst-launch-1.0 -v v4l2src device=/dev/video0 num-buffers=10 ! 'video/x-raw,width=320,height=240,framerate=15/1' ! filesink location=test.yuv
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)15/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)15/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    /GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)15/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)320, height=(int)240, framerate=(fraction)15/1, format=(string)YUY2, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, colorimetry=(string)2:4:7:1
    [ 702.004978] INFO: rcu_preempt detected stalls on CPUs/tasks:
    [ 702.011387] (detected by 0, t=2102 jiffies, g=17530, c=17529, q=1)
    [ 702.018314] All QSes seen, last rcu_preempt kthread activity 2102 (40200-38098), jiffies_till_next_fqs=1, root ->qsmask 0x0
    [ 702.029808] thttpd R running task 0 738 1 0x00000000
    [ 702.037409] Backtrace:
    [ 702.040770] [<c010b6f0>] (dump_backtrace) from [<c010b9d4>] (show_stack+0x18/0x1c)
    [ 702.048827] r7:0000447a r6:c0d14bf0 r5:00000001 r4:ca129800
    [ 702.055132] [<c010b9bc>] (show_stack) from [<c014b7d4>] (sched_show_task.part.9+0xc4/0xdc)
    [ 702.063992] [<c014b710>] (sched_show_task.part.9) from [<c014f6c0>] (sched_show_task+0x1c/0x20)
    [ 702.073087] r5:c0d14bf0 r4:c0d15038
    [ 702.077210] [<c014f6a4>] (sched_show_task) from [<c017b130>] (rcu_check_callbacks+0x8e8/0x8f0)
    [ 702.086463] [<c017a848>] (rcu_check_callbacks) from [<c017f770>] (update_process_times+0x3c/0x64)
    [ 702.095859] r10:c018ef64 r9:00000000 r8:00000003 r7:000000a3 r6:00000000 r5:ca129800
    [ 702.104031] r4:ffffe000
    [ 702.107103] [<c017f734>] (update_process_times) from [<c018ed84>] (tick_sched_handle+0x5c/0x60)
    [ 702.116269] r7:000000a3 r6:727af36e r5:ca3299c8 r4:c0d16b00
    [ 702.122397] [<c018ed28>] (tick_sched_handle) from [<c018efc8>] (tick_sched_timer+0x64/0xd0)
    [ 702.131284] [<c018ef64>] (tick_sched_timer) from [<c0180370>] (__hrtimer_run_queues.constprop.5+0x150/0x1e8)
    [ 702.141591] r7:ffffe000 r6:c0d16440 r5:c0d16b00 r4:c0d16400
    [ 702.147725] [<c0180220>] (__hrtimer_run_queues.constprop.5) from [<c01806e0>] (hrtimer_interrupt+0x9c/0x248)
    [ 702.158101] r10:c0d164b8 r9:c0d16400 r8:ffffffff r7:7fffffff r6:00000003 r5:ffffe000
    [ 702.166268] r4:c0d16400
    [ 702.169391] [<c0180644>] (hrtimer_interrupt) from [<c01190ac>] (omap2_gp_timer_interrupt+0x30/0x38)
    [ 702.178985] r10:c0d4e9c0 r9:cf006200 r8:00000010 r7:ca32992c r6:00000000 r5:cf006200
    [ 702.187150] r4:c0d07e40
    [ 702.190216] [<c011907c>] (omap2_gp_timer_interrupt) from [<c016a6cc>] (__handle_irq_event_percpu+0x6c/0x140)
    [ 702.200550] [<c016a660>] (__handle_irq_event_percpu) from [<c016a7c4>] (handle_irq_event_percpu+0x24/0x60)
    [ 702.210729] r10:68a46ed1 r9:ca328000 r8:cf008000 r7:00000000 r6:00000000 r5:cf006200
    [ 702.218894] r4:cf006200
    [ 702.221885] [<c016a7a0>] (handle_irq_event_percpu) from [<c016a864>] (handle_irq_event+0x64/0x90)
    [ 702.231131] r5:00000010 r4:cf006200
    [ 702.235187] [<c016a800>] (handle_irq_event) from [<c016dc8c>] (handle_level_irq+0xb4/0x158)
    [ 702.243919] r5:00000010 r4:cf006200
    [ 702.248077] [<c016dbd8>] (handle_level_irq) from [<c01698dc>] (generic_handle_irq+0x2c/0x3c)
    [ 702.256882] r5:00000010 r4:c0d4d444
    [ 702.260942] [<c01698b0>] (generic_handle_irq) from [<c0169f94>] (__handle_domain_irq+0x5c/0xb0)
    [ 702.270151] [<c0169f38>] (__handle_domain_irq) from [<c0101464>] (omap_intc_handle_irq+0x3c/0x98)
    [ 702.279546] r9:ca328000 r8:c0847f70 r7:ca3299fc r6:ffffffff r5:600c0113 r4:c0d82130
    [ 702.287757] [<c0101428>] (omap_intc_handle_irq) from [<c010c58c>] (__irq_svc+0x6c/0xa8)
    [ 702.296114] Exception stack(0xca3299c8 to 0xca329a10)
    [ 702.301672] 99c0: ca242a00 00000002 00000000 ca329a18 00000000 00000000
    [ 702.310433] 99e0: ca242a00 ca129800 c0847f70 c08488d0 68a46ed1 ca329a4c ca329a50 ca329a18
    [ 702.319071] 9a00: c0847f70 c014bed0 600c0113 ffffffff
    [ 702.324478] r5:600c0113 r4:c014bed0
    [ 702.328655] [<c014be70>] (finish_task_switch) from [<c0847f70>] (__schedule+0x258/0x720)
    [ 702.337225] r8:ca593a80 r7:cf6448c0 r6:cf1ee400 r5:ca129800 r4:c0d0f800
    [ 702.344466] [<c0847d18>] (__schedule) from [<c08488d0>] (preempt_schedule_irq+0x58/0x84)
    [ 702.353071] r10:00000000 r9:ca328000 r8:c010c5a4 r7:ca329aec r6:ffffffff r5:400c0113
    [ 702.361244] r4:ffffe000
    [ 702.364256] [<c0848878>] (preempt_schedule_irq) from [<c010c5d0>] (svc_preempt+0x8/0x18)
    [ 702.372710] r5:400c0113 r4:c017feb4
    [ 702.376870] [<c084c0b4>] (schedule_hrtimeout_range_clock) from [<c084c214>] (schedule_hrtimeout_range+0x20/0x28)
    [ 702.387526] r8:00000000 r7:00000000 r6:00000000 r5:0000009f r4:ca329ce4
    [ 702.394863] [<c084c1f4>] (schedule_hrtimeout_range) from [<c0235eec>] (poll_schedule_timeout+0x48/0x74)
    [ 702.404825] [<c0235ea4>] (poll_schedule_timeout) from [<c0236cc8>] (do_sys_poll+0x3d0/0x560)
    [ 702.413598] r4:05f8ee00
    [ 702.416650] [<c02368f8>] (do_sys_poll) from [<c0237a14>] (SyS_poll+0x84/0x114)
    [ 702.424385] r10:000000a8 r9:ca328000 r8:c0107e44 r7:0000013f r6:8d4fe053 r5:0003ca58
    [ 702.432549] r4:00000001
    [ 702.435606] [<c0237990>] (SyS_poll) from [<c0107c40>] (ret_fast_syscall+0x0/0x54)
    [ 702.443544] r7:000000a8 r6:3b9aca00 r5:00000ff6 r4:00032368
    [ 702.449662] rcu_preempt kthread starved for 2102 jiffies! g17530 c17529 f0x2 RCU_GP_WAIT_FQS(3) ->state=0x402 ->cpu=0
    [ 702.460583] rcu_preempt I 0 8 2 0x00000000
    [ 702.466506] Backtrace:
    [ 702.469561] [<c0847d18>] (__schedule) from [<c08488d0>] (preempt_schedule_irq+0x58/0x84)
    [ 702.478171] r10:c0d14bf0 r9:cf05a000 r8:c010c5a4 r7:cf05becc r6:ffffffff r5:400c0113
    [ 702.486338] r4:ffffe000
    [ 702.489353] [<c0848878>] (preempt_schedule_irq) from [<c010c5d0>] (svc_preempt+0x8/0x18)
    [ 702.497808] r5:400c0113 r4:c084856c
    [ 702.501882] [<c0848550>] (preempt_schedule.part.2) from [<c0848598>] (preempt_schedule+0x28/0x2c)
    [ 702.511400] [<c0848570>] (preempt_schedule) from [<c015a478>] (prepare_to_swait+0x90/0x94)
    [ 702.520269] [<c015a3e8>] (prepare_to_swait) from [<c015a4b8>] (prepare_to_swait_event+0x3c/0x64)
    [ 702.529632] [<c015a47c>] (prepare_to_swait_event) from [<c0179720>] (rcu_gp_kthread+0x638/0xaa4)
    [ 702.539024] [<c01790e8>] (rcu_gp_kthread) from [<c0145d7c>] (kthread+0x15c/0x164)
    [ 702.546849] r7:cf05a000
    [ 702.549899] [<c0145c20>] (kthread) from [<c0107d28>] (ret_from_fork+0x14/0x2c)
    [ 702.557628] r10:00000000 r9:00000000 r8:00000000 r7:00000000 r6:00000000 r5:c0145c20
    [ 702.565768] r4:cf030700

    BR Rio