MIPI CSI2 - MEM_PRP_VF_MEM question

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MIPI CSI2 - MEM_PRP_VF_MEM question

5,052 Views
meflo
Contributor II

Hi everybody,

I am trying to get some video capture working using MIPI CSI2 and I am having the following issue.

I am able to capture video, but the video is in a grid view of 2 x 2. Meaning, the video is shown 4 times, each window smaller, side by side in a grid instead of the normal picture.

I am using "CSI MEM":

static struct v4l2_input mxc_capture_inputs[MXC_V4L2_CAPTURE_NUM_INPUTS] = {

        {

         .index = 0,

         .name = "CSI IC MEM",

         .type = V4L2_INPUT_TYPE_CAMERA,

         .audioset = 0,

         .tuner = 0,

         .std = V4L2_STD_UNKNOWN,

         .status = 0,

         },

        {

         .index = 1,

         .name = "CSI MEM",

         .type = V4L2_INPUT_TYPE_CAMERA,

         .audioset = 0,

         .tuner = 0,

         .std = V4L2_STD_UNKNOWN,

         .status = V4L2_IN_ST_NO_POWER,

         },

};

My sensor is outputting YUV422 and I do not need any preprocessing done (don't need to resize the video or rotate it).

But apparently the stream goes through MEM_PRP_VF_MEM somehow, and that is why I get the grid view video in the end.

ipu_init_channel() inits the channel as MEM_PRP_VF_ENC.

How could I not use PRP VF so the YUV422 stream from the sensor is available to v4l2 capture as is?

Thanks

Labels (3)
0 Kudos
27 Replies

833 Views
meflo
Contributor II

Hi Qiang, thanks for your reply. Had it working like that but thought it was not really the way to do it. But for now it works like that so it's good enough. Thanks for your answers and time.

0 Kudos

838 Views
meflo
Contributor II

Were you using nongated mode, gated or bt656 sync?

I mean, in the driver's ioctl_g_ifparm() do you set p->u.bt656.clock_curr? Depending on that, in mxc_v4l2_capture.c, the timing mode is defined.

The reason I ask is because if I try on virtual channel 0, with clock_curr not set in my driver, I get timeout on vc 0 as well. If I set some non zero value to clock_curr, then it does not timeout but I get very very messy image.

0 Kudos

838 Views
meflo
Contributor II

So,

as I am using virtual channel 1, I do not need to change GPR1 (I am on imx6 quad by the way).

Without your patch I get a grid image, like the one I mentioned in my second comment. With your patch, I get the error above. When I applied your patch, I only did the changes to ipu_capture.c, as I still want my decoder to sent data to imx on IPU1 (first ipu) CSI 1 (so virtual channel 1).

0 Kudos

838 Views
shanmugamsundar
Contributor IV

Hi Meton,

Are you using gstreamer command to capture the video? If so can you please provide the command line which you used for capturing

Thanks,

shan

0 Kudos

838 Views
meflo
Contributor II

Hi Shan,

I am using mxc_v4l2_tvin

0 Kudos

838 Views
shanmugamsundar
Contributor IV

Hi Meton,

what are all the arguments you are passing as input to your mxc_v4l2_tvin ?

Is that arguments contains the cap_mode i have check the original file which i downloaded form the net. In that i didn't see any argument like cap_mode

I have also come across with the same error which you are facing, but i used gstreamer, in that i missed the Cap_mode  in my command line. so, can you please check by sending cap_mode

For eg:- ./mxc_v4l2_tvin -ow 640 -ow480 -oc 0

oc = cap_mode and 0 is for 640x480 resolution

Thanks,

shan

0 Kudos

838 Views
meflo
Contributor II

Using mxc_v4l2_tvin -ow 640 -ow480 -oc 0 I get the same timeout error with Qiang's patch.

0 Kudos