AnsweredAssumed Answered

IMX6q video capture

Question asked by Andre Kilian on Apr 25, 2018
Latest reply on Apr 27, 2018 by Andre Kilian

we are trying to capture video using a TW9910 on our custom IMX6q board (We run Android 5.0.2).
Even though we used the recommended configuration for TW9910 (BT656) we were not able to capture the correct test pattern we are using as an input.
(Test pattern Generator ----> TW9910 -----(BT656)----> imx6q CSI0)


We were able to capture a video using the camera app and also used "mxc-v4l2-tvin -ow 720 -oh 480 -ot 1 -ol 1 -f UYVY" which produced the same result on our display.
However the video is not right (see attachment), it might be a connection issue with our custom board,
the connections of the TW9910 to our board are the pixelclock and 8 data lines like this:


TW9910        IMX6q-Board
VD8    --->    CSIO0_DAT12
VD9    --->    CSIO0_DAT13
VD10    --->    CSIO0_DAT14
VD11    --->    CSIO0_DAT15
VD12    --->    CSIO0_DAT16
VD13    --->    CSIO0_DAT17
VD14    --->    CSIO0_DAT18
VD15    --->    CSIO0_DAT19


Are these connections correct or do they need to be inverted? (VD8 ---> CSIO0_DAT19 ... VD15 ---> CSIO0_DAT12)
Is there any other reason why our test pattern cannot be captured?


Here is what our driver passes on

In our driver probe:

    /* Set initial values for the sensor struct. */
    memset(&adv7180_data, 0, sizeof(adv7180_data));
    adv7180_data.sen.i2c_client = client;
    adv7180_data.sen.streamcap.timeperframe.denominator = 30;
    adv7180_data.sen.streamcap.timeperframe.numerator = 1;
    adv7180_data.std_id = V4L2_STD_NTSC;
    video_idx = ADV7180_NTSC;
    adv7180_data.sen.pix.width = video_fmts[video_idx].raw_width;
    adv7180_data.sen.pix.height = video_fmts[video_idx].raw_height;
    adv7180_data.sen.pix.pixelformat = V4L2_PIX_FMT_UYVY; /* YUV422 */
    //adv7180_data.sen.pix.pixelformat = V4L2_PIX_FMT_RGB565;//(RGB for Test Generator)
    adv7180_data.sen.pix.priv = 1;  /* 1 is used to indicate TV in */
    adv7180_data.sen.on = true;


In ioctl_g_ifparm

    /* Initialize structure to 0s then set any non-0 values. */
    memset(p, 0, sizeof(*p));
    p->if_type = V4L2_IF_TYPE_BT656; /* This is the only possibility. */
    p->u.bt656.mode = V4L2_IF_TYPE_BT656_MODE_BT_8BIT;
    p->u.bt656.bt_sync_correct = 0;
    p->u.bt656.clock_curr = 0;


Here is some IPU Debug

<7>imx-ipuv3 2400000.ipu: IPU_CLK_RATE = 264000000
<7>imx-ipuv3 2400000.ipu: CSI_SENS_CONF = 0x00000A30
<7>imx-ipuv3 2400000.ipu: CSI_SENS_FRM_SIZE = 0x020C02CF
<7>imx-ipuv3 2400000.ipu: CSI_ACT_FRM_SIZE = 0x01DF02CF