aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-11-25 04:47:09 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 09:38:47 -0200
commitb1b056a5f22851273813f7f1208b50fb7934f12a (patch)
tree03392dea2a6e4135d21b17e5439ca96d77174529 /drivers/media/video
parentabf485fe5136c4f828df2d07655d6dc7253894a5 (diff)
V4L/DVB (9842): gspca: Center the brightness in sonixj.
The brightness jumped from max to min at the middle of the control values. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/gspca/sonixj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index 34f7f58e527..83564e09eee 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -89,7 +89,7 @@ static struct ctrl sd_ctrls[] = {
#define BRIGHTNESS_MAX 0xffff
.maximum = BRIGHTNESS_MAX,
.step = 1,
-#define BRIGHTNESS_DEF 0x7fff
+#define BRIGHTNESS_DEF 0x8000
.default_value = BRIGHTNESS_DEF,
},
.set = sd_setbrightness,
@@ -1129,7 +1129,7 @@ static void setbrightness(struct gspca_dev *gspca_dev)
unsigned int expo;
__u8 k2;
- k2 = sd->brightness >> 10;
+ k2 = ((int) sd->brightness - 0x8000) >> 10;
switch (sd->sensor) {
case SENSOR_HV7131R:
expo = sd->brightness << 4;
@@ -1147,7 +1147,7 @@ static void setbrightness(struct gspca_dev *gspca_dev)
case SENSOR_OM6802:
expo = sd->brightness >> 6;
sd->exposure = setexposure(gspca_dev, expo);
- k2 >>= 1;
+ k2 = sd->brightness >> 11;
break;
}