diff options
author | Erik Andrén <erik.andren@gmail.com> | 2009-09-14 13:14:41 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-19 00:18:00 -0300 |
commit | bb3baf89d197f392c011c64935b79ed67a6542db (patch) | |
tree | a0e18987b52c62b7bb0cadbd342280eda13687e6 | |
parent | e1e7e677a4818500b220cebc45a1b47055c9443a (diff) |
V4L/DVB (12992): gspca - m5602-ov7660: Disable red and blue gain for now
Red and blue gain isn't handled in conformance with the v4l2 specification. Disable them for now.
Signed-off-by: Erik Andrén <erik.andren@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/video/gspca/m5602/m5602_ov7660.c | 92 |
1 files changed, 0 insertions, 92 deletions
diff --git a/drivers/media/video/gspca/m5602/m5602_ov7660.c b/drivers/media/video/gspca/m5602/m5602_ov7660.c index 9648b90eec7..2a28b74cb3f 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov7660.c +++ b/drivers/media/video/gspca/m5602/m5602_ov7660.c @@ -20,10 +20,6 @@ static int ov7660_get_gain(struct gspca_dev *gspca_dev, __s32 *val); static int ov7660_set_gain(struct gspca_dev *gspca_dev, __s32 val); -static int ov7660_get_blue_gain(struct gspca_dev *gspca_dev, __s32 *val); -static int ov7660_set_blue_gain(struct gspca_dev *gspca_dev, __s32 val); -static int ov7660_get_red_gain(struct gspca_dev *gspca_dev, __s32 *val); -static int ov7660_set_red_gain(struct gspca_dev *gspca_dev, __s32 val); static int ov7660_get_auto_white_balance(struct gspca_dev *gspca_dev, __s32 *val); static int ov7660_set_auto_white_balance(struct gspca_dev *gspca_dev, @@ -54,35 +50,7 @@ const static struct ctrl ov7660_ctrls[] = { .get = ov7660_get_gain }, #define BLUE_BALANCE_IDX 2 - { - { - .id = V4L2_CID_BLUE_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "blue balance", - .minimum = 0x00, - .maximum = 0x7f, - .step = 0x1, - .default_value = OV7660_DEFAULT_BLUE_GAIN, - .flags = V4L2_CTRL_FLAG_SLIDER - }, - .set = ov7660_set_blue_gain, - .get = ov7660_get_blue_gain - }, #define RED_BALANCE_IDX 3 - { - { - .id = V4L2_CID_RED_BALANCE, - .type = V4L2_CTRL_TYPE_INTEGER, - .name = "red balance", - .minimum = 0x00, - .maximum = 0x7f, - .step = 0x1, - .default_value = OV7660_DEFAULT_RED_GAIN, - .flags = V4L2_CTRL_FLAG_SLIDER - }, - .set = ov7660_set_red_gain, - .get = ov7660_get_red_gain - }, #define AUTO_WHITE_BALANCE_IDX 4 { { @@ -279,17 +247,6 @@ int ov7660_init(struct sd *sd) sensor_settings[AUTO_EXPOSURE_IDX]); if (err < 0) return err; - - err = ov7660_set_blue_gain(&sd->gspca_dev, - sensor_settings[BLUE_BALANCE_IDX]); - if (err < 0) - return err; - - err = ov7660_set_red_gain(&sd->gspca_dev, - sensor_settings[RED_BALANCE_IDX]); - if (err < 0) - return err; - err = ov7660_set_hflip(&sd->gspca_dev, sensor_settings[HFLIP_IDX]); if (err < 0) @@ -344,55 +301,6 @@ static int ov7660_set_gain(struct gspca_dev *gspca_dev, __s32 val) return err; } -static int ov7660_get_blue_gain(struct gspca_dev *gspca_dev, __s32 *val) -{ - struct sd *sd = (struct sd *) gspca_dev; - s32 *sensor_settings = sd->sensor_priv; - - *val = sensor_settings[BLUE_BALANCE_IDX]; - PDEBUG(D_V4L2, "Read blue balance %d", *val); - return 0; -} - -static int ov7660_set_blue_gain(struct gspca_dev *gspca_dev, __s32 val) -{ - int err; - u8 i2c_data; - struct sd *sd = (struct sd *) gspca_dev; - s32 *sensor_settings = sd->sensor_priv; - - PDEBUG(D_V4L2, "Setting blue balance to %d", val); - - sensor_settings[BLUE_BALANCE_IDX] = val; - - err = m5602_write_sensor(sd, OV7660_BLUE_GAIN, &i2c_data, 1); - return err; -} - -static int ov7660_get_red_gain(struct gspca_dev *gspca_dev, __s32 *val) -{ - struct sd *sd = (struct sd *) gspca_dev; - s32 *sensor_settings = sd->sensor_priv; - - *val = sensor_settings[RED_BALANCE_IDX]; - PDEBUG(D_V4L2, "Read red balance %d", *val); - return 0; -} - -static int ov7660_set_red_gain(struct gspca_dev *gspca_dev, __s32 val) -{ - int err; - u8 i2c_data; - struct sd *sd = (struct sd *) gspca_dev; - s32 *sensor_settings = sd->sensor_priv; - - PDEBUG(D_V4L2, "Setting red balance to %d", val); - - sensor_settings[RED_BALANCE_IDX] = val; - - err = m5602_write_sensor(sd, OV7660_RED_GAIN, &i2c_data, 1); - return err; -} static int ov7660_get_auto_white_balance(struct gspca_dev *gspca_dev, __s32 *val) |