Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192791
b: refs/heads/master
c: 8fef9d9
h: refs/heads/master
i:
  192789: 5d420a3
  192787: 965f6f0
  192783: b45a7a2
v: v3
  • Loading branch information
Max Thrun authored and Mauro Carvalho Chehab committed May 18, 2010
1 parent 9c07a43 commit 1c68268
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 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: 18cf8c91ad558f8d2d0177656df493f81949cfe6
refs/heads/master: 8fef9d962237e29b3d84243387b1f3487b3caaf4
21 changes: 13 additions & 8 deletions trunk/drivers/media/video/gspca/ov534.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static const struct ctrl sd_ctrls[] = {
.minimum = 0,
.maximum = 1,
.step = 1,
#define AWB_DEF 0
#define AWB_DEF 1
.default_value = AWB_DEF,
},
.set = sd_setawb,
Expand Down Expand Up @@ -723,10 +723,17 @@ static void setawb(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;

if (sd->awb)
sccb_reg_write(gspca_dev, 0x63, 0xe0); /* AWB on */
else
sccb_reg_write(gspca_dev, 0x63, 0xaa); /* AWB off */
if (sd->awb) {
sccb_reg_write(gspca_dev, 0x13,
sccb_reg_read(gspca_dev, 0x13) | 0x02);
sccb_reg_write(gspca_dev, 0x63,
sccb_reg_read(gspca_dev, 0x63) | 0xc0);
} else {
sccb_reg_write(gspca_dev, 0x13,
sccb_reg_read(gspca_dev, 0x13) & ~0x02);
sccb_reg_write(gspca_dev, 0x63,
sccb_reg_read(gspca_dev, 0x63) & ~0xc0);
}
}

static void setaec(struct gspca_dev *gspca_dev)
Expand Down Expand Up @@ -805,9 +812,7 @@ static int sd_config(struct gspca_dev *gspca_dev,
#else
gspca_dev->ctrl_inac |= (1 << AWB_IDX);
#endif
#if AWB_DEF != 0
sd->awb = AWB_DEF
#endif
sd->awb = AWB_DEF;
sd->aec = AEC_DEF;
#if SHARPNESS_DEF != 0
sd->sharpness = SHARPNESS_DEF;
Expand Down

0 comments on commit 1c68268

Please sign in to comment.