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.

UVC Camera on BeagleBoneBlack does not achieve good resolutions for preview


Hi,

I'm facing a problem on BeagleBoneBlack. For capturing pictures on a USB UVC capture board camera I have to stick with a camera preview streaming with a very low resolution of 320x240 otherwise I cannot get the camera preview streaming.

I'm using Rowboat Android and a v4l2 camera hardware HAL. 

However the same camera achieve 640x480 preview on other devices. 

Not sure where to start investigating, might be it a kernel issue (it's odd because on the other devices the kernel is older). 

Or is there any hardware issue on BBB?

Any suggestions would help a lot.

Thanks.

-- 
Regards,
Coutinho
www.phiinnovations.com

  • Hi Rafael,

    Can you please provide us the logcat/dmesg output when you "cannot get the camera preview streaming.".

    Thanks,
  • Here is the DMESG when connecting the capture board:

    http://pastebin.com/H6A3ZTvn

    Here is the Logcat on connection:

    http://pastebin.com/8dNXCNEj

    Using 320x240 preview that works fine:
    Logcat:
    http://pastebin.com/q5C99nfP
    No messages in dmesg.

    Using 640x480 preview that makes a preview that keeps alternating with a black screen (about 3s black, 1 good frame, 3 seconds black another frame):

    Logcat:
    http://pastebin.com/EfA1yuaE

    Dmesg I found this:
    <3>[ 769.963012] uvcvideo: Failed to query (SET_CUR) UVC control 2 on unit 3: -110 (exp. 2).

    I think v4l2 control list of formats, we are using YUYV format:

    ioctl: VIDIOC_ENUM_FMT
    Index : 0
    Type : Video Capture
    Pixel Format: 'MJPG' (compressed)
    Name : MJPEG
    Size: Discrete 640x480
    Interval: Discrete 0.033s (30.000 fps)
    Interval: Discrete 1.000s (1.000 fps)
    Size: Discrete 320x240
    Interval: Discrete 0.033s (30.000 fps)
    Interval: Discrete 1.000s (1.000 fps)
    Size: Discrete 640x480
    Interval: Discrete 0.033s (30.000 fps)
    Interval: Discrete 1.000s (1.000 fps)

    Index : 1
    Type : Video Capture
    Pixel Format: 'YUYV'
    Name : YUV 4:2:2 (YUYV)
    Size: Discrete 640x480
    Interval: Discrete 0.033s (30.000 fps)
    Interval: Discrete 1.000s (1.000 fps)
    Size: Discrete 320x240
    Interval: Discrete 0.033s (30.000 fps)
    Interval: Discrete 1.000s (1.000 fps)
    Size: Discrete 640x480
    Interval: Discrete 0.033s (30.000 fps)
    Interval: Discrete 1.000s (1.000 fps)

    Any ideas of where I should investigate more?

    I suspect of BBB USB transferring rate... but...
  • Using another capture board it can achieve 640x480.

    Here is the DMESG for this other capture board:
    <3>[ 133.684844] uvcvideo: Failed to resubmit video URB (-1).
    <6>[ 135.839324] usb 1-1.1: USB disconnect, device number 3
    <6>[ 140.173187] usb 1-1.1: new high-speed USB device number 7 using musb-hdrc
    <6>[ 140.362792] usb 1-1.1: New USB device found, idVendor=0000, idProduct=5001
    <6>[ 140.370025] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=3
    <6>[ 140.377685] usb 1-1.1: Product: Spac_2089 SS4E5
    <6>[ 140.383972] usb 1-1.1: SerialNumber: 20130208
    <6>[ 140.522888] uvcvideo: Found UVC 1.00 device Spac_2089 SS4E5 (0000:5001)
    <6>[ 140.567840] input: Spac_2089 SS4E5 as /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/1-1.1/1-1.1:1.0/input/input2

    Logcat:
    http://pastebin.com/ddWH2pNF

    However it is odd that both capture boards work fine using 640 preview on other devices
  • Hi Rafael,

    The UVCVideo driver available on the kernel is pretty old, and the webcam you are trying to support, Apple iSight, may have bugs with this version.

    Please take a look at "kernel backport project" (drvbp1.linux-foundation.org/.../backports), and try the latest version of uvcvideo.
  • HI,

    I have tried to deploy backport to Rowboat, but it looks like Rowboat kernel is not up to date with 3.2 stream. So when I try to execute the backport integration it complains of thinkgs like usb.h not having an interface.

    Did you manage to backpory any kernel to this android ?

  • Hi,

    Can you please provide me the output of : "adb shell dumpsys media.camera" ?

    Regarding the backport issue, what is the version of the kernel on the board where the camera is working fine?

    Thanks,
  • Actually I don't know which version it could work fine. In my ubuntu it works well and kernel is 3.13. I was trying to put a newer kernel based on the feedback in this thread.