diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2009-03-23 05:03:52 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 11:43:40 -0400 |
commit | db786a3fde5fca025dc2ea96232e010baf335961 (patch) | |
tree | 5d37854745cef96fc808c50470f575dd87e38f60 /drivers/media/video/gspca/vc032x.c | |
parent | dc070bccde5b0ab2f51124bf67e9a3b40a602cba (diff) |
V4L/DVB (11209): gspca - vc032x: New sensor mi1320_soc and webcam 15b8:6001 added.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/vc032x.c')
-rw-r--r-- | drivers/media/video/gspca/vc032x.c | 427 |
1 files changed, 415 insertions, 12 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index 728fff902f15..cdd17bcf42c7 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c | |||
@@ -43,12 +43,13 @@ struct sd { | |||
43 | char sensor; | 43 | char sensor; |
44 | #define SENSOR_HV7131R 0 | 44 | #define SENSOR_HV7131R 0 |
45 | #define SENSOR_MI0360 1 | 45 | #define SENSOR_MI0360 1 |
46 | #define SENSOR_MI1320 2 | 46 | #define SENSOR_MI1310_SOC 2 |
47 | #define SENSOR_MI1310_SOC 3 | 47 | #define SENSOR_MI1320 3 |
48 | #define SENSOR_OV7660 4 | 48 | #define SENSOR_MI1320_SOC 4 |
49 | #define SENSOR_OV7670 5 | 49 | #define SENSOR_OV7660 5 |
50 | #define SENSOR_PO1200 6 | 50 | #define SENSOR_OV7670 6 |
51 | #define SENSOR_PO3130NC 7 | 51 | #define SENSOR_PO1200 7 |
52 | #define SENSOR_PO3130NC 8 | ||
52 | }; | 53 | }; |
53 | 54 | ||
54 | /* V4L2 controls supported by the driver */ | 55 | /* V4L2 controls supported by the driver */ |
@@ -149,7 +150,7 @@ static const struct v4l2_pix_format vc0323_mode[] = { | |||
149 | .sizeimage = 640 * 480 * 3 / 8 + 590, | 150 | .sizeimage = 640 * 480 * 3 / 8 + 590, |
150 | .colorspace = V4L2_COLORSPACE_JPEG, | 151 | .colorspace = V4L2_COLORSPACE_JPEG, |
151 | .priv = 0}, | 152 | .priv = 0}, |
152 | {1280, 1024, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, /* mi1310_soc only */ | 153 | {1280, 1024, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, /* mi13x0_soc only */ |
153 | .bytesperline = 1280, | 154 | .bytesperline = 1280, |
154 | .sizeimage = 1280 * 1024 * 1 / 4 + 590, | 155 | .sizeimage = 1280 * 1024 * 1 / 4 + 590, |
155 | .colorspace = V4L2_COLORSPACE_JPEG, | 156 | .colorspace = V4L2_COLORSPACE_JPEG, |
@@ -891,6 +892,383 @@ static const __u8 mi1320_initQVGA_data[][4] = { | |||
891 | {} | 892 | {} |
892 | }; | 893 | }; |
893 | 894 | ||
895 | static const u8 mi1320_soc_InitVGA_JPG[][4] = { | ||
896 | {0xb3, 0x01, 0x01, 0xcc}, | ||
897 | {0xb0, 0x03, 0x19, 0xcc}, | ||
898 | {0xb0, 0x04, 0x02, 0xcc}, | ||
899 | {0x00, 0x00, 0x30, 0xdd}, | ||
900 | {0xb3, 0x00, 0x64, 0xcc}, | ||
901 | {0xb3, 0x00, 0x67, 0xcc}, | ||
902 | {0xb3, 0x05, 0x01, 0xcc}, | ||
903 | {0xb3, 0x06, 0x01, 0xcc}, | ||
904 | {0xb3, 0x08, 0x01, 0xcc}, | ||
905 | {0xb3, 0x09, 0x0c, 0xcc}, | ||
906 | {0xb3, 0x34, 0x02, 0xcc}, | ||
907 | {0xb3, 0x35, 0xc8, 0xcc}, | ||
908 | {0xb3, 0x02, 0x00, 0xcc}, | ||
909 | {0xb3, 0x03, 0x0a, 0xcc}, | ||
910 | {0xb3, 0x04, 0x05, 0xcc}, | ||
911 | {0xb3, 0x20, 0x00, 0xcc}, | ||
912 | {0xb3, 0x21, 0x00, 0xcc}, | ||
913 | {0xb3, 0x22, 0x01, 0xcc}, | ||
914 | {0xb3, 0x23, 0xe0, 0xcc}, | ||
915 | {0xb3, 0x14, 0x00, 0xcc}, | ||
916 | {0xb3, 0x15, 0x00, 0xcc}, | ||
917 | {0xb3, 0x16, 0x02, 0xcc}, | ||
918 | {0xb3, 0x17, 0x7f, 0xcc}, | ||
919 | {0xb3, 0x00, 0x67, 0xcc}, | ||
920 | {0xb8, 0x00, 0x00, 0xcc}, | ||
921 | {0xbc, 0x00, 0x71, 0xcc}, | ||
922 | {0xbc, 0x01, 0x01, 0xcc}, | ||
923 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
924 | {0xf0, 0x00, 0x02, 0xbb}, | ||
925 | {0x00, 0x00, 0x10, 0xdd}, | ||
926 | {0xc8, 0x00, 0x00, 0xbb}, | ||
927 | {0x00, 0x00, 0x30, 0xdd}, | ||
928 | {0xf0, 0x00, 0x00, 0xbb}, | ||
929 | {0x00, 0x00, 0x10, 0xdd}, | ||
930 | {0x07, 0x00, 0xe0, 0xbb}, | ||
931 | {0x08, 0x00, 0x0b, 0xbb}, | ||
932 | {0x21, 0x00, 0x0c, 0xbb}, | ||
933 | {0x20, 0x01, 0x03, 0xbb}, | ||
934 | {0xb6, 0x00, 0x00, 0xcc}, | ||
935 | {0xb6, 0x03, 0x02, 0xcc}, | ||
936 | {0xb6, 0x02, 0x80, 0xcc}, | ||
937 | {0xb6, 0x05, 0x01, 0xcc}, | ||
938 | {0xb6, 0x04, 0xe0, 0xcc}, | ||
939 | {0xb6, 0x12, 0xf8, 0xcc}, | ||
940 | {0xb6, 0x13, 0x05, 0xcc}, | ||
941 | {0xb6, 0x18, 0x02, 0xcc}, | ||
942 | {0xb6, 0x17, 0x58, 0xcc}, | ||
943 | {0xb6, 0x16, 0x00, 0xcc}, | ||
944 | {0xb6, 0x22, 0x12, 0xcc}, | ||
945 | {0xb6, 0x23, 0x0b, 0xcc}, | ||
946 | {0xbf, 0xc0, 0x39, 0xcc}, | ||
947 | {0xbf, 0xc1, 0x04, 0xcc}, | ||
948 | {0xbf, 0xcc, 0x00, 0xcc}, | ||
949 | {0xb3, 0x01, 0x41, 0xcc}, | ||
950 | {0xf0, 0x00, 0x00, 0xbb}, | ||
951 | {0x05, 0x01, 0x78, 0xbb}, | ||
952 | {0x06, 0x00, 0x11, 0xbb}, | ||
953 | {0x07, 0x01, 0x42, 0xbb}, | ||
954 | {0x08, 0x00, 0x11, 0xbb}, | ||
955 | {0x20, 0x01, 0x03, 0xbb}, | ||
956 | {0x21, 0x80, 0x00, 0xbb}, | ||
957 | {0x22, 0x0d, 0x0f, 0xbb}, | ||
958 | {0x24, 0x80, 0x00, 0xbb}, | ||
959 | {0x59, 0x00, 0xff, 0xbb}, | ||
960 | {0xf0, 0x00, 0x02, 0xbb}, | ||
961 | {0x39, 0x03, 0xca, 0xbb}, | ||
962 | {0x3a, 0x06, 0x80, 0xbb}, | ||
963 | {0x3b, 0x01, 0x52, 0xbb}, | ||
964 | {0x3c, 0x05, 0x40, 0xbb}, | ||
965 | {0x57, 0x01, 0x9c, 0xbb}, | ||
966 | {0x58, 0x01, 0xee, 0xbb}, | ||
967 | {0x59, 0x00, 0xf0, 0xbb}, | ||
968 | {0x5a, 0x01, 0x20, 0xbb}, | ||
969 | {0x5c, 0x1d, 0x17, 0xbb}, | ||
970 | {0x5d, 0x22, 0x1c, 0xbb}, | ||
971 | {0x64, 0x1e, 0x1c, 0xbb}, | ||
972 | {0x5b, 0x00, 0x00, 0xbb}, | ||
973 | {0xf0, 0x00, 0x02, 0xbb}, | ||
974 | {0x22, 0xa0, 0x78, 0xbb}, | ||
975 | {0x23, 0xa0, 0x78, 0xbb}, | ||
976 | {0x24, 0x7f, 0x00, 0xbb}, | ||
977 | {0x28, 0xea, 0x02, 0xbb}, | ||
978 | {0x29, 0x86, 0x7a, 0xbb}, | ||
979 | {0x5e, 0x52, 0x4c, 0xbb}, | ||
980 | {0x5f, 0x20, 0x24, 0xbb}, | ||
981 | {0x60, 0x00, 0x02, 0xbb}, | ||
982 | {0x02, 0x00, 0xee, 0xbb}, | ||
983 | {0x03, 0x39, 0x23, 0xbb}, | ||
984 | {0x04, 0x07, 0x24, 0xbb}, | ||
985 | {0x09, 0x00, 0xc0, 0xbb}, | ||
986 | {0x0a, 0x00, 0x79, 0xbb}, | ||
987 | {0x0b, 0x00, 0x04, 0xbb}, | ||
988 | {0x0c, 0x00, 0x5c, 0xbb}, | ||
989 | {0x0d, 0x00, 0xd9, 0xbb}, | ||
990 | {0x0e, 0x00, 0x53, 0xbb}, | ||
991 | {0x0f, 0x00, 0x21, 0xbb}, | ||
992 | {0x10, 0x00, 0xa4, 0xbb}, | ||
993 | {0x11, 0x00, 0xe5, 0xbb}, | ||
994 | {0x15, 0x00, 0x00, 0xbb}, | ||
995 | {0x16, 0x00, 0x00, 0xbb}, | ||
996 | {0x17, 0x00, 0x00, 0xbb}, | ||
997 | {0x18, 0x00, 0x00, 0xbb}, | ||
998 | {0x19, 0x00, 0x00, 0xbb}, | ||
999 | {0x1a, 0x00, 0x00, 0xbb}, | ||
1000 | {0x1b, 0x00, 0x00, 0xbb}, | ||
1001 | {0x1c, 0x00, 0x00, 0xbb}, | ||
1002 | {0x1d, 0x00, 0x00, 0xbb}, | ||
1003 | {0x1e, 0x00, 0x00, 0xbb}, | ||
1004 | {0xf0, 0x00, 0x01, 0xbb}, | ||
1005 | {0x06, 0xe0, 0x0e, 0xbb}, | ||
1006 | {0x06, 0x60, 0x0e, 0xbb}, | ||
1007 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
1008 | {} | ||
1009 | }; | ||
1010 | static const u8 mi1320_soc_InitQVGA_JPG[][4] = { | ||
1011 | {0xb3, 0x01, 0x01, 0xcc}, | ||
1012 | {0xb0, 0x03, 0x19, 0xcc}, | ||
1013 | {0xb0, 0x04, 0x02, 0xcc}, | ||
1014 | {0x00, 0x00, 0x30, 0xdd}, | ||
1015 | {0xb3, 0x00, 0x64, 0xcc}, | ||
1016 | {0xb3, 0x00, 0x67, 0xcc}, | ||
1017 | {0xb3, 0x05, 0x01, 0xcc}, | ||
1018 | {0xb3, 0x06, 0x01, 0xcc}, | ||
1019 | {0xb3, 0x08, 0x01, 0xcc}, | ||
1020 | {0xb3, 0x09, 0x0c, 0xcc}, | ||
1021 | {0xb3, 0x34, 0x02, 0xcc}, | ||
1022 | {0xb3, 0x35, 0xc8, 0xcc}, | ||
1023 | {0xb3, 0x02, 0x00, 0xcc}, | ||
1024 | {0xb3, 0x03, 0x0a, 0xcc}, | ||
1025 | {0xb3, 0x04, 0x05, 0xcc}, | ||
1026 | {0xb3, 0x20, 0x00, 0xcc}, | ||
1027 | {0xb3, 0x21, 0x00, 0xcc}, | ||
1028 | {0xb3, 0x22, 0x01, 0xcc}, | ||
1029 | {0xb3, 0x23, 0xe0, 0xcc}, | ||
1030 | {0xb3, 0x14, 0x00, 0xcc}, | ||
1031 | {0xb3, 0x15, 0x00, 0xcc}, | ||
1032 | {0xb3, 0x16, 0x02, 0xcc}, | ||
1033 | {0xb3, 0x17, 0x7f, 0xcc}, | ||
1034 | {0xb3, 0x00, 0x67, 0xcc}, | ||
1035 | {0xb8, 0x00, 0x00, 0xcc}, | ||
1036 | {0xbc, 0x00, 0xd1, 0xcc}, | ||
1037 | {0xbc, 0x01, 0x01, 0xcc}, | ||
1038 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
1039 | {0xf0, 0x00, 0x02, 0xbb}, | ||
1040 | {0x00, 0x00, 0x10, 0xdd}, | ||
1041 | {0xc8, 0x00, 0x00, 0xbb}, | ||
1042 | {0x00, 0x00, 0x30, 0xdd}, | ||
1043 | {0xf0, 0x00, 0x00, 0xbb}, | ||
1044 | {0x00, 0x00, 0x10, 0xdd}, | ||
1045 | {0x07, 0x00, 0xe0, 0xbb}, | ||
1046 | {0x08, 0x00, 0x0b, 0xbb}, | ||
1047 | {0x21, 0x00, 0x0c, 0xbb}, | ||
1048 | {0x20, 0x01, 0x03, 0xbb}, | ||
1049 | {0xb6, 0x00, 0x00, 0xcc}, | ||
1050 | {0xb6, 0x03, 0x01, 0xcc}, | ||
1051 | {0xb6, 0x02, 0x40, 0xcc}, | ||
1052 | {0xb6, 0x05, 0x00, 0xcc}, | ||
1053 | {0xb6, 0x04, 0xf0, 0xcc}, | ||
1054 | {0xb6, 0x12, 0xf8, 0xcc}, | ||
1055 | {0xb6, 0x13, 0x05, 0xcc}, | ||
1056 | {0xb6, 0x18, 0x00, 0xcc}, | ||
1057 | {0xb6, 0x17, 0x96, 0xcc}, | ||
1058 | {0xb6, 0x16, 0x00, 0xcc}, | ||
1059 | {0xb6, 0x22, 0x12, 0xcc}, | ||
1060 | {0xb6, 0x23, 0x0b, 0xcc}, | ||
1061 | {0xbf, 0xc0, 0x39, 0xcc}, | ||
1062 | {0xbf, 0xc1, 0x04, 0xcc}, | ||
1063 | {0xbf, 0xcc, 0x00, 0xcc}, | ||
1064 | {0xbc, 0x02, 0x18, 0xcc}, | ||
1065 | {0xbc, 0x03, 0x50, 0xcc}, | ||
1066 | {0xbc, 0x04, 0x18, 0xcc}, | ||
1067 | {0xbc, 0x05, 0x00, 0xcc}, | ||
1068 | {0xbc, 0x06, 0x00, 0xcc}, | ||
1069 | {0xbc, 0x08, 0x30, 0xcc}, | ||
1070 | {0xbc, 0x09, 0x40, 0xcc}, | ||
1071 | {0xbc, 0x0a, 0x10, 0xcc}, | ||
1072 | {0xbc, 0x0b, 0x00, 0xcc}, | ||
1073 | {0xbc, 0x0c, 0x00, 0xcc}, | ||
1074 | {0xb3, 0x01, 0x41, 0xcc}, | ||
1075 | {0xf0, 0x00, 0x00, 0xbb}, | ||
1076 | {0x05, 0x01, 0x78, 0xbb}, | ||
1077 | {0x06, 0x00, 0x11, 0xbb}, | ||
1078 | {0x07, 0x01, 0x42, 0xbb}, | ||
1079 | {0x08, 0x00, 0x11, 0xbb}, | ||
1080 | {0x20, 0x01, 0x03, 0xbb}, | ||
1081 | {0x21, 0x80, 0x00, 0xbb}, | ||
1082 | {0x22, 0x0d, 0x0f, 0xbb}, | ||
1083 | {0x24, 0x80, 0x00, 0xbb}, | ||
1084 | {0x59, 0x00, 0xff, 0xbb}, | ||
1085 | {0xf0, 0x00, 0x02, 0xbb}, | ||
1086 | {0x39, 0x03, 0xca, 0xbb}, | ||
1087 | {0x3a, 0x06, 0x80, 0xbb}, | ||
1088 | {0x3b, 0x01, 0x52, 0xbb}, | ||
1089 | {0x3c, 0x05, 0x40, 0xbb}, | ||
1090 | {0x57, 0x01, 0x9c, 0xbb}, | ||
1091 | {0x58, 0x01, 0xee, 0xbb}, | ||
1092 | {0x59, 0x00, 0xf0, 0xbb}, | ||
1093 | {0x5a, 0x01, 0x20, 0xbb}, | ||
1094 | {0x5c, 0x1d, 0x17, 0xbb}, | ||
1095 | {0x5d, 0x22, 0x1c, 0xbb}, | ||
1096 | {0x64, 0x1e, 0x1c, 0xbb}, | ||
1097 | {0x5b, 0x00, 0x00, 0xbb}, | ||
1098 | {0xf0, 0x00, 0x02, 0xbb}, | ||
1099 | {0x22, 0xa0, 0x78, 0xbb}, | ||
1100 | {0x23, 0xa0, 0x78, 0xbb}, | ||
1101 | {0x24, 0x7f, 0x00, 0xbb}, | ||
1102 | {0x28, 0xea, 0x02, 0xbb}, | ||
1103 | {0x29, 0x86, 0x7a, 0xbb}, | ||
1104 | {0x5e, 0x52, 0x4c, 0xbb}, | ||
1105 | {0x5f, 0x20, 0x24, 0xbb}, | ||
1106 | {0x60, 0x00, 0x02, 0xbb}, | ||
1107 | {0x02, 0x00, 0xee, 0xbb}, | ||
1108 | {0x03, 0x39, 0x23, 0xbb}, | ||
1109 | {0x04, 0x07, 0x24, 0xbb}, | ||
1110 | {0x09, 0x00, 0xc0, 0xbb}, | ||
1111 | {0x0a, 0x00, 0x79, 0xbb}, | ||
1112 | {0x0b, 0x00, 0x04, 0xbb}, | ||
1113 | {0x0c, 0x00, 0x5c, 0xbb}, | ||
1114 | {0x0d, 0x00, 0xd9, 0xbb}, | ||
1115 | {0x0e, 0x00, 0x53, 0xbb}, | ||
1116 | {0x0f, 0x00, 0x21, 0xbb}, | ||
1117 | {0x10, 0x00, 0xa4, 0xbb}, | ||
1118 | {0x11, 0x00, 0xe5, 0xbb}, | ||
1119 | {0x15, 0x00, 0x00, 0xbb}, | ||
1120 | {0x16, 0x00, 0x00, 0xbb}, | ||
1121 | {0x17, 0x00, 0x00, 0xbb}, | ||
1122 | {0x18, 0x00, 0x00, 0xbb}, | ||
1123 | {0x19, 0x00, 0x00, 0xbb}, | ||
1124 | {0x1a, 0x00, 0x00, 0xbb}, | ||
1125 | {0x1b, 0x00, 0x00, 0xbb}, | ||
1126 | {0x1c, 0x00, 0x00, 0xbb}, | ||
1127 | {0x1d, 0x00, 0x00, 0xbb}, | ||
1128 | {0x1e, 0x00, 0x00, 0xbb}, | ||
1129 | {0xf0, 0x00, 0x01, 0xbb}, | ||
1130 | {0x06, 0xe0, 0x0e, 0xbb}, | ||
1131 | {0x06, 0x60, 0x0e, 0xbb}, | ||
1132 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
1133 | {} | ||
1134 | }; | ||
1135 | static const u8 mi1320_soc_InitSXGA_JPG[][4] = { | ||
1136 | {0xb3, 0x01, 0x01, 0xcc}, | ||
1137 | {0xb0, 0x03, 0x19, 0xcc}, | ||
1138 | {0xb0, 0x04, 0x02, 0xcc}, | ||
1139 | {0x00, 0x00, 0x33, 0xdd}, | ||
1140 | {0xb3, 0x00, 0x64, 0xcc}, | ||
1141 | {0xb3, 0x00, 0x67, 0xcc}, | ||
1142 | {0xb3, 0x05, 0x00, 0xcc}, | ||
1143 | {0xb3, 0x06, 0x00, 0xcc}, | ||
1144 | {0xb3, 0x08, 0x01, 0xcc}, | ||
1145 | {0xb3, 0x09, 0x0c, 0xcc}, | ||
1146 | {0xb3, 0x34, 0x02, 0xcc}, | ||
1147 | {0xb3, 0x35, 0xc8, 0xcc}, | ||
1148 | {0xb3, 0x02, 0x00, 0xcc}, | ||
1149 | {0xb3, 0x03, 0x0a, 0xcc}, | ||
1150 | {0xb3, 0x04, 0x05, 0xcc}, | ||
1151 | {0xb3, 0x20, 0x00, 0xcc}, | ||
1152 | {0xb3, 0x21, 0x00, 0xcc}, | ||
1153 | {0xb3, 0x22, 0x04, 0xcc}, | ||
1154 | {0xb3, 0x23, 0x00, 0xcc}, | ||
1155 | {0xb3, 0x14, 0x00, 0xcc}, | ||
1156 | {0xb3, 0x15, 0x00, 0xcc}, | ||
1157 | {0xb3, 0x16, 0x04, 0xcc}, | ||
1158 | {0xb3, 0x17, 0xff, 0xcc}, | ||
1159 | {0xb3, 0x00, 0x67, 0xcc}, | ||
1160 | {0xbc, 0x00, 0x71, 0xcc}, | ||
1161 | {0xbc, 0x01, 0x01, 0xcc}, | ||
1162 | {0xf0, 0x00, 0x02, 0xbb}, | ||
1163 | {0x00, 0x00, 0x30, 0xdd}, | ||
1164 | {0xc8, 0x9f, 0x0b, 0xbb}, | ||
1165 | {0x00, 0x00, 0x20, 0xdd}, | ||
1166 | {0x5b, 0x00, 0x01, 0xbb}, | ||
1167 | {0x00, 0x00, 0x20, 0xdd}, | ||
1168 | {0xf0, 0x00, 0x00, 0xbb}, | ||
1169 | {0x00, 0x00, 0x30, 0xdd}, | ||
1170 | {0x20, 0x01, 0x03, 0xbb}, | ||
1171 | {0x00, 0x00, 0x20, 0xdd}, | ||
1172 | {0xb6, 0x00, 0x00, 0xcc}, | ||
1173 | {0xb6, 0x03, 0x05, 0xcc}, | ||
1174 | {0xb6, 0x02, 0x00, 0xcc}, | ||
1175 | {0xb6, 0x05, 0x04, 0xcc}, | ||
1176 | {0xb6, 0x04, 0x00, 0xcc}, | ||
1177 | {0xb6, 0x12, 0xf8, 0xcc}, | ||
1178 | {0xb6, 0x13, 0x29, 0xcc}, | ||
1179 | {0xb6, 0x18, 0x0a, 0xcc}, | ||
1180 | {0xb6, 0x17, 0x00, 0xcc}, | ||
1181 | {0xb6, 0x16, 0x00, 0xcc}, | ||
1182 | {0xb6, 0x22, 0x12, 0xcc}, | ||
1183 | {0xb6, 0x23, 0x0b, 0xcc}, | ||
1184 | {0xbf, 0xc0, 0x39, 0xcc}, | ||
1185 | {0xbf, 0xc1, 0x04, 0xcc}, | ||
1186 | {0xbf, 0xcc, 0x00, 0xcc}, | ||
1187 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
1188 | {0xb3, 0x01, 0x41, 0xcc}, | ||
1189 | {0xf0, 0x00, 0x00, 0xbb}, | ||
1190 | {0x05, 0x01, 0x78, 0xbb}, | ||
1191 | {0x06, 0x00, 0x11, 0xbb}, | ||
1192 | {0x07, 0x01, 0x42, 0xbb}, | ||
1193 | {0x08, 0x00, 0x11, 0xbb}, | ||
1194 | {0x20, 0x01, 0x03, 0xbb}, | ||
1195 | {0x21, 0x80, 0x00, 0xbb}, | ||
1196 | {0x22, 0x0d, 0x0f, 0xbb}, | ||
1197 | {0x24, 0x80, 0x00, 0xbb}, | ||
1198 | {0x59, 0x00, 0xff, 0xbb}, | ||
1199 | {0xf0, 0x00, 0x02, 0xbb}, | ||
1200 | {0x39, 0x03, 0xca, 0xbb}, | ||
1201 | {0x3a, 0x06, 0x80, 0xbb}, | ||
1202 | {0x3b, 0x01, 0x52, 0xbb}, | ||
1203 | {0x3c, 0x05, 0x40, 0xbb}, | ||
1204 | {0x57, 0x01, 0x9c, 0xbb}, | ||
1205 | {0x58, 0x01, 0xee, 0xbb}, | ||
1206 | {0x59, 0x00, 0xf0, 0xbb}, | ||
1207 | {0x5a, 0x01, 0x20, 0xbb}, | ||
1208 | {0x5c, 0x1d, 0x17, 0xbb}, | ||
1209 | {0x5d, 0x22, 0x1c, 0xbb}, | ||
1210 | {0x64, 0x1e, 0x1c, 0xbb}, | ||
1211 | {0x5b, 0x00, 0x00, 0xbb}, | ||
1212 | {0xf0, 0x00, 0x02, 0xbb}, | ||
1213 | {0x22, 0xa0, 0x78, 0xbb}, | ||
1214 | {0x23, 0xa0, 0x78, 0xbb}, | ||
1215 | {0x24, 0x7f, 0x00, 0xbb}, | ||
1216 | {0x28, 0xea, 0x02, 0xbb}, | ||
1217 | {0x29, 0x86, 0x7a, 0xbb}, | ||
1218 | {0x5e, 0x52, 0x4c, 0xbb}, | ||
1219 | {0x5f, 0x20, 0x24, 0xbb}, | ||
1220 | {0x60, 0x00, 0x02, 0xbb}, | ||
1221 | {0x02, 0x00, 0xee, 0xbb}, | ||
1222 | {0x03, 0x39, 0x23, 0xbb}, | ||
1223 | {0x04, 0x07, 0x24, 0xbb}, | ||
1224 | {0x09, 0x00, 0xc0, 0xbb}, | ||
1225 | {0x0a, 0x00, 0x79, 0xbb}, | ||
1226 | {0x0b, 0x00, 0x04, 0xbb}, | ||
1227 | {0x0c, 0x00, 0x5c, 0xbb}, | ||
1228 | {0x0d, 0x00, 0xd9, 0xbb}, | ||
1229 | {0x0e, 0x00, 0x53, 0xbb}, | ||
1230 | {0x0f, 0x00, 0x21, 0xbb}, | ||
1231 | {0x10, 0x00, 0xa4, 0xbb}, | ||
1232 | {0x11, 0x00, 0xe5, 0xbb}, | ||
1233 | {0x15, 0x00, 0x00, 0xbb}, | ||
1234 | {0x16, 0x00, 0x00, 0xbb}, | ||
1235 | {0x17, 0x00, 0x00, 0xbb}, | ||
1236 | {0x18, 0x00, 0x00, 0xbb}, | ||
1237 | {0x19, 0x00, 0x00, 0xbb}, | ||
1238 | {0x1a, 0x00, 0x00, 0xbb}, | ||
1239 | {0x1b, 0x00, 0x00, 0xbb}, | ||
1240 | {0x1c, 0x00, 0x00, 0xbb}, | ||
1241 | {0x1d, 0x00, 0x00, 0xbb}, | ||
1242 | {0x1e, 0x00, 0x00, 0xbb}, | ||
1243 | {0xf0, 0x00, 0x01, 0xbb}, | ||
1244 | {0x06, 0xe0, 0x0e, 0xbb}, | ||
1245 | {0x06, 0x60, 0x0e, 0xbb}, | ||
1246 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
1247 | {0xf0, 0x00, 0x00, 0xbb}, | ||
1248 | {0x05, 0x01, 0x13, 0xbb}, | ||
1249 | {0x06, 0x00, 0x11, 0xbb}, | ||
1250 | {0x07, 0x00, 0x85, 0xbb}, | ||
1251 | {0x08, 0x00, 0x27, 0xbb}, | ||
1252 | {0x20, 0x01, 0x03, 0xbb}, | ||
1253 | {0x21, 0x80, 0x00, 0xbb}, | ||
1254 | {0x22, 0x0d, 0x0f, 0xbb}, | ||
1255 | {0x24, 0x80, 0x00, 0xbb}, | ||
1256 | {0x59, 0x00, 0xff, 0xbb}, | ||
1257 | {0xf0, 0x00, 0x02, 0xbb}, | ||
1258 | {0x39, 0x03, 0x0d, 0xbb}, | ||
1259 | {0x3a, 0x06, 0x1b, 0xbb}, | ||
1260 | {0x3b, 0x00, 0x95, 0xbb}, | ||
1261 | {0x3c, 0x04, 0xdb, 0xbb}, | ||
1262 | {0x57, 0x02, 0x00, 0xbb}, | ||
1263 | {0x58, 0x02, 0x66, 0xbb}, | ||
1264 | {0x59, 0x00, 0xff, 0xbb}, | ||
1265 | {0x5a, 0x01, 0x33, 0xbb}, | ||
1266 | {0x5c, 0x12, 0x0d, 0xbb}, | ||
1267 | {0x5d, 0x16, 0x11, 0xbb}, | ||
1268 | {0x64, 0x5e, 0x1c, 0xbb}, | ||
1269 | {0x2f, 0x90, 0x00, 0xbb}, | ||
1270 | {} | ||
1271 | }; | ||
894 | static const __u8 po3130_gamma[17] = { | 1272 | static const __u8 po3130_gamma[17] = { |
895 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, | 1273 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
896 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff | 1274 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff |
@@ -1909,9 +2287,10 @@ static const struct sensor_info sensor_info_data[] = { | |||
1909 | {-1, 0x80 | 0x2d, 0x00, 0x0000, 0x65, 0x67, 0x01}, | 2287 | {-1, 0x80 | 0x2d, 0x00, 0x0000, 0x65, 0x67, 0x01}, |
1910 | {-1, 0x80 | 0x6e, 0x00, 0x0000, 0x24, 0x25, 0x01}, | 2288 | {-1, 0x80 | 0x6e, 0x00, 0x0000, 0x24, 0x25, 0x01}, |
1911 | {-1, 0x80 | 0x56, 0x01, 0x0000, 0x64, 0x67, 0x01}, | 2289 | {-1, 0x80 | 0x56, 0x01, 0x0000, 0x64, 0x67, 0x01}, |
1912 | {-1, 0x80 | 0x48, 0x00, 0x0000, 0x64, 0x67, 0x01}, | 2290 | {SENSOR_MI1320_SOC, 0x80 | 0x48, 0x00, 0x148c, 0x64, 0x67, 0x01}, |
1913 | /*fixme: not in the ms-win probe - may be found before?*/ | 2291 | /*fixme: previously detected?*/ |
1914 | {SENSOR_MI1320, 0x80 | 0x48, 0x00, 0x148c, 0x64, 0x65, 0x01}, | 2292 | {SENSOR_MI1320, 0x80 | 0x48, 0x00, 0x148c, 0x64, 0x65, 0x01}, |
2293 | /*fixme: not in the ms-win probe - may be found before?*/ | ||
1915 | {SENSOR_OV7670, 0x80 | 0x21, 0x0a, 0x7673, 0x66, 0x67, 0x05}, | 2294 | {SENSOR_OV7670, 0x80 | 0x21, 0x0a, 0x7673, 0x66, 0x67, 0x05}, |
1916 | }; | 2295 | }; |
1917 | 2296 | ||
@@ -2129,6 +2508,9 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
2129 | case SENSOR_MI1320: | 2508 | case SENSOR_MI1320: |
2130 | PDEBUG(D_PROBE, "Find Sensor MI1320"); | 2509 | PDEBUG(D_PROBE, "Find Sensor MI1320"); |
2131 | break; | 2510 | break; |
2511 | case SENSOR_MI1320_SOC: | ||
2512 | PDEBUG(D_PROBE, "Find Sensor MI1320_SOC"); | ||
2513 | break; | ||
2132 | case SENSOR_OV7660: | 2514 | case SENSOR_OV7660: |
2133 | PDEBUG(D_PROBE, "Find Sensor OV7660"); | 2515 | PDEBUG(D_PROBE, "Find Sensor OV7660"); |
2134 | break; | 2516 | break; |
@@ -2150,10 +2532,15 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
2150 | } else { | 2532 | } else { |
2151 | if (sensor != SENSOR_PO1200) { | 2533 | if (sensor != SENSOR_PO1200) { |
2152 | cam->cam_mode = vc0323_mode; | 2534 | cam->cam_mode = vc0323_mode; |
2153 | if (sd->sensor != SENSOR_MI1310_SOC) | 2535 | switch (sensor) { |
2536 | case SENSOR_MI1310_SOC: | ||
2537 | case SENSOR_MI1320_SOC: | ||
2154 | cam->nmodes = ARRAY_SIZE(vc0323_mode); | 2538 | cam->nmodes = ARRAY_SIZE(vc0323_mode); |
2155 | else /* no SXGA */ | 2539 | break; |
2540 | default: /* no SXGA */ | ||
2156 | cam->nmodes = ARRAY_SIZE(vc0323_mode) - 1; | 2541 | cam->nmodes = ARRAY_SIZE(vc0323_mode) - 1; |
2542 | break; | ||
2543 | } | ||
2157 | } else { | 2544 | } else { |
2158 | cam->cam_mode = svga_mode; | 2545 | cam->cam_mode = svga_mode; |
2159 | cam->nmodes = ARRAY_SIZE(svga_mode); | 2546 | cam->nmodes = ARRAY_SIZE(svga_mode); |
@@ -2313,7 +2700,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
2313 | init = mi1310_socinitVGA_JPG; /* 640x480 */ | 2700 | init = mi1310_socinitVGA_JPG; /* 640x480 */ |
2314 | break; | 2701 | break; |
2315 | default: | 2702 | default: |
2316 | init = mi1310_soc_InitSXGA_JPG; /* 1280xq024 */ | 2703 | init = mi1310_soc_InitSXGA_JPG; /* 1280x1024 */ |
2317 | break; | 2704 | break; |
2318 | } | 2705 | } |
2319 | break; | 2706 | break; |
@@ -2325,6 +2712,21 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
2325 | else | 2712 | else |
2326 | init = mi1320_initVGA_data; /* 640x480 */ | 2713 | init = mi1320_initVGA_data; /* 640x480 */ |
2327 | break; | 2714 | break; |
2715 | case SENSOR_MI1320_SOC: | ||
2716 | GammaT = mi1320_gamma; | ||
2717 | MatrixT = mi1320_matrix; | ||
2718 | switch (mode) { | ||
2719 | case 1: | ||
2720 | init = mi1320_soc_InitQVGA_JPG; /* 320x240 */ | ||
2721 | break; | ||
2722 | case 0: | ||
2723 | init = mi1320_soc_InitVGA_JPG; /* 640x480 */ | ||
2724 | break; | ||
2725 | default: | ||
2726 | init = mi1320_soc_InitSXGA_JPG; /* 1280x1024 */ | ||
2727 | break; | ||
2728 | } | ||
2729 | break; | ||
2328 | case SENSOR_PO3130NC: | 2730 | case SENSOR_PO3130NC: |
2329 | GammaT = po3130_gamma; | 2731 | GammaT = po3130_gamma; |
2330 | MatrixT = po3130_matrix; | 2732 | MatrixT = po3130_matrix; |
@@ -2533,6 +2935,7 @@ static const __devinitdata struct usb_device_id device_table[] = { | |||
2533 | {USB_DEVICE(0x0ac8, 0x0328), .driver_info = BRIDGE_VC0321}, | 2935 | {USB_DEVICE(0x0ac8, 0x0328), .driver_info = BRIDGE_VC0321}, |
2534 | {USB_DEVICE(0x0ac8, 0xc001), .driver_info = BRIDGE_VC0321}, | 2936 | {USB_DEVICE(0x0ac8, 0xc001), .driver_info = BRIDGE_VC0321}, |
2535 | {USB_DEVICE(0x0ac8, 0xc002), .driver_info = BRIDGE_VC0321}, | 2937 | {USB_DEVICE(0x0ac8, 0xc002), .driver_info = BRIDGE_VC0321}, |
2938 | {USB_DEVICE(0x15b8, 0x6001), .driver_info = BRIDGE_VC0323}, | ||
2536 | {USB_DEVICE(0x15b8, 0x6002), .driver_info = BRIDGE_VC0323}, | 2939 | {USB_DEVICE(0x15b8, 0x6002), .driver_info = BRIDGE_VC0323}, |
2537 | {USB_DEVICE(0x17ef, 0x4802), .driver_info = BRIDGE_VC0323}, | 2940 | {USB_DEVICE(0x17ef, 0x4802), .driver_info = BRIDGE_VC0323}, |
2538 | {} | 2941 | {} |