]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MLK-9997-1 ov5640: function enhancement
authorSandor Yu <R01008@freescale.com>
Mon, 15 Dec 2014 08:07:01 +0000 (16:07 +0800)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:18:49 +0000 (21:18 -0600)
-Add V4L2_FRMIVAL_TYPE_DISCRETE setting in ov5640_enum_framesizes.
-Correct pixelformat setting.

Signed-off-by: Sandor Yu <R01008@freescale.com>
drivers/media/platform/mxc/subdev/ov5640.c

index 11831411ecc034014c2412694a9338fcee1fffe7..49289603137d1c7b0737b2faae6c0ae66324d9e0 100644 (file)
@@ -1637,7 +1637,7 @@ static int ov5640_enum_framesizes(struct v4l2_subdev *sd,
        if (fsize->index > ov5640_mode_MAX)
                return -EINVAL;
 
-       fsize->pixel_format = ov5640_data.pix.pixelformat;
+       fsize->type = V4L2_FRMSIZE_TYPE_DISCRETE;
        fsize->discrete.width =
                        max(ov5640_mode_info_data[0][fsize->index].width,
                            ov5640_mode_info_data[1][fsize->index].width);
@@ -1840,7 +1840,7 @@ static int ov5640_probe(struct i2c_client *client,
 
        ov5640_data.io_init = ov5640_reset;
        ov5640_data.i2c_client = client;
-       ov5640_data.pix.pixelformat = V4L2_MBUS_FMT_YUYV8_2X8;
+       ov5640_data.pix.pixelformat = V4L2_PIX_FMT_YUYV;
        ov5640_data.pix.width = 640;
        ov5640_data.pix.height = 480;
        ov5640_data.streamcap.capability = V4L2_MODE_HIGHQUALITY |