diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2008-11-25 08:47:09 +0100 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2008-11-25 08:47:09 +0100 |
commit | f29ecdd796231f10eb0808a5a4d213ea2c8a264f (patch) | |
tree | 253bcd77c4f0fe8df9de7097c7be739bdab939a2 /linux/drivers/media/video/gspca | |
parent | d83c8412dcfbd95cb0794db8f623f0a697097064 (diff) | |
download | mediapointer-dvb-s2-f29ecdd796231f10eb0808a5a4d213ea2c8a264f.tar.gz mediapointer-dvb-s2-f29ecdd796231f10eb0808a5a4d213ea2c8a264f.tar.bz2 |
gspca: Center the brightness in sonixj.
From: Jean-Francois Moine <moinejf@free.fr>
The brightness jumped from max to min at the middle of the control values.
Priority: normal
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers/media/video/gspca')
-rw-r--r-- | linux/drivers/media/video/gspca/sonixj.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/video/gspca/sonixj.c b/linux/drivers/media/video/gspca/sonixj.c index bfd256716..9d9f90669 100644 --- a/linux/drivers/media/video/gspca/sonixj.c +++ b/linux/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, @@ -1142,7 +1142,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; @@ -1160,7 +1160,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; } |