]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (11419): gspca - m5602-ov9650: Don't read exposure data from COM1.
authorErik Andr?n <erik.andren@gmail.com>
Wed, 31 Dec 2008 10:25:42 +0000 (07:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 7 Apr 2009 00:44:43 +0000 (21:44 -0300)
ov9650: Reading the COM1 register corrupts the image.
Decrease the granularity of the exposure and limit its upper range
as setting such high values doesn't have any effect on the image.

Signed-off-by: Erik Andr?n <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/m5602/m5602_ov9650.c
drivers/media/video/gspca/m5602/m5602_ov9650.h

index de45649c739c4247e5423bd05f98d3c460c08130..da6b72a7cf6f2becb9b207ba308b44afc5f6d226 100644 (file)
@@ -75,8 +75,8 @@ const static struct ctrl ov9650_ctrls[] = {
                        .type           = V4L2_CTRL_TYPE_INTEGER,
                        .name           = "exposure",
                        .minimum        = 0x00,
-                       .maximum        = 0xffff,
-                       .step           = 0x1,
+                       .maximum        = 0x1ff,
+                       .step           = 0x4,
                        .default_value  = EXPOSURE_DEFAULT,
                        .flags          = V4L2_CTRL_FLAG_SLIDER
                },
@@ -407,11 +407,6 @@ int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
        u8 i2c_data;
        int err;
 
-       err = m5602_read_sensor(sd, OV9650_COM1, &i2c_data, 1);
-       if (err < 0)
-               return err;
-       *val = i2c_data & 0x03;
-
        err = m5602_read_sensor(sd, OV9650_AECH, &i2c_data, 1);
        if (err < 0)
                return err;
index 08ae7ea96ffa22bbb3217119b9b377e386bda2c9..ca0e42ee05ceb395d68f91b104e4e52810d1b446 100644 (file)
 #define GAIN_DEFAULT                   0x14
 #define RED_GAIN_DEFAULT               0x70
 #define BLUE_GAIN_DEFAULT              0x20
-#define EXPOSURE_DEFAULT               0x5003
+#define EXPOSURE_DEFAULT               0x1ff
 
 /*****************************************************************************/