Failed to make TVP5150 work with MX515 while CSI0 in interlaced mode

Showing results for 
Search instead for 
Did you mean: 

Failed to make TVP5150 work with MX515 while CSI0 in interlaced mode

Contributor IV


We are currently working with TVP5150 on MX515 platform.

The Linux kernel is 2.6.31. And we managed to make TVP5150 work well

while CSI0 of MX51 is in BT656 progressive mode. In this way, MX51 treats each

field from TVP5150 as a separate frame.

The CSI0_SENS_FRM_SIZE is set to 720x( 288+24),

and CSI0_ACT_FRM_SIZE is set to 720x288.

By now, we use the CSI->IC->MEM channel

and everything is OK.

But since TVP5150 outputs in BT656 interlaced mode,

a natural idea is to make MX515 CSI0 also work in BT656  interlaced mode.

So we try to set CSI0_SENS_FRM_SIZE to 720x576,

and set CSI0_ACT_FRM_SIZE to 720x288 while CSI0 is in interlaced mode.

Unfortunately, in this way we can not get video data.

Here is part of our mxc_v4l2_capture.c:

/ * Description of video formats supported.


  *  PAL: raw=720x625, active=720x576.

  *  NTSC: raw=720x525, active=720x480.


  static video_fmt_t video_fmts[] = {

      {           /*! NTSC */

       .v4l2_id = V4L2_STD_NTSC,

       .name = "NTSC",

       .raw_width = 720,      /* SENS_FRM_WIDTH */

       .raw_height = 525,     /* SENS_FRM_HEIGHT */

       .active_width = 720,       /* ACT_FRM_WIDTH plus 1 */

       .active_height = 480,  /* ACT_FRM_HEIGHT plus 1 */

       .active_top = 13,

       .active_left = 0,


      {           /*! (B, G, H, I, N) PAL */

      .v4l2_id = V4L2_STD_PAL,

       .name = "PAL",

       .raw_width = 720,          /* SENS_FRM_WIDTH */

       .raw_height = 625,         /* SENS_FRM_HEIGHT */

       .active_width = 720,       /* ACTV_FRM_WIDTH */

       .active_height = 576,      /* ACTV_FRM_HEIGHT */

       .active_top = 0,

       .active_left = 0,


      {           /*! Unlocked standard */

       .v4l2_id = V4L2_STD_ALL,

       .name = "Autodetect",

       .raw_width = 720,

       .raw_height = 625,

       .active_width = 720,

       .active_height = 576,

       .active_top = 0,



Since raw_width/height are used to set CSI0_SENS_FRM_WIDTH/HEIGHT,

and active_width/height are used to set CSI0_ACT_FRM_WIDTH/HEIGHT,

so is the upper setting correct?

If I would like to use one field  ( odd field or even field is ok) to replace the whole frame,

should I set CSI0_SENS_FRM_WIDTH/HEIGHT to 720x656 and



set CSI0_SENS_FRM_WIDTH/HEIGHT to 720x576 and



Labels (3)
4 Replies

NXP Employee
NXP Employee

Your 2.6.31 BSP is too older, in fact in new iMX5 2.6.35 BSP, the interlaced CSI input and de-interlace function was already supported. It was tested with adv7180, all IPU side codes are re-used for all TVin sensors.

The lasted 2.6.35 BSP is L2.6.35_11_09_ER_SOURCE which can be used for both iMX51 and iMX53, it can be downloaded from freescale web site.

Contributor IV

Thanks for your information.

I will try the new BSP!

0 Kudos

NXP Employee
NXP Employee

In 2.6.35 kernel, for the interlaced input, the two fields will be merged into one frame in v4l2 capture driver, so the application will get a 720*480 frame for NTSC input. Then application can use IPU to de-interlace this frame.

The sample application can be found in the unit test code: mxc_v4l2_tvin.c.

Some useful discusstion:

0 Kudos

Contributor IV

The patches posted by

are mainly for Android BSP.

Are there similar patches for deinterlacing CSI image capturing for ADV7180 on MX6Q?

The latest BSP ( L3.0.25_4.1.0) does not include support for deinterlacing on the image capture path.

Any idea?

0 Kudos