summaryrefslogtreecommitdiff
path: root/drivers/media/video/gspca/sonixj.c
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2011-08-10 12:13:45 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-09-11 16:24:12 +0400
commitabe8cee744aa8aa29a2d88b915a17f0c7744aa3a (patch)
tree439c9858070cf916f5ff356ece4ea07f355ef525 /drivers/media/video/gspca/sonixj.c
parent7d84a179b1f8c473ae7557d9f227c25771cc63c7 (diff)
downloadlinux-abe8cee744aa8aa29a2d88b915a17f0c7744aa3a.tar.xz
[media] gspca - sonixj: Adjust the contrast control
The contrast was too low. Higher values are better. Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/sonixj.c')
-rw-r--r--drivers/media/video/gspca/sonixj.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/sonixj.c b/drivers/media/video/gspca/sonixj.c
index f3cfb9788aa5..7ab0c1a7623d 100644
--- a/drivers/media/video/gspca/sonixj.c
+++ b/drivers/media/video/gspca/sonixj.c
@@ -159,7 +159,7 @@ static const struct ctrl sd_ctrls[NCTRLS] = {
#define CONTRAST_MAX 127
.maximum = CONTRAST_MAX,
.step = 1,
- .default_value = 63,
+ .default_value = 20,
},
.set_control = setcontrast
},
@@ -2021,13 +2021,13 @@ static void setcontrast(struct gspca_dev *gspca_dev)
u8 k2;
u8 contrast[6];
- k2 = sd->ctrls[CONTRAST].val * 0x30 / (CONTRAST_MAX + 1)
- + 0x10; /* 10..40 */
+ k2 = sd->ctrls[CONTRAST].val * 37 / (CONTRAST_MAX + 1)
+ + 37; /* 37..73 */
contrast[0] = (k2 + 1) / 2; /* red */
contrast[1] = 0;
contrast[2] = k2; /* green */
contrast[3] = 0;
- contrast[4] = (k2 + 1) / 5; /* blue */
+ contrast[4] = k2 / 5; /* blue */
contrast[5] = 0;
reg_w(gspca_dev, 0x84, contrast, sizeof contrast);
}