summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/spca561.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-09-03 16:47:55 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-09-03 18:36:45 -0300
commit3a1ea7050345734acc3a33b2b00a611b9b7bf640 (patch)
tree5844ceec2ce6eb00ffd4540f742534b506a217cd /drivers/media/video/gspca/spca561.c
parentd698dc6b0477d3165a7f320b3ce36d1cbd361c94 (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.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/media/video/gspca/spca561.c b/drivers/media/video/gspca/spca561.c
index 0a1e66201a6..ec575f5672d 100644
--- a/drivers/media/video/gspca/spca561.c
+++ b/drivers/media/video/gspca/spca561.c
@@ -38,9 +38,9 @@ struct sd {
#define CONTRAST_MAX 0x3fff
__u16 exposure; /* rev12a only */
-#define EXPOSURE_MIN 0x2001
-#define EXPOSURE_DEF 0x20ae
-#define EXPOSURE_MAX 0x421d
+#define EXPOSURE_MIN 0
+#define EXPOSURE_DEF 200
+#define EXPOSURE_MAX 762
__u8 brightness; /* rev72a only */
#define BRIGHTNESS_MIN 0
@@ -48,7 +48,7 @@ struct sd {
#define BRIGHTNESS_MAX 63
__u8 white; /* rev12a only */
-#define WHITE_MIN 0
+#define WHITE_MIN 1
#define WHITE_DEF 0x40
#define WHITE_MAX 0x7f
@@ -608,10 +608,6 @@ static void setwhite(struct gspca_dev *gspca_dev)
__u8 reg8614, reg8616;
white = sd->white;
- if (sd->white == 0) {
- PDEBUG(D_CONF, "Discarding null whiteness");
- return;
- }
/* try to emulate MS-win as possible */
reg8616 = 0x90 - white * 5 / 8;
reg_w_val(gspca_dev->dev, 0x8616, reg8616);
@@ -623,10 +619,12 @@ static void setwhite(struct gspca_dev *gspca_dev)
static void setexposure(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
+ int expo;
__u8 data[2];
- data[0] = sd->exposure;
- data[1] = sd->exposure >> 8;
+ expo = sd->exposure + 0x20a8; /* from test */
+ data[0] = expo;
+ data[1] = expo >> 8;
reg_w_buf(gspca_dev, 0x8309, data, 2);
}