diff options
author | Jean-François Moine <moinejf@free.fr> | 2011-03-22 04:16:11 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-22 15:38:17 -0400 |
commit | c3ee142b44c868fb5e0eefe1b9c2df8115f6c69b (patch) | |
tree | ab994415daa17beadfe2dbe758cd1523dcffaf19 /drivers | |
parent | b1a873a37b6551a214ad37d1eee7654a9d65fd6e (diff) |
[media] gspca - nw80x: Cleanup source
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/gspca/nw80x.c | 273 |
1 files changed, 65 insertions, 208 deletions
diff --git a/drivers/media/video/gspca/nw80x.c b/drivers/media/video/gspca/nw80x.c index 1c9d3c2f6670..831748873884 100644 --- a/drivers/media/video/gspca/nw80x.c +++ b/drivers/media/video/gspca/nw80x.c | |||
@@ -53,7 +53,7 @@ struct sd { | |||
53 | }; | 53 | }; |
54 | 54 | ||
55 | enum bridges { | 55 | enum bridges { |
56 | BRIDGE_NW800, /* et31x110 */ | 56 | BRIDGE_NW800, /* and et31x110 */ |
57 | BRIDGE_NW801, | 57 | BRIDGE_NW801, |
58 | BRIDGE_NW802, | 58 | BRIDGE_NW802, |
59 | }; | 59 | }; |
@@ -145,7 +145,7 @@ enum webcams { | |||
145 | nw801/nw802 320x240 - 640x480 | 145 | nw801/nw802 320x240 - 640x480 |
146 | */ | 146 | */ |
147 | 147 | ||
148 | static const struct v4l2_pix_format sif_mode[] = { | 148 | static const struct v4l2_pix_format cif_mode[] = { |
149 | {352, 288, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE, | 149 | {352, 288, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE, |
150 | .bytesperline = 352, | 150 | .bytesperline = 352, |
151 | .sizeimage = 352 * 288 * 4 / 8, | 151 | .sizeimage = 352 * 288 * 4 / 8, |
@@ -171,6 +171,7 @@ static const struct v4l2_pix_format vga_mode[] = { | |||
171 | * - n bytes: data | 171 | * - n bytes: data |
172 | */ | 172 | */ |
173 | #define I2C0 0xff | 173 | #define I2C0 0xff |
174 | |||
174 | static const u8 nw800_init[] = { | 175 | static const u8 nw800_init[] = { |
175 | 0x05, 0x00, 0x01, 0x55, | 176 | 0x05, 0x00, 0x01, 0x55, |
176 | 0x10, 0x9b, 0x01, 0xaa, | 177 | 0x10, 0x9b, 0x01, 0xaa, |
@@ -333,8 +334,9 @@ static const u8 nw800_init[] = { | |||
333 | 0, 0, 0 | 334 | 0, 0, 0 |
334 | }; | 335 | }; |
335 | 336 | ||
336 | /* 06a5:d001 - nw801 - p35u */ | 337 | /* 06a5:d001 - nw801 - Panasonic |
337 | static const u8 nw801_init_1[] = { | 338 | * P35u */ |
339 | static const u8 nw801_start_1[] = { | ||
338 | 0x05, 0x06, 0x01, 0x04, | 340 | 0x05, 0x06, 0x01, 0x04, |
339 | 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e, | 341 | 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e, |
340 | 0x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, | 342 | 0x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, |
@@ -389,7 +391,7 @@ static const u8 nw801_init_1[] = { | |||
389 | 0xf0, 0x00, | 391 | 0xf0, 0x00, |
390 | 0, 0, 0, | 392 | 0, 0, 0, |
391 | }; | 393 | }; |
392 | static const u8 nw801_init_qvga[] = { | 394 | static const u8 nw801_start_qvga[] = { |
393 | 0x02, 0x00, 0x10, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00, | 395 | 0x02, 0x00, 0x10, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00, |
394 | 0x00, 0x78, 0x18, 0x0b, 0x06, 0xa2, 0x86, 0x78, | 396 | 0x00, 0x78, 0x18, 0x0b, 0x06, 0xa2, 0x86, 0x78, |
395 | 0x02, 0x0f, 0x01, 0x6b, | 397 | 0x02, 0x0f, 0x01, 0x6b, |
@@ -401,7 +403,7 @@ static const u8 nw801_init_qvga[] = { | |||
401 | /* AE window */ | 403 | /* AE window */ |
402 | 0, 0, 0, | 404 | 0, 0, 0, |
403 | }; | 405 | }; |
404 | static const u8 nw801_init_vga[] = { | 406 | static const u8 nw801_start_vga[] = { |
405 | 0x02, 0x00, 0x10, 0x78, 0xa0, 0x97, 0x78, 0xa0, 0x00, 0x00, 0x00, | 407 | 0x02, 0x00, 0x10, 0x78, 0xa0, 0x97, 0x78, 0xa0, 0x00, 0x00, 0x00, |
406 | 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xf0, | 408 | 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xf0, |
407 | 0x02, 0x0f, 0x01, 0xd5, | 409 | 0x02, 0x0f, 0x01, 0xd5, |
@@ -412,7 +414,7 @@ static const u8 nw801_init_vga[] = { | |||
412 | 0x10, 0x11, 0x08, 0x51, 0x00, 0x30, 0x02, 0x3d, 0x00, 0xa4, 0x01, | 414 | 0x10, 0x11, 0x08, 0x51, 0x00, 0x30, 0x02, 0x3d, 0x00, 0xa4, 0x01, |
413 | 0, 0, 0, | 415 | 0, 0, 0, |
414 | }; | 416 | }; |
415 | static const u8 nw801_init_2[] = { | 417 | static const u8 nw801_start_2[] = { |
416 | 0x10, 0x04, 0x01, 0x1a, | 418 | 0x10, 0x04, 0x01, 0x1a, |
417 | 0x10, 0x19, 0x01, 0x09, /* clock */ | 419 | 0x10, 0x19, 0x01, 0x09, /* clock */ |
418 | 0x10, 0x24, 0x06, 0xc0, 0x00, 0x3f, 0x02, 0x00, 0x01, | 420 | 0x10, 0x24, 0x06, 0xc0, 0x00, 0x3f, 0x02, 0x00, 0x01, |
@@ -441,7 +443,7 @@ static const u8 nw801_init_2[] = { | |||
441 | }; | 443 | }; |
442 | 444 | ||
443 | /* nw802 (sharp IR3Y38M?) */ | 445 | /* nw802 (sharp IR3Y38M?) */ |
444 | static const u8 nw802_init[] = { | 446 | static const u8 nw802_start[] = { |
445 | 0x04, 0x06, 0x01, 0x04, | 447 | 0x04, 0x06, 0x01, 0x04, |
446 | 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0xf9, 0x02, 0x10, 0x00, 0x4d, | 448 | 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0xf9, 0x02, 0x10, 0x00, 0x4d, |
447 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, | 449 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, |
@@ -524,7 +526,6 @@ static const u8 nw802_init[] = { | |||
524 | }; | 526 | }; |
525 | /* et31x110 - Trust 120 SpaceCam */ | 527 | /* et31x110 - Trust 120 SpaceCam */ |
526 | static const u8 spacecam_init[] = { | 528 | static const u8 spacecam_init[] = { |
527 | /*fixme: at connection time*/ | ||
528 | 0x04, 0x05, 0x01, 0x01, | 529 | 0x04, 0x05, 0x01, 0x01, |
529 | 0x04, 0x04, 0x01, 0x01, | 530 | 0x04, 0x04, 0x01, 0x01, |
530 | 0x04, 0x06, 0x01, 0x04, | 531 | 0x04, 0x06, 0x01, 0x04, |
@@ -617,13 +618,8 @@ static const u8 spacecam_init[] = { | |||
617 | 0x04, 0x04, 0x01, 0x40, | 618 | 0x04, 0x04, 0x01, 0x40, |
618 | 0, 0, 0 | 619 | 0, 0, 0 |
619 | }; | 620 | }; |
620 | /* et31x110 - other Trust SpaceCam120 */ | 621 | /* et31x110 - pas106 - other Trust SpaceCam120 */ |
621 | static const u8 spacecam2_init[] = { | 622 | static const u8 spacecam2_start[] = { |
622 | 0x04, 0x05, 0x01, 0x61, | ||
623 | 0x04, 0x04, 0x01, 0x01, | ||
624 | 0x04, 0x06, 0x01, 0x04, | ||
625 | 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, | ||
626 | 0x05, 0x05, 0x01, 0x00, | ||
627 | 0x04, 0x06, 0x01, 0x44, | 623 | 0x04, 0x06, 0x01, 0x44, |
628 | 0x04, 0x06, 0x01, 0x00, | 624 | 0x04, 0x06, 0x01, 0x00, |
629 | 0x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f, | 625 | 0x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f, |
@@ -682,79 +678,25 @@ static const u8 spacecam2_init[] = { | |||
682 | 0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01, | 678 | 0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01, |
683 | 0x04, 0x04, 0x01, 0x40, | 679 | 0x04, 0x04, 0x01, 0x40, |
684 | 0x04, 0x04, 0x01, 0x00, | 680 | 0x04, 0x04, 0x01, 0x00, |
685 | #if 1 | ||
686 | I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05, | 681 | I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05, |
687 | 0x00, 0x00, 0x05, 0x05, | 682 | 0x00, 0x00, 0x05, 0x05, |
688 | I2C0, 0x40, 0x02, 0x11, 0x06, | 683 | I2C0, 0x40, 0x02, 0x11, 0x06, |
689 | I2C0, 0x40, 0x02, 0x14, 0x00, | 684 | I2C0, 0x40, 0x02, 0x14, 0x00, |
690 | I2C0, 0x40, 0x02, 0x13, 0x01, | 685 | I2C0, 0x40, 0x02, 0x13, 0x01, /* i2c end */ |
691 | #else | ||
692 | 0x06, 0x00, 0x0b, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00, | ||
693 | 0x00, 0x05, 0x05, | ||
694 | 0x06, 0x00, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05, | ||
695 | 0x00, 0x00, 0x05, 0x05, | ||
696 | 0x05, 0x02, 0x02, 0x0c, 0x40, | ||
697 | 0x05, 0x05, 0x01, 0x01, | ||
698 | 0x06, 0x00, 0x01, 0x06, | ||
699 | 0x06, 0x00, 0x02, 0x11, 0x06, | ||
700 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
701 | 0x05, 0x05, 0x01, 0x01, | ||
702 | 0x06, 0x00, 0x01, 0x00, | ||
703 | 0x06, 0x00, 0x02, 0x14, 0x00, | ||
704 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
705 | 0x05, 0x05, 0x01, 0x01, | ||
706 | 0x06, 0x00, 0x01, 0x01, | ||
707 | 0x06, 0x00, 0x02, 0x13, 0x01, | ||
708 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
709 | 0x05, 0x05, 0x01, 0x01, | ||
710 | #endif | ||
711 | 0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00, | 686 | 0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00, |
712 | 0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65, | 687 | 0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65, |
713 | 0x40, | 688 | 0x40, |
714 | #if 1 | 689 | I2C0, 0x40, 0x02, 0x02, 0x0c, /* pixel clock */ |
715 | I2C0, 0x40, 0x02, 0x02, 0x0c, | ||
716 | I2C0, 0x40, 0x02, 0x0f, 0x00, | 690 | I2C0, 0x40, 0x02, 0x0f, 0x00, |
717 | I2C0, 0x40, 0x02, 0x13, 0x01, | 691 | I2C0, 0x40, 0x02, 0x13, 0x01, /* i2c end */ |
718 | #else | ||
719 | 0x06, 0x00, 0x01, 0x0c, | ||
720 | 0x06, 0x00, 0x02, 0x02, 0x0c, | ||
721 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
722 | 0x05, 0x05, 0x01, 0x01, | ||
723 | 0x06, 0x00, 0x01, 0x00, | ||
724 | 0x06, 0x00, 0x02, 0x0f, 0x00, | ||
725 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
726 | 0x05, 0x05, 0x01, 0x01, | ||
727 | 0x06, 0x00, 0x01, 0x01, | ||
728 | 0x06, 0x00, 0x02, 0x13, 0x01, | ||
729 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
730 | 0x05, 0x05, 0x01, 0x01, | ||
731 | #endif | ||
732 | 0x10, 0x00, 0x01, 0x01, | 692 | 0x10, 0x00, 0x01, 0x01, |
733 | 0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, | 693 | 0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, |
734 | 0x20, 0x01, 0x60, 0x01, | 694 | 0x20, 0x01, 0x60, 0x01, |
735 | #if 1 | 695 | I2C0, 0x40, 0x02, 0x05, 0x0f, /* exposure */ |
736 | I2C0, 0x40, 0x02, 0x05, 0x0f, | 696 | I2C0, 0x40, 0x02, 0x13, 0x01, /* i2c end */ |
737 | I2C0, 0x40, 0x02, 0x13, 0x01, | ||
738 | I2C0, 0x40, 0x07, 0x09, 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00, | 697 | I2C0, 0x40, 0x07, 0x09, 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00, |
698 | /* gains */ | ||
739 | I2C0, 0x40, 0x03, 0x12, 0x04, 0x01, | 699 | I2C0, 0x40, 0x03, 0x12, 0x04, 0x01, |
740 | #else | ||
741 | 0x06, 0x00, 0x01, 0x0f, | ||
742 | 0x06, 0x00, 0x02, 0x05, 0x0f, | ||
743 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
744 | 0x05, 0x05, 0x01, 0x01, | ||
745 | 0x06, 0x00, 0x01, 0x01, | ||
746 | 0x06, 0x00, 0x02, 0x13, 0x01, | ||
747 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
748 | 0x05, 0x05, 0x01, 0x01, | ||
749 | 0x06, 0x00, 0x06, 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00, | ||
750 | 0x06, 0x00, 0x07, 0x09, 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00, | ||
751 | 0x05, 0x02, 0x02, 0x07, 0x40, | ||
752 | 0x05, 0x05, 0x01, 0x01, | ||
753 | 0x06, 0x00, 0x02, 0x04, 0x01, | ||
754 | 0x06, 0x00, 0x03, 0x12, 0x04, 0x01, | ||
755 | 0x05, 0x02, 0x02, 0x03, 0x40, | ||
756 | 0x05, 0x05, 0x01, 0x01, | ||
757 | #endif | ||
758 | 0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01, | 700 | 0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01, |
759 | 0x10, 0x0e, 0x01, 0x08, | 701 | 0x10, 0x0e, 0x01, 0x08, |
760 | 0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7, | 702 | 0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7, |
@@ -776,7 +718,7 @@ static const u8 spacecam2_init[] = { | |||
776 | }; | 718 | }; |
777 | 719 | ||
778 | /* nw802 - Conceptronic Video Pro */ | 720 | /* nw802 - Conceptronic Video Pro */ |
779 | static const u8 cvideopro_init[] = { | 721 | static const u8 cvideopro_start[] = { |
780 | 0x04, 0x06, 0x01, 0x04, | 722 | 0x04, 0x06, 0x01, 0x04, |
781 | 0x00, 0x00, 0x40, 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c, | 723 | 0x00, 0x00, 0x40, 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c, |
782 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, | 724 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, |
@@ -856,10 +798,9 @@ static const u8 cvideopro_init[] = { | |||
856 | }; | 798 | }; |
857 | 799 | ||
858 | /* nw802 - D-link dru-350c cam */ | 800 | /* nw802 - D-link dru-350c cam */ |
859 | static const u8 dlink_init[] = { | 801 | static const u8 dlink_start[] = { |
860 | 0x04, 0x06, 0x01, 0x04, | 802 | 0x04, 0x06, 0x01, 0x04, |
861 | 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d, | 803 | 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d, |
862 | /* 0xf9, 0x02, = nb pixels per line */ | ||
863 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, | 804 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, |
864 | 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19, | 805 | 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19, |
865 | 0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4, | 806 | 0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4, |
@@ -878,7 +819,6 @@ static const u8 dlink_init[] = { | |||
878 | 0x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00, | 819 | 0x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00, |
879 | 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11, | 820 | 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11, |
880 | 0x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94, | 821 | 0x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94, |
881 | /* 0x19, v index of clamping pulse */ | ||
882 | 0x00, 0x10, 0x06, 0x10, 0x00, 0x36, 0x00, | 822 | 0x00, 0x10, 0x06, 0x10, 0x00, 0x36, 0x00, |
883 | 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00, | 823 | 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00, |
884 | 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0, | 824 | 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0, |
@@ -909,7 +849,6 @@ static const u8 dlink_init[] = { | |||
909 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x82, | 849 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x82, |
910 | 0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40, | 850 | 0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40, |
911 | 0x01, 0xf0, 0x00, | 851 | 0x01, 0xf0, 0x00, |
912 | /* 0x00, 0x03, 0x02, 0x92, 0x03, = nb of pixels per line */ | ||
913 | 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00, | 852 | 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00, |
914 | 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78, | 853 | 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78, |
915 | 0x40, | 854 | 0x40, |
@@ -938,8 +877,10 @@ static const u8 dlink_init[] = { | |||
938 | 0, 0, 0 | 877 | 0, 0, 0 |
939 | }; | 878 | }; |
940 | 879 | ||
941 | /* nw801 - Plustek Opticam 500U or ProLink DS3303u (Hitachi HD49322BF) */ | 880 | /* 06a5:d001 - nw801 - Sony |
942 | static const u8 ds330_init[] = { | 881 | * Plustek Opticam 500U or ProLink DS3303u (Hitachi HD49322BF) */ |
882 | /*fixme: 320x240 only*/ | ||
883 | static const u8 ds3303_start[] = { | ||
943 | 0x05, 0x06, 0x01, 0x04, | 884 | 0x05, 0x06, 0x01, 0x04, |
944 | 0x00, 0x00, 0x40, 0x16, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e, | 885 | 0x00, 0x00, 0x40, 0x16, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e, |
945 | 0x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, | 886 | 0x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, |
@@ -1021,8 +962,9 @@ static const u8 ds330_init[] = { | |||
1021 | 0, 0, 0 | 962 | 0, 0, 0 |
1022 | }; | 963 | }; |
1023 | 964 | ||
1024 | /* 06a5:d001 - nw802 - Panasonic GP-KR651US (Philips TDA8786) */ | 965 | /* 06a5:d001 - nw802 - Panasonic |
1025 | static const u8 kr651_init_1[] = { | 966 | * GP-KR651US (Philips TDA8786) */ |
967 | static const u8 kr651_start_1[] = { | ||
1026 | 0x04, 0x06, 0x01, 0x04, | 968 | 0x04, 0x06, 0x01, 0x04, |
1027 | 0x00, 0x00, 0x40, 0x44, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x48, | 969 | 0x00, 0x00, 0x40, 0x44, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x48, |
1028 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, | 970 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, |
@@ -1075,7 +1017,7 @@ static const u8 kr651_init_1[] = { | |||
1075 | 0x01, 0xf0, 0x00, | 1017 | 0x01, 0xf0, 0x00, |
1076 | 0, 0, 0 | 1018 | 0, 0, 0 |
1077 | }; | 1019 | }; |
1078 | static const u8 kr651_init_qvga[] = { | 1020 | static const u8 kr651_start_qvga[] = { |
1079 | 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00, | 1021 | 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00, |
1080 | 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78, | 1022 | 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78, |
1081 | 0x40, | 1023 | 0x40, |
@@ -1088,21 +1030,19 @@ static const u8 kr651_init_qvga[] = { | |||
1088 | 0x10, 0x1d, 0x02, 0x28, 0x01, | 1030 | 0x10, 0x1d, 0x02, 0x28, 0x01, |
1089 | 0, 0, 0 | 1031 | 0, 0, 0 |
1090 | }; | 1032 | }; |
1091 | static const u8 kr651_init_vga[] = { | 1033 | static const u8 kr651_start_vga[] = { |
1092 | 0x02, 0x00, 0x11, 0x78, 0xa0, 0x8c, 0x78, 0xa0, 0x00, 0x00, 0x00, | 1034 | 0x02, 0x00, 0x11, 0x78, 0xa0, 0x8c, 0x78, 0xa0, 0x00, 0x00, 0x00, |
1093 | 0x00, 0xf0, 0x30, 0x03, 0x01, 0x82, 0x82, 0x98, | 1035 | 0x00, 0xf0, 0x30, 0x03, 0x01, 0x82, 0x82, 0x98, |
1094 | 0x80, | 1036 | 0x80, |
1095 | 0x10, 0x1a, 0x01, 0x03, | 1037 | 0x10, 0x1a, 0x01, 0x03, |
1096 | 0x10, 0x00, 0x01, 0xa0, | 1038 | 0x10, 0x00, 0x01, 0xa0, |
1097 | 0x10, 0x85, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01, | 1039 | 0x10, 0x85, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01, |
1098 | |||
1099 | 0x10, 0x1b, 0x02, 0x00, 0x00, | 1040 | 0x10, 0x1b, 0x02, 0x00, 0x00, |
1100 | 0x10, 0x11, 0x08, 0x51, 0x00, 0x30, 0x02, 0x3d, 0x00, 0xa4, 0x01, | 1041 | 0x10, 0x11, 0x08, 0x51, 0x00, 0x30, 0x02, 0x3d, 0x00, 0xa4, 0x01, |
1101 | |||
1102 | 0x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00, | 1042 | 0x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00, |
1103 | 0x10, 0x1d, 0x02, 0x68, 0x00, | 1043 | 0x10, 0x1d, 0x02, 0x68, 0x00, |
1104 | }; | 1044 | }; |
1105 | static const u8 kr651_init_2[] = { | 1045 | static const u8 kr651_start_2[] = { |
1106 | 0x10, 0x0e, 0x01, 0x08, | 1046 | 0x10, 0x0e, 0x01, 0x08, |
1107 | 0x10, 0x41, 0x11, 0x00, 0x11, 0x3c, 0x5c, 0x74, 0x88, 0x99, 0xa8, | 1047 | 0x10, 0x41, 0x11, 0x00, 0x11, 0x3c, 0x5c, 0x74, 0x88, 0x99, 0xa8, |
1108 | 0xb7, 0xc4, 0xd0, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc, | 1048 | 0xb7, 0xc4, 0xd0, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc, |
@@ -1122,7 +1062,7 @@ static const u8 kr651_init_2[] = { | |||
1122 | }; | 1062 | }; |
1123 | 1063 | ||
1124 | /* nw802 - iRez Kritter cam */ | 1064 | /* nw802 - iRez Kritter cam */ |
1125 | static const u8 kritter_init[] = { | 1065 | static const u8 kritter_start[] = { |
1126 | 0x04, 0x06, 0x01, 0x06, | 1066 | 0x04, 0x06, 0x01, 0x06, |
1127 | 0x00, 0x00, 0x40, 0x44, 0x96, 0x98, 0x94, 0x03, 0x18, 0x00, 0x48, | 1067 | 0x00, 0x00, 0x40, 0x44, 0x96, 0x98, 0x94, 0x03, 0x18, 0x00, 0x48, |
1128 | 0x0f, 0x1e, 0x00, 0x0c, 0x02, 0x01, 0x00, 0x19, | 1068 | 0x0f, 0x1e, 0x00, 0x0c, 0x02, 0x01, 0x00, 0x19, |
@@ -1202,7 +1142,7 @@ static const u8 kritter_init[] = { | |||
1202 | }; | 1142 | }; |
1203 | 1143 | ||
1204 | /* nw802 - Mustek Wcam 300 mini */ | 1144 | /* nw802 - Mustek Wcam 300 mini */ |
1205 | static const u8 mustek_init[] = { | 1145 | static const u8 mustek_start[] = { |
1206 | 0x04, 0x06, 0x01, 0x04, | 1146 | 0x04, 0x06, 0x01, 0x04, |
1207 | 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d, | 1147 | 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d, |
1208 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, | 1148 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, |
@@ -1337,7 +1277,7 @@ static const u8 proscope_init_1[] = { | |||
1337 | 0x01, 0xf0, 0x00, | 1277 | 0x01, 0xf0, 0x00, |
1338 | 0, 0, 0 | 1278 | 0, 0, 0 |
1339 | }; | 1279 | }; |
1340 | static const u8 proscope_init_qvga[] = { | 1280 | static const u8 proscope_start_qvga[] = { |
1341 | 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00, | 1281 | 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00, |
1342 | 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78, | 1282 | 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78, |
1343 | 0x40, | 1283 | 0x40, |
@@ -1350,7 +1290,7 @@ static const u8 proscope_init_qvga[] = { | |||
1350 | 0x10, 0x0e, 0x01, 0x10, | 1290 | 0x10, 0x0e, 0x01, 0x10, |
1351 | 0, 0, 0 | 1291 | 0, 0, 0 |
1352 | }; | 1292 | }; |
1353 | static const u8 proscope_init_vga[] = { | 1293 | static const u8 proscope_start_vga[] = { |
1354 | 0x00, 0x03, 0x02, 0xf9, 0x02, | 1294 | 0x00, 0x03, 0x02, 0xf9, 0x02, |
1355 | 0x10, 0x85, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01, | 1295 | 0x10, 0x85, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01, |
1356 | 0x02, 0x00, 0x11, 0x78, 0xa0, 0x8c, 0x78, 0xa0, 0x00, 0x00, 0x00, | 1296 | 0x02, 0x00, 0x11, 0x78, 0xa0, 0x8c, 0x78, 0xa0, 0x00, 0x00, 0x00, |
@@ -1368,7 +1308,7 @@ static const u8 proscope_init_vga[] = { | |||
1368 | 0x10, 0x03, 0x01, 0x00, | 1308 | 0x10, 0x03, 0x01, 0x00, |
1369 | 0, 0, 0 | 1309 | 0, 0, 0 |
1370 | }; | 1310 | }; |
1371 | static const u8 proscope_init_2[] = { | 1311 | static const u8 proscope_start_2[] = { |
1372 | 0x10, 0x0f, 0x02, 0x0c, 0x0c, | 1312 | 0x10, 0x0f, 0x02, 0x0c, 0x0c, |
1373 | 0x10, 0x03, 0x01, 0x0c, | 1313 | 0x10, 0x03, 0x01, 0x0c, |
1374 | 0x10, 0x41, 0x11, 0x00, 0x10, 0x51, 0x6e, 0x83, 0x93, 0xa1, 0xae, | 1314 | 0x10, 0x41, 0x11, 0x00, 0x10, 0x51, 0x6e, 0x83, 0x93, 0xa1, 0xae, |
@@ -1383,14 +1323,8 @@ static const u8 proscope_init_2[] = { | |||
1383 | 0, 0, 0 | 1323 | 0, 0, 0 |
1384 | }; | 1324 | }; |
1385 | 1325 | ||
1386 | /* nw800 - Divio Chicony TwinkleCam */ | 1326 | /* nw800 - hv7121b? (seems pas106) - Divio Chicony TwinkleCam */ |
1387 | static const u8 twinkle_init[] = { | 1327 | static const u8 twinkle_start[] = { |
1388 | 0x04, 0x05, 0x01, 0x61, | ||
1389 | 0x04, 0x04, 0x01, 0x01, | ||
1390 | 0x04, 0x06, 0x01, 0x04, | ||
1391 | 0x04, 0x04, 0x03, 0x00, 0x00, 0x00, | ||
1392 | 0x05, 0x05, 0x01, 0x00, | ||
1393 | |||
1394 | 0x04, 0x06, 0x01, 0x44, | 1328 | 0x04, 0x06, 0x01, 0x44, |
1395 | 0x04, 0x06, 0x01, 0x00, | 1329 | 0x04, 0x06, 0x01, 0x00, |
1396 | 0x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f, | 1330 | 0x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f, |
@@ -1448,107 +1382,32 @@ static const u8 twinkle_init[] = { | |||
1448 | 0x01, 0x60, 0x01, 0x00, 0x00, | 1382 | 0x01, 0x60, 0x01, 0x00, 0x00, |
1449 | 1383 | ||
1450 | 0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01, | 1384 | 0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01, |
1451 | /*320 3f ef, 0x00 */ | ||
1452 | 0x04, 0x04, 0x01, 0x10, | 1385 | 0x04, 0x04, 0x01, 0x10, |
1453 | 0x04, 0x04, 0x01, 0x00, | 1386 | 0x04, 0x04, 0x01, 0x00, |
1454 | 0x04, 0x05, 0x01, 0x61, | 1387 | 0x04, 0x05, 0x01, 0x61, |
1455 | 0x04, 0x04, 0x01, 0x01, | 1388 | 0x04, 0x04, 0x01, 0x01, |
1456 | #if 1 | ||
1457 | I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00, | 1389 | I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00, |
1458 | 0x00, 0x00, 0x00, 0x0a, | 1390 | 0x00, 0x00, 0x00, 0x0a, |
1459 | I2C0, 0x40, 0x02, 0x11, 0x06, | 1391 | I2C0, 0x40, 0x02, 0x11, 0x06, |
1460 | I2C0, 0x40, 0x02, 0x14, 0x00, | 1392 | I2C0, 0x40, 0x02, 0x14, 0x00, |
1461 | I2C0, 0x40, 0x02, 0x13, 0x01, | 1393 | I2C0, 0x40, 0x02, 0x13, 0x01, /* i2c end */ |
1462 | I2C0, 0x40, 0x02, 0x07, 0x01, | 1394 | I2C0, 0x40, 0x02, 0x07, 0x01, |
1463 | #else | ||
1464 | 0x06, 0x00, 0x0b, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, | ||
1465 | 0x00, 0x00, 0x0a, | ||
1466 | 0x06, 0x00, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00, | ||
1467 | 0x00, 0x00, 0x00, 0x0a, | ||
1468 | 0x05, 0x02, 0x02, 0x0c, 0x40, | ||
1469 | 0x05, 0x05, 0x01, 0x01, | ||
1470 | 0x06, 0x00, 0x01, 0x06, | ||
1471 | 0x06, 0x00, 0x02, 0x11, 0x06, | ||
1472 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1473 | 0x05, 0x05, 0x01, 0x01, | ||
1474 | 0x06, 0x00, 0x01, 0x00, | ||
1475 | 0x06, 0x00, 0x02, 0x14, 0x00, | ||
1476 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1477 | 0x05, 0x05, 0x01, 0x01, | ||
1478 | 0x06, 0x00, 0x01, 0x01, | ||
1479 | 0x06, 0x00, 0x02, 0x13, 0x01, | ||
1480 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1481 | 0x05, 0x05, 0x01, 0x01, | ||
1482 | 0x06, 0x00, 0x01, 0x01, | ||
1483 | 0x06, 0x00, 0x02, 0x07, 0x01, | ||
1484 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1485 | 0x05, 0x05, 0x01, 0x01, | ||
1486 | #endif | ||
1487 | 0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00, | 1395 | 0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00, |
1488 | /* 320 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00, */ | ||
1489 | 0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65, | 1396 | 0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65, |
1490 | /* 320 0x00, 0x78, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x5c, */ | ||
1491 | 0x40, | 1397 | 0x40, |
1492 | #if 1 | ||
1493 | I2C0, 0x40, 0x02, 0x02, 0x0c, | 1398 | I2C0, 0x40, 0x02, 0x02, 0x0c, |
1494 | I2C0, 0x40, 0x02, 0x13, 0x01, | 1399 | I2C0, 0x40, 0x02, 0x13, 0x01, |
1495 | #else | ||
1496 | 0x06, 0x00, 0x01, 0x0c, | ||
1497 | 0x06, 0x00, 0x02, 0x02, 0x0c, | ||
1498 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1499 | 0x05, 0x05, 0x01, 0x01, | ||
1500 | 0x06, 0x00, 0x01, 0x01, | ||
1501 | 0x06, 0x00, 0x02, 0x13, 0x01, | ||
1502 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1503 | 0x05, 0x05, 0x01, 0x01, | ||
1504 | #endif | ||
1505 | 0x10, 0x00, 0x01, 0x01, | 1400 | 0x10, 0x00, 0x01, 0x01, |
1506 | 0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, | 1401 | 0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, |
1507 | 0x20, 0x01, 0x60, 0x01, | 1402 | 0x20, 0x01, 0x60, 0x01, |
1508 | /* 320 0xf0, 0x00, 0x40, 0x01, */ | ||
1509 | #if 1 | ||
1510 | I2C0, 0x40, 0x02, 0x05, 0x0f, | 1403 | I2C0, 0x40, 0x02, 0x05, 0x0f, |
1511 | I2C0, 0x40, 0x02, 0x13, 0x01, | 1404 | I2C0, 0x40, 0x02, 0x13, 0x01, |
1512 | I2C0, 0x40, 0x08, 0x08, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x17, | 1405 | I2C0, 0x40, 0x08, 0x08, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x17, |
1513 | I2C0, 0x40, 0x03, 0x12, 0x00, 0x01, | 1406 | I2C0, 0x40, 0x03, 0x12, 0x00, 0x01, |
1514 | #else | ||
1515 | 0x06, 0x00, 0x01, 0x0f, | ||
1516 | 0x06, 0x00, 0x02, 0x05, 0x0f, | ||
1517 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1518 | 0x05, 0x05, 0x01, 0x01, | ||
1519 | 0x06, 0x00, 0x01, 0x01, | ||
1520 | 0x06, 0x00, 0x02, 0x13, 0x01, | ||
1521 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1522 | 0x05, 0x05, 0x01, 0x01, | ||
1523 | 0x06, 0x00, 0x07, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x17, | ||
1524 | 0x06, 0x00, 0x08, 0x08, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x17, | ||
1525 | 0x05, 0x02, 0x02, 0x08, 0x40, | ||
1526 | 0x05, 0x05, 0x01, 0x01, | ||
1527 | 0x06, 0x00, 0x02, 0x00, 0x01, | ||
1528 | 0x06, 0x00, 0x03, 0x12, 0x00, 0x01, | ||
1529 | 0x05, 0x02, 0x02, 0x03, 0x40, | ||
1530 | 0x05, 0x05, 0x01, 0x01, | ||
1531 | #endif | ||
1532 | 0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01, | 1407 | 0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01, |
1533 | /* 320 3f ef */ | ||
1534 | #if 1 | ||
1535 | I2C0, 0x40, 0x02, 0x12, 0x00, | 1408 | I2C0, 0x40, 0x02, 0x12, 0x00, |
1536 | I2C0, 0x40, 0x02, 0x0e, 0x00, | 1409 | I2C0, 0x40, 0x02, 0x0e, 0x00, |
1537 | I2C0, 0x40, 0x02, 0x11, 0x06, | 1410 | I2C0, 0x40, 0x02, 0x11, 0x06, |
1538 | #else | ||
1539 | 0x06, 0x00, 0x01, 0x00, | ||
1540 | 0x06, 0x00, 0x02, 0x12, 0x00, | ||
1541 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1542 | 0x05, 0x05, 0x01, 0x01, | ||
1543 | 0x06, 0x00, 0x01, 0x00, | ||
1544 | 0x06, 0x00, 0x02, 0x0e, 0x00, | ||
1545 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1546 | 0x05, 0x05, 0x01, 0x01, | ||
1547 | 0x06, 0x00, 0x01, 0x06, | ||
1548 | 0x06, 0x00, 0x02, 0x11, 0x06, | ||
1549 | 0x05, 0x02, 0x02, 0x02, 0x40, | ||
1550 | 0x05, 0x05, 0x01, 0x01, | ||
1551 | #endif | ||
1552 | 0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7, | 1411 | 0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7, |
1553 | 0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7, | 1412 | 0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7, |
1554 | 0xf9, | 1413 | 0xf9, |
@@ -1745,7 +1604,7 @@ static const u8 dsbc110_init[] = { | |||
1745 | }; | 1604 | }; |
1746 | 1605 | ||
1747 | /* nw802 dvc-v6 */ | 1606 | /* nw802 dvc-v6 */ |
1748 | static const u8 dvcv6_init[] = { | 1607 | static const u8 dvcv6_start[] = { |
1749 | 0x04, 0x06, 0x01, 0x06, | 1608 | 0x04, 0x06, 0x01, 0x06, |
1750 | 0x00, 0x00, 0x40, 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c, | 1609 | 0x00, 0x00, 0x40, 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c, |
1751 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, | 1610 | 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19, |
@@ -1830,22 +1689,22 @@ static const u8 dvcv6_init[] = { | |||
1830 | 0x04, 0x04, 0x01, 0x00, | 1689 | 0x04, 0x04, 0x01, 0x00, |
1831 | }; | 1690 | }; |
1832 | 1691 | ||
1833 | static const u8 *webcam_init[] = { | 1692 | static const u8 *webcam_start[] = { |
1834 | [Generic800] = nw800_init, | 1693 | [Generic800] = nw800_init, |
1835 | [SpaceCam] = spacecam_init, | 1694 | [SpaceCam] = spacecam_init, |
1836 | [SpaceCam2] = spacecam2_init, | 1695 | [SpaceCam2] = spacecam2_start, |
1837 | [Cvideopro] = cvideopro_init, | 1696 | [Cvideopro] = cvideopro_start, |
1838 | [Dlink350c] = dlink_init, | 1697 | [Dlink350c] = dlink_start, |
1839 | [DS3303u] = ds330_init, | 1698 | [DS3303u] = ds3303_start, |
1840 | [Kr651us] = kr651_init_1, | 1699 | [Kr651us] = kr651_start_1, |
1841 | [Kritter] = kritter_init, | 1700 | [Kritter] = kritter_start, |
1842 | [Mustek300] = mustek_init, | 1701 | [Mustek300] = mustek_start, |
1843 | [Proscope] = proscope_init_1, | 1702 | [Proscope] = proscope_init_1, |
1844 | [Twinkle] = twinkle_init, | 1703 | [Twinkle] = twinkle_start, |
1845 | [DsbC110] = dsbc110_init, | 1704 | [DsbC110] = dsbc110_init, |
1846 | [DvcV6] = dvcv6_init, | 1705 | [DvcV6] = dvcv6_start, |
1847 | [P35u] = nw801_init_1, | 1706 | [P35u] = nw801_start_1, |
1848 | [Generic802] = nw802_init, | 1707 | [Generic802] = nw802_start, |
1849 | }; | 1708 | }; |
1850 | 1709 | ||
1851 | /* -- write a register -- */ | 1710 | /* -- write a register -- */ |
@@ -1949,7 +1808,7 @@ static void reg_w_buf(struct gspca_dev *gspca_dev, | |||
1949 | if (cmd[-3] != I2C0) | 1808 | if (cmd[-3] != I2C0) |
1950 | reg_w(gspca_dev, reg, cmd, len); | 1809 | reg_w(gspca_dev, reg, cmd, len); |
1951 | else | 1810 | else |
1952 | i2c_w(gspca_dev, reg & 0xff, cmd, len); | 1811 | i2c_w(gspca_dev, reg, cmd, len); |
1953 | cmd += len; | 1812 | cmd += len; |
1954 | } | 1813 | } |
1955 | } | 1814 | } |
@@ -2092,8 +1951,8 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
2092 | PDEBUG(D_PROBE, "Bridge nw80%d", sd->bridge); | 1951 | PDEBUG(D_PROBE, "Bridge nw80%d", sd->bridge); |
2093 | 1952 | ||
2094 | if (sd->bridge == BRIDGE_NW800) { | 1953 | if (sd->bridge == BRIDGE_NW800) { |
2095 | gspca_dev->cam.cam_mode = sif_mode; | 1954 | gspca_dev->cam.cam_mode = cif_mode; |
2096 | gspca_dev->cam.nmodes = ARRAY_SIZE(sif_mode); | 1955 | gspca_dev->cam.nmodes = ARRAY_SIZE(cif_mode); |
2097 | } else { | 1956 | } else { |
2098 | gspca_dev->cam.cam_mode = vga_mode; | 1957 | gspca_dev->cam.cam_mode = vga_mode; |
2099 | switch (sd->webcam) { | 1958 | switch (sd->webcam) { |
@@ -2110,12 +1969,10 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
2110 | } | 1969 | } |
2111 | switch (sd->webcam) { | 1970 | switch (sd->webcam) { |
2112 | case P35u: | 1971 | case P35u: |
2113 | /* sd->ctrls[EXPOSURE].min = 0; | 1972 | /* sd->ctrls[EXPOSURE].max = 9; |
2114 | * sd->ctrls[EXPOSURE].max = 9; | ||
2115 | * sd->ctrls[EXPOSURE].def = 1; */ | 1973 | * sd->ctrls[EXPOSURE].def = 1; */ |
2116 | break; | 1974 | break; |
2117 | case Kr651us: | 1975 | case Kr651us: |
2118 | /* sd->ctrls[EXPOSURE].min = 0; */ | ||
2119 | sd->ctrls[EXPOSURE].max = 315; | 1976 | sd->ctrls[EXPOSURE].max = 315; |
2120 | sd->ctrls[EXPOSURE].def = 150; | 1977 | sd->ctrls[EXPOSURE].def = 150; |
2121 | break; | 1978 | break; |
@@ -2133,29 +1990,29 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
2133 | struct sd *sd = (struct sd *) gspca_dev; | 1990 | struct sd *sd = (struct sd *) gspca_dev; |
2134 | const u8 *cmd; | 1991 | const u8 *cmd; |
2135 | 1992 | ||
2136 | cmd = webcam_init[sd->webcam]; | 1993 | cmd = webcam_start[sd->webcam]; |
2137 | reg_w_buf(gspca_dev, cmd); | 1994 | reg_w_buf(gspca_dev, cmd); |
2138 | switch (sd->webcam) { | 1995 | switch (sd->webcam) { |
2139 | case P35u: | 1996 | case P35u: |
2140 | if (gspca_dev->width == 320) | 1997 | if (gspca_dev->width == 320) |
2141 | reg_w_buf(gspca_dev, nw801_init_qvga); | 1998 | reg_w_buf(gspca_dev, nw801_start_qvga); |
2142 | else | 1999 | else |
2143 | reg_w_buf(gspca_dev, nw801_init_vga); | 2000 | reg_w_buf(gspca_dev, nw801_start_vga); |
2144 | reg_w_buf(gspca_dev, nw801_init_2); | 2001 | reg_w_buf(gspca_dev, nw801_start_2); |
2145 | break; | 2002 | break; |
2146 | case Kr651us: | 2003 | case Kr651us: |
2147 | if (gspca_dev->width == 320) | 2004 | if (gspca_dev->width == 320) |
2148 | reg_w_buf(gspca_dev, kr651_init_qvga); | 2005 | reg_w_buf(gspca_dev, kr651_start_qvga); |
2149 | else | 2006 | else |
2150 | reg_w_buf(gspca_dev, kr651_init_vga); | 2007 | reg_w_buf(gspca_dev, kr651_start_vga); |
2151 | reg_w_buf(gspca_dev, kr651_init_2); | 2008 | reg_w_buf(gspca_dev, kr651_start_2); |
2152 | break; | 2009 | break; |
2153 | case Proscope: | 2010 | case Proscope: |
2154 | if (gspca_dev->width == 320) | 2011 | if (gspca_dev->width == 320) |
2155 | reg_w_buf(gspca_dev, proscope_init_qvga); | 2012 | reg_w_buf(gspca_dev, proscope_start_qvga); |
2156 | else | 2013 | else |
2157 | reg_w_buf(gspca_dev, proscope_init_vga); | 2014 | reg_w_buf(gspca_dev, proscope_start_vga); |
2158 | reg_w_buf(gspca_dev, proscope_init_2); | 2015 | reg_w_buf(gspca_dev, proscope_start_2); |
2159 | break; | 2016 | break; |
2160 | } | 2017 | } |
2161 | 2018 | ||