Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320561
b: refs/heads/master
c: 8b3a19b
h: refs/heads/master
i:
  320559: 733171d
v: v3
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jul 30, 2012
1 parent e3411f8 commit 7ee7210
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 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: 9153ac3ba4bccfdccb43e765cf1cf9bd9e65e657
refs/heads/master: 8b3a19b1b3ab95fbc40acb653ca7559f32318301
12 changes: 11 additions & 1 deletion trunk/drivers/media/video/gspca/sonixb.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,6 +630,13 @@ static void setgain(struct gspca_dev *gspca_dev)
case SENSOR_OV7630: {
__u8 i2c[] = {0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10};

/*
* The ov7630's gain is weird, at 32 the gain drops to the
* same level as at 16, so skip 32-47 (of the 0-63 scale).
*/
if (sd->sensor == SENSOR_OV7630 && gain >= 32)
gain += 16;

i2c[1] = sensor_data[sd->sensor].sensor_addr;
i2c[3] = gain;
i2c_w(gspca_dev, i2c);
Expand Down Expand Up @@ -1017,8 +1024,11 @@ static int sd_init_controls(struct gspca_dev *gspca_dev)
gspca_dev->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
V4L2_CID_GAIN, 0, 31, 1, 15);
break;
case SENSOR_HV7131D:
case SENSOR_OV7630:
gspca_dev->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
V4L2_CID_GAIN, 0, 47, 1, 31);
break;
case SENSOR_HV7131D:
gspca_dev->gain = v4l2_ctrl_new_std(hdl, &sd_ctrl_ops,
V4L2_CID_GAIN, 0, 63, 1, 31);
break;
Expand Down

0 comments on commit 7ee7210

Please sign in to comment.