diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-09-03 15:47:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-09-03 17:36:45 -0400 |
commit | 3a1ea7050345734acc3a33b2b00a611b9b7bf640 (patch) | |
tree | 5844ceec2ce6eb00ffd4540f742534b506a217cd /drivers/media/video/gspca/spca561.c | |
parent | d698dc6b0477d3165a7f320b3ce36d1cbd361c94 (diff) |
V4L/DVB (8705): gspca: Adjust some control limits in spca561.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/spca561.c')
-rw-r--r-- | drivers/media/video/gspca/spca561.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c index 0a1e66201a65..ec575f5672df 100644 --- a/drivers/media/video/gspca/spca561.c +++ b/drivers/media/video/gspca/spca561.c | |||
@@ -38,9 +38,9 @@ struct sd { | |||
38 | #define CONTRAST_MAX 0x3fff | 38 | #define CONTRAST_MAX 0x3fff |
39 | 39 | ||
40 | __u16 exposure; /* rev12a only */ | 40 | __u16 exposure; /* rev12a only */ |
41 | #define EXPOSURE_MIN 0x2001 | 41 | #define EXPOSURE_MIN 0 |
42 | #define EXPOSURE_DEF 0x20ae | 42 | #define EXPOSURE_DEF 200 |
43 | #define EXPOSURE_MAX 0x421d | 43 | #define EXPOSURE_MAX 762 |
44 | 44 | ||
45 | __u8 brightness; /* rev72a only */ | 45 | __u8 brightness; /* rev72a only */ |
46 | #define BRIGHTNESS_MIN 0 | 46 | #define BRIGHTNESS_MIN 0 |
@@ -48,7 +48,7 @@ struct sd { | |||
48 | #define BRIGHTNESS_MAX 63 | 48 | #define BRIGHTNESS_MAX 63 |
49 | 49 | ||
50 | __u8 white; /* rev12a only */ | 50 | __u8 white; /* rev12a only */ |
51 | #define WHITE_MIN 0 | 51 | #define WHITE_MIN 1 |
52 | #define WHITE_DEF 0x40 | 52 | #define WHITE_DEF 0x40 |
53 | #define WHITE_MAX 0x7f | 53 | #define WHITE_MAX 0x7f |
54 | 54 | ||
@@ -608,10 +608,6 @@ static void setwhite(struct gspca_dev *gspca_dev) | |||
608 | __u8 reg8614, reg8616; | 608 | __u8 reg8614, reg8616; |
609 | 609 | ||
610 | white = sd->white; | 610 | white = sd->white; |
611 | if (sd->white == 0) { | ||
612 | PDEBUG(D_CONF, "Discarding null whiteness"); | ||
613 | return; | ||
614 | } | ||
615 | /* try to emulate MS-win as possible */ | 611 | /* try to emulate MS-win as possible */ |
616 | reg8616 = 0x90 - white * 5 / 8; | 612 | reg8616 = 0x90 - white * 5 / 8; |
617 | reg_w_val(gspca_dev->dev, 0x8616, reg8616); | 613 | reg_w_val(gspca_dev->dev, 0x8616, reg8616); |
@@ -623,10 +619,12 @@ static void setwhite(struct gspca_dev *gspca_dev) | |||
623 | static void setexposure(struct gspca_dev *gspca_dev) | 619 | static void setexposure(struct gspca_dev *gspca_dev) |
624 | { | 620 | { |
625 | struct sd *sd = (struct sd *) gspca_dev; | 621 | struct sd *sd = (struct sd *) gspca_dev; |
622 | int expo; | ||
626 | __u8 data[2]; | 623 | __u8 data[2]; |
627 | 624 | ||
628 | data[0] = sd->exposure; | 625 | expo = sd->exposure + 0x20a8; /* from test */ |
629 | data[1] = sd->exposure >> 8; | 626 | data[0] = expo; |
627 | data[1] = expo >> 8; | ||
630 | reg_w_buf(gspca_dev, 0x8309, data, 2); | 628 | reg_w_buf(gspca_dev, 0x8309, data, 2); |
631 | } | 629 | } |
632 | 630 | ||