V4L/DVB: gspca - sn9c20x: Fix non working mt9v111 sensor
authorBrian Johnson <brijohn@gmail.com>
Wed, 5 May 2010 16:22:45 +0000 (13:22 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 May 2010 15:59:01 +0000 (12:59 -0300)
Signed-off-by: Brian Johnson <brijohn@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/sn9c20x.c

index dad5dde..644a7fd 100644 (file)
@@ -996,29 +996,12 @@ static struct i2c_reg_u16 mt9v112_init[] = {
 
 static struct i2c_reg_u16 mt9v111_init[] = {
        {0x01, 0x0004}, {0x0d, 0x0001}, {0x0d, 0x0000},
-       {0x01, 0x0001}, {0x02, 0x0016}, {0x03, 0x01e1},
-       {0x04, 0x0281}, {0x05, 0x0004}, {0x07, 0x3002},
-       {0x21, 0x0000}, {0x25, 0x4024}, {0x26, 0xff03},
-       {0x27, 0xff10}, {0x2b, 0x7828}, {0x2c, 0xb43c},
-       {0x2d, 0xf0a0}, {0x2e, 0x0c64}, {0x2f, 0x0064},
-       {0x67, 0x4010}, {0x06, 0x301e}, {0x08, 0x0480},
-       {0x01, 0x0004}, {0x02, 0x0016}, {0x03, 0x01e6},
-       {0x04, 0x0286}, {0x05, 0x0004}, {0x06, 0x0000},
-       {0x07, 0x3002}, {0x08, 0x0008}, {0x0c, 0x0000},
-       {0x0d, 0x0000}, {0x0e, 0x0000}, {0x0f, 0x0000},
-       {0x10, 0x0000}, {0x11, 0x0000}, {0x12, 0x00b0},
-       {0x13, 0x007c}, {0x14, 0x0000}, {0x15, 0x0000},
-       {0x16, 0x0000}, {0x17, 0x0000}, {0x18, 0x0000},
-       {0x19, 0x0000}, {0x1a, 0x0000}, {0x1b, 0x0000},
-       {0x1c, 0x0000}, {0x1d, 0x0000}, {0x30, 0x0000},
-       {0x30, 0x0005}, {0x31, 0x0000}, {0x02, 0x0016},
-       {0x03, 0x01e1}, {0x04, 0x0281}, {0x05, 0x0004},
-       {0x06, 0x0000}, {0x07, 0x3002}, {0x06, 0x002d},
-       {0x05, 0x0004}, {0x09, 0x0064}, {0x2b, 0x00a0},
-       {0x2c, 0x00a0}, {0x2d, 0x00a0}, {0x2e, 0x00a0},
-       {0x02, 0x0016}, {0x03, 0x01e1}, {0x04, 0x0281},
-       {0x05, 0x0004}, {0x06, 0x002d}, {0x07, 0x3002},
-       {0x0e, 0x0008}, {0x06, 0x002d}, {0x05, 0x0004},
+       {0x01, 0x0001}, {0x05, 0x0004}, {0x2d, 0xe0a0},
+       {0x2e, 0x0c64}, {0x2f, 0x0064}, {0x06, 0x600e},
+       {0x08, 0x0480}, {0x01, 0x0004}, {0x02, 0x0016},
+       {0x03, 0x01e7}, {0x04, 0x0287}, {0x05, 0x0004},
+       {0x06, 0x002d}, {0x07, 0x3002}, {0x08, 0x0008},
+       {0x0e, 0x0008}, {0x20, 0x0000}
 };
 
 static struct i2c_reg_u16 mt9v011_init[] = {
@@ -1369,6 +1352,7 @@ static int mt9v_init_sensor(struct gspca_dev *gspca_dev)
                                return -ENODEV;
                        }
                }
+               gspca_dev->ctrl_dis = (1 << EXPOSURE_IDX) | (1 << AUTOGAIN_IDX) | (1 << GAIN_IDX);
                sd->hstart = 2;
                sd->vstart = 2;
                sd->sensor = SENSOR_MT9V111;
@@ -1623,7 +1607,6 @@ static int set_exposure(struct gspca_dev *gspca_dev)
                break;
        case SENSOR_MT9M001:
        case SENSOR_MT9V112:
-       case SENSOR_MT9V111:
        case SENSOR_MT9V011:
                exp[0] |= (3 << 4);
                exp[2] = 0x09;
@@ -1658,7 +1641,6 @@ static int set_gain(struct gspca_dev *gspca_dev)
                gain[3] = ov_gain[sd->gain];
                break;
        case SENSOR_MT9V011:
-       case SENSOR_MT9V111:
                gain[0] |= (3 << 4);
                gain[2] = 0x35;
                gain[3] = micron1_gain[sd->gain] >> 8;