===================================================================
@@ -59,7 +59,7 @@
u8 brightness;
u8 contrast;
u8 gain;
- u8 exposure;
+ u16 exposure;
u8 agc;
u8 awb;
u8 aec;
@@ -140,7 +140,7 @@
.type = V4L2_CTRL_TYPE_INTEGER,
.name = "Exposure",
.minimum = 0,
- .maximum = 255,
+ .maximum = 506,
.step = 1,
#define EXPO_DEF 120
.default_value = EXPO_DEF,
@@ -684,11 +684,15 @@
static void setexposure(struct gspca_dev *gspca_dev)
{
struct sd *sd = (struct sd *) gspca_dev;
- u8 val;
+ u16 val;
+
+ if (sd->aec)
+ return;
val = sd->exposure;
- sccb_reg_write(gspca_dev, 0x08, val >> 7);
- sccb_reg_write(gspca_dev, 0x10, val << 1);
+ sccb_reg_write(gspca_dev, 0x08, val >> 8);
+ sccb_reg_write(gspca_dev, 0x10, val & 0xff);
+
}
static void setagc(struct gspca_dev *gspca_dev)