]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (8705): gspca: Adjust some control limits in spca561.
authorJean-Francois Moine <moinejf@free.fr>
Wed, 3 Sep 2008 19:47:55 +0000 (16:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 3 Sep 2008 21:36:45 +0000 (18:36 -0300)
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/spca561.c

index 0a1e66201a6572e42acfa87071e10ecb7028bf0f..ec575f5672df54ad7e30f8768da82470075cc7e0 100644 (file)
@@ -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);
 }