Hi,
I'm trying to add support for OV7670 sensor in LB-DM368. The foll. are the configurations that I'm using:
Board: Leopardboard DM368
Kernel: linux-2.6.32.17-psp03.01.01.39
Sensor: OV7670 (16 pin module- without FIFO)
I've modified few lines in kernel files as follows:
1. /arch/arm/mach-davinci/board-dm368-leopard.c:
#if defined(CONFIG_VIDEO_OV7670) || defined(CONFIG_VIDEO_OV7670_MODULE)
/* Input available at the ov7670 */
static struct v4l2_input ov7670_inputs[] = {
{
.index = 0,
.name = "Camera",
.type = V4L2_INPUT_TYPE_CAMERA,
}
};
#endif
static struct vpfe_subdev_info vpfe_sub_devs[] = {
#if defined(CONFIG_VIDEO_OV7670) || defined(CONFIG_VIDEO_OV7670_MODULE)
{
.module_name = "ov7670",
//.is_camera = 1,
.grp_id = VPFE_SUBDEV_OV7670,
.num_inputs = ARRAY_SIZE(ov7670_inputs),
.inputs = ov7670_inputs,
.ccdc_if_params = {
.if_type = VPFE_RAW_BAYER,
.hdpol = VPFE_PINPOL_POSITIVE,
.vdpol = VPFE_PINPOL_POSITIVE,
},
.board_info = {
I2C_BOARD_INFO("ov7670", 0x21),
.platform_data = (void *)1,
},
},
#endif
};
2. /media/video/davinci/vpfe-capture.c:
In function static int vpfe_config_ccdc_image_format(struct vpfe_device *vpfe_dev),
commented out: //pix_fmt = vpfe_dev->fmt.fmt.pix.pixelformat;
/* At CCDC we need to set pix format based on source. */
/* if (vpfe_dev->imp_chained) {
if (vpfe_dev->current_subdev->is_camera)
pix_fmt = V4L2_PIX_FMT_SBGGR16;
else if (pix_fmt == V4L2_PIX_FMT_NV12)
pix_fmt = V4L2_PIX_FMT_UYVY;
}
*/
and added:
pix_fmt = V4L2_PIX_FMT_YUYV;
Then I tried running a gstreamer pipeline to capture a single frame:
#FILE_NAME=VGA_jpeg_file.jpg
#gst-launch -e v4l2src always-copy=false num-buffers=1 chain-ipipe=true ! video/x-raw-yuv,format=\(fourcc\)UYVY, width=640, height=480 ! ffmpegcolorspace ! dmaienc_jpeg !filesink location=$FILE_NAME
Output:
Setting pipeline to PAUSED ...
davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:1:124
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not open device '/dev/video0' for reading and writing.
Additional debug info:
../../../src/sys/v4l2/v4l2_calls.c(587): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
system error: No such device
Setting pipeline to NULL ...
Freeing pipeline ...
But /dev/video0 is there if I try ls /dev/video*.
What am i missing here? Can anyone please guide me how to proceed?
Regards,
Diwakar