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.

Camera Support for omap3evm in Gingerbread

Hello, 

I am using the rowboat gingerbread (2.3) for my omap3evm board. Can 
anyone point me as how to access camera from the camera app? Someone 
suggested to make USE_CAMERA_STUB to false in BoardConfig.mk. But, 
still I am not able to access it. Is there something else I should do 
in order to access the camera. I could use gstreamer to view the 
camera but it would be really great if I can access the camera from 
the app. Any help would be appreciated. 

Thanks, 
Krishnan.

  • Hi,

    1. rowboat gingerbread devkit 1.0 release supports camera on beagleboard

    2. yes, USE_CAMERA_STUB=false, will enable camera port on android. But you need to build entire file system again.

    3. Which camera sensor you are using ? Does it have supported driver in kernel ?

    4. Kindly send us logcat output to analyze further

    -

    satish

  • Hi Satish,

     

    Thanks for your reply. I am using an analog sensor from optisoft. I get the following error when I try to access the camera from the app,

    "Sorry. the application Camera(process com.andoid.camera) has stopped
    unexpectedly.Please try again."

     

    My logcat shows this,

    D/CameraHardware(  885): Set Parameter...!!
    D/CameraHardware(  885): PreviewFormat yuv422sp
    D/CameraHardware(  885): PictureFormat jpeg
    D/CameraHardware(  885): preview width:640,height:480
    D/CameraHardware(  885): picture width:640,height:480
    D/CameraHardware(  885): FRAMERATE 15
    D/CameraHardware(  885): Picture Size by CamHAL 640 x 480
    D/CameraHardware(  885): Preview Resolution by CamHAL 640 x 480
    V/Camera  ( 2024): getParameters
    V/Camera  ( 2024): setParameters
    D/CameraHardware(  885): Set Parameter...!!
    D/CameraHardware(  885): PreviewFormat yuv422sp
    D/CameraHardware(  885): PictureFormat jpeg
    D/CameraHardware(  885): preview width:640,height:480
    D/CameraHardware(  885): picture width:640,height:480
    D/CameraHardware(  885): FRAMERATE 15
    D/CameraHardware(  885): Picture Size by CamHAL 640 x 480
    D/CameraHardware(  885): Preview Resolution by CamHAL 640 x 480
    V/camera  ( 2024): startPreview
    V/Camera  ( 2024): startPreview
    D/CameraHardware(  885): enableMsgType:16
    D/CameraHardware(  885): 249: startPreview() ENTER
    D/V4L2Camera(  885): 60: Open() ENTER
    D/V4L2Camera(  885): 93: Open() EXIT
    D/CameraHardware(  885): startPreview width:640,height:480
    D/V4L2Camera(  885): 99: Configure() ENTER
    D/V4L2Camera(  885): CameraConfigure PreviewFormat: w=720 h=480
    D/V4L2Camera(  885): CameraConfigure: Old frame rate is 30000/1001  fps
    E/V4L2Camera(  885): VIDIOC_S_PARM  Fail....
    D/V4L2Camera(  885): 141: Configure() EXIT
    E/CameraHardware(  885): Fail to configure camera device

    Any idea why VIDIOC_S_PARM fails?

    Thanks,
    Krishnan.

  • Hi Krishnan,

    There could be some issue with camera configuration.

    1. You are opening camera device , with 720x480 : Is it supported by driver or V4l2 framework?

    2. Also, you need to see color format you are passing to camera driver/v4l2 driver? Which format you are trying : V4L2_PIX_FMT_YUYV or V4L2_PIX_FMT_UYVY or ??

    3. Have you ever tested driver with test app?

    4. It would be helpful if you send CameraHardware.cpp and v4l2.cpp files. Because only thing you need to change parameters at camera configuration?

    Let me know if you need more assist.

     

    Br,

    satish

     

  • Hi,satish, i'm useing the mt9p031 for the camera in 2.3.4android(rowboat-dsp,kernel2.6.37),i modified the CameraHardware.cpp and V4L2camera.cpp to support the mt9p031 camera sensor.But there were something issue:

    1,the mt9p031 pix format is 12bit bayer output. i modify the DEF_PIX_FMT=V4L2_PIX_FMT_SGRBG12 in v4l2camera.cpp,build the libcamera,report err like this "hardware/ti/omap3/camera/V4L2Camera.cpp:421:error 'V4L2_PIX_FMT_SGRBG12'  was not declared in the scope.".but i changed it to  DEF_PIX_FMT=V4L2_PIX_FMT_SGRBG10,the libcamera build successfully.did it not support the  V4L2_PIX_FMT_SGRBG12?

    2,i searth the internet,found the dm365 build-in mt9p031 driver,used V4L2_PIX_FMT_SGRBG10.but the android HAL was the YUV422 to yuv420,i think if there is a  algorithm in dm365 to bayer SGRBG10 convert to yuv420sp?

    if there has the algorithm,would you like to post it? thanks

    jery