22 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
24 #include <linux/input.h>
28 MODULE_AUTHOR(
"Jean-Francois Moine <http://moinejf.free.fr>, "
96 .sizeimage = 320 * 240 * 3 / 8 + 590,
101 .sizeimage = 640 * 480 * 3 / 8 + 590,
109 .sizeimage = 320 * 232 * 4 / 8 + 590,
114 .sizeimage = 640 * 472 * 3 / 8 + 590,
122 .sizeimage = 176 * 144 * 3 / 8 + 590,
127 .sizeimage = 352 * 288 * 3 / 8 + 590,
136 static u8 jpeg_qual[] = {50, 75, 87, };
145 static const struct usb_action adcm2700_Initial[] = {
165 {0xbb, 0x00, 0x0400},
166 {0xdd, 0x00, 0x0010},
167 {0xbb, 0x0f, 0x140f},
179 {0xbb, 0x00, 0x0408},
180 {0xdd, 0x00, 0x0200},
181 {0xbb, 0x00, 0x0400},
182 {0xdd, 0x00, 0x0010},
183 {0xbb, 0x0f, 0x140f},
184 {0xbb, 0xe0, 0x0c2e},
185 {0xbb, 0x01, 0x2000},
186 {0xbb, 0x96, 0x2400},
187 {0xbb, 0x06, 0x1006},
189 {0xdd, 0x00, 0x0010},
190 {0xaa, 0xfe, 0x0002},
192 {0xdd, 0x00, 0x0010},
193 {0xbb, 0x5f, 0x2090},
194 {0xbb, 0x01, 0x8000},
195 {0xbb, 0x09, 0x8400},
196 {0xbb, 0x86, 0x0002},
197 {0xbb, 0xe6, 0x0401},
198 {0xbb, 0x86, 0x0802},
199 {0xbb, 0xe6, 0x0c01},
201 {0xdd, 0x00, 0x0010},
202 {0xaa, 0xfe, 0x0000},
204 {0xdd, 0x00, 0x0010},
206 {0xaa, 0xfe, 0x0020},
209 {0xaa, 0xfe, 0x0002},
211 {0xaa, 0xb4, 0xcd37},
212 {0xaa, 0xa4, 0x0004},
213 {0xaa, 0xa8, 0x0007},
214 {0xaa, 0xac, 0x0004},
218 {0xdd, 0x00, 0x0010},
219 {0xaa, 0xfe, 0x0000},
221 {0xdd, 0x00, 0x0010},
222 {0xbb, 0x04, 0x0400},
223 {0xdd, 0x00, 0x0100},
224 {0xbb, 0x01, 0x0400},
226 {0xaa, 0xfe, 0x0002},
228 {0xbb, 0x41, 0x2803},
229 {0xbb, 0x40, 0x2c03},
231 {0xaa, 0xfe, 0x0010},
234 static const struct usb_action adcm2700_InitialScale[] = {
254 {0xbb, 0x00, 0x0400},
255 {0xdd, 0x00, 0x0010},
256 {0xbb, 0x0f, 0x140f},
268 {0xbb, 0x00, 0x0408},
269 {0xdd, 0x00, 0x0200},
270 {0xbb, 0x00, 0x0400},
271 {0xdd, 0x00, 0x0050},
272 {0xbb, 0x0f, 0x140f},
273 {0xbb, 0xe0, 0x0c2e},
274 {0xbb, 0x01, 0x2000},
275 {0xbb, 0x96, 0x2400},
276 {0xbb, 0x06, 0x1006},
278 {0xdd, 0x00, 0x0010},
279 {0xaa, 0xfe, 0x0002},
281 {0xdd, 0x00, 0x0010},
282 {0xbb, 0x5f, 0x2090},
283 {0xbb, 0x01, 0x8000},
284 {0xbb, 0x09, 0x8400},
285 {0xbb, 0x86, 0x0002},
286 {0xbb, 0xe6, 0x0401},
287 {0xbb, 0x86, 0x0802},
288 {0xbb, 0xe6, 0x0c01},
290 {0xdd, 0x00, 0x0010},
291 {0xaa, 0xfe, 0x0000},
293 {0xdd, 0x00, 0x0010},
295 {0xaa, 0xfe, 0x0020},
299 {0xdd, 0x00, 0x0010},
300 {0xaa, 0xfe, 0x0000},
302 {0xdd, 0x00, 0x0010},
303 {0xbb, 0x04, 0x0400},
304 {0xdd, 0x00, 0x0100},
305 {0xbb, 0x01, 0x0400},
307 {0xaa, 0xfe, 0x0002},
309 {0xbb, 0x41, 0x2803},
310 {0xbb, 0x40, 0x2c03},
312 {0xaa, 0xfe, 0x0010},
315 static const struct usb_action adcm2700_50HZ[] = {
317 {0xaa, 0xfe, 0x0002},
319 {0xbb, 0x05, 0x8400},
320 {0xbb, 0xd0, 0xb007},
321 {0xbb, 0xa0, 0xb80f},
323 {0xaa, 0xfe, 0x0010},
324 {0xaa, 0x26, 0x00d0},
325 {0xaa, 0x28, 0x0002},
328 static const struct usb_action adcm2700_60HZ[] = {
330 {0xaa, 0xfe, 0x0002},
332 {0xbb, 0x07, 0x8400},
333 {0xbb, 0x82, 0xb006},
334 {0xbb, 0x04, 0xb80d},
336 {0xaa, 0xfe, 0x0010},
337 {0xaa, 0x26, 0x0057},
338 {0xaa, 0x28, 0x0002},
341 static const struct usb_action adcm2700_NoFliker[] = {
343 {0xaa, 0xfe, 0x0002},
345 {0xbb, 0x07, 0x8400},
346 {0xbb, 0x05, 0xb000},
347 {0xbb, 0xa0, 0xb801},
349 {0xaa, 0xfe, 0x0010},
352 static const struct usb_action cs2102_InitialScale[] = {
377 {0xaa, 0x02, 0x0008},
378 {0xaa, 0x03, 0x0000},
379 {0xaa, 0x11, 0x0000},
380 {0xaa, 0x12, 0x0089},
381 {0xaa, 0x13, 0x0000},
382 {0xaa, 0x14, 0x00e9},
383 {0xaa, 0x20, 0x0000},
384 {0xaa, 0x22, 0x0000},
385 {0xaa, 0x0b, 0x0004},
386 {0xaa, 0x30, 0x0030},
387 {0xaa, 0x31, 0x0030},
388 {0xaa, 0x32, 0x0030},
396 {0xa0, 0x10, 0x01ae},
400 {0xa0, 0x00, 0x01ad},
404 static const struct usb_action cs2102_Initial[] = {
429 {0xaa, 0x02, 0x0008},
430 {0xaa, 0x03, 0x0000},
431 {0xaa, 0x11, 0x0001},
432 {0xaa, 0x12, 0x0087},
433 {0xaa, 0x13, 0x0001},
434 {0xaa, 0x14, 0x00e7},
435 {0xaa, 0x20, 0x0000},
436 {0xaa, 0x22, 0x0000},
437 {0xaa, 0x0b, 0x0004},
438 {0xaa, 0x30, 0x0030},
439 {0xaa, 0x31, 0x0030},
440 {0xaa, 0x32, 0x0030},
448 {0xa0, 0x15, 0x01ae},
452 {0xa0, 0x00, 0x01ad},
455 static const struct usb_action cs2102_50HZScale[] = {
457 {0xaa, 0x23, 0x0001},
458 {0xaa, 0x24, 0x005f},
459 {0xaa, 0x25, 0x0090},
460 {0xaa, 0x21, 0x00dd},
477 static const struct usb_action cs2102_50HZ[] = {
479 {0xaa, 0x23, 0x0000},
480 {0xaa, 0x24, 0x00af},
481 {0xaa, 0x25, 0x00c8},
482 {0xaa, 0x21, 0x0068},
499 static const struct usb_action cs2102_60HZScale[] = {
501 {0xaa, 0x23, 0x0001},
502 {0xaa, 0x24, 0x0055},
503 {0xaa, 0x25, 0x00cc},
504 {0xaa, 0x21, 0x003f},
521 static const struct usb_action cs2102_60HZ[] = {
523 {0xaa, 0x23, 0x0000},
524 {0xaa, 0x24, 0x00aa},
525 {0xaa, 0x25, 0x00e6},
526 {0xaa, 0x21, 0x003f},
543 static const struct usb_action cs2102_NoFlikerScale[] = {
545 {0xaa, 0x23, 0x0001},
546 {0xaa, 0x24, 0x005f},
547 {0xaa, 0x25, 0x0000},
548 {0xaa, 0x21, 0x0001},
565 static const struct usb_action cs2102_NoFliker[] = {
567 {0xaa, 0x23, 0x0000},
568 {0xaa, 0x24, 0x00af},
569 {0xaa, 0x25, 0x0080},
570 {0xaa, 0x21, 0x0001},
589 static const struct usb_action cs2102K_InitialScale[] = {
690 {0xa0, 0x00, 0x01ad},
691 {0xa0, 0x01, 0x01b1},
848 static const struct usb_action cs2102K_Initial[] = {
951 {0xa0, 0x00, 0x01ad},
952 {0xa0, 0x01, 0x01b1},
1226 static const struct usb_action gc0305_Initial[] = {
1245 {0xaa, 0x13, 0x0002},
1246 {0xaa, 0x15, 0x0003},
1247 {0xaa, 0x01, 0x0000},
1248 {0xaa, 0x02, 0x0000},
1249 {0xaa, 0x1a, 0x0000},
1250 {0xaa, 0x1c, 0x0017},
1251 {0xaa, 0x1d, 0x0080},
1252 {0xaa, 0x1f, 0x0008},
1253 {0xaa, 0x21, 0x0012},
1257 {0xaa, 0x05, 0x0000},
1258 {0xaa, 0x0a, 0x0000},
1259 {0xaa, 0x0b, 0x00b0},
1260 {0xaa, 0x0c, 0x0000},
1261 {0xaa, 0x0d, 0x00b0},
1262 {0xaa, 0x0e, 0x0000},
1263 {0xaa, 0x0f, 0x00b0},
1264 {0xaa, 0x10, 0x0000},
1265 {0xaa, 0x11, 0x00b0},
1266 {0xaa, 0x16, 0x0001},
1267 {0xaa, 0x17, 0x00e6},
1268 {0xaa, 0x18, 0x0002},
1269 {0xaa, 0x19, 0x0086},
1270 {0xaa, 0x20, 0x0000},
1271 {0xaa, 0x1b, 0x0020},
1276 {0xa0, 0x09, 0x01ad},
1283 {0xa0, 0x00, 0x011e},
1290 static const struct usb_action gc0305_InitialScale[] = {
1309 {0xaa, 0x13, 0x0000},
1310 {0xaa, 0x15, 0x0001},
1311 {0xaa, 0x01, 0x0000},
1312 {0xaa, 0x02, 0x0000},
1313 {0xaa, 0x1a, 0x0000},
1314 {0xaa, 0x1c, 0x0017},
1315 {0xaa, 0x1d, 0x0080},
1316 {0xaa, 0x1f, 0x0008},
1317 {0xaa, 0x21, 0x0012},
1321 {0xaa, 0x05, 0x0000},
1322 {0xaa, 0x0a, 0x0000},
1323 {0xaa, 0x0b, 0x00b0},
1324 {0xaa, 0x0c, 0x0000},
1325 {0xaa, 0x0d, 0x00b0},
1326 {0xaa, 0x0e, 0x0000},
1327 {0xaa, 0x0f, 0x00b0},
1328 {0xaa, 0x10, 0x0000},
1329 {0xaa, 0x11, 0x00b0},
1330 {0xaa, 0x16, 0x0001},
1331 {0xaa, 0x17, 0x00e8},
1332 {0xaa, 0x18, 0x0002},
1333 {0xaa, 0x19, 0x0088},
1334 {0xaa, 0x20, 0x0000},
1335 {0xaa, 0x1b, 0x0020},
1340 {0xa0, 0x09, 0x01ad},
1346 {0xa0, 0x00, 0x011e},
1353 static const struct usb_action gc0305_50HZ[] = {
1354 {0xaa, 0x82, 0x0000},
1355 {0xaa, 0x83, 0x0002},
1356 {0xaa, 0x84, 0x0038},
1379 static const struct usb_action gc0305_60HZ[] = {
1380 {0xaa, 0x82, 0x0000},
1381 {0xaa, 0x83, 0x0000},
1382 {0xaa, 0x84, 0x00ec},
1403 static const struct usb_action gc0305_NoFliker[] = {
1405 {0xaa, 0x82, 0x0000},
1406 {0xaa, 0x83, 0x0000},
1407 {0xaa, 0x84, 0x0020},
1426 static const struct usb_action hdcs2020_InitialScale[] = {
1444 {0xaa, 0x1c, 0x0000},
1445 {0xaa, 0x0a, 0x0001},
1446 {0xaa, 0x0b, 0x0006},
1447 {0xaa, 0x0c, 0x007b},
1448 {0xaa, 0x0d, 0x00a7},
1449 {0xaa, 0x03, 0x00fb},
1450 {0xaa, 0x05, 0x0000},
1451 {0xaa, 0x06, 0x0003},
1452 {0xaa, 0x09, 0x0008},
1454 {0xaa, 0x0f, 0x0018},
1455 {0xaa, 0x10, 0x0018},
1456 {0xaa, 0x11, 0x0018},
1457 {0xaa, 0x12, 0x0018},
1459 {0xaa, 0x15, 0x004e},
1460 {0xaa, 0x1c, 0x0004},
1470 {0xa1, 0x01, 0x0002},
1471 {0xa1, 0x01, 0x0008},
1472 {0xa1, 0x01, 0x0180},
1477 {0xa1, 0x01, 0x0008},
1480 {0xa1, 0x01, 0x01c8},
1481 {0xa1, 0x01, 0x01c9},
1482 {0xa1, 0x01, 0x01ca},
1527 {0xa1, 0x01, 0x0180},
1530 {0xaa, 0x13, 0x0031},
1531 {0xaa, 0x14, 0x0001},
1532 {0xaa, 0x0e, 0x0004},
1533 {0xaa, 0x19, 0x00cd},
1551 {0xa1, 0x01, 0x0180},
1558 static const struct usb_action hdcs2020_Initial[] = {
1576 {0xaa, 0x1c, 0x0000},
1577 {0xaa, 0x0a, 0x0001},
1578 {0xaa, 0x0b, 0x0006},
1579 {0xaa, 0x0c, 0x007a},
1580 {0xaa, 0x0d, 0x00a7},
1581 {0xaa, 0x03, 0x00fb},
1582 {0xaa, 0x05, 0x0000},
1583 {0xaa, 0x06, 0x0003},
1584 {0xaa, 0x09, 0x0008},
1585 {0xaa, 0x0f, 0x0018},
1586 {0xaa, 0x10, 0x0018},
1587 {0xaa, 0x11, 0x0018},
1588 {0xaa, 0x12, 0x0018},
1589 {0xaa, 0x15, 0x004e},
1590 {0xaa, 0x1c, 0x0004},
1600 {0xa1, 0x01, 0x0002},
1601 {0xa1, 0x01, 0x0008},
1602 {0xa1, 0x01, 0x0180},
1607 {0xa1, 0x01, 0x0008},
1610 {0xa1, 0x01, 0x01c8},
1611 {0xa1, 0x01, 0x01c9},
1612 {0xa1, 0x01, 0x01ca},
1655 {0xa1, 0x01, 0x0180},
1659 {0xaa, 0x13, 0x0031},
1660 {0xaa, 0x14, 0x0001},
1661 {0xaa, 0x0e, 0x0004},
1662 {0xaa, 0x19, 0x00cd},
1679 {0xa1, 0x01, 0x0180},
1686 static const struct usb_action hdcs2020_50HZ[] = {
1688 {0xaa, 0x13, 0x0018},
1689 {0xaa, 0x14, 0x0001},
1690 {0xaa, 0x0e, 0x0005},
1691 {0xaa, 0x19, 0x001f},
1707 static const struct usb_action hdcs2020_60HZ[] = {
1709 {0xaa, 0x13, 0x0031},
1710 {0xaa, 0x14, 0x0001},
1711 {0xaa, 0x0e, 0x0004},
1712 {0xaa, 0x19, 0x00cd},
1728 static const struct usb_action hdcs2020_NoFliker[] = {
1730 {0xaa, 0x13, 0x0010},
1731 {0xaa, 0x14, 0x0001},
1732 {0xaa, 0x0e, 0x0004},
1733 {0xaa, 0x19, 0x0000},
1750 static const struct usb_action hv7131b_InitialScale[] = {
1767 {0xaa, 0x30, 0x002d},
1768 {0xaa, 0x01, 0x0005},
1769 {0xaa, 0x11, 0x0000},
1770 {0xaa, 0x13, 0x0001},
1771 {0xaa, 0x14, 0x0001},
1772 {0xaa, 0x15, 0x00e8},
1773 {0xaa, 0x16, 0x0002},
1774 {0xaa, 0x17, 0x0086},
1775 {0xaa, 0x31, 0x0038},
1776 {0xaa, 0x32, 0x0038},
1777 {0xaa, 0x33, 0x0038},
1778 {0xaa, 0x5b, 0x0001},
1784 {0xa0, 0x00, 0x01ad},
1785 {0xa0, 0xc0, 0x019b},
1786 {0xa0, 0xa0, 0x019c},
1793 {0xaa, 0x02, 0x0090},
1797 static const struct usb_action hv7131b_Initial[] = {
1814 {0xaa, 0x30, 0x002d},
1815 {0xaa, 0x01, 0x0005},
1816 {0xaa, 0x11, 0x0001},
1817 {0xaa, 0x13, 0x0000},
1818 {0xaa, 0x14, 0x0001},
1819 {0xaa, 0x15, 0x00e6},
1820 {0xaa, 0x16, 0x0002},
1821 {0xaa, 0x17, 0x0086},
1822 {0xaa, 0x31, 0x0038},
1823 {0xaa, 0x32, 0x0038},
1824 {0xaa, 0x33, 0x0038},
1825 {0xaa, 0x5b, 0x0001},
1831 {0xa0, 0x00, 0x01ad},
1832 {0xa0, 0xc0, 0x019b},
1833 {0xa0, 0xa0, 0x019c},
1840 {0xaa, 0x02, 0x0090},
1843 static const struct usb_action hv7131b_50HZ[] = {
1845 {0xaa, 0x25, 0x0007},
1846 {0xaa, 0x26, 0x0053},
1847 {0xaa, 0x27, 0x0000},
1848 {0xaa, 0x20, 0x0000},
1849 {0xaa, 0x21, 0x0050},
1850 {0xaa, 0x22, 0x001b},
1851 {0xaa, 0x23, 0x00fc},
1868 static const struct usb_action hv7131b_50HZScale[] = {
1870 {0xaa, 0x25, 0x0007},
1871 {0xaa, 0x26, 0x0053},
1872 {0xaa, 0x27, 0x0000},
1873 {0xaa, 0x20, 0x0000},
1874 {0xaa, 0x21, 0x0050},
1875 {0xaa, 0x22, 0x0012},
1876 {0xaa, 0x23, 0x0080},
1893 static const struct usb_action hv7131b_60HZ[] = {
1895 {0xaa, 0x25, 0x0007},
1896 {0xaa, 0x26, 0x00a1},
1897 {0xaa, 0x27, 0x0020},
1898 {0xaa, 0x20, 0x0000},
1899 {0xaa, 0x21, 0x0040},
1900 {0xaa, 0x22, 0x0013},
1901 {0xaa, 0x23, 0x004c},
1918 static const struct usb_action hv7131b_60HZScale[] = {
1920 {0xaa, 0x25, 0x0007},
1921 {0xaa, 0x26, 0x00a1},
1922 {0xaa, 0x27, 0x0020},
1923 {0xaa, 0x20, 0x0000},
1924 {0xaa, 0x21, 0x00a0},
1925 {0xaa, 0x22, 0x0016},
1926 {0xaa, 0x23, 0x0040},
1943 static const struct usb_action hv7131b_NoFliker[] = {
1945 {0xaa, 0x25, 0x0003},
1946 {0xaa, 0x26, 0x0000},
1947 {0xaa, 0x27, 0x0000},
1948 {0xaa, 0x20, 0x0000},
1949 {0xaa, 0x21, 0x0010},
1950 {0xaa, 0x22, 0x0000},
1951 {0xaa, 0x23, 0x0003},
1968 static const struct usb_action hv7131b_NoFlikerScale[] = {
1970 {0xaa, 0x25, 0x0003},
1971 {0xaa, 0x26, 0x0000},
1972 {0xaa, 0x27, 0x0000},
1973 {0xaa, 0x20, 0x0000},
1974 {0xaa, 0x21, 0x00a0},
1975 {0xaa, 0x22, 0x0016},
1976 {0xaa, 0x23, 0x0040},
1995 static const struct usb_action hv7131r_InitialScale[] = {
2017 {0xdd, 0x00, 0x0200},
2019 {0xaa, 0x01, 0x000c},
2020 {0xaa, 0x11, 0x0000},
2021 {0xaa, 0x13, 0x0000},
2022 {0xaa, 0x14, 0x0001},
2023 {0xaa, 0x15, 0x00e8},
2024 {0xaa, 0x16, 0x0002},
2025 {0xaa, 0x17, 0x0088},
2026 {0xaa, 0x30, 0x000b},
2031 {0xa0, 0x00, 0x01ad},
2032 {0xa0, 0xc0, 0x019b},
2033 {0xa0, 0xa0, 0x019c},
2041 static const struct usb_action hv7131r_Initial[] = {
2063 {0xdd, 0x00, 0x0200},
2065 {0xaa, 0x01, 0x000c},
2066 {0xaa, 0x11, 0x0000},
2067 {0xaa, 0x13, 0x0000},
2068 {0xaa, 0x14, 0x0001},
2069 {0xaa, 0x15, 0x00e6},
2070 {0xaa, 0x16, 0x0002},
2071 {0xaa, 0x17, 0x0086},
2072 {0xaa, 0x30, 0x000b},
2077 {0xa0, 0x00, 0x01ad},
2078 {0xa0, 0xc0, 0x019b},
2079 {0xa0, 0xa0, 0x019c},
2087 static const struct usb_action hv7131r_50HZ[] = {
2105 static const struct usb_action hv7131r_50HZScale[] = {
2123 static const struct usb_action hv7131r_60HZ[] = {
2141 static const struct usb_action hv7131r_60HZScale[] = {
2159 static const struct usb_action hv7131r_NoFliker[] = {
2177 static const struct usb_action hv7131r_NoFlikerScale[] = {
2196 static const struct usb_action icm105a_InitialScale[] = {
2224 {0xaa, 0x01, 0x0010},
2225 {0xaa, 0x03, 0x0000},
2226 {0xaa, 0x04, 0x0001},
2227 {0xaa, 0x05, 0x0020},
2228 {0xaa, 0x06, 0x0001},
2229 {0xaa, 0x08, 0x0000},
2230 {0xaa, 0x03, 0x0001},
2231 {0xaa, 0x04, 0x0011},
2232 {0xaa, 0x05, 0x00a0},
2233 {0xaa, 0x06, 0x0001},
2234 {0xaa, 0x08, 0x0000},
2235 {0xaa, 0x03, 0x0002},
2236 {0xaa, 0x04, 0x0013},
2237 {0xaa, 0x05, 0x0020},
2238 {0xaa, 0x06, 0x0001},
2239 {0xaa, 0x08, 0x0000},
2240 {0xaa, 0x03, 0x0003},
2241 {0xaa, 0x04, 0x0015},
2242 {0xaa, 0x05, 0x0020},
2243 {0xaa, 0x06, 0x0005},
2244 {0xaa, 0x08, 0x0000},
2245 {0xaa, 0x03, 0x0004},
2246 {0xaa, 0x04, 0x0017},
2247 {0xaa, 0x05, 0x0020},
2248 {0xaa, 0x06, 0x000d},
2249 {0xaa, 0x08, 0x0000},
2250 {0xaa, 0x03, 0x0005},
2251 {0xaa, 0x04, 0x0019},
2252 {0xaa, 0x05, 0x0020},
2253 {0xaa, 0x06, 0x0005},
2254 {0xaa, 0x08, 0x0000},
2255 {0xaa, 0x03, 0x0006},
2256 {0xaa, 0x04, 0x0017},
2257 {0xaa, 0x05, 0x0026},
2258 {0xaa, 0x06, 0x0005},
2259 {0xaa, 0x08, 0x0000},
2260 {0xaa, 0x03, 0x0007},
2261 {0xaa, 0x04, 0x0019},
2262 {0xaa, 0x05, 0x0022},
2263 {0xaa, 0x06, 0x0005},
2264 {0xaa, 0x08, 0x0000},
2265 {0xaa, 0x03, 0x0008},
2266 {0xaa, 0x04, 0x0021},
2267 {0xaa, 0x05, 0x00aa},
2268 {0xaa, 0x06, 0x0005},
2269 {0xaa, 0x08, 0x0000},
2270 {0xaa, 0x03, 0x0009},
2271 {0xaa, 0x04, 0x0023},
2272 {0xaa, 0x05, 0x00aa},
2273 {0xaa, 0x06, 0x000d},
2274 {0xaa, 0x08, 0x0000},
2275 {0xaa, 0x03, 0x000a},
2276 {0xaa, 0x04, 0x0025},
2277 {0xaa, 0x05, 0x00aa},
2278 {0xaa, 0x06, 0x0005},
2279 {0xaa, 0x08, 0x0000},
2280 {0xaa, 0x03, 0x000b},
2281 {0xaa, 0x04, 0x00ec},
2282 {0xaa, 0x05, 0x002e},
2283 {0xaa, 0x06, 0x0005},
2284 {0xaa, 0x08, 0x0000},
2285 {0xaa, 0x03, 0x000c},
2286 {0xaa, 0x04, 0x00fa},
2287 {0xaa, 0x05, 0x002a},
2288 {0xaa, 0x06, 0x0005},
2289 {0xaa, 0x08, 0x0000},
2290 {0xaa, 0x07, 0x000d},
2291 {0xaa, 0x01, 0x0005},
2292 {0xaa, 0x94, 0x0002},
2293 {0xaa, 0x90, 0x0000},
2294 {0xaa, 0x91, 0x001f},
2295 {0xaa, 0x10, 0x0064},
2296 {0xaa, 0x9b, 0x00f0},
2297 {0xaa, 0x9c, 0x0002},
2298 {0xaa, 0x14, 0x001a},
2299 {0xaa, 0x20, 0x0080},
2300 {0xaa, 0x22, 0x0080},
2301 {0xaa, 0x24, 0x0080},
2302 {0xaa, 0x26, 0x0080},
2303 {0xaa, 0x00, 0x0084},
2306 {0xaa, 0xa8, 0x00c0},
2307 {0xa1, 0x01, 0x0002},
2308 {0xa1, 0x01, 0x0008},
2309 {0xa1, 0x01, 0x0180},
2314 {0xa1, 0x01, 0x0008},
2318 {0xa1, 0x01, 0x01c8},
2319 {0xa1, 0x01, 0x01c9},
2320 {0xa1, 0x01, 0x01ca},
2331 {0xa1, 0x01, 0x0180},
2334 {0xaa, 0x0d, 0x0003},
2335 {0xaa, 0x0c, 0x008c},
2336 {0xaa, 0x0e, 0x0095},
2337 {0xaa, 0x0f, 0x0002},
2338 {0xaa, 0x1c, 0x0094},
2339 {0xaa, 0x1d, 0x0002},
2340 {0xaa, 0x20, 0x0080},
2341 {0xaa, 0x22, 0x0080},
2342 {0xaa, 0x24, 0x0080},
2343 {0xaa, 0x26, 0x0080},
2344 {0xaa, 0x00, 0x0084},
2365 {0xa1, 0x01, 0x0180},
2373 static const struct usb_action icm105a_Initial[] = {
2401 {0xaa, 0x01, 0x0010},
2402 {0xaa, 0x03, 0x0000},
2403 {0xaa, 0x04, 0x0001},
2404 {0xaa, 0x05, 0x0020},
2405 {0xaa, 0x06, 0x0001},
2406 {0xaa, 0x08, 0x0000},
2407 {0xaa, 0x03, 0x0001},
2408 {0xaa, 0x04, 0x0011},
2409 {0xaa, 0x05, 0x00a0},
2410 {0xaa, 0x06, 0x0001},
2411 {0xaa, 0x08, 0x0000},
2412 {0xaa, 0x03, 0x0002},
2413 {0xaa, 0x04, 0x0013},
2414 {0xaa, 0x05, 0x0020},
2415 {0xaa, 0x06, 0x0001},
2416 {0xaa, 0x08, 0x0000},
2417 {0xaa, 0x03, 0x0003},
2418 {0xaa, 0x04, 0x0015},
2419 {0xaa, 0x05, 0x0020},
2420 {0xaa, 0x06, 0x0005},
2421 {0xaa, 0x08, 0x0000},
2422 {0xaa, 0x03, 0x0004},
2423 {0xaa, 0x04, 0x0017},
2424 {0xaa, 0x05, 0x0020},
2425 {0xaa, 0x06, 0x000d},
2426 {0xaa, 0x08, 0x0000},
2427 {0xaa, 0x03, 0x0005},
2431 {0xa1, 0x01, 0x0091},
2432 {0xaa, 0x05, 0x0020},
2433 {0xaa, 0x06, 0x0005},
2434 {0xaa, 0x08, 0x0000},
2435 {0xaa, 0x03, 0x0006},
2436 {0xaa, 0x04, 0x0017},
2437 {0xaa, 0x05, 0x0026},
2438 {0xaa, 0x06, 0x0005},
2439 {0xaa, 0x08, 0x0000},
2440 {0xaa, 0x03, 0x0007},
2441 {0xaa, 0x04, 0x0019},
2442 {0xaa, 0x05, 0x0022},
2443 {0xaa, 0x06, 0x0005},
2444 {0xaa, 0x08, 0x0000},
2445 {0xaa, 0x03, 0x0008},
2446 {0xaa, 0x04, 0x0021},
2447 {0xaa, 0x05, 0x00aa},
2448 {0xaa, 0x06, 0x0005},
2449 {0xaa, 0x08, 0x0000},
2450 {0xaa, 0x03, 0x0009},
2451 {0xaa, 0x04, 0x0023},
2452 {0xaa, 0x05, 0x00aa},
2453 {0xaa, 0x06, 0x000d},
2454 {0xaa, 0x08, 0x0000},
2455 {0xaa, 0x03, 0x000a},
2456 {0xaa, 0x04, 0x0025},
2457 {0xaa, 0x05, 0x00aa},
2458 {0xaa, 0x06, 0x0005},
2459 {0xaa, 0x08, 0x0000},
2460 {0xaa, 0x03, 0x000b},
2461 {0xaa, 0x04, 0x00ec},
2462 {0xaa, 0x05, 0x002e},
2463 {0xaa, 0x06, 0x0005},
2464 {0xaa, 0x08, 0x0000},
2465 {0xaa, 0x03, 0x000c},
2466 {0xaa, 0x04, 0x00fa},
2467 {0xaa, 0x05, 0x002a},
2468 {0xaa, 0x06, 0x0005},
2469 {0xaa, 0x08, 0x0000},
2470 {0xaa, 0x07, 0x000d},
2471 {0xaa, 0x01, 0x0005},
2472 {0xaa, 0x94, 0x0002},
2473 {0xaa, 0x90, 0x0000},
2474 {0xaa, 0x91, 0x0010},
2475 {0xaa, 0x10, 0x0064},
2476 {0xaa, 0x9b, 0x00f0},
2477 {0xaa, 0x9c, 0x0002},
2478 {0xaa, 0x14, 0x001a},
2479 {0xaa, 0x20, 0x0080},
2480 {0xaa, 0x22, 0x0080},
2481 {0xaa, 0x24, 0x0080},
2482 {0xaa, 0x26, 0x0080},
2483 {0xaa, 0x00, 0x0084},
2486 {0xaa, 0xa8, 0x0080},
2488 {0xa1, 0x01, 0x0002},
2489 {0xa1, 0x01, 0x0008},
2490 {0xa1, 0x01, 0x0180},
2495 {0xa1, 0x01, 0x0008},
2499 {0xa1, 0x01, 0x01c8},
2500 {0xa1, 0x01, 0x01c9},
2501 {0xa1, 0x01, 0x01ca},
2513 {0xa1, 0x01, 0x0180},
2516 {0xaa, 0x0d, 0x0003},
2517 {0xaa, 0x0c, 0x0020},
2518 {0xaa, 0x0e, 0x000e},
2519 {0xaa, 0x0f, 0x0002},
2520 {0xaa, 0x1c, 0x000d},
2521 {0xaa, 0x1d, 0x0002},
2522 {0xaa, 0x20, 0x0080},
2523 {0xaa, 0x22, 0x0080},
2524 {0xaa, 0x24, 0x0080},
2525 {0xaa, 0x26, 0x0080},
2526 {0xaa, 0x00, 0x0084},
2545 {0xa1, 0x01, 0x0180},
2552 static const struct usb_action icm105a_50HZScale[] = {
2554 {0xaa, 0x0d, 0x0003},
2555 {0xaa, 0x0c, 0x0020},
2556 {0xaa, 0x0e, 0x000e},
2557 {0xaa, 0x0f, 0x0002},
2558 {0xaa, 0x1c, 0x000d},
2559 {0xaa, 0x1d, 0x0002},
2560 {0xaa, 0x20, 0x0080},
2561 {0xaa, 0x22, 0x0080},
2562 {0xaa, 0x24, 0x0080},
2563 {0xaa, 0x26, 0x0080},
2564 {0xaa, 0x00, 0x0084},
2583 static const struct usb_action icm105a_50HZ[] = {
2585 {0xaa, 0x0d, 0x0003},
2586 {0xaa, 0x0c, 0x008c},
2587 {0xaa, 0x0e, 0x0095},
2588 {0xaa, 0x0f, 0x0002},
2589 {0xaa, 0x1c, 0x0094},
2590 {0xaa, 0x1d, 0x0002},
2591 {0xaa, 0x20, 0x0080},
2592 {0xaa, 0x22, 0x0080},
2593 {0xaa, 0x24, 0x0080},
2594 {0xaa, 0x26, 0x0080},
2595 {0xaa, 0x00, 0x0084},
2616 static const struct usb_action icm105a_60HZScale[] = {
2618 {0xaa, 0x0d, 0x0003},
2619 {0xaa, 0x0c, 0x0004},
2620 {0xaa, 0x0e, 0x000d},
2621 {0xaa, 0x0f, 0x0002},
2622 {0xaa, 0x1c, 0x0008},
2623 {0xaa, 0x1d, 0x0002},
2624 {0xaa, 0x20, 0x0080},
2625 {0xaa, 0x22, 0x0080},
2626 {0xaa, 0x24, 0x0080},
2627 {0xaa, 0x26, 0x0080},
2628 {0xaa, 0x00, 0x0084},
2647 static const struct usb_action icm105a_60HZ[] = {
2649 {0xaa, 0x0d, 0x0003},
2650 {0xaa, 0x0c, 0x0008},
2651 {0xaa, 0x0e, 0x0086},
2652 {0xaa, 0x0f, 0x0002},
2653 {0xaa, 0x1c, 0x0085},
2654 {0xaa, 0x1d, 0x0002},
2655 {0xaa, 0x20, 0x0080},
2656 {0xaa, 0x22, 0x0080},
2657 {0xaa, 0x24, 0x0080},
2658 {0xaa, 0x26, 0x0080},
2659 {0xaa, 0x00, 0x0084},
2680 static const struct usb_action icm105a_NoFlikerScale[] = {
2682 {0xaa, 0x0d, 0x0003},
2683 {0xaa, 0x0c, 0x0004},
2684 {0xaa, 0x0e, 0x000d},
2685 {0xaa, 0x0f, 0x0002},
2686 {0xaa, 0x1c, 0x0000},
2687 {0xaa, 0x1d, 0x0002},
2688 {0xaa, 0x20, 0x0080},
2689 {0xaa, 0x22, 0x0080},
2690 {0xaa, 0x24, 0x0080},
2691 {0xaa, 0x26, 0x0080},
2692 {0xaa, 0x00, 0x0084},
2711 static const struct usb_action icm105a_NoFliker[] = {
2713 {0xaa, 0x0d, 0x0003},
2714 {0xaa, 0x0c, 0x0004},
2715 {0xaa, 0x0e, 0x0081},
2716 {0xaa, 0x0f, 0x0002},
2717 {0xaa, 0x1c, 0x0080},
2718 {0xaa, 0x1d, 0x0002},
2719 {0xaa, 0x20, 0x0080},
2720 {0xaa, 0x22, 0x0080},
2721 {0xaa, 0x24, 0x0080},
2722 {0xaa, 0x26, 0x0080},
2723 {0xaa, 0x00, 0x0084},
2745 static const struct usb_action mc501cb_Initial[] = {
2770 {0xaa, 0x01, 0x0001},
2771 {0xaa, 0x01, 0x0003},
2772 {0xaa, 0x01, 0x0001},
2773 {0xaa, 0x03, 0x0000},
2774 {0xaa, 0x10, 0x0000},
2775 {0xaa, 0x11, 0x0080},
2776 {0xaa, 0x12, 0x0000},
2777 {0xaa, 0x13, 0x0000},
2778 {0xaa, 0x14, 0x0000},
2779 {0xaa, 0x15, 0x0000},
2780 {0xaa, 0x16, 0x0000},
2781 {0xaa, 0x17, 0x0001},
2782 {0xaa, 0x18, 0x00de},
2783 {0xaa, 0x19, 0x0002},
2784 {0xaa, 0x1a, 0x0086},
2785 {0xaa, 0x20, 0x00a8},
2786 {0xaa, 0x22, 0x0000},
2787 {0xaa, 0x23, 0x0000},
2788 {0xaa, 0x24, 0x0000},
2789 {0xaa, 0x40, 0x0033},
2790 {0xaa, 0x41, 0x0077},
2791 {0xaa, 0x42, 0x0053},
2792 {0xaa, 0x43, 0x00b0},
2793 {0xaa, 0x4b, 0x0001},
2794 {0xaa, 0x72, 0x0020},
2795 {0xaa, 0x73, 0x0000},
2796 {0xaa, 0x80, 0x0000},
2797 {0xaa, 0x85, 0x0050},
2798 {0xaa, 0x91, 0x0070},
2799 {0xaa, 0x92, 0x0072},
2800 {0xaa, 0x03, 0x0001},
2801 {0xaa, 0x10, 0x00a0},
2802 {0xaa, 0x11, 0x0001},
2803 {0xaa, 0x30, 0x0000},
2804 {0xaa, 0x60, 0x0000},
2805 {0xaa, 0xa0, 0x001a},
2806 {0xaa, 0xa1, 0x0000},
2807 {0xaa, 0xa2, 0x003f},
2808 {0xaa, 0xa3, 0x0028},
2809 {0xaa, 0xa4, 0x0010},
2810 {0xaa, 0xa5, 0x0020},
2811 {0xaa, 0xb1, 0x0044},
2812 {0xaa, 0xd0, 0x0001},
2813 {0xaa, 0xd1, 0x0085},
2814 {0xaa, 0xd2, 0x0080},
2815 {0xaa, 0xd3, 0x0080},
2816 {0xaa, 0xd4, 0x0080},
2817 {0xaa, 0xd5, 0x0080},
2818 {0xaa, 0xc0, 0x00c3},
2819 {0xaa, 0xc2, 0x0044},
2820 {0xaa, 0xc4, 0x0040},
2821 {0xaa, 0xc5, 0x0020},
2822 {0xaa, 0xc6, 0x0008},
2823 {0xaa, 0x03, 0x0004},
2824 {0xaa, 0x10, 0x0000},
2825 {0xaa, 0x40, 0x0030},
2826 {0xaa, 0x41, 0x0020},
2827 {0xaa, 0x42, 0x002d},
2828 {0xaa, 0x03, 0x0003},
2829 {0xaa, 0x1c, 0x0050},
2830 {0xaa, 0x11, 0x0081},
2831 {0xaa, 0x3b, 0x001d},
2832 {0xaa, 0x3c, 0x004c},
2833 {0xaa, 0x3d, 0x0018},
2834 {0xaa, 0x3e, 0x006a},
2835 {0xaa, 0x01, 0x0000},
2836 {0xaa, 0x52, 0x00ff},
2846 {0xaa, 0x03, 0x0002},
2847 {0xaa, 0x51, 0x0027},
2848 {0xaa, 0x52, 0x0020},
2849 {0xaa, 0x03, 0x0003},
2850 {0xaa, 0x50, 0x0010},
2851 {0xaa, 0x51, 0x0010},
2852 {0xaa, 0x54, 0x0010},
2853 {0xaa, 0x55, 0x0010},
2854 {0xa0, 0xf0, 0x0199},
2855 {0xa0, 0x80, 0x019a},
2857 {0xaa, 0x03, 0x0003},
2858 {0xaa, 0x10, 0x00fc},
2859 {0xaa, 0x36, 0x001d},
2860 {0xaa, 0x37, 0x004c},
2861 {0xaa, 0x3b, 0x001d},
2865 static const struct usb_action mc501cb_InitialScale[] = {
2890 {0xaa, 0x01, 0x0001},
2891 {0xaa, 0x01, 0x0003},
2892 {0xaa, 0x01, 0x0001},
2893 {0xaa, 0x03, 0x0000},
2894 {0xaa, 0x10, 0x0000},
2895 {0xaa, 0x11, 0x0080},
2896 {0xaa, 0x12, 0x0000},
2897 {0xaa, 0x13, 0x0000},
2898 {0xaa, 0x14, 0x0000},
2899 {0xaa, 0x15, 0x0000},
2900 {0xaa, 0x16, 0x0000},
2901 {0xaa, 0x17, 0x0001},
2902 {0xaa, 0x18, 0x00d8},
2903 {0xaa, 0x19, 0x0002},
2904 {0xaa, 0x1a, 0x0088},
2905 {0xaa, 0x20, 0x00a8},
2906 {0xaa, 0x22, 0x0000},
2907 {0xaa, 0x23, 0x0000},
2908 {0xaa, 0x24, 0x0000},
2909 {0xaa, 0x40, 0x0033},
2910 {0xaa, 0x41, 0x0077},
2911 {0xaa, 0x42, 0x0053},
2912 {0xaa, 0x43, 0x00b0},
2913 {0xaa, 0x4b, 0x0001},
2914 {0xaa, 0x72, 0x0020},
2915 {0xaa, 0x73, 0x0000},
2916 {0xaa, 0x80, 0x0000},
2917 {0xaa, 0x85, 0x0050},
2918 {0xaa, 0x91, 0x0070},
2919 {0xaa, 0x92, 0x0072},
2920 {0xaa, 0x03, 0x0001},
2921 {0xaa, 0x10, 0x00a0},
2922 {0xaa, 0x11, 0x0001},
2923 {0xaa, 0x30, 0x0000},
2924 {0xaa, 0x60, 0x0000},
2925 {0xaa, 0xa0, 0x001a},
2926 {0xaa, 0xa1, 0x0000},
2927 {0xaa, 0xa2, 0x003f},
2928 {0xaa, 0xa3, 0x0028},
2929 {0xaa, 0xa4, 0x0010},
2930 {0xaa, 0xa5, 0x0020},
2931 {0xaa, 0xb1, 0x0044},
2932 {0xaa, 0xd0, 0x0001},
2933 {0xaa, 0xd1, 0x0085},
2934 {0xaa, 0xd2, 0x0080},
2935 {0xaa, 0xd3, 0x0080},
2936 {0xaa, 0xd4, 0x0080},
2937 {0xaa, 0xd5, 0x0080},
2938 {0xaa, 0xc0, 0x00c3},
2939 {0xaa, 0xc2, 0x0044},
2940 {0xaa, 0xc4, 0x0040},
2941 {0xaa, 0xc5, 0x0020},
2942 {0xaa, 0xc6, 0x0008},
2943 {0xaa, 0x03, 0x0004},
2944 {0xaa, 0x10, 0x0000},
2945 {0xaa, 0x40, 0x0030},
2946 {0xaa, 0x41, 0x0020},
2947 {0xaa, 0x42, 0x002d},
2948 {0xaa, 0x03, 0x0003},
2949 {0xaa, 0x1c, 0x0050},
2950 {0xaa, 0x11, 0x0081},
2951 {0xaa, 0x3b, 0x003a},
2952 {0xaa, 0x3c, 0x0098},
2953 {0xaa, 0x3d, 0x0030},
2954 {0xaa, 0x3e, 0x00d4},
2955 {0xaa, 0x01, 0x0000},
2956 {0xaa, 0x52, 0x00ff},
2966 {0xaa, 0x03, 0x0002},
2967 {0xaa, 0x51, 0x004e},
2968 {0xaa, 0x52, 0x0041},
2969 {0xaa, 0x03, 0x0003},
2970 {0xaa, 0x50, 0x0010},
2971 {0xaa, 0x51, 0x0010},
2972 {0xaa, 0x54, 0x0010},
2973 {0xaa, 0x55, 0x0010},
2974 {0xa0, 0xf0, 0x0199},
2975 {0xa0, 0x80, 0x019a},
2979 static const struct usb_action mc501cb_50HZ[] = {
2980 {0xaa, 0x03, 0x0003},
2981 {0xaa, 0x10, 0x00fc},
2982 {0xaa, 0x36, 0x001d},
2983 {0xaa, 0x37, 0x004c},
2984 {0xaa, 0x3b, 0x001d},
2985 {0xaa, 0x3c, 0x004c},
2986 {0xaa, 0x3d, 0x001d},
2987 {0xaa, 0x3e, 0x004c},
2991 static const struct usb_action mc501cb_50HZScale[] = {
2992 {0xaa, 0x03, 0x0003},
2993 {0xaa, 0x10, 0x00fc},
2994 {0xaa, 0x36, 0x003a},
2995 {0xaa, 0x37, 0x0098},
2996 {0xaa, 0x3b, 0x003a},
2997 {0xaa, 0x3c, 0x0098},
2998 {0xaa, 0x3d, 0x003a},
2999 {0xaa, 0x3e, 0x0098},
3003 static const struct usb_action mc501cb_60HZ[] = {
3004 {0xaa, 0x03, 0x0003},
3005 {0xaa, 0x10, 0x00fc},
3006 {0xaa, 0x36, 0x0018},
3007 {0xaa, 0x37, 0x006a},
3008 {0xaa, 0x3d, 0x0018},
3009 {0xaa, 0x3e, 0x006a},
3010 {0xaa, 0x3b, 0x0018},
3011 {0xaa, 0x3c, 0x006a},
3015 static const struct usb_action mc501cb_60HZScale[] = {
3016 {0xaa, 0x03, 0x0003},
3017 {0xaa, 0x10, 0x00fc},
3018 {0xaa, 0x36, 0x0030},
3019 {0xaa, 0x37, 0x00d4},
3020 {0xaa, 0x3d, 0x0030},
3021 {0xaa, 0x3e, 0x00d4},
3022 {0xaa, 0x3b, 0x0030},
3023 {0xaa, 0x3c, 0x00d4},
3027 static const struct usb_action mc501cb_NoFliker[] = {
3028 {0xaa, 0x03, 0x0003},
3029 {0xaa, 0x10, 0x00fc},
3030 {0xaa, 0x36, 0x0018},
3031 {0xaa, 0x37, 0x006a},
3032 {0xaa, 0x3d, 0x0018},
3033 {0xaa, 0x3e, 0x006a},
3034 {0xaa, 0x3b, 0x0018},
3035 {0xaa, 0x3c, 0x006a},
3039 static const struct usb_action mc501cb_NoFlikerScale[] = {
3040 {0xaa, 0x03, 0x0003},
3041 {0xaa, 0x10, 0x00fc},
3042 {0xaa, 0x36, 0x0030},
3043 {0xaa, 0x37, 0x00d4},
3044 {0xaa, 0x3d, 0x0030},
3045 {0xaa, 0x3e, 0x00d4},
3046 {0xaa, 0x3b, 0x0030},
3047 {0xaa, 0x3c, 0x00d4},
3052 static const struct usb_action ov7620_Initial[] = {
3077 {0xaa, 0x12, 0x0088},
3078 {0xaa, 0x12, 0x0048},
3079 {0xaa, 0x75, 0x008a},
3080 {0xaa, 0x13, 0x00a3},
3081 {0xaa, 0x04, 0x0000},
3082 {0xaa, 0x05, 0x0000},
3083 {0xaa, 0x14, 0x0000},
3084 {0xaa, 0x15, 0x0004},
3085 {0xaa, 0x17, 0x0018},
3086 {0xaa, 0x18, 0x00ba},
3087 {0xaa, 0x19, 0x0002},
3088 {0xaa, 0x1a, 0x00f1},
3089 {0xaa, 0x20, 0x0040},
3090 {0xaa, 0x24, 0x0088},
3091 {0xaa, 0x25, 0x0078},
3092 {0xaa, 0x27, 0x00f6},
3093 {0xaa, 0x28, 0x00a0},
3094 {0xaa, 0x21, 0x0000},
3095 {0xaa, 0x2a, 0x0083},
3096 {0xaa, 0x2b, 0x0096},
3097 {0xaa, 0x2d, 0x0005},
3098 {0xaa, 0x74, 0x0020},
3099 {0xaa, 0x61, 0x0068},
3100 {0xaa, 0x64, 0x0088},
3101 {0xaa, 0x00, 0x0000},
3102 {0xaa, 0x06, 0x0080},
3103 {0xaa, 0x01, 0x0090},
3104 {0xaa, 0x02, 0x0030},
3109 {0xa0, 0x00, 0x01ad},
3121 static const struct usb_action ov7620_InitialScale[] = {
3148 {0xaa, 0x12, 0x0088},
3149 {0xaa, 0x12, 0x0048},
3150 {0xaa, 0x75, 0x008a},
3151 {0xaa, 0x13, 0x00a3},
3152 {0xaa, 0x04, 0x0000},
3153 {0xaa, 0x05, 0x0000},
3154 {0xaa, 0x14, 0x0000},
3155 {0xaa, 0x15, 0x0004},
3156 {0xaa, 0x24, 0x0088},
3157 {0xaa, 0x25, 0x0078},
3158 {0xaa, 0x17, 0x0018},
3159 {0xaa, 0x18, 0x00ba},
3160 {0xaa, 0x19, 0x0002},
3161 {0xaa, 0x1a, 0x00f2},
3162 {0xaa, 0x20, 0x0040},
3163 {0xaa, 0x27, 0x00f6},
3164 {0xaa, 0x28, 0x00a0},
3165 {0xaa, 0x21, 0x0000},
3166 {0xaa, 0x2a, 0x0083},
3167 {0xaa, 0x2b, 0x0096},
3168 {0xaa, 0x2d, 0x0005},
3169 {0xaa, 0x74, 0x0020},
3170 {0xaa, 0x61, 0x0068},
3171 {0xaa, 0x64, 0x0088},
3172 {0xaa, 0x00, 0x0000},
3173 {0xaa, 0x06, 0x0080},
3174 {0xaa, 0x01, 0x0090},
3175 {0xaa, 0x02, 0x0030},
3180 {0xa0, 0x00, 0x01ad},
3192 static const struct usb_action ov7620_50HZ[] = {
3193 {0xaa, 0x13, 0x00a3},
3194 {0xdd, 0x00, 0x0100},
3195 {0xaa, 0x2b, 0x0096},
3196 {0xaa, 0x75, 0x008a},
3197 {0xaa, 0x2d, 0x0005},
3204 {0xaa, 0x10, 0x0082},
3205 {0xaa, 0x76, 0x0003},
3210 static const struct usb_action ov7620_60HZ[] = {
3211 {0xaa, 0x13, 0x00a3},
3213 {0xdd, 0x00, 0x0100},
3214 {0xaa, 0x2b, 0x0000},
3215 {0xaa, 0x75, 0x008a},
3216 {0xaa, 0x2d, 0x0005},
3223 {0xaa, 0x10, 0x0020},
3224 {0xaa, 0x76, 0x0003},
3232 static const struct usb_action ov7620_NoFliker[] = {
3233 {0xaa, 0x13, 0x00a3},
3235 {0xdd, 0x00, 0x0100},
3236 {0xaa, 0x2b, 0x0000},
3237 {0xaa, 0x75, 0x008e},
3238 {0xaa, 0x2d, 0x0001},
3253 static const struct usb_action ov7630c_InitialScale[] = {
3268 {0xaa, 0x12, 0x0080},
3280 {0xaa, 0x12, 0x0069},
3281 {0xaa, 0x04, 0x0020},
3282 {0xaa, 0x06, 0x0050},
3283 {0xaa, 0x13, 0x0083},
3284 {0xaa, 0x14, 0x0000},
3285 {0xaa, 0x15, 0x0024},
3286 {0xaa, 0x17, 0x0018},
3287 {0xaa, 0x18, 0x00ba},
3288 {0xaa, 0x19, 0x0002},
3289 {0xaa, 0x1a, 0x00f6},
3290 {0xaa, 0x1b, 0x0002},
3291 {0xaa, 0x20, 0x00c2},
3292 {0xaa, 0x24, 0x0060},
3293 {0xaa, 0x25, 0x0040},
3294 {0xaa, 0x26, 0x0030},
3295 {0xaa, 0x27, 0x00ea},
3296 {0xaa, 0x28, 0x00a0},
3297 {0xaa, 0x21, 0x0000},
3298 {0xaa, 0x2a, 0x0081},
3299 {0xaa, 0x2b, 0x0096},
3300 {0xaa, 0x2d, 0x0094},
3301 {0xaa, 0x2f, 0x003d},
3302 {0xaa, 0x30, 0x0024},
3303 {0xaa, 0x60, 0x0000},
3304 {0xaa, 0x61, 0x0040},
3305 {0xaa, 0x68, 0x007c},
3306 {0xaa, 0x6f, 0x0015},
3307 {0xaa, 0x75, 0x0088},
3308 {0xaa, 0x77, 0x00b5},
3309 {0xaa, 0x01, 0x0060},
3310 {0xaa, 0x02, 0x0060},
3316 {0xa0, 0x00, 0x01ad},
3325 {0xa1, 0x01, 0x0002},
3335 {0xa1, 0x01, 0x0008},
3338 {0xa1, 0x01, 0x01c8},
3339 {0xa1, 0x01, 0x01c9},
3340 {0xa1, 0x01, 0x01ca},
3384 {0xa1, 0x01, 0x0180},
3386 {0xaa, 0x10, 0x001b},
3387 {0xaa, 0x76, 0x0002},
3388 {0xaa, 0x2a, 0x0081},
3389 {0xaa, 0x2b, 0x0000},
3403 {0xaa, 0x13, 0x0083},
3404 {0xa1, 0x01, 0x0180},
3409 static const struct usb_action ov7630c_Initial[] = {
3423 {0xaa, 0x12, 0x0080},
3435 {0xaa, 0x12, 0x0069},
3436 {0xaa, 0x04, 0x0020},
3437 {0xaa, 0x06, 0x0050},
3438 {0xaa, 0x13, 0x00c3},
3439 {0xaa, 0x14, 0x0000},
3440 {0xaa, 0x15, 0x0024},
3441 {0xaa, 0x19, 0x0003},
3442 {0xaa, 0x1a, 0x00f6},
3443 {0xaa, 0x1b, 0x0002},
3444 {0xaa, 0x20, 0x00c2},
3445 {0xaa, 0x24, 0x0060},
3446 {0xaa, 0x25, 0x0040},
3447 {0xaa, 0x26, 0x0030},
3448 {0xaa, 0x27, 0x00ea},
3449 {0xaa, 0x28, 0x00a0},
3450 {0xaa, 0x21, 0x0000},
3451 {0xaa, 0x2a, 0x0081},
3452 {0xaa, 0x2b, 0x0096},
3453 {0xaa, 0x2d, 0x0084},
3454 {0xaa, 0x2f, 0x003d},
3455 {0xaa, 0x30, 0x0024},
3456 {0xaa, 0x60, 0x0000},
3457 {0xaa, 0x61, 0x0040},
3458 {0xaa, 0x68, 0x007c},
3459 {0xaa, 0x6f, 0x0015},
3460 {0xaa, 0x75, 0x0088},
3461 {0xaa, 0x77, 0x00b5},
3462 {0xaa, 0x01, 0x0060},
3463 {0xaa, 0x02, 0x0060},
3464 {0xaa, 0x17, 0x0018},
3465 {0xaa, 0x18, 0x00ba},
3471 {0xa0, 0x00, 0x01ad},
3480 {0xa1, 0x01, 0x0002},
3491 {0xa1, 0x01, 0x0008},
3494 {0xa1, 0x01, 0x01c8},
3495 {0xa1, 0x01, 0x01c9},
3496 {0xa1, 0x01, 0x01ca},
3540 {0xa1, 0x01, 0x0180},
3542 {0xaa, 0x10, 0x000d},
3543 {0xaa, 0x76, 0x0002},
3544 {0xaa, 0x2a, 0x0081},
3545 {0xaa, 0x2b, 0x0000},
3559 {0xaa, 0x13, 0x00c3},
3561 {0xa1, 0x01, 0x0180},
3566 static const struct usb_action pas106b_Initial_com[] = {
3568 {0xa1, 0x01, 0x0010},
3574 {0xa0, 0x03, 0x003a},
3575 {0xa0, 0x0c, 0x003b},
3576 {0xa0, 0x04, 0x0038},
3580 static const struct usb_action pas106b_InitialScale[] = {
3604 {0xaa, 0x02, 0x0004},
3605 {0xaa, 0x08, 0x0000},
3606 {0xaa, 0x09, 0x0005},
3607 {0xaa, 0x0a, 0x0002},
3608 {0xaa, 0x0b, 0x0002},
3609 {0xaa, 0x0c, 0x0005},
3610 {0xaa, 0x0d, 0x0000},
3611 {0xaa, 0x0e, 0x0002},
3612 {0xaa, 0x14, 0x0081},
3620 {0xa0, 0x00, 0x01ad},
3676 {0xaa, 0x07, 0x00b1},
3677 {0xaa, 0x05, 0x0003},
3678 {0xaa, 0x04, 0x0001},
3679 {0xaa, 0x03, 0x003b},
3687 {0xa1, 0x01, 0x0180},
3696 static const struct usb_action pas106b_Initial[] = {
3720 {0xaa, 0x02, 0x0004},
3721 {0xaa, 0x08, 0x0000},
3722 {0xaa, 0x09, 0x0005},
3723 {0xaa, 0x0a, 0x0002},
3724 {0xaa, 0x0b, 0x0002},
3725 {0xaa, 0x0c, 0x0005},
3726 {0xaa, 0x0d, 0x0000},
3727 {0xaa, 0x0e, 0x0002},
3728 {0xaa, 0x14, 0x0081},
3736 {0xa0, 0x00, 0x01ad},
3796 {0xaa, 0x07, 0x00b1},
3797 {0xaa, 0x05, 0x0003},
3798 {0xaa, 0x04, 0x0001},
3799 {0xaa, 0x03, 0x003b},
3806 {0xa1, 0x01, 0x0180},
3813 {0xa0, 0x00, 0x0007},
3817 static const struct usb_action pas106b_50HZ[] = {
3826 {0xaa, 0x03, 0x0021},
3827 {0xaa, 0x04, 0x000c},
3828 {0xaa, 0x05, 0x0002},
3829 {0xaa, 0x07, 0x001c},
3833 static const struct usb_action pas106b_60HZ[] = {
3842 {0xaa, 0x03, 0x001c},
3843 {0xaa, 0x04, 0x0004},
3844 {0xaa, 0x05, 0x0001},
3845 {0xaa, 0x07, 0x00c4},
3849 static const struct usb_action pas106b_NoFliker[] = {
3858 {0xaa, 0x03, 0x0013},
3859 {0xaa, 0x04, 0x0000},
3860 {0xaa, 0x05, 0x0001},
3861 {0xaa, 0x07, 0x0030},
3867 static const struct usb_action pas202b_Initial[] = {
3888 {0xaa, 0x02, 0x0002},
3889 {0xaa, 0x07, 0x0006},
3890 {0xaa, 0x08, 0x0002},
3891 {0xaa, 0x09, 0x0006},
3892 {0xaa, 0x0a, 0x0001},
3893 {0xaa, 0x0b, 0x0001},
3894 {0xaa, 0x0c, 0x0006},
3895 {0xaa, 0x0d, 0x0000},
3896 {0xaa, 0x10, 0x0000},
3897 {0xaa, 0x12, 0x0005},
3898 {0xaa, 0x13, 0x0063},
3899 {0xaa, 0x15, 0x0070},
3903 {0xa0, 0x00, 0x01ad},
3911 static const struct usb_action pas202b_InitialScale[] = {
3932 {0xaa, 0x02, 0x0002},
3933 {0xaa, 0x07, 0x0006},
3934 {0xaa, 0x08, 0x0002},
3935 {0xaa, 0x09, 0x0006},
3936 {0xaa, 0x0a, 0x0001},
3937 {0xaa, 0x0b, 0x0001},
3938 {0xaa, 0x0c, 0x0006},
3939 {0xaa, 0x0d, 0x0000},
3940 {0xaa, 0x10, 0x0000},
3941 {0xaa, 0x12, 0x0005},
3942 {0xaa, 0x13, 0x0063},
3943 {0xaa, 0x15, 0x0070},
3947 {0xa0, 0x00, 0x01ad},
3957 static const struct usb_action pas202b_50HZ[] = {
3961 {0xaa, 0x20, 0x0002},
3962 {0xaa, 0x21, 0x001b},
3963 {0xaa, 0x03, 0x0044},
3964 {0xaa, 0x04, 0x0008},
3965 {0xaa, 0x05, 0x001b},
3966 {0xaa, 0x0e, 0x0001},
3967 {0xaa, 0x0f, 0x0000},
3986 static const struct usb_action pas202b_50HZScale[] = {
3990 {0xaa, 0x20, 0x0004},
3991 {0xaa, 0x21, 0x003d},
3992 {0xaa, 0x03, 0x0041},
3993 {0xaa, 0x04, 0x0010},
3994 {0xaa, 0x05, 0x003d},
3995 {0xaa, 0x0e, 0x0001},
3996 {0xaa, 0x0f, 0x0000},
4015 static const struct usb_action pas202b_60HZ[] = {
4019 {0xaa, 0x20, 0x0002},
4020 {0xaa, 0x21, 0x0000},
4021 {0xaa, 0x03, 0x0045},
4022 {0xaa, 0x04, 0x0008},
4023 {0xaa, 0x05, 0x0000},
4024 {0xaa, 0x0e, 0x0001},
4025 {0xaa, 0x0f, 0x0000},
4044 static const struct usb_action pas202b_60HZScale[] = {
4048 {0xaa, 0x20, 0x0004},
4049 {0xaa, 0x21, 0x0008},
4050 {0xaa, 0x03, 0x0042},
4051 {0xaa, 0x04, 0x0010},
4052 {0xaa, 0x05, 0x0008},
4053 {0xaa, 0x0e, 0x0001},
4054 {0xaa, 0x0f, 0x0000},
4073 static const struct usb_action pas202b_NoFliker[] = {
4077 {0xaa, 0x20, 0x0002},
4078 {0xaa, 0x21, 0x0006},
4079 {0xaa, 0x03, 0x0040},
4080 {0xaa, 0x04, 0x0008},
4081 {0xaa, 0x05, 0x0006},
4082 {0xaa, 0x0e, 0x0001},
4083 {0xaa, 0x0f, 0x0000},
4102 static const struct usb_action pas202b_NoFlikerScale[] = {
4106 {0xaa, 0x20, 0x0004},
4107 {0xaa, 0x21, 0x000c},
4108 {0xaa, 0x03, 0x0040},
4109 {0xaa, 0x04, 0x0010},
4110 {0xaa, 0x05, 0x000c},
4111 {0xaa, 0x0e, 0x0001},
4112 {0xaa, 0x0f, 0x0000},
4133 static const struct usb_action mt9v111_1_Initial[] = {
4150 {0xdd, 0x00, 0x0200},
4152 {0xaa, 0x01, 0x0001},
4153 {0xaa, 0x06, 0x0000},
4154 {0xaa, 0x08, 0x0483},
4155 {0xaa, 0x01, 0x0004},
4156 {0xaa, 0x08, 0x0006},
4157 {0xaa, 0x02, 0x0011},
4158 {0xaa, 0x03, 0x01e5},
4159 {0xaa, 0x04, 0x0285},
4160 {0xaa, 0x07, 0x3002},
4161 {0xaa, 0x20, 0x5100},
4162 {0xaa, 0x35, 0x507f},
4163 {0xaa, 0x30, 0x0005},
4164 {0xaa, 0x31, 0x0000},
4165 {0xaa, 0x58, 0x0078},
4166 {0xaa, 0x62, 0x0411},
4167 {0xaa, 0x2b, 0x007f},
4168 {0xaa, 0x2c, 0x007f},
4169 {0xaa, 0x2d, 0x007f},
4170 {0xaa, 0x2e, 0x007f},
4176 {0xa0, 0x09, 0x01ad},
4187 static const struct usb_action mt9v111_1_InitialScale[] = {
4204 {0xdd, 0x00, 0x0200},
4206 {0xaa, 0x01, 0x0001},
4207 {0xaa, 0x06, 0x0000},
4208 {0xaa, 0x08, 0x0483},
4209 {0xaa, 0x01, 0x0004},
4210 {0xaa, 0x08, 0x0006},
4211 {0xaa, 0x02, 0x0011},
4212 {0xaa, 0x03, 0x01e7},
4213 {0xaa, 0x04, 0x0287},
4214 {0xaa, 0x07, 0x3002},
4215 {0xaa, 0x20, 0x5100},
4216 {0xaa, 0x35, 0x007f},
4217 {0xaa, 0x30, 0x0005},
4218 {0xaa, 0x31, 0x0000},
4219 {0xaa, 0x58, 0x0078},
4220 {0xaa, 0x62, 0x0411},
4221 {0xaa, 0x2b, 0x007f},
4222 {0xaa, 0x2c, 0x007f},
4223 {0xaa, 0x2d, 0x007f},
4224 {0xaa, 0x2e, 0x007f},
4230 {0xa0, 0x09, 0x01ad},
4241 static const struct usb_action mt9v111_1_AE50HZ[] = {
4244 {0xbb, 0x00, 0x0562},
4245 {0xbb, 0x01, 0x09aa},
4264 static const struct usb_action mt9v111_1_AE50HZScale[] = {
4267 {0xbb, 0x00, 0x0509},
4268 {0xbb, 0x01, 0x0934},
4286 static const struct usb_action mt9v111_1_AE60HZ[] = {
4289 {0xaa, 0x05, 0x003d},
4290 {0xaa, 0x09, 0x016e},
4309 static const struct usb_action mt9v111_1_AE60HZScale[] = {
4312 {0xbb, 0x00, 0x0509},
4313 {0xbb, 0x01, 0x0983},
4331 static const struct usb_action mt9v111_1_AENoFliker[] = {
4334 {0xbb, 0x00, 0x0509},
4335 {0xbb, 0x01, 0x0960},
4354 static const struct usb_action mt9v111_1_AENoFlikerScale[] = {
4357 {0xbb, 0x00, 0x0534},
4358 {0xbb, 0x02, 0x0960},
4378 static const struct usb_action mt9v111_3_Initial[] = {
4395 {0xdd, 0x00, 0x0200},
4397 {0xaa, 0x01, 0x0001},
4398 {0xaa, 0x06, 0x0000},
4399 {0xaa, 0x08, 0x0483},
4402 {0xaa, 0x01, 0x0004},
4403 {0xaa, 0x08, 0x0006},
4404 {0xaa, 0x02, 0x0011},
4405 {0xaa, 0x03, 0x01e5},
4406 {0xaa, 0x04, 0x0285},
4407 {0xaa, 0x07, 0x3002},
4408 {0xaa, 0x20, 0x1100},
4409 {0xaa, 0x35, 0x007f},
4410 {0xaa, 0x30, 0x0005},
4411 {0xaa, 0x31, 0x0000},
4412 {0xaa, 0x58, 0x0078},
4413 {0xaa, 0x62, 0x0411},
4414 {0xaa, 0x2b, 0x007f},
4415 {0xaa, 0x2c, 0x007f},
4416 {0xaa, 0x2d, 0x007f},
4417 {0xaa, 0x2e, 0x007f},
4423 {0xa0, 0x00, 0x01ad},
4434 static const struct usb_action mt9v111_3_InitialScale[] = {
4451 {0xdd, 0x00, 0x0200},
4453 {0xaa, 0x01, 0x0001},
4454 {0xaa, 0x06, 0x0000},
4455 {0xaa, 0x08, 0x0483},
4456 {0xaa, 0x01, 0x0004},
4457 {0xaa, 0x08, 0x0006},
4458 {0xaa, 0x02, 0x0011},
4459 {0xaa, 0x03, 0x01e7},
4460 {0xaa, 0x04, 0x0287},
4461 {0xaa, 0x07, 0x3002},
4462 {0xaa, 0x20, 0x1100},
4463 {0xaa, 0x35, 0x007f},
4464 {0xaa, 0x30, 0x0005},
4465 {0xaa, 0x31, 0x0000},
4466 {0xaa, 0x58, 0x0078},
4467 {0xaa, 0x62, 0x0411},
4468 {0xaa, 0x2b, 0x007f},
4469 {0xaa, 0x2c, 0x007f},
4470 {0xaa, 0x2d, 0x007f},
4471 {0xaa, 0x2e, 0x007f},
4477 {0xa0, 0x00, 0x01ad},
4488 static const struct usb_action mt9v111_3_AE50HZ[] = {
4491 {0xaa, 0x05, 0x0009},
4492 {0xaa, 0x09, 0x01ce},
4510 static const struct usb_action mt9v111_3_AE50HZScale[] = {
4513 {0xaa, 0x05, 0x0009},
4514 {0xaa, 0x09, 0x01ce},
4532 static const struct usb_action mt9v111_3_AE60HZ[] = {
4535 {0xaa, 0x05, 0x0009},
4536 {0xaa, 0x09, 0x0083},
4554 static const struct usb_action mt9v111_3_AE60HZScale[] = {
4557 {0xaa, 0x05, 0x0009},
4558 {0xaa, 0x09, 0x0083},
4576 static const struct usb_action mt9v111_3_AENoFliker[] = {
4579 {0xaa, 0x05, 0x0034},
4580 {0xaa, 0x09, 0x0260},
4599 static const struct usb_action mt9v111_3_AENoFlikerScale[] = {
4602 {0xaa, 0x05, 0x0034},
4603 {0xaa, 0x09, 0x0260},
4623 static const struct usb_action pb0330_Initial[] = {
4639 {0xdd, 0x00, 0x0200},
4641 {0xaa, 0x01, 0x0006},
4642 {0xaa, 0x02, 0x0011},
4643 {0xaa, 0x03, 0x01e5},
4644 {0xaa, 0x04, 0x0285},
4645 {0xaa, 0x06, 0x0003},
4646 {0xaa, 0x07, 0x3002},
4647 {0xaa, 0x20, 0x1100},
4648 {0xaa, 0x2f, 0xf7b0},
4649 {0xaa, 0x30, 0x0005},
4650 {0xaa, 0x31, 0x0000},
4651 {0xaa, 0x34, 0x0100},
4652 {0xaa, 0x35, 0x0060},
4653 {0xaa, 0x3d, 0x068f},
4654 {0xaa, 0x40, 0x01e0},
4655 {0xaa, 0x58, 0x0078},
4656 {0xaa, 0x62, 0x0411},
4662 {0xa0, 0x09, 0x01ad},
4663 {0xa0, 0x15, 0x01ae},
4672 static const struct usb_action pb0330_InitialScale[] = {
4688 {0xdd, 0x00, 0x0200},
4690 {0xaa, 0x01, 0x0006},
4691 {0xaa, 0x02, 0x0011},
4692 {0xaa, 0x03, 0x01e7},
4693 {0xaa, 0x04, 0x0287},
4694 {0xaa, 0x06, 0x0003},
4695 {0xaa, 0x07, 0x3002},
4696 {0xaa, 0x20, 0x1100},
4697 {0xaa, 0x2f, 0xf7b0},
4698 {0xaa, 0x30, 0x0005},
4699 {0xaa, 0x31, 0x0000},
4700 {0xaa, 0x34, 0x0100},
4701 {0xaa, 0x35, 0x0060},
4702 {0xaa, 0x3d, 0x068f},
4703 {0xaa, 0x40, 0x01e0},
4704 {0xaa, 0x58, 0x0078},
4705 {0xaa, 0x62, 0x0411},
4711 {0xa0, 0x09, 0x01ad},
4712 {0xa0, 0x15, 0x01ae},
4721 static const struct usb_action pb0330_50HZ[] = {
4723 {0xbb, 0x00, 0x055c},
4724 {0xbb, 0x01, 0x09aa},
4725 {0xbb, 0x00, 0x1001},
4743 static const struct usb_action pb0330_50HZScale[] = {
4745 {0xbb, 0x00, 0x0566},
4746 {0xbb, 0x02, 0x09b2},
4747 {0xbb, 0x00, 0x1002},
4765 static const struct usb_action pb0330_60HZ[] = {
4767 {0xbb, 0x00, 0x0535},
4768 {0xbb, 0x01, 0x0974},
4769 {0xbb, 0x00, 0x1001},
4787 static const struct usb_action pb0330_60HZScale[] = {
4789 {0xbb, 0x00, 0x0535},
4790 {0xbb, 0x02, 0x096c},
4791 {0xbb, 0x00, 0x1002},
4809 static const struct usb_action pb0330_NoFliker[] = {
4811 {0xbb, 0x00, 0x0509},
4812 {0xbb, 0x02, 0x0940},
4813 {0xbb, 0x00, 0x1002},
4831 static const struct usb_action pb0330_NoFlikerScale[] = {
4833 {0xbb, 0x00, 0x0535},
4834 {0xbb, 0x01, 0x0980},
4835 {0xbb, 0x00, 0x1001},
4855 static const struct usb_action po2030_Initial[] = {
4876 {0xaa, 0x8d, 0x0008},
4883 {0xaa, 0x09, 0x00ce},
4884 {0xaa, 0x0b, 0x0005},
4885 {0xaa, 0x0d, 0x0054},
4886 {0xaa, 0x0f, 0x00eb},
4887 {0xaa, 0x87, 0x0000},
4888 {0xaa, 0x88, 0x0004},
4889 {0xaa, 0x89, 0x0000},
4890 {0xaa, 0x8a, 0x0005},
4891 {0xaa, 0x13, 0x0003},
4892 {0xaa, 0x16, 0x0040},
4893 {0xaa, 0x18, 0x0040},
4894 {0xaa, 0x1d, 0x0002},
4895 {0xaa, 0x29, 0x00e8},
4896 {0xaa, 0x45, 0x0045},
4897 {0xaa, 0x50, 0x00ed},
4898 {0xaa, 0x51, 0x0025},
4899 {0xaa, 0x52, 0x0042},
4900 {0xaa, 0x53, 0x002f},
4901 {0xaa, 0x79, 0x0025},
4902 {0xaa, 0x7b, 0x0000},
4903 {0xaa, 0x7e, 0x0025},
4904 {0xaa, 0x7f, 0x0025},
4905 {0xaa, 0x21, 0x0000},
4906 {0xaa, 0x33, 0x0036},
4907 {0xaa, 0x36, 0x0060},
4908 {0xaa, 0x37, 0x0008},
4909 {0xaa, 0x3b, 0x0031},
4910 {0xaa, 0x44, 0x000f},
4911 {0xaa, 0x58, 0x0002},
4912 {0xaa, 0x66, 0x00c0},
4913 {0xaa, 0x67, 0x0044},
4914 {0xaa, 0x6b, 0x00a0},
4915 {0xaa, 0x6c, 0x0054},
4916 {0xaa, 0xd6, 0x0007},
4921 {0xa0, 0x00, 0x01ad},
4932 static const struct usb_action po2030_InitialScale[] = {
4953 {0xaa, 0x8d, 0x0008},
4960 {0xaa, 0x09, 0x00cc},
4961 {0xaa, 0x0b, 0x0005},
4962 {0xaa, 0x0d, 0x0058},
4963 {0xaa, 0x0f, 0x00ed},
4964 {0xaa, 0x87, 0x0000},
4965 {0xaa, 0x88, 0x0004},
4966 {0xaa, 0x89, 0x0000},
4967 {0xaa, 0x8a, 0x0005},
4968 {0xaa, 0x13, 0x0003},
4969 {0xaa, 0x16, 0x0040},
4970 {0xaa, 0x18, 0x0040},
4971 {0xaa, 0x1d, 0x0002},
4972 {0xaa, 0x29, 0x00e8},
4973 {0xaa, 0x45, 0x0045},
4974 {0xaa, 0x50, 0x00ed},
4975 {0xaa, 0x51, 0x0025},
4976 {0xaa, 0x52, 0x0042},
4977 {0xaa, 0x53, 0x002f},
4978 {0xaa, 0x79, 0x0025},
4979 {0xaa, 0x7b, 0x0000},
4980 {0xaa, 0x7e, 0x0025},
4981 {0xaa, 0x7f, 0x0025},
4982 {0xaa, 0x21, 0x0000},
4983 {0xaa, 0x33, 0x0036},
4984 {0xaa, 0x36, 0x0060},
4985 {0xaa, 0x37, 0x0008},
4986 {0xaa, 0x3b, 0x0031},
4987 {0xaa, 0x44, 0x000f},
4988 {0xaa, 0x58, 0x0002},
4989 {0xaa, 0x66, 0x00c0},
4990 {0xaa, 0x67, 0x0044},
4991 {0xaa, 0x6b, 0x00a0},
4992 {0xaa, 0x6c, 0x0054},
4993 {0xaa, 0xd6, 0x0007},
4998 {0xa0, 0x00, 0x01ad},
5008 static const struct usb_action po2030_50HZ[] = {
5009 {0xaa, 0x8d, 0x0008},
5010 {0xaa, 0x1a, 0x0001},
5011 {0xaa, 0x1b, 0x000a},
5012 {0xaa, 0x1c, 0x00b0},
5030 static const struct usb_action po2030_60HZ[] = {
5031 {0xaa, 0x8d, 0x0008},
5032 {0xaa, 0x1a, 0x0000},
5033 {0xaa, 0x1b, 0x00de},
5034 {0xaa, 0x1c, 0x0040},
5053 static const struct usb_action po2030_NoFliker[] = {
5055 {0xaa, 0x8d, 0x000d},
5056 {0xaa, 0x1a, 0x0000},
5057 {0xaa, 0x1b, 0x0002},
5058 {0xaa, 0x1c, 0x0078},
5059 {0xaa, 0x46, 0x0000},
5060 {0xaa, 0x15, 0x0000},
5064 static const struct usb_action tas5130c_InitialScale[] = {
5092 {0xa0, 0x00, 0x01ad},
5101 static const struct usb_action tas5130c_Initial[] = {
5128 {0xa0, 0x00, 0x01ad},
5137 static const struct usb_action tas5130c_50HZ[] = {
5139 {0xaa, 0xa3, 0x0001},
5140 {0xaa, 0xa4, 0x0063},
5162 static const struct usb_action tas5130c_50HZScale[] = {
5164 {0xaa, 0xa3, 0x0001},
5165 {0xaa, 0xa4, 0x0077},
5187 static const struct usb_action tas5130c_60HZ[] = {
5189 {0xaa, 0xa3, 0x0001},
5190 {0xaa, 0xa4, 0x0036},
5212 static const struct usb_action tas5130c_60HZScale[] = {
5214 {0xaa, 0xa3, 0x0001},
5215 {0xaa, 0xa4, 0x0077},
5237 static const struct usb_action tas5130c_NoFliker[] = {
5239 {0xaa, 0xa3, 0x0001},
5240 {0xaa, 0xa4, 0x0040},
5263 static const struct usb_action tas5130c_NoFlikerScale[] = {
5265 {0xaa, 0xa3, 0x0001},
5266 {0xaa, 0xa4, 0x0090},
5290 static const struct usb_action gc0303_Initial[] = {
5313 {0xaa, 0x01, 0x0000},
5314 {0xaa, 0x1a, 0x0000},
5315 {0xaa, 0x1c, 0x0017},
5316 {0xaa, 0x1b, 0x0000},
5320 {0xaa, 0x05, 0x0010},
5321 {0xaa, 0x0a, 0x0002},
5322 {0xaa, 0x0b, 0x0000},
5323 {0xaa, 0x0c, 0x0002},
5324 {0xaa, 0x0d, 0x0000},
5325 {0xaa, 0x0e, 0x0002},
5326 {0xaa, 0x0f, 0x0000},
5327 {0xaa, 0x10, 0x0002},
5328 {0xaa, 0x11, 0x0000},
5329 {0xaa, 0x16, 0x0001},
5330 {0xaa, 0x17, 0x00e8},
5331 {0xaa, 0x18, 0x0002},
5332 {0xaa, 0x19, 0x0088},
5333 {0xaa, 0x20, 0x0020},
5338 {0xa0, 0x09, 0x01ad},
5346 {0xaa, 0x1b, 0x0000},
5350 static const struct usb_action gc0303_InitialScale[] = {
5373 {0xaa, 0x01, 0x0000},
5374 {0xaa, 0x1a, 0x0000},
5375 {0xaa, 0x1c, 0x0017},
5376 {0xaa, 0x1b, 0x0000},
5380 {0xaa, 0x05, 0x0010},
5381 {0xaa, 0x0a, 0x0001},
5382 {0xaa, 0x0b, 0x0000},
5383 {0xaa, 0x0c, 0x0001},
5384 {0xaa, 0x0d, 0x0000},
5385 {0xaa, 0x0e, 0x0001},
5386 {0xaa, 0x0f, 0x0000},
5387 {0xaa, 0x10, 0x0001},
5388 {0xaa, 0x11, 0x0000},
5389 {0xaa, 0x16, 0x0001},
5390 {0xaa, 0x17, 0x00e8},
5391 {0xaa, 0x18, 0x0002},
5392 {0xaa, 0x19, 0x0088},
5397 {0xa0, 0x09, 0x01ad},
5405 {0xaa, 0x1b, 0x0000},
5408 static const struct usb_action gc0303_50HZ[] = {
5409 {0xaa, 0x82, 0x0000},
5410 {0xaa, 0x83, 0x0001},
5411 {0xaa, 0x84, 0x0063},
5432 static const struct usb_action gc0303_50HZScale[] = {
5433 {0xaa, 0x82, 0x0000},
5434 {0xaa, 0x83, 0x0003},
5435 {0xaa, 0x84, 0x0054},
5456 static const struct usb_action gc0303_60HZ[] = {
5457 {0xaa, 0x82, 0x0000},
5458 {0xaa, 0x83, 0x0000},
5459 {0xaa, 0x84, 0x003b},
5480 static const struct usb_action gc0303_60HZScale[] = {
5481 {0xaa, 0x82, 0x0000},
5482 {0xaa, 0x83, 0x0000},
5483 {0xaa, 0x84, 0x0076},
5504 static const struct usb_action gc0303_NoFliker[] = {
5506 {0xaa, 0x82, 0x0000},
5507 {0xaa, 0x83, 0x0000},
5508 {0xaa, 0x84, 0x0020},
5526 static const struct usb_action gc0303_NoFlikerScale[] = {
5528 {0xaa, 0x82, 0x0000},
5529 {0xaa, 0x83, 0x0000},
5530 {0xaa, 0x84, 0x0020},
5556 usb_rcvctrlpipe(gspca_dev->
dev, 0),
5563 pr_err(
"reg_r err %d\n", ret);
5570 static void reg_w(
struct gspca_dev *gspca_dev,
5579 usb_sndctrlpipe(gspca_dev->
dev, 0),
5582 value, index,
NULL, 0,
5585 pr_err(
"reg_w_i err %d\n", ret);
5598 reg_w(gspca_dev, reg, 0x0092);
5599 reg_w(gspca_dev, 0x02, 0x0090);
5601 retbyte = reg_r(gspca_dev, 0x0091);
5602 if (retbyte != 0x00)
5603 pr_err(
"i2c_r status error %02x\n", retbyte);
5604 retval = reg_r(gspca_dev, 0x0095);
5605 retval |= reg_r(gspca_dev, 0x0096) << 8;
5618 reg_w(gspca_dev, reg, 0x92);
5619 reg_w(gspca_dev, valL, 0x93);
5620 reg_w(gspca_dev, valH, 0x94);
5621 reg_w(gspca_dev, 0x01, 0x90);
5623 retbyte = reg_r(gspca_dev, 0x0091);
5624 if (retbyte != 0x00)
5625 pr_err(
"i2c_w status error %02x\n", retbyte);
5629 static void usb_exchange(
struct gspca_dev *gspca_dev,
5632 while (action->
req) {
5633 switch (action->
req) {
5635 reg_w(gspca_dev, action->
val, action->
idx);
5638 reg_r(gspca_dev, action->
idx);
5662 static void setmatrix(
struct gspca_dev *gspca_dev)
5664 struct sd *
sd = (
struct sd *) gspca_dev;
5667 static const u8 adcm2700_matrix[9] =
5670 {0x74, 0xed, 0xed, 0xed, 0x74, 0xed, 0xed, 0xed, 0x74};
5671 static const u8 gc0305_matrix[9] =
5672 {0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50};
5673 static const u8 ov7620_matrix[9] =
5674 {0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58};
5675 static const u8 pas202b_matrix[9] =
5676 {0x4c, 0xf5, 0xff, 0xf9, 0x51, 0xf5, 0xfb, 0xed, 0x5f};
5677 static const u8 po2030_matrix[9] =
5678 {0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60};
5679 static const u8 tas5130c_matrix[9] =
5680 {0x68, 0xec, 0xec, 0xec, 0x68, 0xec, 0xec, 0xec, 0x68};
5681 static const u8 gc0303_matrix[9] =
5682 {0x6c, 0xea, 0xea, 0xea, 0x6c, 0xea, 0xea, 0xea, 0x6c};
5705 matrix = matrix_tb[sd->
sensor];
5708 for (i = 0; i <
ARRAY_SIZE(ov7620_matrix); i++)
5709 reg_w(gspca_dev, matrix[i], 0x010a + i);
5712 static void setsharpness(
struct gspca_dev *gspca_dev,
s32 val)
5714 static const u8 sharpness_tb[][2] = {
5721 reg_w(gspca_dev, sharpness_tb[val][0], 0x01c6);
5722 reg_r(gspca_dev, 0x01c8);
5723 reg_r(gspca_dev, 0x01c9);
5724 reg_r(gspca_dev, 0x01ca);
5725 reg_w(gspca_dev, sharpness_tb[val][1], 0x01cb);
5728 static void setcontrast(
struct gspca_dev *gspca_dev,
5732 int g,
i, adj, gp1, gp2;
5734 static const u8 delta_b[16] =
5735 {0x50, 0x38, 0x2d, 0x28, 0x24, 0x21, 0x1e, 0x1d,
5736 0x1d, 0x1b, 0x1b, 0x1b, 0x19, 0x18, 0x18, 0x18};
5737 static const u8 delta_c[16] =
5738 {0x2c, 0x1a, 0x12, 0x0c, 0x0a, 0x06, 0x06, 0x06,
5739 0x04, 0x06, 0x04, 0x04, 0x03, 0x03, 0x02, 0x02};
5740 static const u8 gamma_tb[6][16] = {
5741 {0x00, 0x00, 0x03, 0x0d, 0x1b, 0x2e, 0x45, 0x5f,
5742 0x79, 0x93, 0xab, 0xc1, 0xd4, 0xe5, 0xf3, 0xff},
5743 {0x01, 0x0c, 0x1f, 0x3a, 0x53, 0x6d, 0x85, 0x9c,
5744 0xb0, 0xc2, 0xd1, 0xde, 0xe9, 0xf2, 0xf9, 0xff},
5745 {0x04, 0x16, 0x30, 0x4e, 0x68, 0x81, 0x98, 0xac,
5746 0xbe, 0xcd, 0xda, 0xe4, 0xed, 0xf5, 0xfb, 0xff},
5747 {0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
5748 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff},
5749 {0x20, 0x4b, 0x6e, 0x8d, 0xa3, 0xb5, 0xc5, 0xd2,
5750 0xdc, 0xe5, 0xec, 0xf2, 0xf6, 0xfa, 0xfd, 0xff},
5751 {0x24, 0x44, 0x64, 0x84, 0x9d, 0xb2, 0xc4, 0xd3,
5752 0xe0, 0xeb, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff},
5755 Tgamma = gamma_tb[gamma - 1];
5761 for (i = 0; i < 16; i++) {
5762 g = Tgamma[
i] + delta_b[
i] * brightness / 256
5763 - delta_c[
i] * contrast / 256 - adj / 2;
5768 reg_w(gspca_dev, g, 0x0120 + i);
5771 else if (contrast < 0)
5774 gr[i - 1] = (g - gp2) / 2;
5776 gr[0] = gp1 == 0 ? 0 : (g - gp1);
5780 gr[15] = (0xff - gp2) / 2;
5781 for (i = 0; i < 16; i++)
5782 reg_w(gspca_dev, gr[i], 0x0130 + i);
5785 static s32 getexposure(
struct gspca_dev *gspca_dev)
5787 return (
i2c_read(gspca_dev, 0x25) << 9)
5789 | (
i2c_read(gspca_dev, 0x27) >> 7);
5792 static void setexposure(
struct gspca_dev *gspca_dev,
s32 val)
5794 i2c_write(gspca_dev, 0x25, val >> 9, 0x00);
5795 i2c_write(gspca_dev, 0x26, val >> 1, 0x00);
5796 i2c_write(gspca_dev, 0x27, val << 7, 0x00);
5799 static void setquality(
struct gspca_dev *gspca_dev)
5801 struct sd *sd = (
struct sd *) gspca_dev;
5812 static void setlightfreq(
struct gspca_dev *gspca_dev,
s32 val)
5814 struct sd *sd = (
struct sd *) gspca_dev;
5819 {adcm2700_NoFliker, adcm2700_NoFliker,
5820 adcm2700_50HZ, adcm2700_50HZ,
5821 adcm2700_60HZ, adcm2700_60HZ},
5823 {cs2102_NoFliker, cs2102_NoFlikerScale,
5824 cs2102_50HZ, cs2102_50HZScale,
5825 cs2102_60HZ, cs2102_60HZScale},
5827 {cs2102_NoFliker, cs2102_NoFlikerScale,
5831 {gc0303_NoFliker, gc0303_NoFlikerScale,
5832 gc0303_50HZ, gc0303_50HZScale,
5833 gc0303_60HZ, gc0303_60HZScale},
5835 {gc0305_NoFliker, gc0305_NoFliker,
5836 gc0305_50HZ, gc0305_50HZ,
5837 gc0305_60HZ, gc0305_60HZ},
5839 {hdcs2020_NoFliker, hdcs2020_NoFliker,
5840 hdcs2020_50HZ, hdcs2020_50HZ,
5841 hdcs2020_60HZ, hdcs2020_60HZ},
5843 {hv7131b_NoFliker, hv7131b_NoFlikerScale,
5844 hv7131b_50HZ, hv7131b_50HZScale,
5845 hv7131b_60HZ, hv7131b_60HZScale},
5847 {hv7131r_NoFliker, hv7131r_NoFlikerScale,
5848 hv7131r_50HZ, hv7131r_50HZScale,
5849 hv7131r_60HZ, hv7131r_60HZScale},
5851 {icm105a_NoFliker, icm105a_NoFlikerScale,
5852 icm105a_50HZ, icm105a_50HZScale,
5853 icm105a_60HZ, icm105a_60HZScale},
5855 {mc501cb_NoFliker, mc501cb_NoFlikerScale,
5856 mc501cb_50HZ, mc501cb_50HZScale,
5857 mc501cb_60HZ, mc501cb_60HZScale},
5859 {mt9v111_1_AENoFliker, mt9v111_1_AENoFlikerScale,
5860 mt9v111_1_AE50HZ, mt9v111_1_AE50HZScale,
5861 mt9v111_1_AE60HZ, mt9v111_1_AE60HZScale},
5863 {mt9v111_3_AENoFliker, mt9v111_3_AENoFlikerScale,
5864 mt9v111_3_AE50HZ, mt9v111_3_AE50HZScale,
5865 mt9v111_3_AE60HZ, mt9v111_3_AE60HZScale},
5867 {ov7620_NoFliker, ov7620_NoFliker,
5868 ov7620_50HZ, ov7620_50HZ,
5869 ov7620_60HZ, ov7620_60HZ},
5875 {pas106b_NoFliker, pas106b_NoFliker,
5876 pas106b_50HZ, pas106b_50HZ,
5877 pas106b_60HZ, pas106b_60HZ},
5879 {pas202b_NoFliker, pas202b_NoFlikerScale,
5880 pas202b_50HZ, pas202b_50HZScale,
5881 pas202b_60HZ, pas202b_60HZScale},
5883 {pb0330_NoFliker, pb0330_NoFlikerScale,
5884 pb0330_50HZ, pb0330_50HZScale,
5885 pb0330_60HZ, pb0330_60HZScale},
5887 {po2030_NoFliker, po2030_NoFliker,
5888 po2030_50HZ, po2030_50HZ,
5889 po2030_60HZ, po2030_60HZ},
5891 {tas5130c_NoFliker, tas5130c_NoFlikerScale,
5892 tas5130c_50HZ, tas5130c_50HZScale,
5893 tas5130c_60HZ, tas5130c_60HZScale},
5897 mode = gspca_dev->
cam.cam_mode[gspca_dev->
curr_mode].priv;
5900 zc3_freq = freq_tb[sd->
sensor][
i];
5901 if (zc3_freq ==
NULL)
5903 usb_exchange(gspca_dev, zc3_freq);
5908 reg_w(gspca_dev, 0x85, 0x018d);
5914 reg_w(gspca_dev, 0x40, 0x0002);
5916 reg_w(gspca_dev, 0x44, 0x0002);
5920 reg_w(gspca_dev, 0x00, 0x01a7);
5925 static void setautogain(
struct gspca_dev *gspca_dev,
s32 val)
5927 reg_w(gspca_dev, val ? 0x42 : 0x02, 0x0180);
5937 struct gspca_dev *gspca_dev = &sd->
gspca_dev;
5951 if (gspca_dev->frozen)
5959 reg11 = reg_r(gspca_dev, 0x0011);
5963 change = reg11 & 0x01;
5988 reg_w(gspca_dev, reg07, 0x0007);
5999 static void send_unknown(
struct gspca_dev *gspca_dev,
int sensor)
6001 reg_w(gspca_dev, 0x01, 0x0000);
6004 reg_w(gspca_dev, 0x03, 0x003a);
6005 reg_w(gspca_dev, 0x0c, 0x003b);
6006 reg_w(gspca_dev, 0x08, 0x0038);
6015 reg_w(gspca_dev, 0x0d, 0x003a);
6016 reg_w(gspca_dev, 0x02, 0x003b);
6017 reg_w(gspca_dev, 0x00, 0x0038);
6021 reg_w(gspca_dev, 0x03, 0x003b);
6022 reg_w(gspca_dev, 0x0c, 0x003a);
6023 reg_w(gspca_dev, 0x0b, 0x0039);
6025 reg_w(gspca_dev, 0x0b, 0x0038);
6031 static void start_2wr_probe(
struct gspca_dev *gspca_dev,
int sensor)
6033 reg_w(gspca_dev, 0x01, 0x0000);
6034 reg_w(gspca_dev, sensor, 0x0010);
6035 reg_w(gspca_dev, 0x01, 0x0001);
6036 reg_w(gspca_dev, 0x03, 0x0012);
6037 reg_w(gspca_dev, 0x01, 0x0012);
6041 static int sif_probe(
struct gspca_dev *gspca_dev)
6045 start_2wr_probe(gspca_dev, 0x0f);
6046 reg_w(gspca_dev, 0x08, 0x008d);
6048 checkword = ((
i2c_read(gspca_dev, 0x00) & 0x0f) << 4)
6049 | ((
i2c_read(gspca_dev, 0x01) & 0xf0) >> 4);
6050 PDEBUG(D_PROBE,
"probe sif 0x%04x", checkword);
6051 if (checkword == 0x0007) {
6058 static int vga_2wr_probe(
struct gspca_dev *gspca_dev)
6062 start_2wr_probe(gspca_dev, 0x00);
6064 retword =
i2c_read(gspca_dev, 0x01);
6068 start_2wr_probe(gspca_dev, 0x04);
6070 retword =
i2c_read(gspca_dev, 0x01);
6074 start_2wr_probe(gspca_dev, 0x06);
6075 reg_w(gspca_dev, 0x08, 0x008d);
6077 retword =
i2c_read(gspca_dev, 0x11);
6084 start_2wr_probe(gspca_dev, 0x08);
6087 retword =
i2c_read(gspca_dev, 0x15);
6091 start_2wr_probe(gspca_dev, 0x0a);
6093 retword =
i2c_read(gspca_dev, 0x07);
6096 retword =
i2c_read(gspca_dev, 0x03);
6099 retword =
i2c_read(gspca_dev, 0x04);
6103 start_2wr_probe(gspca_dev, 0x0c);
6105 retword =
i2c_read(gspca_dev, 0x01);
6109 start_2wr_probe(gspca_dev, 0x0e);
6110 reg_w(gspca_dev, 0x08, 0x008d);
6113 retword =
i2c_read(gspca_dev, 0x03);
6119 start_2wr_probe(gspca_dev, 0x02);
6121 retword =
i2c_read(gspca_dev, 0x01);
6125 reg_r(gspca_dev, 0x0010);
6126 reg_r(gspca_dev, 0x0010);
6128 reg_w(gspca_dev, 0x01, 0x0000);
6129 reg_w(gspca_dev, 0x01, 0x0001);
6130 reg_w(gspca_dev, 0x06, 0x0010);
6131 reg_w(gspca_dev, 0xa1, 0x008b);
6132 reg_w(gspca_dev, 0x08, 0x008d);
6134 reg_w(gspca_dev, 0x01, 0x0012);
6136 retword =
i2c_read(gspca_dev, 0x0a) << 8;
6137 retword |=
i2c_read(gspca_dev, 0x0b);
6138 PDEBUG(D_PROBE,
"probe 2wr ov vga 0x%04x", retword);
6141 reg_w(gspca_dev, 0x06, 0x0010);
6166 static int vga_3wr_probe(
struct gspca_dev *gspca_dev)
6168 struct sd *sd = (
struct sd *) gspca_dev;
6173 reg_w(gspca_dev, 0x02, 0x0010);
6174 reg_r(gspca_dev, 0x0010);
6175 reg_w(gspca_dev, 0x01, 0x0000);
6176 reg_w(gspca_dev, 0x00, 0x0010);
6177 reg_w(gspca_dev, 0x01, 0x0001);
6178 reg_w(gspca_dev, 0x91, 0x008b);
6179 reg_w(gspca_dev, 0x03, 0x0012);
6180 reg_w(gspca_dev, 0x01, 0x0012);
6181 reg_w(gspca_dev, 0x05, 0x0012);
6182 retword =
i2c_read(gspca_dev, 0x14);
6185 retword =
i2c_read(gspca_dev, 0x15);
6188 retword =
i2c_read(gspca_dev, 0x16);
6192 reg_w(gspca_dev, 0x02, 0x0010);
6193 retword = reg_r(gspca_dev, 0x000b) << 8;
6194 retword |= reg_r(gspca_dev, 0x000a);
6195 PDEBUG(D_PROBE,
"probe 3wr vga 1 0x%04x", retword);
6196 reg_r(gspca_dev, 0x0010);
6197 if ((retword & 0xff00) == 0x6400)
6199 for (i = 0; i <
ARRAY_SIZE(chipset_revision_sensor); i++) {
6200 if (chipset_revision_sensor[i].
revision == retword) {
6207 reg_w(gspca_dev, 0x01, 0x0000);
6208 reg_w(gspca_dev, 0x01, 0x0001);
6209 reg_w(gspca_dev, 0xdd, 0x008b);
6210 reg_w(gspca_dev, 0x0a, 0x0010);
6211 reg_w(gspca_dev, 0x03, 0x0012);
6212 reg_w(gspca_dev, 0x01, 0x0012);
6213 retword =
i2c_read(gspca_dev, 0x00);
6215 PDEBUG(D_PROBE,
"probe 3wr vga type 0a");
6220 reg_w(gspca_dev, 0x01, 0x0000);
6221 reg_w(gspca_dev, 0x01, 0x0001);
6222 reg_w(gspca_dev, 0x98, 0x008b);
6223 reg_w(gspca_dev, 0x01, 0x0010);
6224 reg_w(gspca_dev, 0x03, 0x0012);
6226 reg_w(gspca_dev, 0x01, 0x0012);
6227 retword =
i2c_read(gspca_dev, 0x00);
6229 PDEBUG(D_PROBE,
"probe 3wr vga type %02x", retword);
6230 if (retword == 0x0011)
6232 if (retword == 0x0029)
6237 reg_w(gspca_dev, 0x01, 0x0000);
6238 reg_w(gspca_dev, 0x01, 0x0001);
6239 reg_w(gspca_dev, 0xa1, 0x008b);
6240 reg_w(gspca_dev, 0x08, 0x008d);
6241 reg_w(gspca_dev, 0x06, 0x0010);
6242 reg_w(gspca_dev, 0x01, 0x0012);
6243 reg_w(gspca_dev, 0x05, 0x0012);
6244 if (
i2c_read(gspca_dev, 0x1c) == 0x007f
6245 &&
i2c_read(gspca_dev, 0x1d) == 0x00a2) {
6250 reg_w(gspca_dev, 0x01, 0x0000);
6251 reg_w(gspca_dev, 0x00, 0x0002);
6252 reg_w(gspca_dev, 0x01, 0x0010);
6253 reg_w(gspca_dev, 0x01, 0x0001);
6254 reg_w(gspca_dev, 0xee, 0x008b);
6255 reg_w(gspca_dev, 0x03, 0x0012);
6256 reg_w(gspca_dev, 0x01, 0x0012);
6257 reg_w(gspca_dev, 0x05, 0x0012);
6258 retword =
i2c_read(gspca_dev, 0x00) << 8;
6259 retword |=
i2c_read(gspca_dev, 0x01);
6260 PDEBUG(D_PROBE,
"probe 3wr vga 2 0x%04x", retword);
6261 if (retword == 0x2030) {
6265 retbyte =
i2c_read(gspca_dev, 0x02);
6266 PDEBUG(D_PROBE,
"sensor PO2030 rev 0x%02x", retbyte);
6272 reg_w(gspca_dev, 0x01, 0x0000);
6273 reg_w(gspca_dev, 0x0a, 0x0010);
6274 reg_w(gspca_dev, 0xd3, 0x008b);
6275 reg_w(gspca_dev, 0x01, 0x0001);
6276 reg_w(gspca_dev, 0x03, 0x0012);
6277 reg_w(gspca_dev, 0x01, 0x0012);
6278 reg_w(gspca_dev, 0x05, 0x0012);
6279 reg_w(gspca_dev, 0xd3, 0x008b);
6280 retword =
i2c_read(gspca_dev, 0x01);
6282 PDEBUG(D_PROBE,
"probe 3wr vga type 0a ? ret: %04x", retword);
6288 static int zcxx_probeSensor(
struct gspca_dev *gspca_dev)
6290 struct sd *sd = (
struct sd *) gspca_dev;
6300 sensor = sif_probe(gspca_dev);
6305 sensor = vga_2wr_probe(gspca_dev);
6308 return vga_3wr_probe(gspca_dev);
6312 static int sd_config(
struct gspca_dev *gspca_dev,
6315 struct sd *sd = (
struct sd *) gspca_dev;
6323 sd->
sensor =
id->driver_info;
6334 struct gspca_dev *gspca_dev =
6336 struct sd *sd = (
struct sd *)gspca_dev;
6342 sd->
exposure->val = getexposure(gspca_dev);
6348 static int zcxx_s_ctrl(
struct v4l2_ctrl *ctrl)
6350 struct gspca_dev *gspca_dev =
6352 struct sd *sd = (
struct sd *)gspca_dev;
6358 qual = sd->
reg08 >> 1;
6360 for (i = 0; i <
ARRAY_SIZE(jpeg_qual); i++) {
6361 if (ctrl->
val <= jpeg_qual[i])
6364 if (i > 0 && i == qual && ctrl->
val < jpeg_qual[i])
6369 !gspca_dev->
cam.needs_full_bandwidth)
6372 sd->
reg08 = (i << 1) | 1;
6373 ctrl->
val = jpeg_qual[
i];
6382 setcontrast(gspca_dev, sd->
gamma->val,
6387 setautogain(gspca_dev, ctrl->
val);
6389 setexposure(gspca_dev, sd->
exposure->val);
6392 setlightfreq(gspca_dev, ctrl->
val);
6395 setsharpness(gspca_dev, ctrl->
val);
6398 setquality(gspca_dev);
6405 .g_volatile_ctrl = zcxx_g_volatile_ctrl,
6406 .s_ctrl = zcxx_s_ctrl,
6409 static int sd_init_controls(
struct gspca_dev *gspca_dev)
6411 struct sd *sd = (
struct sd *)gspca_dev;
6435 gspca_dev->
vdev.ctrl_handler = hdl;
6458 jpeg_qual[0], jpeg_qual[
ARRAY_SIZE(jpeg_qual) - 1], 1,
6461 pr_err(
"Could not initialize controls\n");
6471 static int sd_init(
struct gspca_dev *gspca_dev)
6473 struct sd *sd = (
struct sd *) gspca_dev;
6498 sensor = zcxx_probeSensor(gspca_dev);
6500 PDEBUG(D_PROBE,
"probe sensor -> %04x", sensor);
6509 PDEBUG(D_PROBE,
"Sensor MC501CB");
6512 PDEBUG(D_PROBE,
"Sensor GC0303");
6515 pr_warn(
"Unknown sensor - set to TAS5130C\n");
6521 sensor =
i2c_read(gspca_dev, 0x00);
6522 PDEBUG(D_PROBE,
"Sensor hv7131 type %d", sensor);
6526 PDEBUG(D_PROBE,
"Find Sensor HV7131B");
6531 PDEBUG(D_PROBE,
"Find Sensor HV7131R");
6537 PDEBUG(D_PROBE,
"Sensor TAS5130C");
6541 PDEBUG(D_PROBE,
"Find Sensor CS2102");
6545 PDEBUG(D_PROBE,
"Find Sensor HDCS2020");
6550 "Find Sensor PB0330. Chip revision %x",
6555 PDEBUG(D_PROBE,
"Find Sensor ICM105A");
6559 PDEBUG(D_PROBE,
"Find Sensor PAS202B");
6563 PDEBUG(D_PROBE,
"Find Sensor PAS106");
6568 PDEBUG(D_PROBE,
"Find Sensor TAS5130C");
6572 PDEBUG(D_PROBE,
"Find Sensor HV7131R");
6578 "Sensor MT9V111. Chip revision %04x",
6586 "Find Sensor CS2102K?. Chip revision %x",
6591 PDEBUG(D_PROBE,
"Find Sensor ADCM2700");
6595 PDEBUG(D_PROBE,
"Find Sensor GC0305");
6599 PDEBUG(D_PROBE,
"Sensor GC0303");
6603 PDEBUG(D_PROBE,
"Find Sensor PO2030");
6607 PDEBUG(D_PROBE,
"Find Sensor OV7620");
6611 PDEBUG(D_PROBE,
"Find Sensor OV7630C");
6615 PDEBUG(D_PROBE,
"Find Sensor OV7648");
6619 pr_err(
"Unknown sensor %04x\n", sensor);
6623 if (sensor < 0x20) {
6624 if (sensor == -1 || sensor == 0x10 || sensor == 0x12)
6625 reg_w(gspca_dev, 0x02, 0x0010);
6626 reg_r(gspca_dev, 0x0010);
6629 cam = &gspca_dev->
cam;
6630 switch (mode_tb[sd->
sensor]) {
6647 reg_w(gspca_dev, 0x01, 0x0000);
6651 static int sd_pre_start(
struct gspca_dev *gspca_dev)
6653 struct sd *sd = (
struct sd *) gspca_dev;
6654 gspca_dev->
cam.needs_full_bandwidth = (sd->
reg08 >= 4) ? 1 : 0;
6658 static int sd_start(
struct gspca_dev *gspca_dev)
6660 struct sd *sd = (
struct sd *) gspca_dev;
6664 {adcm2700_Initial, adcm2700_InitialScale},
6666 {cs2102_Initial, cs2102_InitialScale},
6668 {cs2102K_Initial, cs2102K_InitialScale},
6670 {gc0303_Initial, gc0303_InitialScale},
6672 {gc0305_Initial, gc0305_InitialScale},
6674 {hdcs2020_Initial, hdcs2020_InitialScale},
6676 {hv7131b_Initial, hv7131b_InitialScale},
6678 {hv7131r_Initial, hv7131r_InitialScale},
6680 {icm105a_Initial, icm105a_InitialScale},
6682 {mc501cb_Initial, mc501cb_InitialScale},
6684 {mt9v111_1_Initial, mt9v111_1_InitialScale},
6686 {mt9v111_3_Initial, mt9v111_3_InitialScale},
6688 {ov7620_Initial, ov7620_InitialScale},
6690 {ov7630c_Initial, ov7630c_InitialScale},
6692 {pas106b_Initial, pas106b_InitialScale},
6694 {pas202b_Initial, pas202b_InitialScale},
6696 {pb0330_Initial, pb0330_InitialScale},
6698 {po2030_Initial, po2030_InitialScale},
6700 {tas5130c_Initial, tas5130c_InitialScale},
6707 mode = gspca_dev->
cam.cam_mode[gspca_dev->
curr_mode].priv;
6710 zcxx_probeSensor(gspca_dev);
6713 usb_exchange(gspca_dev, pas106b_Initial_com);
6716 usb_exchange(gspca_dev, init_tb[sd->
sensor][mode]);
6726 reg_r(gspca_dev, 0x0002);
6727 reg_w(gspca_dev, 0x09, 0x01ad);
6728 reg_w(gspca_dev, 0x15, 0x01ae);
6731 reg_w(gspca_dev, 0x0d, 0x003a);
6732 reg_w(gspca_dev, 0x02, 0x003b);
6733 reg_w(gspca_dev, 0x00, 0x0038);
6737 reg_w(gspca_dev, 0x03, 0x003b);
6738 reg_w(gspca_dev, 0x0c, 0x003a);
6739 reg_w(gspca_dev, 0x0b, 0x0039);
6745 setmatrix(gspca_dev);
6749 reg_r(gspca_dev, 0x0008);
6750 reg_w(gspca_dev, 0x00, 0x0008);
6756 reg_r(gspca_dev, 0x0008);
6759 reg_w(gspca_dev, 0x03, 0x0008);
6776 setmatrix(gspca_dev);
6780 reg_r(gspca_dev, 0x0180);
6781 reg_w(gspca_dev, 0x00, 0x0180);
6784 setquality(gspca_dev);
6786 reg_w(gspca_dev, 0x00, 0x0007);
6792 reg_w(gspca_dev, 0x09, 0x01ad);
6793 reg_w(gspca_dev, 0x15, 0x01ae);
6794 reg_w(gspca_dev, 0x02, 0x0180);
6796 reg_w(gspca_dev, 0x40, 0x0117);
6804 reg_w(gspca_dev, 0x09, 0x01ad);
6805 reg_w(gspca_dev, 0x15, 0x01ae);
6810 reg_r(gspca_dev, 0x0180);
6813 reg_w(gspca_dev, 0x09, 0x01ad);
6814 reg_w(gspca_dev, 0x15, 0x01ae);
6818 reg_w(gspca_dev, 0x40, 0x0117);
6819 reg_r(gspca_dev, 0x0180);
6837 static void sd_stop0(
struct gspca_dev *gspca_dev)
6839 struct sd *sd = (
struct sd *) gspca_dev;
6849 send_unknown(gspca_dev, sd->
sensor);
6852 static void sd_pkt_scan(
struct gspca_dev *gspca_dev,
6856 struct sd *sd = (
struct sd *) gspca_dev;
6860 && data[len - 3] == 0xff && data[len - 2] == 0xd9) {
6868 if (data[0] == 0xff && data[1] == 0xd8) {
6885 static int sd_set_jcomp(
struct gspca_dev *gspca_dev,
6888 struct sd *sd = (
struct sd *) gspca_dev;
6893 static int sd_get_jcomp(
struct gspca_dev *gspca_dev,
6896 struct sd *sd = (
struct sd *) gspca_dev;
6898 memset(jcomp, 0,
sizeof *jcomp);
6905 #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
6906 static int sd_int_pkt_scan(
struct gspca_dev *gspca_dev,
6910 if (len == 8 && data[4] == 1) {
6911 input_report_key(gspca_dev->input_dev,
KEY_CAMERA, 1);
6912 input_sync(gspca_dev->input_dev);
6913 input_report_key(gspca_dev->input_dev,
KEY_CAMERA, 0);
6914 input_sync(gspca_dev->input_dev);
6922 .
name = KBUILD_MODNAME,
6923 .config = sd_config,
6925 .init_controls = sd_init_controls,
6926 .isoc_init = sd_pre_start,
6929 .pkt_scan = sd_pkt_scan,
6930 .get_jcomp = sd_get_jcomp,
6931 .set_jcomp = sd_set_jcomp,
6932 #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE)
6933 .int_pkt_scan = sd_int_pkt_scan,
6938 {USB_DEVICE(0x03f0, 0x1b07)},
6939 {USB_DEVICE(0x041e, 0x041e)},
6940 {USB_DEVICE(0x041e, 0x4017)},
6942 {USB_DEVICE(0x041e, 0x401e)},
6943 {USB_DEVICE(0x041e, 0x401f)},
6944 {USB_DEVICE(0x041e, 0x4022)},
6945 {USB_DEVICE(0x041e, 0x4029)},
6948 {USB_DEVICE(0x041e, 0x4036)},
6949 {USB_DEVICE(0x041e, 0x403a)},
6952 {USB_DEVICE(0x0458, 0x7007)},
6953 {USB_DEVICE(0x0458, 0x700c)},
6954 {USB_DEVICE(0x0458, 0x700f)},
6955 {USB_DEVICE(0x0461, 0x0a00)},
6957 {USB_DEVICE(0x046d, 0x08a0)},
6958 {USB_DEVICE(0x046d, 0x08a1)},
6959 {USB_DEVICE(0x046d, 0x08a2)},
6960 {USB_DEVICE(0x046d, 0x08a3)},
6961 {USB_DEVICE(0x046d, 0x08a6)},
6962 {USB_DEVICE(0x046d, 0x08a7)},
6963 {USB_DEVICE(0x046d, 0x08a9)},
6964 {USB_DEVICE(0x046d, 0x08aa)},
6965 {USB_DEVICE(0x046d, 0x08ac)},
6966 {USB_DEVICE(0x046d, 0x08ad)},
6967 {USB_DEVICE(0x046d, 0x08ae)},
6968 {USB_DEVICE(0x046d, 0x08af)},
6969 {USB_DEVICE(0x046d, 0x08b9)},
6970 {USB_DEVICE(0x046d, 0x08d7)},
6971 {USB_DEVICE(0x046d, 0x08d8)},
6972 {USB_DEVICE(0x046d, 0x08d9)},
6973 {USB_DEVICE(0x046d, 0x08da)},
6979 {USB_DEVICE(0x055f, 0xc005)},
6980 {USB_DEVICE(0x055f, 0xd003)},
6981 {USB_DEVICE(0x055f, 0xd004)},
6982 {USB_DEVICE(0x0698, 0x2003)},
6985 {USB_DEVICE(0x0ac8, 0x301b)},
6986 {USB_DEVICE(0x0ac8, 0x303b)},
6987 {USB_DEVICE(0x0ac8, 0x305b)},
6988 {USB_DEVICE(0x0ac8, 0x307b)},
6989 {USB_DEVICE(0x10fd, 0x0128)},
6990 {USB_DEVICE(0x10fd, 0x804d)},
6991 {USB_DEVICE(0x10fd, 0x8050)},
7005 static struct usb_driver sd_driver = {
7006 .name = KBUILD_MODNAME,
7007 .id_table = device_table,
7011 .suspend = gspca_suspend,
7012 .resume = gspca_resume,
7013 .reset_resume = gspca_resume,
7021 "Force sensor. Only for experts!!!");