diff options
author | Erik Andrén <erik.andren@gmail.com> | 2009-09-14 12:14:41 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-18 23:18:00 -0400 |
commit | bb3baf89d197f392c011c64935b79ed67a6542db (patch) | |
tree | a0e18987b52c62b7bb0cadbd342280eda13687e6 /drivers/media | |
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>
Diffstat (limited to 'drivers/media')
-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 9648b90eec73..2a28b74cb3f9 100644 --- a/drivers/media/video/gspca/m5602/m5602_ov7660.c +++ b/drivers/media/video/gspca/m5602/m5602_ov7660.c | |||
@@ -20,10 +20,6 @@ | |||
20 | 20 | ||
21 | static int ov7660_get_gain(struct gspca_dev *gspca_dev, __s32 *val); | 21 | static int ov7660_get_gain(struct gspca_dev *gspca_dev, __s32 *val); |
22 | static int ov7660_set_gain(struct gspca_dev *gspca_dev, __s32 val); | 22 | static int ov7660_set_gain(struct gspca_dev *gspca_dev, __s32 val); |
23 | static int ov7660_get_blue_gain(struct gspca_dev *gspca_dev, __s32 *val); | ||
24 | static int ov7660_set_blue_gain(struct gspca_dev *gspca_dev, __s32 val); | ||
25 | static int ov7660_get_red_gain(struct gspca_dev *gspca_dev, __s32 *val); | ||
26 | static int ov7660_set_red_gain(struct gspca_dev *gspca_dev, __s32 val); | ||
27 | static int ov7660_get_auto_white_balance(struct gspca_dev *gspca_dev, | 23 | static int ov7660_get_auto_white_balance(struct gspca_dev *gspca_dev, |
28 | __s32 *val); | 24 | __s32 *val); |
29 | static int ov7660_set_auto_white_balance(struct gspca_dev *gspca_dev, | 25 | static int ov7660_set_auto_white_balance(struct gspca_dev *gspca_dev, |
@@ -54,35 +50,7 @@ const static struct ctrl ov7660_ctrls[] = { | |||
54 | .get = ov7660_get_gain | 50 | .get = ov7660_get_gain |
55 | }, | 51 | }, |
56 | #define BLUE_BALANCE_IDX 2 | 52 | #define BLUE_BALANCE_IDX 2 |
57 | { | ||
58 | { | ||
59 | .id = V4L2_CID_BLUE_BALANCE, | ||
60 | .type = V4L2_CTRL_TYPE_INTEGER, | ||
61 | .name = "blue balance", | ||
62 | .minimum = 0x00, | ||
63 | .maximum = 0x7f, | ||
64 | .step = 0x1, | ||
65 | .default_value = OV7660_DEFAULT_BLUE_GAIN, | ||
66 | .flags = V4L2_CTRL_FLAG_SLIDER | ||
67 | }, | ||
68 | .set = ov7660_set_blue_gain, | ||
69 | .get = ov7660_get_blue_gain | ||
70 | }, | ||
71 | #define RED_BALANCE_IDX 3 | 53 | #define RED_BALANCE_IDX 3 |
72 | { | ||
73 | { | ||
74 | .id = V4L2_CID_RED_BALANCE, | ||
75 | .type = V4L2_CTRL_TYPE_INTEGER, | ||
76 | .name = "red balance", | ||
77 | .minimum = 0x00, | ||
78 | .maximum = 0x7f, | ||
79 | .step = 0x1, | ||
80 | .default_value = OV7660_DEFAULT_RED_GAIN, | ||
81 | .flags = V4L2_CTRL_FLAG_SLIDER | ||
82 | }, | ||
83 | .set = ov7660_set_red_gain, | ||
84 | .get = ov7660_get_red_gain | ||
85 | }, | ||
86 | #define AUTO_WHITE_BALANCE_IDX 4 | 54 | #define AUTO_WHITE_BALANCE_IDX 4 |
87 | { | 55 | { |
88 | { | 56 | { |
@@ -279,17 +247,6 @@ int ov7660_init(struct sd *sd) | |||
279 | sensor_settings[AUTO_EXPOSURE_IDX]); | 247 | sensor_settings[AUTO_EXPOSURE_IDX]); |
280 | if (err < 0) | 248 | if (err < 0) |
281 | return err; | 249 | return err; |
282 | |||
283 | err = ov7660_set_blue_gain(&sd->gspca_dev, | ||
284 | sensor_settings[BLUE_BALANCE_IDX]); | ||
285 | if (err < 0) | ||
286 | return err; | ||
287 | |||
288 | err = ov7660_set_red_gain(&sd->gspca_dev, | ||
289 | sensor_settings[RED_BALANCE_IDX]); | ||
290 | if (err < 0) | ||
291 | return err; | ||
292 | |||
293 | err = ov7660_set_hflip(&sd->gspca_dev, | 250 | err = ov7660_set_hflip(&sd->gspca_dev, |
294 | sensor_settings[HFLIP_IDX]); | 251 | sensor_settings[HFLIP_IDX]); |
295 | if (err < 0) | 252 | if (err < 0) |
@@ -344,55 +301,6 @@ static int ov7660_set_gain(struct gspca_dev *gspca_dev, __s32 val) | |||
344 | return err; | 301 | return err; |
345 | } | 302 | } |
346 | 303 | ||
347 | static int ov7660_get_blue_gain(struct gspca_dev *gspca_dev, __s32 *val) | ||
348 | { | ||
349 | struct sd *sd = (struct sd *) gspca_dev; | ||
350 | s32 *sensor_settings = sd->sensor_priv; | ||
351 | |||
352 | *val = sensor_settings[BLUE_BALANCE_IDX]; | ||
353 | PDEBUG(D_V4L2, "Read blue balance %d", *val); | ||
354 | return 0; | ||
355 | } | ||
356 | |||
357 | static int ov7660_set_blue_gain(struct gspca_dev *gspca_dev, __s32 val) | ||
358 | { | ||
359 | int err; | ||
360 | u8 i2c_data; | ||
361 | struct sd *sd = (struct sd *) gspca_dev; | ||
362 | s32 *sensor_settings = sd->sensor_priv; | ||
363 | |||
364 | PDEBUG(D_V4L2, "Setting blue balance to %d", val); | ||
365 | |||
366 | sensor_settings[BLUE_BALANCE_IDX] = val; | ||
367 | |||
368 | err = m5602_write_sensor(sd, OV7660_BLUE_GAIN, &i2c_data, 1); | ||
369 | return err; | ||
370 | } | ||
371 | |||
372 | static int ov7660_get_red_gain(struct gspca_dev *gspca_dev, __s32 *val) | ||
373 | { | ||
374 | struct sd *sd = (struct sd *) gspca_dev; | ||
375 | s32 *sensor_settings = sd->sensor_priv; | ||
376 | |||
377 | *val = sensor_settings[RED_BALANCE_IDX]; | ||
378 | PDEBUG(D_V4L2, "Read red balance %d", *val); | ||
379 | return 0; | ||
380 | } | ||
381 | |||
382 | static int ov7660_set_red_gain(struct gspca_dev *gspca_dev, __s32 val) | ||
383 | { | ||
384 | int err; | ||
385 | u8 i2c_data; | ||
386 | struct sd *sd = (struct sd *) gspca_dev; | ||
387 | s32 *sensor_settings = sd->sensor_priv; | ||
388 | |||
389 | PDEBUG(D_V4L2, "Setting red balance to %d", val); | ||
390 | |||
391 | sensor_settings[RED_BALANCE_IDX] = val; | ||
392 | |||
393 | err = m5602_write_sensor(sd, OV7660_RED_GAIN, &i2c_data, 1); | ||
394 | return err; | ||
395 | } | ||
396 | 304 | ||
397 | static int ov7660_get_auto_white_balance(struct gspca_dev *gspca_dev, | 305 | static int ov7660_get_auto_white_balance(struct gspca_dev *gspca_dev, |
398 | __s32 *val) | 306 | __s32 *val) |