diff options
Diffstat (limited to 'drivers/media/video/gspca/vc032x.c')
-rw-r--r-- | drivers/media/video/gspca/vc032x.c | 245 |
1 files changed, 165 insertions, 80 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index cda14583bc35..1a50f8025bd1 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c | |||
@@ -153,9 +153,9 @@ static const struct v4l2_pix_format vc0323_mode[] = { | |||
153 | .sizeimage = 640 * 480 * 3 / 8 + 590, | 153 | .sizeimage = 640 * 480 * 3 / 8 + 590, |
154 | .colorspace = V4L2_COLORSPACE_JPEG, | 154 | .colorspace = V4L2_COLORSPACE_JPEG, |
155 | .priv = 0}, | 155 | .priv = 0}, |
156 | {1280, 1024, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, /* mi13x0_soc only */ | 156 | {1280, 960, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, /* mi1310_soc only */ |
157 | .bytesperline = 1280, | 157 | .bytesperline = 1280, |
158 | .sizeimage = 1280 * 1024 * 1 / 4 + 590, | 158 | .sizeimage = 1280 * 960 * 3 / 8 + 590, |
159 | .colorspace = V4L2_COLORSPACE_JPEG, | 159 | .colorspace = V4L2_COLORSPACE_JPEG, |
160 | .priv = 2}, | 160 | .priv = 2}, |
161 | }; | 161 | }; |
@@ -650,108 +650,194 @@ static const __u8 mi1310_socinitQVGA_JPG[][4] = { | |||
650 | static const u8 mi1310_soc_InitSXGA_JPG[][4] = { | 650 | static const u8 mi1310_soc_InitSXGA_JPG[][4] = { |
651 | {0xb0, 0x03, 0x19, 0xcc}, | 651 | {0xb0, 0x03, 0x19, 0xcc}, |
652 | {0xb0, 0x04, 0x02, 0xcc}, | 652 | {0xb0, 0x04, 0x02, 0xcc}, |
653 | {0xb3, 0x00, 0x24, 0xcc}, | 653 | {0xb3, 0x00, 0x64, 0xcc}, |
654 | {0xb3, 0x00, 0x25, 0xcc}, | 654 | {0xb3, 0x00, 0x65, 0xcc}, |
655 | {0xb3, 0x05, 0x00, 0xcc}, | 655 | {0xb3, 0x05, 0x00, 0xcc}, |
656 | {0xb3, 0x06, 0x01, 0xcc}, | 656 | {0xb3, 0x06, 0x00, 0xcc}, |
657 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
658 | {0xb3, 0x08, 0x01, 0xcc}, | 657 | {0xb3, 0x08, 0x01, 0xcc}, |
659 | {0xb3, 0x09, 0x0c, 0xcc}, | 658 | {0xb3, 0x09, 0x0c, 0xcc}, |
660 | {0xb3, 0x34, 0x02, 0xcc}, | 659 | {0xb3, 0x34, 0x02, 0xcc}, |
661 | {0xb3, 0x35, 0xdd, 0xcc}, | 660 | {0xb3, 0x35, 0xdd, 0xcc}, |
661 | {0xb3, 0x02, 0x00, 0xcc}, | ||
662 | {0xb3, 0x03, 0x0a, 0xcc}, | 662 | {0xb3, 0x03, 0x0a, 0xcc}, |
663 | {0xb3, 0x04, 0x0d, 0xcc}, | 663 | {0xb3, 0x04, 0x0d, 0xcc}, |
664 | {0xb3, 0x20, 0x00, 0xcc}, | 664 | {0xb3, 0x20, 0x00, 0xcc}, |
665 | {0xb3, 0x21, 0x00, 0xcc}, | 665 | {0xb3, 0x21, 0x00, 0xcc}, |
666 | {0xb3, 0x22, 0x04, 0xcc}, | 666 | {0xb3, 0x22, 0x03, 0xcc}, |
667 | {0xb3, 0x23, 0x00, 0xcc}, | 667 | {0xb3, 0x23, 0xc0, 0xcc}, |
668 | {0xb3, 0x14, 0x00, 0xcc}, | 668 | {0xb3, 0x14, 0x00, 0xcc}, |
669 | {0xb3, 0x15, 0x00, 0xcc}, | 669 | {0xb3, 0x15, 0x00, 0xcc}, |
670 | {0xb3, 0x16, 0x04, 0xcc}, | 670 | {0xb3, 0x16, 0x04, 0xcc}, |
671 | {0xb3, 0x17, 0xff, 0xcc}, | 671 | {0xb3, 0x17, 0xff, 0xcc}, |
672 | {0xb8, 0x01, 0x7d, 0xcc}, | 672 | {0xb3, 0x00, 0x65, 0xcc}, |
673 | {0xb8, 0x81, 0x09, 0xcc}, | 673 | {0xb8, 0x00, 0x00, 0xcc}, |
674 | {0xb8, 0x27, 0x20, 0xcc}, | 674 | {0xbc, 0x00, 0x70, 0xcc}, |
675 | {0xb8, 0x26, 0x80, 0xcc}, | 675 | {0xbc, 0x01, 0x01, 0xcc}, |
676 | {0xb8, 0x06, 0x00, 0xcc}, | 676 | {0xf0, 0x00, 0x02, 0xbb}, |
677 | {0xb8, 0x07, 0x05, 0xcc}, | 677 | {0xc8, 0x9f, 0x0b, 0xbb}, |
678 | {0xb8, 0x08, 0x00, 0xcc}, | 678 | {0x5b, 0x00, 0x01, 0xbb}, |
679 | {0xb8, 0x09, 0x04, 0xcc}, | ||
680 | {0xb3, 0x00, 0x25, 0xcc}, | ||
681 | {0xb8, 0x00, 0x11, 0xcc}, | ||
682 | {0xbc, 0x00, 0x71, 0xcc}, | ||
683 | {0xb8, 0x81, 0x01, 0xcc}, | ||
684 | {0xb8, 0x2c, 0x5a, 0xcc}, | ||
685 | {0xb8, 0x2d, 0xff, 0xcc}, | ||
686 | {0xb8, 0x2e, 0xee, 0xcc}, | ||
687 | {0xb8, 0x2f, 0xfb, 0xcc}, | ||
688 | {0xb8, 0x30, 0x52, 0xcc}, | ||
689 | {0xb8, 0x31, 0xf8, 0xcc}, | ||
690 | {0xb8, 0x32, 0xf1, 0xcc}, | ||
691 | {0xb8, 0x33, 0xff, 0xcc}, | ||
692 | {0xb8, 0x34, 0x54, 0xcc}, | ||
693 | {0xf0, 0x00, 0x00, 0xbb}, | 679 | {0xf0, 0x00, 0x00, 0xbb}, |
694 | {0x00, 0x01, 0x00, 0xdd}, | 680 | {0x20, 0x03, 0x03, 0xbb}, |
695 | {0x0d, 0x00, 0x09, 0xbb}, | ||
696 | {0x0d, 0x00, 0x08, 0xbb}, | ||
697 | {0xf0, 0x00, 0x01, 0xbb}, | 681 | {0xf0, 0x00, 0x01, 0xbb}, |
698 | {0x00, 0x01, 0x00, 0xdd}, | 682 | {0x05, 0x00, 0x07, 0xbb}, |
699 | {0x06, 0x00, 0x14, 0xbb}, | 683 | {0x34, 0x00, 0x00, 0xbb}, |
700 | {0x3a, 0x10, 0x00, 0xbb}, | 684 | {0x35, 0xff, 0x00, 0xbb}, |
701 | {0x00, 0x00, 0x10, 0xdd}, | 685 | {0xdc, 0x07, 0x02, 0xbb}, |
702 | {0x9b, 0x10, 0x00, 0xbb}, | 686 | {0xdd, 0x3c, 0x18, 0xbb}, |
703 | {0x00, 0x00, 0x10, 0xdd}, | 687 | {0xde, 0x92, 0x6d, 0xbb}, |
688 | {0xdf, 0xcd, 0xb1, 0xbb}, | ||
689 | {0xe0, 0xff, 0xe7, 0xbb}, | ||
690 | {0x06, 0xf0, 0x0d, 0xbb}, | ||
691 | {0x06, 0x70, 0x0e, 0xbb}, | ||
692 | {0x4c, 0x00, 0x01, 0xbb}, | ||
693 | {0x4d, 0x00, 0x01, 0xbb}, | ||
694 | {0xf0, 0x00, 0x02, 0xbb}, | ||
695 | {0x2e, 0x0c, 0x60, 0xbb}, | ||
696 | {0x21, 0xb6, 0x6e, 0xbb}, | ||
697 | {0x37, 0x01, 0x40, 0xbb}, | ||
704 | {0xf0, 0x00, 0x00, 0xbb}, | 698 | {0xf0, 0x00, 0x00, 0xbb}, |
705 | {0x00, 0x01, 0x00, 0xdd}, | 699 | {0x07, 0x00, 0x84, 0xbb}, |
706 | {0x2b, 0x00, 0x28, 0xbb}, | 700 | {0x08, 0x02, 0x4a, 0xbb}, |
707 | {0x2c, 0x00, 0x30, 0xbb}, | 701 | {0x05, 0x01, 0x10, 0xbb}, |
708 | {0x2d, 0x00, 0x30, 0xbb}, | 702 | {0x06, 0x00, 0x39, 0xbb}, |
709 | {0x2e, 0x00, 0x28, 0xbb}, | 703 | {0xf0, 0x00, 0x02, 0xbb}, |
710 | {0x41, 0x00, 0xd7, 0xbb}, | 704 | {0x58, 0x02, 0x67, 0xbb}, |
711 | {0x09, 0x02, 0x3a, 0xbb}, | 705 | {0x57, 0x02, 0x00, 0xbb}, |
712 | {0x0c, 0x00, 0x00, 0xbb}, | 706 | {0x5a, 0x02, 0x67, 0xbb}, |
713 | {0x20, 0x00, 0x00, 0xbb}, | 707 | {0x59, 0x02, 0x00, 0xbb}, |
714 | {0x05, 0x00, 0x8c, 0xbb}, | 708 | {0x5c, 0x12, 0x0d, 0xbb}, |
715 | {0x06, 0x00, 0x32, 0xbb}, | 709 | {0x5d, 0x16, 0x11, 0xbb}, |
716 | {0x07, 0x00, 0xc6, 0xbb}, | 710 | {0x39, 0x06, 0x18, 0xbb}, |
717 | {0x08, 0x00, 0x19, 0xbb}, | 711 | {0x3a, 0x06, 0x18, 0xbb}, |
718 | {0x24, 0x80, 0x6f, 0xbb}, | 712 | {0x3b, 0x06, 0x18, 0xbb}, |
719 | {0xc8, 0x00, 0x0f, 0xbb}, | 713 | {0x3c, 0x06, 0x18, 0xbb}, |
720 | {0x20, 0x00, 0x03, 0xbb}, | 714 | {0x64, 0x7b, 0x5b, 0xbb}, |
721 | {0xb6, 0x00, 0x00, 0xcc}, | 715 | {0xb6, 0x00, 0x00, 0xcc}, |
722 | {0xb6, 0x03, 0x05, 0xcc}, | 716 | {0xb6, 0x03, 0x05, 0xcc}, |
723 | {0xb6, 0x02, 0x00, 0xcc}, | 717 | {0xb6, 0x02, 0x00, 0xcc}, |
724 | {0xb6, 0x05, 0x04, 0xcc}, | 718 | {0xb6, 0x05, 0x03, 0xcc}, |
725 | {0xb6, 0x04, 0x00, 0xcc}, | 719 | {0xb6, 0x04, 0xc0, 0xcc}, |
726 | {0xb6, 0x12, 0xf8, 0xcc}, | 720 | {0xb6, 0x12, 0xf8, 0xcc}, |
727 | {0xb6, 0x18, 0x0a, 0xcc}, | 721 | {0xb6, 0x13, 0x29, 0xcc}, |
728 | {0xb6, 0x17, 0x00, 0xcc}, | 722 | {0xb6, 0x18, 0x09, 0xcc}, |
723 | {0xb6, 0x17, 0x60, 0xcc}, | ||
729 | {0xb6, 0x16, 0x00, 0xcc}, | 724 | {0xb6, 0x16, 0x00, 0xcc}, |
730 | {0xb6, 0x22, 0x12, 0xcc}, | 725 | {0xb6, 0x22, 0x12, 0xcc}, |
731 | {0xb6, 0x23, 0x0b, 0xcc}, | 726 | {0xb6, 0x23, 0x0b, 0xcc}, |
732 | {0xb3, 0x02, 0x02, 0xcc}, | ||
733 | {0xbf, 0xc0, 0x39, 0xcc}, | 727 | {0xbf, 0xc0, 0x39, 0xcc}, |
734 | {0xbf, 0xc1, 0x04, 0xcc}, | 728 | {0xbf, 0xc1, 0x04, 0xcc}, |
735 | {0xbf, 0xcc, 0x10, 0xcc}, | 729 | {0xbf, 0xcc, 0x00, 0xcc}, |
736 | {0xb9, 0x12, 0x00, 0xcc}, | ||
737 | {0xb9, 0x13, 0x14, 0xcc}, | ||
738 | {0xb9, 0x14, 0x14, 0xcc}, | ||
739 | {0xb9, 0x15, 0x14, 0xcc}, | ||
740 | {0xb9, 0x16, 0x14, 0xcc}, | ||
741 | {0xb9, 0x18, 0x00, 0xcc}, | ||
742 | {0xb9, 0x19, 0x1e, 0xcc}, | ||
743 | {0xb9, 0x1a, 0x1e, 0xcc}, | ||
744 | {0xb9, 0x1b, 0x1e, 0xcc}, | ||
745 | {0xb9, 0x1c, 0x1e, 0xcc}, | ||
746 | {0xb3, 0x01, 0x41, 0xcc}, | 730 | {0xb3, 0x01, 0x41, 0xcc}, |
747 | {0xb8, 0x8e, 0x00, 0xcc}, | 731 | {0x00, 0x00, 0x80, 0xdd}, |
748 | {0xb8, 0x8f, 0xff, 0xcc}, | 732 | {0xf0, 0x00, 0x02, 0xbb}, |
749 | {0xb6, 0x12, 0xf8, 0xcc}, | 733 | {0x00, 0x00, 0x10, 0xdd}, |
750 | {0xb8, 0x0c, 0x20, 0xcc}, | 734 | {0x22, 0xa0, 0x78, 0xbb}, |
751 | {0xb8, 0x0d, 0x70, 0xcc}, | 735 | {0x23, 0xa0, 0x78, 0xbb}, |
752 | {0xb6, 0x13, 0x13, 0xcc}, | 736 | {0x24, 0x7f, 0x00, 0xbb}, |
753 | {0x2f, 0x00, 0xC0, 0xbb}, | 737 | {0x28, 0xea, 0x02, 0xbb}, |
754 | {0xb8, 0xa0, 0x12, 0xcc}, | 738 | {0x29, 0x86, 0x7a, 0xbb}, |
739 | {0x5e, 0x52, 0x4c, 0xbb}, | ||
740 | {0x5f, 0x20, 0x24, 0xbb}, | ||
741 | {0x60, 0x00, 0x02, 0xbb}, | ||
742 | {0x02, 0x00, 0xee, 0xbb}, | ||
743 | {0x03, 0x39, 0x23, 0xbb}, | ||
744 | {0x04, 0x07, 0x24, 0xbb}, | ||
745 | {0x09, 0x00, 0xc0, 0xbb}, | ||
746 | {0x0a, 0x00, 0x79, 0xbb}, | ||
747 | {0x0b, 0x00, 0x04, 0xbb}, | ||
748 | {0x0c, 0x00, 0x5c, 0xbb}, | ||
749 | {0x0d, 0x00, 0xd9, 0xbb}, | ||
750 | {0x0e, 0x00, 0x53, 0xbb}, | ||
751 | {0x0f, 0x00, 0x21, 0xbb}, | ||
752 | {0x10, 0x00, 0xa4, 0xbb}, | ||
753 | {0x11, 0x00, 0xe5, 0xbb}, | ||
754 | {0x15, 0x00, 0x00, 0xbb}, | ||
755 | {0x16, 0x00, 0x00, 0xbb}, | ||
756 | {0x17, 0x00, 0x00, 0xbb}, | ||
757 | {0x18, 0x00, 0x00, 0xbb}, | ||
758 | {0x19, 0x00, 0x00, 0xbb}, | ||
759 | {0x1a, 0x00, 0x00, 0xbb}, | ||
760 | {0x1b, 0x00, 0x00, 0xbb}, | ||
761 | {0x1c, 0x00, 0x00, 0xbb}, | ||
762 | {0x1d, 0x00, 0x00, 0xbb}, | ||
763 | {0x1e, 0x00, 0x00, 0xbb}, | ||
764 | {0xf0, 0x00, 0x01, 0xbb}, | ||
765 | {0x00, 0x00, 0x20, 0xdd}, | ||
766 | {0x06, 0xf0, 0x8e, 0xbb}, | ||
767 | {0x00, 0x00, 0x80, 0xdd}, | ||
768 | {0x06, 0x70, 0x8e, 0xbb}, | ||
769 | {0xf0, 0x00, 0x02, 0xbb}, | ||
770 | {0x00, 0x00, 0x20, 0xdd}, | ||
771 | {0x5e, 0x6a, 0x53, 0xbb}, | ||
772 | {0x5f, 0x40, 0x2c, 0xbb}, | ||
773 | {0xf0, 0x00, 0x01, 0xbb}, | ||
774 | {0x00, 0x00, 0x20, 0xdd}, | ||
775 | {0x58, 0x00, 0x00, 0xbb}, | ||
776 | {0x53, 0x09, 0x03, 0xbb}, | ||
777 | {0x54, 0x31, 0x18, 0xbb}, | ||
778 | {0x55, 0x8b, 0x5f, 0xbb}, | ||
779 | {0x56, 0xc0, 0xa9, 0xbb}, | ||
780 | {0x57, 0xe0, 0xd2, 0xbb}, | ||
781 | {0xe1, 0x00, 0x00, 0xbb}, | ||
782 | {0xdc, 0x09, 0x03, 0xbb}, | ||
783 | {0xdd, 0x31, 0x18, 0xbb}, | ||
784 | {0xde, 0x8b, 0x5f, 0xbb}, | ||
785 | {0xdf, 0xc0, 0xa9, 0xbb}, | ||
786 | {0xe0, 0xe0, 0xd2, 0xbb}, | ||
787 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
788 | {0xf0, 0x00, 0x01, 0xbb}, | ||
789 | {0x06, 0xf0, 0x8e, 0xbb}, | ||
790 | {0xf0, 0x00, 0x02, 0xbb}, | ||
791 | {0x2f, 0xde, 0x20, 0xbb}, | ||
792 | {0xf0, 0x00, 0x02, 0xbb}, | ||
793 | {0x24, 0x50, 0x20, 0xbb}, | ||
794 | {0xbc, 0x0e, 0x00, 0xcc}, | ||
795 | {0xbc, 0x0f, 0x05, 0xcc}, | ||
796 | {0xbc, 0x10, 0xc0, 0xcc}, | ||
797 | {0xf0, 0x00, 0x02, 0xbb}, | ||
798 | {0x34, 0x0c, 0x50, 0xbb}, | ||
799 | {0xbc, 0x11, 0x03, 0xcc}, | ||
800 | {0xf0, 0x00, 0x01, 0xbb}, | ||
801 | {0x80, 0x00, 0x03, 0xbb}, | ||
802 | {0x81, 0xc7, 0x14, 0xbb}, | ||
803 | {0x82, 0xeb, 0xe8, 0xbb}, | ||
804 | {0x83, 0xfe, 0xf4, 0xbb}, | ||
805 | {0x84, 0xcd, 0x10, 0xbb}, | ||
806 | {0x85, 0xf3, 0xee, 0xbb}, | ||
807 | {0x86, 0xff, 0xf1, 0xbb}, | ||
808 | {0x87, 0xcd, 0x10, 0xbb}, | ||
809 | {0x88, 0xf3, 0xee, 0xbb}, | ||
810 | {0x89, 0x01, 0xf1, 0xbb}, | ||
811 | {0x8a, 0xe5, 0x17, 0xbb}, | ||
812 | {0x8b, 0xe8, 0xe2, 0xbb}, | ||
813 | {0x8c, 0xf7, 0xed, 0xbb}, | ||
814 | {0x8d, 0x00, 0xff, 0xbb}, | ||
815 | {0x8e, 0xec, 0x10, 0xbb}, | ||
816 | {0x8f, 0xf0, 0xed, 0xbb}, | ||
817 | {0x90, 0xf9, 0xf2, 0xbb}, | ||
818 | {0x91, 0x00, 0x00, 0xbb}, | ||
819 | {0x92, 0xe9, 0x0d, 0xbb}, | ||
820 | {0x93, 0xf4, 0xf2, 0xbb}, | ||
821 | {0x94, 0xfb, 0xf5, 0xbb}, | ||
822 | {0x95, 0x00, 0xff, 0xbb}, | ||
823 | {0xb6, 0x0f, 0x08, 0xbb}, | ||
824 | {0xb7, 0x3d, 0x16, 0xbb}, | ||
825 | {0xb8, 0x0c, 0x04, 0xbb}, | ||
826 | {0xb9, 0x1c, 0x07, 0xbb}, | ||
827 | {0xba, 0x0a, 0x03, 0xbb}, | ||
828 | {0xbb, 0x1b, 0x09, 0xbb}, | ||
829 | {0xbc, 0x17, 0x0d, 0xbb}, | ||
830 | {0xbd, 0x23, 0x1d, 0xbb}, | ||
831 | {0xbe, 0x00, 0x28, 0xbb}, | ||
832 | {0xbf, 0x11, 0x09, 0xbb}, | ||
833 | {0xc0, 0x16, 0x15, 0xbb}, | ||
834 | {0xc1, 0x00, 0x1b, 0xbb}, | ||
835 | {0xc2, 0x0e, 0x07, 0xbb}, | ||
836 | {0xc3, 0x14, 0x10, 0xbb}, | ||
837 | {0xc4, 0x00, 0x17, 0xbb}, | ||
838 | {0x06, 0x74, 0x8e, 0xbb}, | ||
839 | {0xf0, 0x00, 0x00, 0xbb}, | ||
840 | {0x03, 0x03, 0xc0, 0xbb}, | ||
755 | {} | 841 | {} |
756 | }; | 842 | }; |
757 | 843 | ||
@@ -2522,8 +2608,7 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
2522 | break; | 2608 | break; |
2523 | case SENSOR_MI1310_SOC: | 2609 | case SENSOR_MI1310_SOC: |
2524 | cam->cam_mode = vc0323_mode; | 2610 | cam->cam_mode = vc0323_mode; |
2525 | /* TODO: 1280x1024 resolution setting is incorrect, so don't export it now*/ | 2611 | cam->nmodes = ARRAY_SIZE(vc0323_mode); |
2526 | cam->nmodes = ARRAY_SIZE(vc0323_mode) - 1; | ||
2527 | break; | 2612 | break; |
2528 | case SENSOR_MI1320_SOC: | 2613 | case SENSOR_MI1320_SOC: |
2529 | cam->cam_mode = bi_mode; | 2614 | cam->cam_mode = bi_mode; |