R-Car/Boards/Yocto-Gen3-CommonFAQ/How to use USB camera on Starter Kit.

From eLinux.org
Jump to: navigation, search

How to use USB camera on Starter Kit.

Please refer to the steps below.

  1. Edit kernel configulation
    # bitbake linux-renesas -c do_menuconfig
    
    Device Drivers --> Multimedia support  ---> [*] Media USB Adapters
            [*] USB Video Class (UVC)
            [*] UVC input events device support (NEW)
    
  2. bitbake
      # bitbake linux-renesas -c compile -f
      # bitbake core-image-weston
    
  3. Run
      root@h3ulcb:~# gst-launch-1.0 v4l2src device=/dev/video16 ! videoconvert ! waylandsink
    
    videoN: Please set according to your environment.

Note: How to check whether UVC driver is enabled or not.
If there is no output, UVC driver is not enabled.

  1. root@h3ulcb:~# zcat /proc/config.gz | grep USB_VIDEO
    CONFIG_USB_VIDEO_CLASS=y
    CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
    
  2. root@h3ulcb:~# root@h3ulcb:~# dmesg | grep uvcvideo
    [ 1.766632] usbcore: registered new interface driver uvcvideo
    

Note: How to know camera device(videoN).

root@h3ulcb:~# v4l2-ctl --list-devices
fe920000.vsp rpf.0 input (platform:fe920000.vsp):
        /dev/video6
        /dev/video7
        /dev/video8
        /dev/video9
        /dev/video10
        /dev/video11

fe960000.vsp rpf.0 input (platform:fe960000.vsp):
        /dev/video0
        /dev/video1
        /dev/video2
        /dev/video3
        /dev/video4
        /dev/video5

fe9a0000.vsp rpf.0 input (platform:fe9a0000.vsp):
        /dev/video12
        /dev/video13

fe9b0000.vsp rpf.0 input (platform:fe9b0000.vsp):
        /dev/video14
        /dev/video15

USB Video: USB Video (usb-ee0a0100.usb-1):
        /dev/video16