Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 271799
b: refs/heads/master
c: abe8cee
h: refs/heads/master
i:
  271797: 05a893a
  271795: 1977717
  271791: e051b54
v: v3
  • Loading branch information
Jean-François Moine authored and Mauro Carvalho Chehab committed Sep 11, 2011
1 parent cbc545a commit ac24ea3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7d84a179b1f8c473ae7557d9f227c25771cc63c7
refs/heads/master: abe8cee744aa8aa29a2d88b915a17f0c7744aa3a
8 changes: 4 additions & 4 deletions trunk/drivers/media/video/gspca/sonixj.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit ac24ea3

Please sign in to comment.