Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311273
b: refs/heads/master
c: cf3c1c3
h: refs/heads/master
i:
  311271: 5269dc1
v: v3
  • Loading branch information
Antonio Ospite authored and Mauro Carvalho Chehab committed Jun 11, 2012
1 parent 65cf625 commit 4588391
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 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: bc378feeda46633cfa92dac7a7ef5df66047b0ef
refs/heads/master: cf3c1c319500e879daa1487f41bb094bd377566f
31 changes: 2 additions & 29 deletions trunk/drivers/media/video/gspca/ov534.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static void setbrightness(struct gspca_dev *gspca_dev);
static void setcontrast(struct gspca_dev *gspca_dev);
static void setgain(struct gspca_dev *gspca_dev);
static void setexposure(struct gspca_dev *gspca_dev);
static int sd_setagc(struct gspca_dev *gspca_dev, __s32 val);
static void setagc(struct gspca_dev *gspca_dev);
static void setawb(struct gspca_dev *gspca_dev);
static void setaec(struct gspca_dev *gspca_dev);
static void setsharpness(struct gspca_dev *gspca_dev);
Expand Down Expand Up @@ -189,7 +189,7 @@ static const struct ctrl sd_ctrls[] = {
.step = 1,
.default_value = 1,
},
.set = sd_setagc
.set_control = setagc
},
[AWB] = {
{
Expand Down Expand Up @@ -1242,10 +1242,6 @@ static int sd_config(struct gspca_dev *gspca_dev,

cam->ctrls = sd->ctrls;

/* the auto white balance control works only when auto gain is set */
if (sd_ctrls[AGC].qctrl.default_value == 0)
gspca_dev->ctrl_inac |= (1 << AWB);

cam->cam_mode = ov772x_mode;
cam->nmodes = ARRAY_SIZE(ov772x_mode);

Expand Down Expand Up @@ -1486,29 +1482,6 @@ static void sd_pkt_scan(struct gspca_dev *gspca_dev,
} while (remaining_len > 0);
}

static int sd_setagc(struct gspca_dev *gspca_dev, __s32 val)
{
struct sd *sd = (struct sd *) gspca_dev;

sd->ctrls[AGC].val = val;

/* the auto white balance control works only
* when auto gain is set */
if (val) {
gspca_dev->ctrl_inac &= ~(1 << AWB);
} else {
gspca_dev->ctrl_inac |= (1 << AWB);
if (sd->ctrls[AWB].val) {
sd->ctrls[AWB].val = 0;
if (gspca_dev->streaming)
setawb(gspca_dev);
}
}
if (gspca_dev->streaming)
setagc(gspca_dev);
return gspca_dev->usb_err;
}

static int sd_querymenu(struct gspca_dev *gspca_dev,
struct v4l2_querymenu *menu)
{
Expand Down

0 comments on commit 4588391

Please sign in to comment.