aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorErik Andr?n <erik.andren@gmail.com>2008-12-31 05:25:42 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:44:43 -0400
commit7136e705d8db46f22657523ee108be35c59ce3e9 (patch)
tree8436673f4d62ca6ef859636ea3492ede0c8604ed /drivers/media
parent5a0489b3beb9de0c42f2a93113d6bd148473ac9b (diff)
V4L/DVB (11419): gspca - m5602-ov9650: Don't read exposure data from COM1.
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>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov9650.c9
-rw-r--r--drivers/media/video/gspca/m5602/m5602_ov9650.h2
2 files changed, 3 insertions, 8 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.c b/drivers/media/video/gspca/m5602/m5602_ov9650.c
index de45649c739..da6b72a7cf6 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov9650.c
+++ b/drivers/media/video/gspca/m5602/m5602_ov9650.c
@@ -75,8 +75,8 @@ const static struct ctrl ov9650_ctrls[] = {
75 .type = V4L2_CTRL_TYPE_INTEGER, 75 .type = V4L2_CTRL_TYPE_INTEGER,
76 .name = "exposure", 76 .name = "exposure",
77 .minimum = 0x00, 77 .minimum = 0x00,
78 .maximum = 0xffff, 78 .maximum = 0x1ff,
79 .step = 0x1, 79 .step = 0x4,
80 .default_value = EXPOSURE_DEFAULT, 80 .default_value = EXPOSURE_DEFAULT,
81 .flags = V4L2_CTRL_FLAG_SLIDER 81 .flags = V4L2_CTRL_FLAG_SLIDER
82 }, 82 },
@@ -407,11 +407,6 @@ int ov9650_get_exposure(struct gspca_dev *gspca_dev, __s32 *val)
407 u8 i2c_data; 407 u8 i2c_data;
408 int err; 408 int err;
409 409
410 err = m5602_read_sensor(sd, OV9650_COM1, &i2c_data, 1);
411 if (err < 0)
412 return err;
413 *val = i2c_data & 0x03;
414
415 err = m5602_read_sensor(sd, OV9650_AECH, &i2c_data, 1); 410 err = m5602_read_sensor(sd, OV9650_AECH, &i2c_data, 1);
416 if (err < 0) 411 if (err < 0)
417 return err; 412 return err;
diff --git a/drivers/media/video/gspca/m5602/m5602_ov9650.h b/drivers/media/video/gspca/m5602/m5602_ov9650.h
index 08ae7ea96ff..ca0e42ee05c 100644
--- a/drivers/media/video/gspca/m5602/m5602_ov9650.h
+++ b/drivers/media/video/gspca/m5602/m5602_ov9650.h
@@ -123,7 +123,7 @@
123#define GAIN_DEFAULT 0x14 123#define GAIN_DEFAULT 0x14
124#define RED_GAIN_DEFAULT 0x70 124#define RED_GAIN_DEFAULT 0x70
125#define BLUE_GAIN_DEFAULT 0x20 125#define BLUE_GAIN_DEFAULT 0x20
126#define EXPOSURE_DEFAULT 0x5003 126#define EXPOSURE_DEFAULT 0x1ff
127 127
128/*****************************************************************************/ 128/*****************************************************************************/
129 129