diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-01-10 17:31:34 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 13:10:40 -0500 |
commit | b10af3f70bfaf98b6405dcd0561283b7ec485630 (patch) | |
tree | 4e671dd307e8cf65de561c3c47d761236432604e /drivers | |
parent | 8d0082fa3f3ac978075439e73b4a36ca0715e747 (diff) |
V4L/DVB (14001): gscpa_sonixb: Differentiate between tas5110c and tas5110d and fix d hstart
Our hstart value was wrong for tas5110d sensor using sonixb cams, this
patch fixes this. Many thanks to Paulus (laudaka) for donating me a camera
with such a sensor IC.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/gspca/sonixb.c | 31 |
1 files changed, 22 insertions, 9 deletions
diff --git a/drivers/media/video/gspca/sonixb.c b/drivers/media/video/gspca/sonixb.c index 725a1230c8da..cfefdfefaf62 100644 --- a/drivers/media/video/gspca/sonixb.c +++ b/drivers/media/video/gspca/sonixb.c | |||
@@ -73,8 +73,9 @@ struct sd { | |||
73 | #define SENSOR_OV7630 2 | 73 | #define SENSOR_OV7630 2 |
74 | #define SENSOR_PAS106 3 | 74 | #define SENSOR_PAS106 3 |
75 | #define SENSOR_PAS202 4 | 75 | #define SENSOR_PAS202 4 |
76 | #define SENSOR_TAS5110 5 | 76 | #define SENSOR_TAS5110C 5 |
77 | #define SENSOR_TAS5130CXX 6 | 77 | #define SENSOR_TAS5110D 6 |
78 | #define SENSOR_TAS5130CXX 7 | ||
78 | __u8 reg11; | 79 | __u8 reg11; |
79 | }; | 80 | }; |
80 | 81 | ||
@@ -460,13 +461,21 @@ static const __u8 pas202_sensor_init[][8] = { | |||
460 | {0xa0, 0x40, 0x11, 0x01, 0x31, 0x00, 0x63, 0x16}, | 461 | {0xa0, 0x40, 0x11, 0x01, 0x31, 0x00, 0x63, 0x16}, |
461 | }; | 462 | }; |
462 | 463 | ||
463 | static const __u8 initTas5110[] = { | 464 | static const __u8 initTas5110c[] = { |
464 | 0x44, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x00, | 465 | 0x44, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x00, |
465 | 0x00, 0x00, | 466 | 0x00, 0x00, |
466 | 0x00, 0x01, 0x00, 0x45, 0x09, 0x0a, | 467 | 0x00, 0x01, 0x00, 0x45, 0x09, 0x0a, |
467 | 0x16, 0x12, 0x60, 0x86, 0x2b, | 468 | 0x16, 0x12, 0x60, 0x86, 0x2b, |
468 | 0x14, 0x0a, 0x02, 0x02, 0x09, 0x07 | 469 | 0x14, 0x0a, 0x02, 0x02, 0x09, 0x07 |
469 | }; | 470 | }; |
471 | /* Same as above, except a different hstart */ | ||
472 | static const __u8 initTas5110d[] = { | ||
473 | 0x44, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x00, | ||
474 | 0x00, 0x00, | ||
475 | 0x00, 0x01, 0x00, 0x41, 0x09, 0x0a, | ||
476 | 0x16, 0x12, 0x60, 0x86, 0x2b, | ||
477 | 0x14, 0x0a, 0x02, 0x02, 0x09, 0x07 | ||
478 | }; | ||
470 | static const __u8 tas5110_sensor_init[][8] = { | 479 | static const __u8 tas5110_sensor_init[][8] = { |
471 | {0x30, 0x11, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x10}, | 480 | {0x30, 0x11, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x10}, |
472 | {0x30, 0x11, 0x02, 0x20, 0xa9, 0x00, 0x00, 0x10}, | 481 | {0x30, 0x11, 0x02, 0x20, 0xa9, 0x00, 0x00, 0x10}, |
@@ -497,7 +506,9 @@ SENS(initPas106, NULL, pas106_sensor_init, NULL, NULL, F_SIF, NO_EXPO|NO_FREQ, | |||
497 | 0), | 506 | 0), |
498 | SENS(initPas202, initPas202, pas202_sensor_init, NULL, NULL, 0, | 507 | SENS(initPas202, initPas202, pas202_sensor_init, NULL, NULL, 0, |
499 | NO_EXPO|NO_FREQ, 0), | 508 | NO_EXPO|NO_FREQ, 0), |
500 | SENS(initTas5110, NULL, tas5110_sensor_init, NULL, NULL, F_GAIN|F_SIF, | 509 | SENS(initTas5110c, NULL, tas5110_sensor_init, NULL, NULL, F_GAIN|F_SIF, |
510 | NO_BRIGHTNESS|NO_FREQ, 0), | ||
511 | SENS(initTas5110d, NULL, tas5110_sensor_init, NULL, NULL, F_GAIN|F_SIF, | ||
501 | NO_BRIGHTNESS|NO_FREQ, 0), | 512 | NO_BRIGHTNESS|NO_FREQ, 0), |
502 | SENS(initTas5130, NULL, tas5130_sensor_init, NULL, NULL, 0, NO_EXPO|NO_FREQ, | 513 | SENS(initTas5130, NULL, tas5130_sensor_init, NULL, NULL, 0, NO_EXPO|NO_FREQ, |
503 | 0), | 514 | 0), |
@@ -652,7 +663,8 @@ static void setsensorgain(struct gspca_dev *gspca_dev) | |||
652 | 663 | ||
653 | switch (sd->sensor) { | 664 | switch (sd->sensor) { |
654 | 665 | ||
655 | case SENSOR_TAS5110: { | 666 | case SENSOR_TAS5110C: |
667 | case SENSOR_TAS5110D: { | ||
656 | __u8 i2c[] = | 668 | __u8 i2c[] = |
657 | {0x30, 0x11, 0x02, 0x20, 0x70, 0x00, 0x00, 0x10}; | 669 | {0x30, 0x11, 0x02, 0x20, 0x70, 0x00, 0x00, 0x10}; |
658 | 670 | ||
@@ -704,7 +716,8 @@ static void setexposure(struct gspca_dev *gspca_dev) | |||
704 | struct sd *sd = (struct sd *) gspca_dev; | 716 | struct sd *sd = (struct sd *) gspca_dev; |
705 | 717 | ||
706 | switch (sd->sensor) { | 718 | switch (sd->sensor) { |
707 | case SENSOR_TAS5110: { | 719 | case SENSOR_TAS5110C: |
720 | case SENSOR_TAS5110D: { | ||
708 | __u8 reg; | 721 | __u8 reg; |
709 | 722 | ||
710 | /* register 19's high nibble contains the sn9c10x clock divider | 723 | /* register 19's high nibble contains the sn9c10x clock divider |
@@ -1227,10 +1240,10 @@ static const struct sd_desc sd_desc = { | |||
1227 | 1240 | ||
1228 | 1241 | ||
1229 | static const struct usb_device_id device_table[] __devinitconst = { | 1242 | static const struct usb_device_id device_table[] __devinitconst = { |
1230 | {USB_DEVICE(0x0c45, 0x6001), SB(TAS5110, 102)}, /* TAS5110C1B */ | 1243 | {USB_DEVICE(0x0c45, 0x6001), SB(TAS5110C, 102)}, /* TAS5110C1B */ |
1231 | {USB_DEVICE(0x0c45, 0x6005), SB(TAS5110, 101)}, /* TAS5110C1B */ | 1244 | {USB_DEVICE(0x0c45, 0x6005), SB(TAS5110C, 101)}, /* TAS5110C1B */ |
1232 | #if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE | 1245 | #if !defined CONFIG_USB_SN9C102 && !defined CONFIG_USB_SN9C102_MODULE |
1233 | {USB_DEVICE(0x0c45, 0x6007), SB(TAS5110, 101)}, /* TAS5110D */ | 1246 | {USB_DEVICE(0x0c45, 0x6007), SB(TAS5110D, 101)}, /* TAS5110D */ |
1234 | {USB_DEVICE(0x0c45, 0x6009), SB(PAS106, 101)}, | 1247 | {USB_DEVICE(0x0c45, 0x6009), SB(PAS106, 101)}, |
1235 | {USB_DEVICE(0x0c45, 0x600d), SB(PAS106, 101)}, | 1248 | {USB_DEVICE(0x0c45, 0x600d), SB(PAS106, 101)}, |
1236 | #endif | 1249 | #endif |