AnsweredAssumed Answered

Capturing BT1120 192x1080 Interlaced video on Parallel CSI using Kernel 3.10

Question asked by Isaac Nickaein on Jun 20, 2015
Latest reply on Jul 6, 2015 by Wigros Sun



I am trying to capture a BT1120 16bit video stream with embedded sync in with 1920x1080 Interlaced format. The input interface is the Parallel CSI interface. The pin connection is according to Support BT1120 progressive mode in Mx6Q .


What I have done so far in kernel 3.10.17 BSP:


  1. Enabled CSI related modules in kernel menuconfig under Device Drivers > Multimedia > V4L2
  2. Modified ov5640.c driver to remove codes related to I2C and regulators
  3. Set pixel format of ov5640.c to V4L2_PIX_FMT_YUYV (ov5640_data.pix.pixelformat = V4L2_PIX_FMT_YUYV)
  4. Set resolution to 1920x1080 in ov5640.c
  5. Set the IPU settings so that CSI_SENS_CONF = 0x80000970 and CSI_ACT_FRM_SIZE = 0x0437077F.
  6. Set the following settings in ov5640.c:


p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_BT_8BIT;

p->u.bt656.bt_sync_correct = 0;  /* Indicate external vsync */

p->u.bt656.clock_curr = 0;


   7. Set csi_param.mclk (in mxc_v4l2_capture.c) and ov5640_data.mclk (in ov5640.c) to 74250000.

   8. Set the following in mxc_v4l2_capture.c


csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR1120_INTERLACED_SDR;

csi_param.data_width = IPU_CSI_DATA_WIDTH_8;

csi_param.ext_vsync = 0;

csi_param.Vsync_pol = 0;

csi_param.Hsync_pol = 0;

csi_param.pixclk_pol = 0;

csi_param.data_pol = 0;

csi_param.mclk = 74250000;


I have tried changing the data polarity and data_enable polarity, but I always get the following error:



root@imx6qsabresd:~# GST_DEBUG=*:2 gst-launch -v mfw_v4lsrc capture-mode=5 fps-n=15 num-buffers=1 !  jpegenc ! filesink location=sample.jpeg

MFW_GST_V4LSRC_PLUGIN 3.0.11 build on May 23 2015 15:00:36.

Setting pipeline to PAUSED ...

/GstPipeline:pipeline0/MFWGstV4LSrc:mfwgstv4lsrc0.GstPad:src: caps = video/x-raw-yuv, format=(fourcc)I420, width=(int)1920, height=(int)1080, framerate=(fraction)15/1, pixel-aspect-ratio=(fraction)1/1

Pipeline is live and does not need PREROLL ...

Setting pipeline to PLAYING ...

New clock: GstSystemClock

0:00:11.336852668   468   0xee26c0 ERROR             mfw_v4lsrc /home/isaac/Desktop/yocto/dizzy3/fsl-community-bsp/build/tmp/work/imx6qsabresd-poky-linux-gnueabi/gst-fsl-plugin/3.0.11-r0/gst-fsl-plugins-3.0.11/src/misc/v4l_source/src/mfw_gst_v4lsrc.c:1243:mfw_gst_v4lsrc_buffer_new: >>V4L_SRC: VIDIOC_DQBUF failed.

0:00:11.337536668   468   0xee26c0 WARN                 basesrc /home/isaac/Desktop/yocto/dizzy3/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:2625:gst_base_src_loop:<mfwgstv4lsrc0> error: Internal data flow error.

0:00:11.337859335   468   0xee26c0 WARN                 basesrc /home/isaac/Desktop/yocto/dizzy3/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c:2625:gst_base_src_loop:<mfwgstv4lsrc0> error: streaming task paused, reason error (-5)

ERROR: from element /GstPipeline:pipeline0/MFWGstV4LSrc:mfwgstv4lsrc0: Internal data flow error.

Additional debug info:

/home/isaac/Desktop/yocto/dizzy3/fsl-community-bsp/build/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesrc.c(2625): gst_base_src_loop (): /GstPipeline:pipeline0/MFWGstV4LSrc:mfwgstv4lsrc0:

streaming task paused, reason error (-5)

Execution ended after 10024113668 ns.

Setting pipeline to PAUSED ...

Setting pipeline to READY ...

/GstPipeline:pipeline0/MFWGstV4LSrc:mfwgstv4lsrc0.GstPad:src: caps = NULL

Setting pipeline to NULL ...

Freeing pipeline ...