AnsweredAssumed Answered

i.MX6D using CSI BT656 capture in progressive mode

Question asked by Herve Schmitt on Jan 14, 2014
Latest reply on Apr 30, 2014 by XXiao1z
Branched to a new discussion

Hi all,

We have a custom i.MX6Dual board on which we receive 2 BT656 PAL video flows. These flows are decoded by an AVD7280 video decoder chip on each channel which provides either:

  • A BT656 interlaced video flow at 25 fps,
  • Or a BT656 progressive video flow at 50 fps (the progressive conversion being performed by the ADV7280 itself, which is a nice feature but unfortunately available only at 50 fps).

The kernel used is Linux 3.0.35_4.0.0.


Interlaced at 25 fps : OK

We can successfully read the interlaced video flow at 25 fps using either:

mxc_v4l2_tvin -ow 720 -oh 576 -vi 0 -vo 17 -dv   ### CSI0 -> HDMI

mxc_v4l2_tvin -ow 720 -oh 576 -vi 1 -vo 17 -dv   ### CSI1 -> HDMI


  • A gstreamer pipeline streaming to an external host having IP (both instances can run simultaneously in this case):
gst-launch -v --gst-debug=2 -e mfw_v4lsrc device=/dev/video0 fps-n=25 input=1 ! vpuenc codec=avc framerate-nu=25 bitrate=4194304 ! rtph264pay ! udpsink host= port=5000 sync=false -v &
gst-launch -v --gst-debug=2 -e mfw_v4lsrc device=/dev/video1 fps-n=25 input=1 ! vpuenc codec=avc framerate-nu=25 bitrate=4194304 ! rtph264pay ! udpsink host= port=5002 sync=false -v &


Progressive at 50 fps : KO

When activating the I2P feature (using Analog Devices provided scripts that we assume reliable), we can’t read the video flow anymore using either application.

The main change we have tried is:

diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c

index d21f847..05fcede 100644


Index: drivers/media/video/mxc/capture/mxc_v4l2_capture.c


--- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c

+++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c

@@ -1343,10 +1343,14 @@ static int mxc_v4l2_s_param(cam_data *cam, struct v4l2_streamparm *parm)

        csi_param.mclk = 0;


        pr_debug("   clock_curr=mclk=%d\n", ifparm.u.bt656.clock_curr);

+#if 0

        if (ifparm.u.bt656.clock_curr == 0)

                csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_INTERLACED;


                csi_param.clk_mode = IPU_CSI_CLK_MODE_GATED_CLK;


+       csi_param.clk_mode = IPU_CSI_CLK_MODE_CCIR656_PROGRESSIVE;



        csi_param.pixclk_pol = ifparm.u.bt656.latch_clk_inv;


We have also tried a few other changes in our driver without any success (sensor’s streamcap.timeperframe.denominator set to 50 instead of 25, testing a few bt656 structure member changes or PAL attributes) but nothing works… It always fails in the VIDIOC_DQBUF ioctl, and it looks like the video frames of the capture device are ignored!



Has anybody successfully read PAL progressive video frames on BT656 at 50 fps?

By checking on i.MX community, we saw Switching CSI into Progressive bt.656 Mode mentioning successful support of the TW9912 (competitor of the ADV7280) but on 2.6.35 and on an unspecified type of CPU.

We also checked Q&A: Is it really possible to implement the BT656 with SAV / EAV and without external HSYNC/VSYNC? explaining it doesn’t work on i.MX6Q and our feeling is similar.

Any suggestion?