diff options
Diffstat (limited to 'drivers/media/video/gspca/zc3xx.c')
-rw-r--r-- | drivers/media/video/gspca/zc3xx.c | 1012 |
1 files changed, 508 insertions, 504 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index 0befacf49855..ec2a53d53fe2 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -51,16 +51,16 @@ struct sd { | |||
51 | #define SENSOR_CS2102 0 | 51 | #define SENSOR_CS2102 0 |
52 | #define SENSOR_CS2102K 1 | 52 | #define SENSOR_CS2102K 1 |
53 | #define SENSOR_GC0305 2 | 53 | #define SENSOR_GC0305 2 |
54 | #define SENSOR_HDCS2020 3 | 54 | #define SENSOR_HDCS2020b 3 |
55 | #define SENSOR_HDCS2020b 4 | 55 | #define SENSOR_HV7131B 4 |
56 | #define SENSOR_HV7131B 5 | 56 | #define SENSOR_HV7131C 5 |
57 | #define SENSOR_HV7131C 6 | 57 | #define SENSOR_ICM105A 6 |
58 | #define SENSOR_ICM105A 7 | 58 | #define SENSOR_MC501CB 7 |
59 | #define SENSOR_MC501CB 8 | 59 | #define SENSOR_OV7620 8 |
60 | #define SENSOR_OV7620 9 | 60 | /*#define SENSOR_OV7648 8 - same values */ |
61 | /*#define SENSOR_OV7648 9 - same values */ | 61 | #define SENSOR_OV7630C 9 |
62 | #define SENSOR_OV7630C 10 | 62 | #define SENSOR_PAS106 10 |
63 | #define SENSOR_PAS106 11 | 63 | #define SENSOR_PAS202B 11 |
64 | #define SENSOR_PB0330 12 | 64 | #define SENSOR_PB0330 12 |
65 | #define SENSOR_PO2030 13 | 65 | #define SENSOR_PO2030 13 |
66 | #define SENSOR_TAS5130CK 14 | 66 | #define SENSOR_TAS5130CK 14 |
@@ -173,7 +173,7 @@ static struct ctrl sd_ctrls[] = { | |||
173 | }, | 173 | }, |
174 | }; | 174 | }; |
175 | 175 | ||
176 | static struct v4l2_pix_format vga_mode[] = { | 176 | static const struct v4l2_pix_format vga_mode[] = { |
177 | {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, | 177 | {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
178 | .bytesperline = 320, | 178 | .bytesperline = 320, |
179 | .sizeimage = 320 * 240 * 3 / 8 + 590, | 179 | .sizeimage = 320 * 240 * 3 / 8 + 590, |
@@ -186,7 +186,7 @@ static struct v4l2_pix_format vga_mode[] = { | |||
186 | .priv = 0}, | 186 | .priv = 0}, |
187 | }; | 187 | }; |
188 | 188 | ||
189 | static struct v4l2_pix_format sif_mode[] = { | 189 | static const struct v4l2_pix_format sif_mode[] = { |
190 | {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, | 190 | {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
191 | .bytesperline = 176, | 191 | .bytesperline = 176, |
192 | .sizeimage = 176 * 144 * 3 / 8 + 590, | 192 | .sizeimage = 176 * 144 * 3 / 8 + 590, |
@@ -1653,295 +1653,6 @@ static const struct usb_action gc0305_NoFliker[] = { | |||
1653 | {} | 1653 | {} |
1654 | }; | 1654 | }; |
1655 | 1655 | ||
1656 | /* play poker with registers at your own risk !! */ | ||
1657 | static const struct usb_action hdcs2020xx_Initial[] = { | ||
1658 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, | ||
1659 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, | ||
1660 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, | ||
1661 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, | ||
1662 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, | ||
1663 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, | ||
1664 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, | ||
1665 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, | ||
1666 | /* D0 ?? E0 did not start */ | ||
1667 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, | ||
1668 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, | ||
1669 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, | ||
1670 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, | ||
1671 | {0xa0, 0x08, ZC3XX_R098_WINYSTARTLOW}, | ||
1672 | {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW}, | ||
1673 | {0xa0, 0x08, ZC3XX_R11A_FIRSTYLOW}, | ||
1674 | {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW}, | ||
1675 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, | ||
1676 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, | ||
1677 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, | ||
1678 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, | ||
1679 | {0xaa, 0x02, 0x0002}, | ||
1680 | {0xaa, 0x07, 0x0006}, | ||
1681 | {0xaa, 0x08, 0x0002}, | ||
1682 | {0xaa, 0x09, 0x0006}, | ||
1683 | {0xaa, 0x0a, 0x0001}, | ||
1684 | {0xaa, 0x0b, 0x0001}, | ||
1685 | {0xaa, 0x0c, 0x0008}, | ||
1686 | {0xaa, 0x0d, 0x0000}, | ||
1687 | {0xaa, 0x10, 0x0000}, | ||
1688 | {0xaa, 0x12, 0x0005}, | ||
1689 | {0xaa, 0x13, 0x0063}, | ||
1690 | {0xaa, 0x15, 0x0070}, | ||
1691 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, | ||
1692 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, | ||
1693 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, | ||
1694 | {0xa0, 0x00, 0x01ad}, | ||
1695 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, | ||
1696 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, | ||
1697 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, | ||
1698 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, | ||
1699 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, | ||
1700 | {0xa1, 0x01, 0x0002}, | ||
1701 | {0xa1, 0x01, 0x0008}, | ||
1702 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ | ||
1703 | {0xa0, 0x04, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ | ||
1704 | {0xa1, 0x01, 0x01c8}, | ||
1705 | {0xa1, 0x01, 0x01c9}, | ||
1706 | {0xa1, 0x01, 0x01ca}, | ||
1707 | {0xa0, 0x07, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ | ||
1708 | {0xa0, 0x11, ZC3XX_R120_GAMMA00}, /* gamma ~4 */ | ||
1709 | {0xa0, 0x37, ZC3XX_R121_GAMMA01}, | ||
1710 | {0xa0, 0x58, ZC3XX_R122_GAMMA02}, | ||
1711 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, | ||
1712 | {0xa0, 0x91, ZC3XX_R124_GAMMA04}, | ||
1713 | {0xa0, 0xa6, ZC3XX_R125_GAMMA05}, | ||
1714 | {0xa0, 0xb8, ZC3XX_R126_GAMMA06}, | ||
1715 | {0xa0, 0xc7, ZC3XX_R127_GAMMA07}, | ||
1716 | {0xa0, 0xd3, ZC3XX_R128_GAMMA08}, | ||
1717 | {0xa0, 0xde, ZC3XX_R129_GAMMA09}, | ||
1718 | {0xa0, 0xe6, ZC3XX_R12A_GAMMA0A}, | ||
1719 | {0xa0, 0xed, ZC3XX_R12B_GAMMA0B}, | ||
1720 | {0xa0, 0xf3, ZC3XX_R12C_GAMMA0C}, | ||
1721 | {0xa0, 0xf8, ZC3XX_R12D_GAMMA0D}, | ||
1722 | {0xa0, 0xfb, ZC3XX_R12E_GAMMA0E}, | ||
1723 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, | ||
1724 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, | ||
1725 | {0xa0, 0x23, ZC3XX_R131_GAMMA11}, | ||
1726 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, | ||
1727 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, | ||
1728 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, | ||
1729 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, | ||
1730 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, | ||
1731 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, | ||
1732 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, | ||
1733 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, | ||
1734 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, | ||
1735 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, | ||
1736 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, | ||
1737 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, | ||
1738 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, | ||
1739 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, | ||
1740 | |||
1741 | {0xa0, 0x4c, ZC3XX_R10A_RGB00}, /* matrix */ | ||
1742 | {0xa0, 0xf5, ZC3XX_R10B_RGB01}, | ||
1743 | {0xa0, 0xff, ZC3XX_R10C_RGB02}, | ||
1744 | {0xa0, 0xf9, ZC3XX_R10D_RGB10}, | ||
1745 | {0xa0, 0x51, ZC3XX_R10E_RGB11}, | ||
1746 | {0xa0, 0xf5, ZC3XX_R10F_RGB12}, | ||
1747 | {0xa0, 0xfb, ZC3XX_R110_RGB20}, | ||
1748 | {0xa0, 0xed, ZC3XX_R111_RGB21}, | ||
1749 | {0xa0, 0x5f, ZC3XX_R112_RGB22}, | ||
1750 | |||
1751 | {0xa1, 0x01, 0x0180}, | ||
1752 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
1753 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | ||
1754 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, | ||
1755 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, | ||
1756 | {0xaa, 0x20, 0x0004}, | ||
1757 | {0xaa, 0x21, 0x003d}, | ||
1758 | {0xaa, 0x03, 0x0041}, | ||
1759 | {0xaa, 0x04, 0x0010}, | ||
1760 | {0xaa, 0x05, 0x003d}, | ||
1761 | {0xaa, 0x0e, 0x0001}, | ||
1762 | {0xaa, 0x0f, 0x0000}, | ||
1763 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, | ||
1764 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, | ||
1765 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, | ||
1766 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, | ||
1767 | {0xa0, 0x3d, ZC3XX_R192_EXPOSURELIMITLOW}, | ||
1768 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, | ||
1769 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, | ||
1770 | {0xa0, 0x9b, ZC3XX_R197_ANTIFLICKERLOW}, | ||
1771 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, | ||
1772 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, | ||
1773 | {0xa0, 0x41, ZC3XX_R01D_HSYNC_0}, | ||
1774 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, | ||
1775 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, | ||
1776 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, | ||
1777 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, | ||
1778 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, | ||
1779 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
1780 | {0xa1, 0x01, 0x0195}, | ||
1781 | {0xa1, 0x01, 0x0196}, | ||
1782 | {0xa1, 0x01, 0x0197}, | ||
1783 | {0xa0, 0x3d, ZC3XX_R192_EXPOSURELIMITLOW}, | ||
1784 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, | ||
1785 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, | ||
1786 | {0xa0, 0x1d, ZC3XX_R116_RGAIN}, | ||
1787 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, | ||
1788 | {0xa0, 0x85, ZC3XX_R118_BGAIN}, | ||
1789 | {0xa1, 0x01, 0x0116}, | ||
1790 | {0xa1, 0x01, 0x0118}, | ||
1791 | {0xa1, 0x01, 0x0180}, | ||
1792 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
1793 | {0xa0, 0x1d, ZC3XX_R116_RGAIN}, | ||
1794 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, | ||
1795 | {0xa0, 0x85, ZC3XX_R118_BGAIN}, | ||
1796 | {0xa1, 0x01, 0x0116}, | ||
1797 | {0xa1, 0x01, 0x0118}, | ||
1798 | /* {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, */ | ||
1799 | {0xa0, 0x00, 0x0007}, | ||
1800 | {} | ||
1801 | }; | ||
1802 | |||
1803 | static const struct usb_action hdcs2020xx_InitialScale[] = { | ||
1804 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, | ||
1805 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, | ||
1806 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, | ||
1807 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, | ||
1808 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, | ||
1809 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, | ||
1810 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, | ||
1811 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, | ||
1812 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, | ||
1813 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, | ||
1814 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, | ||
1815 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, | ||
1816 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, | ||
1817 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, | ||
1818 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, | ||
1819 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, | ||
1820 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, | ||
1821 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, | ||
1822 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, | ||
1823 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, | ||
1824 | {0xaa, 0x02, 0x0002}, | ||
1825 | {0xaa, 0x07, 0x0006}, | ||
1826 | {0xaa, 0x08, 0x0002}, | ||
1827 | {0xaa, 0x09, 0x0006}, | ||
1828 | {0xaa, 0x0a, 0x0001}, | ||
1829 | {0xaa, 0x0b, 0x0001}, | ||
1830 | {0xaa, 0x0c, 0x0008}, | ||
1831 | {0xaa, 0x0d, 0x0000}, | ||
1832 | {0xaa, 0x10, 0x0000}, | ||
1833 | {0xaa, 0x12, 0x0005}, | ||
1834 | {0xaa, 0x13, 0x0063}, | ||
1835 | {0xaa, 0x15, 0x0070}, | ||
1836 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, | ||
1837 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, | ||
1838 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, | ||
1839 | {0xa0, 0x00, 0x01ad}, | ||
1840 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, | ||
1841 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, | ||
1842 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, | ||
1843 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, | ||
1844 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, | ||
1845 | {0xa1, 0x01, 0x0002}, | ||
1846 | {0xa1, 0x01, 0x0008}, | ||
1847 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ | ||
1848 | {0xa0, 0x04, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ | ||
1849 | {0xa1, 0x01, 0x01c8}, | ||
1850 | {0xa1, 0x01, 0x01c9}, | ||
1851 | {0xa1, 0x01, 0x01ca}, | ||
1852 | {0xa0, 0x07, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ | ||
1853 | {0xa0, 0x11, ZC3XX_R120_GAMMA00}, /* gamma ~4*/ | ||
1854 | {0xa0, 0x37, ZC3XX_R121_GAMMA01}, | ||
1855 | {0xa0, 0x58, ZC3XX_R122_GAMMA02}, | ||
1856 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, | ||
1857 | {0xa0, 0x91, ZC3XX_R124_GAMMA04}, | ||
1858 | {0xa0, 0xa6, ZC3XX_R125_GAMMA05}, | ||
1859 | {0xa0, 0xb8, ZC3XX_R126_GAMMA06}, | ||
1860 | {0xa0, 0xc7, ZC3XX_R127_GAMMA07}, | ||
1861 | {0xa0, 0xd3, ZC3XX_R128_GAMMA08}, | ||
1862 | {0xa0, 0xde, ZC3XX_R129_GAMMA09}, | ||
1863 | {0xa0, 0xe6, ZC3XX_R12A_GAMMA0A}, | ||
1864 | {0xa0, 0xed, ZC3XX_R12B_GAMMA0B}, | ||
1865 | {0xa0, 0xf3, ZC3XX_R12C_GAMMA0C}, | ||
1866 | {0xa0, 0xf8, ZC3XX_R12D_GAMMA0D}, | ||
1867 | {0xa0, 0xfb, ZC3XX_R12E_GAMMA0E}, | ||
1868 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, | ||
1869 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, | ||
1870 | {0xa0, 0x23, ZC3XX_R131_GAMMA11}, | ||
1871 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, | ||
1872 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, | ||
1873 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, | ||
1874 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, | ||
1875 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, | ||
1876 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, | ||
1877 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, | ||
1878 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, | ||
1879 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, | ||
1880 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, | ||
1881 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, | ||
1882 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, | ||
1883 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, | ||
1884 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, | ||
1885 | {0xa0, 0x60, ZC3XX_R10A_RGB00}, /* matrix */ | ||
1886 | {0xa0, 0xff, ZC3XX_R10B_RGB01}, | ||
1887 | {0xa0, 0xff, ZC3XX_R10C_RGB02}, | ||
1888 | {0xa0, 0xff, ZC3XX_R10D_RGB10}, | ||
1889 | {0xa0, 0x60, ZC3XX_R10E_RGB11}, | ||
1890 | {0xa0, 0xff, ZC3XX_R10F_RGB12}, | ||
1891 | {0xa0, 0xff, ZC3XX_R110_RGB20}, | ||
1892 | {0xa0, 0xff, ZC3XX_R111_RGB21}, | ||
1893 | {0xa0, 0x60, ZC3XX_R112_RGB22}, | ||
1894 | |||
1895 | {0xa1, 0x01, 0x0180}, | ||
1896 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
1897 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | ||
1898 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, | ||
1899 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, | ||
1900 | {0xaa, 0x20, 0x0002}, | ||
1901 | {0xaa, 0x21, 0x001b}, | ||
1902 | {0xaa, 0x03, 0x0044}, | ||
1903 | {0xaa, 0x04, 0x0008}, | ||
1904 | {0xaa, 0x05, 0x001b}, | ||
1905 | {0xaa, 0x0e, 0x0001}, | ||
1906 | {0xaa, 0x0f, 0x0000}, | ||
1907 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, | ||
1908 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, | ||
1909 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, | ||
1910 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, | ||
1911 | {0xa0, 0x1b, ZC3XX_R192_EXPOSURELIMITLOW}, | ||
1912 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, | ||
1913 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, | ||
1914 | {0xa0, 0x4d, ZC3XX_R197_ANTIFLICKERLOW}, | ||
1915 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, | ||
1916 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, | ||
1917 | {0xa0, 0x44, ZC3XX_R01D_HSYNC_0}, | ||
1918 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, | ||
1919 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, | ||
1920 | {0xa0, 0xeb, ZC3XX_R020_HSYNC_3}, | ||
1921 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, | ||
1922 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, | ||
1923 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
1924 | {0xa1, 0x01, 0x0195}, | ||
1925 | {0xa1, 0x01, 0x0196}, | ||
1926 | {0xa1, 0x01, 0x0197}, | ||
1927 | {0xa0, 0x1b, ZC3XX_R192_EXPOSURELIMITLOW}, | ||
1928 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, | ||
1929 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, | ||
1930 | {0xa0, 0x1d, ZC3XX_R116_RGAIN}, | ||
1931 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, | ||
1932 | {0xa0, 0x99, ZC3XX_R118_BGAIN}, | ||
1933 | {0xa1, 0x01, 0x0116}, | ||
1934 | {0xa1, 0x01, 0x0118}, | ||
1935 | {0xa1, 0x01, 0x0180}, | ||
1936 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
1937 | {0xa0, 0x1d, ZC3XX_R116_RGAIN}, | ||
1938 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, | ||
1939 | {0xa0, 0x99, ZC3XX_R118_BGAIN}, | ||
1940 | /* {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, */ | ||
1941 | {0xa0, 0x00, 0x0007}, | ||
1942 | /* {0xa0, 0x18, 0x00fe}, */ | ||
1943 | {} | ||
1944 | }; | ||
1945 | static const struct usb_action hdcs2020xb_Initial[] = { | 1656 | static const struct usb_action hdcs2020xb_Initial[] = { |
1946 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, | 1657 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
1947 | {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT}, | 1658 | {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT}, |
@@ -2310,67 +2021,6 @@ static const struct usb_action hv7131bxx_Initial[] = { /* 320x240 */ | |||
2310 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, | 2021 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
2311 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, | 2022 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
2312 | {0xaa, 0x02, 0x0090}, /* 00,02,80,aa */ | 2023 | {0xaa, 0x02, 0x0090}, /* 00,02,80,aa */ |
2313 | {0xa1, 0x01, 0x0002}, | ||
2314 | {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT}, | ||
2315 | {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND}, | ||
2316 | {0xa1, 0x01, 0x0091}, | ||
2317 | {0xa1, 0x01, 0x0095}, | ||
2318 | {0xa1, 0x01, 0x0096}, | ||
2319 | |||
2320 | {0xa1, 0x01, 0x0008}, | ||
2321 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ | ||
2322 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ | ||
2323 | {0xa1, 0x01, 0x01c8}, | ||
2324 | {0xa1, 0x01, 0x01c9}, | ||
2325 | {0xa1, 0x01, 0x01ca}, | ||
2326 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ | ||
2327 | |||
2328 | {0xa0, 0x50, ZC3XX_R10A_RGB00}, /* matrix */ | ||
2329 | {0xa0, 0xf8, ZC3XX_R10B_RGB01}, | ||
2330 | {0xa0, 0xf8, ZC3XX_R10C_RGB02}, | ||
2331 | {0xa0, 0xf8, ZC3XX_R10D_RGB10}, | ||
2332 | {0xa0, 0x50, ZC3XX_R10E_RGB11}, | ||
2333 | {0xa0, 0xf8, ZC3XX_R10F_RGB12}, | ||
2334 | {0xa0, 0xf8, ZC3XX_R110_RGB20}, | ||
2335 | {0xa0, 0xf8, ZC3XX_R111_RGB21}, | ||
2336 | {0xa0, 0x50, ZC3XX_R112_RGB22}, | ||
2337 | {0xa1, 0x01, 0x0180}, | ||
2338 | {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
2339 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | ||
2340 | {0xaa, 0x25, 0x0007}, | ||
2341 | {0xaa, 0x26, 0x00a1}, | ||
2342 | {0xaa, 0x27, 0x0020}, | ||
2343 | {0xaa, 0x20, 0x0000}, | ||
2344 | {0xaa, 0x21, 0x00a0}, | ||
2345 | {0xaa, 0x22, 0x0016}, | ||
2346 | {0xaa, 0x23, 0x0040}, | ||
2347 | |||
2348 | {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 2F */ | ||
2349 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 4d */ | ||
2350 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, | ||
2351 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, | ||
2352 | {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID}, | ||
2353 | {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW}, | ||
2354 | {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, | ||
2355 | {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, | ||
2356 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, | ||
2357 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, | ||
2358 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, | ||
2359 | {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, | ||
2360 | {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, | ||
2361 | {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, | ||
2362 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, | ||
2363 | {0xa1, 0x01, 0x001d}, | ||
2364 | {0xa1, 0x01, 0x001e}, | ||
2365 | {0xa1, 0x01, 0x001f}, | ||
2366 | {0xa1, 0x01, 0x0020}, | ||
2367 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
2368 | {0xa1, 0x01, 0x0180}, | ||
2369 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
2370 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, | ||
2371 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, | ||
2372 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, | ||
2373 | /* {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, */ | ||
2374 | {} | 2024 | {} |
2375 | }; | 2025 | }; |
2376 | 2026 | ||
@@ -2418,65 +2068,156 @@ static const struct usb_action hv7131bxx_InitialScale[] = { /* 640x480*/ | |||
2418 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, | 2068 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
2419 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, | 2069 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
2420 | {0xaa, 0x02, 0x0090}, /* {0xaa, 0x02, 0x0080}, */ | 2070 | {0xaa, 0x02, 0x0090}, /* {0xaa, 0x02, 0x0080}, */ |
2421 | {0xa1, 0x01, 0x0002}, | 2071 | {} |
2422 | {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT}, | 2072 | }; |
2423 | {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND}, | 2073 | static const struct usb_action hv7131b_50HZ[] = { /* 640x480*/ |
2424 | {0xa1, 0x01, 0x0091}, | 2074 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
2425 | {0xa1, 0x01, 0x0095}, | 2075 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
2426 | {0xa1, 0x01, 0x0096}, | 2076 | {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */ |
2427 | {0xa1, 0x01, 0x0008}, | 2077 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
2428 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ | 2078 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
2429 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ | 2079 | {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */ |
2430 | {0xa1, 0x01, 0x01c8}, | 2080 | {0xaa, 0x22, 0x001b}, /* 00,22,1b,aa */ |
2431 | {0xa1, 0x01, 0x01c9}, | 2081 | {0xaa, 0x23, 0x00fc}, /* 00,23,fc,aa */ |
2432 | {0xa1, 0x01, 0x01ca}, | 2082 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
2433 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ | 2083 | {0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,9b,cc */ |
2434 | 2084 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,80,cc */ | |
2435 | {0xa0, 0x50, ZC3XX_R10A_RGB00}, /* matrix */ | 2085 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
2436 | {0xa0, 0xf8, ZC3XX_R10B_RGB01}, | 2086 | {0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,ea,cc */ |
2437 | {0xa0, 0xf8, ZC3XX_R10C_RGB02}, | 2087 | {0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,60,cc */ |
2438 | {0xa0, 0xf8, ZC3XX_R10D_RGB10}, | 2088 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
2439 | {0xa0, 0x50, ZC3XX_R10E_RGB11}, | 2089 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
2440 | {0xa0, 0xf8, ZC3XX_R10F_RGB12}, | 2090 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
2441 | {0xa0, 0xf8, ZC3XX_R110_RGB20}, | 2091 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
2442 | {0xa0, 0xf8, ZC3XX_R111_RGB21}, | 2092 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
2443 | {0xa0, 0x50, ZC3XX_R112_RGB22}, | 2093 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, /* 00,1e,50,cc */ |
2444 | {0xa1, 0x01, 0x0180}, | 2094 | {0xa0, 0x1b, ZC3XX_R01F_HSYNC_2}, /* 00,1f,1b,cc */ |
2445 | {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE}, | 2095 | {0xa0, 0xfc, ZC3XX_R020_HSYNC_3}, /* 00,20,fc,cc */ |
2446 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | 2096 | {} |
2447 | {0xaa, 0x25, 0x0007}, | 2097 | }; |
2448 | {0xaa, 0x26, 0x00a1}, | 2098 | static const struct usb_action hv7131b_50HZScale[] = { /* 320x240 */ |
2449 | {0xaa, 0x27, 0x0020}, | 2099 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
2450 | {0xaa, 0x20, 0x0000}, | 2100 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
2451 | {0xaa, 0x21, 0x0040}, | 2101 | {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */ |
2452 | {0xaa, 0x22, 0x0013}, | 2102 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
2453 | {0xaa, 0x23, 0x004c}, | 2103 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
2454 | {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 2f */ | 2104 | {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */ |
2455 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 4d */ | 2105 | {0xaa, 0x22, 0x0012}, /* 00,22,12,aa */ |
2456 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 60 */ | 2106 | {0xaa, 0x23, 0x0080}, /* 00,23,80,aa */ |
2457 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, | 2107 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
2458 | {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID}, | 2108 | {0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,9b,cc */ |
2459 | {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW}, | 2109 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,80,cc */ |
2460 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, | 2110 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,01,cc */ |
2461 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, | 2111 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,d4,cc */ |
2462 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, | 2112 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,c0,cc */ |
2463 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, | 2113 | {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, /* 01,8c,07,cc */ |
2464 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, | 2114 | {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,0f,cc */ |
2465 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, | 2115 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
2466 | {0xa0, 0x13, ZC3XX_R01F_HSYNC_2}, | 2116 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
2467 | {0xa0, 0x4c, ZC3XX_R020_HSYNC_3}, | 2117 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
2468 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, | 2118 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, /* 00,1e,50,cc */ |
2469 | {0xa1, 0x01, 0x001d}, | 2119 | {0xa0, 0x12, ZC3XX_R01F_HSYNC_2}, /* 00,1f,12,cc */ |
2470 | {0xa1, 0x01, 0x001e}, | 2120 | {0xa0, 0x80, ZC3XX_R020_HSYNC_3}, /* 00,20,80,cc */ |
2471 | {0xa1, 0x01, 0x001f}, | 2121 | {} |
2472 | {0xa1, 0x01, 0x0020}, | 2122 | }; |
2473 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, | 2123 | static const struct usb_action hv7131b_60HZ[] = { /* 640x480*/ |
2474 | {0xa1, 0x01, 0x0180}, | 2124 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
2475 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, | 2125 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
2476 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, | 2126 | {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */ |
2477 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, | 2127 | {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */ |
2478 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, | 2128 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
2479 | /* {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, */ | 2129 | {0xaa, 0x21, 0x0040}, /* 00,21,40,aa */ |
2130 | {0xaa, 0x22, 0x0013}, /* 00,22,13,aa */ | ||
2131 | {0xaa, 0x23, 0x004c}, /* 00,23,4c,aa */ | ||
2132 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ | ||
2133 | {0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,4d,cc */ | ||
2134 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,60,cc */ | ||
2135 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | ||
2136 | {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,c3,cc */ | ||
2137 | {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,50,cc */ | ||
2138 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ | ||
2139 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ | ||
2140 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ | ||
2141 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ | ||
2142 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ | ||
2143 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, /* 00,1e,40,cc */ | ||
2144 | {0xa0, 0x13, ZC3XX_R01F_HSYNC_2}, /* 00,1f,13,cc */ | ||
2145 | {0xa0, 0x4c, ZC3XX_R020_HSYNC_3}, /* 00,20,4c,cc */ | ||
2146 | {} | ||
2147 | }; | ||
2148 | static const struct usb_action hv7131b_60HZScale[] = { /* 320x240 */ | ||
2149 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | ||
2150 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ | ||
2151 | {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */ | ||
2152 | {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */ | ||
2153 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ | ||
2154 | {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */ | ||
2155 | {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */ | ||
2156 | {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */ | ||
2157 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ | ||
2158 | {0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,4d,cc */ | ||
2159 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,60,cc */ | ||
2160 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,01,cc */ | ||
2161 | {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,86,cc */ | ||
2162 | {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,a0,cc */ | ||
2163 | {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, /* 01,8c,07,cc */ | ||
2164 | {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,0f,cc */ | ||
2165 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ | ||
2166 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ | ||
2167 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ | ||
2168 | {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,a0,cc */ | ||
2169 | {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, /* 00,1f,16,cc */ | ||
2170 | {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, /* 00,20,40,cc */ | ||
2171 | {} | ||
2172 | }; | ||
2173 | static const struct usb_action hv7131b_NoFliker[] = { /* 640x480*/ | ||
2174 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | ||
2175 | {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */ | ||
2176 | {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */ | ||
2177 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ | ||
2178 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ | ||
2179 | {0xaa, 0x21, 0x0010}, /* 00,21,10,aa */ | ||
2180 | {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */ | ||
2181 | {0xaa, 0x23, 0x0003}, /* 00,23,03,aa */ | ||
2182 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ | ||
2183 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,f8,cc */ | ||
2184 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,00,cc */ | ||
2185 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | ||
2186 | {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,02,cc */ | ||
2187 | {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,00,cc */ | ||
2188 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | ||
2189 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | ||
2190 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ | ||
2191 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ | ||
2192 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ | ||
2193 | {0xa0, 0x10, ZC3XX_R01E_HSYNC_1}, /* 00,1e,10,cc */ | ||
2194 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, /* 00,1f,00,cc */ | ||
2195 | {0xa0, 0x03, ZC3XX_R020_HSYNC_3}, /* 00,20,03,cc */ | ||
2196 | {} | ||
2197 | }; | ||
2198 | static const struct usb_action hv7131b_NoFlikerScale[] = { /* 320x240 */ | ||
2199 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | ||
2200 | {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */ | ||
2201 | {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */ | ||
2202 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ | ||
2203 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ | ||
2204 | {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */ | ||
2205 | {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */ | ||
2206 | {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */ | ||
2207 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ | ||
2208 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,f8,cc */ | ||
2209 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,00,cc */ | ||
2210 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | ||
2211 | {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,02,cc */ | ||
2212 | {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,00,cc */ | ||
2213 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | ||
2214 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | ||
2215 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ | ||
2216 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ | ||
2217 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ | ||
2218 | {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,a0,cc */ | ||
2219 | {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, /* 00,1f,16,cc */ | ||
2220 | {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, /* 00,20,40,cc */ | ||
2480 | {} | 2221 | {} |
2481 | }; | 2222 | }; |
2482 | 2223 | ||
@@ -4389,6 +4130,270 @@ static const struct usb_action pas106b_NoFliker[] = { | |||
4389 | {} | 4130 | {} |
4390 | }; | 4131 | }; |
4391 | 4132 | ||
4133 | /* from usbvm31b.inf */ | ||
4134 | static const struct usb_action pas202b_Initial[] = { /* 640x480 */ | ||
4135 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ | ||
4136 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,00,cc */ | ||
4137 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ | ||
4138 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc */ | ||
4139 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ | ||
4140 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ | ||
4141 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ | ||
4142 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ | ||
4143 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ | ||
4144 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ | ||
4145 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ | ||
4146 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ | ||
4147 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ | ||
4148 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,03,cc */ | ||
4149 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ | ||
4150 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,03,cc */ | ||
4151 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ | ||
4152 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc */ | ||
4153 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ | ||
4154 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ | ||
4155 | {0xaa, 0x02, 0x0002}, /* 00,02,04,aa --> 02 */ | ||
4156 | {0xaa, 0x07, 0x0006}, /* 00,07,06,aa */ | ||
4157 | {0xaa, 0x08, 0x0002}, /* 00,08,02,aa */ | ||
4158 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ | ||
4159 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ | ||
4160 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ | ||
4161 | {0xaa, 0x0c, 0x0008}, /* 00,0c,08,aa */ | ||
4162 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ | ||
4163 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ | ||
4164 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ | ||
4165 | {0xaa, 0x13, 0x0063}, /* 00,13,63,aa */ | ||
4166 | {0xaa, 0x15, 0x0070}, /* 00,15,70,aa */ | ||
4167 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc */ | ||
4168 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ | ||
4169 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ | ||
4170 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ | ||
4171 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ | ||
4172 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ | ||
4173 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ | ||
4174 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ | ||
4175 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, /* 01,8d,70,cc */ | ||
4176 | {} | ||
4177 | }; | ||
4178 | static const struct usb_action pas202b_InitialScale[] = { /* 320x240 */ | ||
4179 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ | ||
4180 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,00,cc */ | ||
4181 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ | ||
4182 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ | ||
4183 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ | ||
4184 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ | ||
4185 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ | ||
4186 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ | ||
4187 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ | ||
4188 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ | ||
4189 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ | ||
4190 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ | ||
4191 | {0xa0, 0x08, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,08,cc */ | ||
4192 | {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,02,cc */ | ||
4193 | {0xa0, 0x08, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,08,cc */ | ||
4194 | {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,02,cc */ | ||
4195 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ | ||
4196 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d8,cc */ | ||
4197 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ | ||
4198 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ | ||
4199 | {0xaa, 0x02, 0x0002}, /* 00,02,02,aa */ | ||
4200 | {0xaa, 0x07, 0x0006}, /* 00,07,06,aa */ | ||
4201 | {0xaa, 0x08, 0x0002}, /* 00,08,02,aa */ | ||
4202 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ | ||
4203 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ | ||
4204 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ | ||
4205 | {0xaa, 0x0c, 0x0008}, /* 00,0c,08,aa */ | ||
4206 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ | ||
4207 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ | ||
4208 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ | ||
4209 | {0xaa, 0x13, 0x0063}, /* 00,13,63,aa */ | ||
4210 | {0xaa, 0x15, 0x0070}, /* 00,15,70,aa */ | ||
4211 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ | ||
4212 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ | ||
4213 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ | ||
4214 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ | ||
4215 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ | ||
4216 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ | ||
4217 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ | ||
4218 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ | ||
4219 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, /* 01,8d,70,cc */ | ||
4220 | {} | ||
4221 | }; | ||
4222 | static const struct usb_action pas202b_50HZ[] = { | ||
4223 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | ||
4224 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | ||
4225 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | ||
4226 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | ||
4227 | {0xaa, 0x21, 0x0068}, /* 00,21,68,aa */ | ||
4228 | {0xaa, 0x03, 0x0044}, /* 00,03,44,aa */ | ||
4229 | {0xaa, 0x04, 0x0009}, /* 00,04,09,aa */ | ||
4230 | {0xaa, 0x05, 0x0028}, /* 00,05,28,aa */ | ||
4231 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | ||
4232 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | ||
4233 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,14,cc */ | ||
4234 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ | ||
4235 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | ||
4236 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,07,cc */ | ||
4237 | {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,d2,cc */ | ||
4238 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | ||
4239 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | ||
4240 | {0xa0, 0x4d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,4d,cc */ | ||
4241 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | ||
4242 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | ||
4243 | {0xa0, 0x44, ZC3XX_R01D_HSYNC_0}, /* 00,1d,44,cc */ | ||
4244 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ | ||
4245 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ | ||
4246 | {0xa0, 0xeb, ZC3XX_R020_HSYNC_3}, /* 00,20,eb,cc */ | ||
4247 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ | ||
4248 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ | ||
4249 | {} | ||
4250 | }; | ||
4251 | static const struct usb_action pas202b_50HZScale[] = { | ||
4252 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | ||
4253 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | ||
4254 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | ||
4255 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | ||
4256 | {0xaa, 0x21, 0x006c}, /* 00,21,6c,aa */ | ||
4257 | {0xaa, 0x03, 0x0041}, /* 00,03,41,aa */ | ||
4258 | {0xaa, 0x04, 0x0009}, /* 00,04,09,aa */ | ||
4259 | {0xaa, 0x05, 0x002c}, /* 00,05,2c,aa */ | ||
4260 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | ||
4261 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | ||
4262 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,14,cc */ | ||
4263 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ | ||
4264 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | ||
4265 | {0xa0, 0x0f, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0f,cc */ | ||
4266 | {0xa0, 0xbe, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,be,cc */ | ||
4267 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | ||
4268 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | ||
4269 | {0xa0, 0x9b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,9b,cc */ | ||
4270 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | ||
4271 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | ||
4272 | {0xa0, 0x41, ZC3XX_R01D_HSYNC_0}, /* 00,1d,41,cc */ | ||
4273 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ | ||
4274 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ | ||
4275 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ | ||
4276 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ | ||
4277 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ | ||
4278 | {} | ||
4279 | }; | ||
4280 | static const struct usb_action pas202b_60HZ[] = { | ||
4281 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | ||
4282 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | ||
4283 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | ||
4284 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | ||
4285 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ | ||
4286 | {0xaa, 0x03, 0x0045}, /* 00,03,45,aa */ | ||
4287 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ | ||
4288 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ | ||
4289 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | ||
4290 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | ||
4291 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,14,cc */ | ||
4292 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ | ||
4293 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | ||
4294 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,07,cc */ | ||
4295 | {0xa0, 0xc0, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,c0,cc */ | ||
4296 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | ||
4297 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | ||
4298 | {0xa0, 0x40, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,40,cc */ | ||
4299 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | ||
4300 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | ||
4301 | {0xa0, 0x45, ZC3XX_R01D_HSYNC_0}, /* 00,1d,45,cc */ | ||
4302 | {0xa0, 0x8e, ZC3XX_R01E_HSYNC_1}, /* 00,1e,8e,cc */ | ||
4303 | {0xa0, 0xc1, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c1,cc */ | ||
4304 | {0xa0, 0xf5, ZC3XX_R020_HSYNC_3}, /* 00,20,f5,cc */ | ||
4305 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ | ||
4306 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ | ||
4307 | {} | ||
4308 | }; | ||
4309 | static const struct usb_action pas202b_60HZScale[] = { | ||
4310 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | ||
4311 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | ||
4312 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | ||
4313 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | ||
4314 | {0xaa, 0x21, 0x0004}, /* 00,21,04,aa */ | ||
4315 | {0xaa, 0x03, 0x0042}, /* 00,03,42,aa */ | ||
4316 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ | ||
4317 | {0xaa, 0x05, 0x0004}, /* 00,05,04,aa */ | ||
4318 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | ||
4319 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | ||
4320 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,14,cc */ | ||
4321 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ | ||
4322 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | ||
4323 | {0xa0, 0x0f, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0f,cc */ | ||
4324 | {0xa0, 0x9f, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,9f,cc */ | ||
4325 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | ||
4326 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | ||
4327 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,81,cc */ | ||
4328 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | ||
4329 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | ||
4330 | {0xa0, 0x42, ZC3XX_R01D_HSYNC_0}, /* 00,1d,42,cc */ | ||
4331 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ | ||
4332 | {0xa0, 0xaf, ZC3XX_R01F_HSYNC_2}, /* 00,1f,af,cc */ | ||
4333 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ | ||
4334 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ | ||
4335 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ | ||
4336 | {} | ||
4337 | }; | ||
4338 | static const struct usb_action pas202b_NoFliker[] = { | ||
4339 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | ||
4340 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | ||
4341 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | ||
4342 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | ||
4343 | {0xaa, 0x21, 0x0020}, /* 00,21,20,aa */ | ||
4344 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ | ||
4345 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ | ||
4346 | {0xaa, 0x05, 0x0020}, /* 00,05,20,aa */ | ||
4347 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | ||
4348 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | ||
4349 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | ||
4350 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,07,cc */ | ||
4351 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,f0,cc */ | ||
4352 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | ||
4353 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | ||
4354 | {0xa0, 0x02, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,02,cc */ | ||
4355 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | ||
4356 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | ||
4357 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ | ||
4358 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ | ||
4359 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ | ||
4360 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ | ||
4361 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ | ||
4362 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ | ||
4363 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ | ||
4364 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ | ||
4365 | {} | ||
4366 | }; | ||
4367 | static const struct usb_action pas202b_NoFlikerScale[] = { | ||
4368 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ | ||
4369 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ | ||
4370 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ | ||
4371 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ | ||
4372 | {0xaa, 0x21, 0x0010}, /* 00,21,10,aa */ | ||
4373 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ | ||
4374 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ | ||
4375 | {0xaa, 0x05, 0x0010}, /* 00,05,10,aa */ | ||
4376 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ | ||
4377 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ | ||
4378 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ | ||
4379 | {0xa0, 0x0f, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0f,cc */ | ||
4380 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,f0,cc */ | ||
4381 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ | ||
4382 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ | ||
4383 | {0xa0, 0x02, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,02,cc */ | ||
4384 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ | ||
4385 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ | ||
4386 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ | ||
4387 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ | ||
4388 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ | ||
4389 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ | ||
4390 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ | ||
4391 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ | ||
4392 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ | ||
4393 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ | ||
4394 | {} | ||
4395 | }; | ||
4396 | |||
4392 | static const struct usb_action pb03303x_Initial[] = { | 4397 | static const struct usb_action pb03303x_Initial[] = { |
4393 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, | 4398 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
4394 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, | 4399 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
@@ -5725,7 +5730,7 @@ static const struct usb_action tas5130cxx_Initial[] = { | |||
5725 | {} | 5730 | {} |
5726 | }; | 5731 | }; |
5727 | static const struct usb_action tas5130cxx_InitialScale[] = { | 5732 | static const struct usb_action tas5130cxx_InitialScale[] = { |
5728 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, | 5733 | /*?? {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, */ |
5729 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, | 5734 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
5730 | {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, | 5735 | {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, |
5731 | 5736 | ||
@@ -6049,7 +6054,7 @@ static const struct usb_action tas5130c_vf0250_InitialScale[] = { | |||
6049 | {0xaa, 0x1b, 0x0000}, /* 00,1b,00,aa, */ | 6054 | {0xaa, 0x1b, 0x0000}, /* 00,1b,00,aa, */ |
6050 | {0xaa, 0x13, 0x0002}, /* 00,13,02,aa, */ | 6055 | {0xaa, 0x13, 0x0002}, /* 00,13,02,aa, */ |
6051 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ | 6056 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
6052 | {0xaa, 0x01, 0x0000}, | 6057 | /*?? {0xaa, 0x01, 0x0000}, */ |
6053 | {0xaa, 0x01, 0x0000}, | 6058 | {0xaa, 0x01, 0x0000}, |
6054 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */ | 6059 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */ |
6055 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */ | 6060 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */ |
@@ -6065,8 +6070,8 @@ static const struct usb_action tas5130c_vf0250_InitialScale[] = { | |||
6065 | {0xaa, 0x0f, 0x00a0}, /* 00,0f,a0,aa, */ | 6070 | {0xaa, 0x0f, 0x00a0}, /* 00,0f,a0,aa, */ |
6066 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa, */ | 6071 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa, */ |
6067 | {0xaa, 0x11, 0x00a0}, /* 00,11,a0,aa, */ | 6072 | {0xaa, 0x11, 0x00a0}, /* 00,11,a0,aa, */ |
6068 | {0xa0, 0x00, 0x0039}, | 6073 | /*?? {0xa0, 0x00, 0x0039}, |
6069 | {0xa1, 0x01, 0x0037}, | 6074 | {0xa1, 0x01, 0x0037}, */ |
6070 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */ | 6075 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */ |
6071 | {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa (e6 -> e8) */ | 6076 | {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa (e6 -> e8) */ |
6072 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */ | 6077 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */ |
@@ -6303,7 +6308,7 @@ static __u8 i2c_write(struct gspca_dev *gspca_dev, | |||
6303 | reg_w_i(gspca_dev->dev, valL, 0x93); | 6308 | reg_w_i(gspca_dev->dev, valL, 0x93); |
6304 | reg_w_i(gspca_dev->dev, valH, 0x94); | 6309 | reg_w_i(gspca_dev->dev, valH, 0x94); |
6305 | reg_w_i(gspca_dev->dev, 0x01, 0x90); /* <- write command */ | 6310 | reg_w_i(gspca_dev->dev, 0x01, 0x90); /* <- write command */ |
6306 | msleep(5); | 6311 | msleep(15); |
6307 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ | 6312 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ |
6308 | PDEBUG(D_USBO, "i2c w [%02x] = %02x%02x (%02x)", | 6313 | PDEBUG(D_USBO, "i2c w [%02x] = %02x%02x (%02x)", |
6309 | reg, valH, valL, retbyte); | 6314 | reg, valH, valL, retbyte); |
@@ -6346,30 +6351,35 @@ static void setmatrix(struct gspca_dev *gspca_dev) | |||
6346 | {0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50}; | 6351 | {0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50}; |
6347 | static const __u8 ov7620_matrix[9] = | 6352 | static const __u8 ov7620_matrix[9] = |
6348 | {0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58}; | 6353 | {0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58}; |
6354 | static const __u8 pas202b_matrix[9] = | ||
6355 | {0x4c, 0xf5, 0xff, 0xf9, 0x51, 0xf5, 0xfb, 0xed, 0x5f}; | ||
6349 | static const __u8 po2030_matrix[9] = | 6356 | static const __u8 po2030_matrix[9] = |
6350 | {0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60}; | 6357 | {0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60}; |
6351 | static const __u8 vf0250_matrix[9] = | 6358 | static const __u8 vf0250_matrix[9] = |
6352 | {0x7b, 0xea, 0xea, 0xea, 0x7b, 0xea, 0xea, 0xea, 0x7b}; | 6359 | {0x7b, 0xea, 0xea, 0xea, 0x7b, 0xea, 0xea, 0xea, 0x7b}; |
6360 | static const __u8 *matrix_tb[SENSOR_MAX] = { | ||
6361 | NULL, /* SENSOR_CS2102 0 */ | ||
6362 | NULL, /* SENSOR_CS2102K 1 */ | ||
6363 | gc0305_matrix, /* SENSOR_GC0305 2 */ | ||
6364 | NULL, /* SENSOR_HDCS2020b 3 */ | ||
6365 | NULL, /* SENSOR_HV7131B 4 */ | ||
6366 | NULL, /* SENSOR_HV7131C 5 */ | ||
6367 | NULL, /* SENSOR_ICM105A 6 */ | ||
6368 | NULL, /* SENSOR_MC501CB 7 */ | ||
6369 | ov7620_matrix, /* SENSOR_OV7620 8 */ | ||
6370 | NULL, /* SENSOR_OV7630C 9 */ | ||
6371 | NULL, /* SENSOR_PAS106 10 */ | ||
6372 | pas202b_matrix, /* SENSOR_PAS202B 11 */ | ||
6373 | NULL, /* SENSOR_PB0330 12 */ | ||
6374 | po2030_matrix, /* SENSOR_PO2030 13 */ | ||
6375 | NULL, /* SENSOR_TAS5130CK 14 */ | ||
6376 | NULL, /* SENSOR_TAS5130CXX 15 */ | ||
6377 | vf0250_matrix, /* SENSOR_TAS5130C_VF0250 16 */ | ||
6378 | }; | ||
6353 | 6379 | ||
6354 | switch (sd->sensor) { | 6380 | matrix = matrix_tb[sd->sensor]; |
6355 | case SENSOR_GC0305: | 6381 | if (matrix == NULL) |
6356 | matrix = gc0305_matrix; | 6382 | return; /* matrix already loaded */ |
6357 | break; | ||
6358 | case SENSOR_MC501CB: | ||
6359 | return; /* no matrix? */ | ||
6360 | case SENSOR_OV7620: | ||
6361 | /* case SENSOR_OV7648: */ | ||
6362 | matrix = ov7620_matrix; | ||
6363 | break; | ||
6364 | case SENSOR_PO2030: | ||
6365 | matrix = po2030_matrix; | ||
6366 | break; | ||
6367 | case SENSOR_TAS5130C_VF0250: | ||
6368 | matrix = vf0250_matrix; | ||
6369 | break; | ||
6370 | default: /* matrix already loaded */ | ||
6371 | return; | ||
6372 | } | ||
6373 | for (i = 0; i < ARRAY_SIZE(ov7620_matrix); i++) | 6383 | for (i = 0; i < ARRAY_SIZE(ov7620_matrix); i++) |
6374 | reg_w(gspca_dev->dev, matrix[i], 0x010a + i); | 6384 | reg_w(gspca_dev->dev, matrix[i], 0x010a + i); |
6375 | } | 6385 | } |
@@ -6585,42 +6595,42 @@ static int setlightfreq(struct gspca_dev *gspca_dev) | |||
6585 | {gc0305_NoFliker, gc0305_NoFliker, | 6595 | {gc0305_NoFliker, gc0305_NoFliker, |
6586 | gc0305_50HZ, gc0305_50HZ, | 6596 | gc0305_50HZ, gc0305_50HZ, |
6587 | gc0305_60HZ, gc0305_60HZ}, | 6597 | gc0305_60HZ, gc0305_60HZ}, |
6588 | /* SENSOR_HDCS2020 3 */ | 6598 | /* SENSOR_HDCS2020b 3 */ |
6589 | {NULL, NULL, | ||
6590 | NULL, NULL, | ||
6591 | NULL, NULL}, | ||
6592 | /* SENSOR_HDCS2020b 4 */ | ||
6593 | {hdcs2020b_NoFliker, hdcs2020b_NoFliker, | 6599 | {hdcs2020b_NoFliker, hdcs2020b_NoFliker, |
6594 | hdcs2020b_50HZ, hdcs2020b_50HZ, | 6600 | hdcs2020b_50HZ, hdcs2020b_50HZ, |
6595 | hdcs2020b_60HZ, hdcs2020b_60HZ}, | 6601 | hdcs2020b_60HZ, hdcs2020b_60HZ}, |
6596 | /* SENSOR_HV7131B 5 */ | 6602 | /* SENSOR_HV7131B 4 */ |
6603 | {hv7131b_NoFlikerScale, hv7131b_NoFliker, | ||
6604 | hv7131b_50HZScale, hv7131b_50HZ, | ||
6605 | hv7131b_60HZScale, hv7131b_60HZ}, | ||
6606 | /* SENSOR_HV7131C 5 */ | ||
6597 | {NULL, NULL, | 6607 | {NULL, NULL, |
6598 | NULL, NULL, | 6608 | NULL, NULL, |
6599 | NULL, NULL}, | 6609 | NULL, NULL}, |
6600 | /* SENSOR_HV7131C 6 */ | 6610 | /* SENSOR_ICM105A 6 */ |
6601 | {NULL, NULL, | ||
6602 | NULL, NULL, | ||
6603 | NULL, NULL}, | ||
6604 | /* SENSOR_ICM105A 7 */ | ||
6605 | {icm105a_NoFliker, icm105a_NoFlikerScale, | 6611 | {icm105a_NoFliker, icm105a_NoFlikerScale, |
6606 | icm105a_50HZ, icm105a_50HZScale, | 6612 | icm105a_50HZ, icm105a_50HZScale, |
6607 | icm105a_60HZ, icm105a_60HZScale}, | 6613 | icm105a_60HZ, icm105a_60HZScale}, |
6608 | /* SENSOR_MC501CB 8 */ | 6614 | /* SENSOR_MC501CB 7 */ |
6609 | {MC501CB_NoFliker, MC501CB_NoFlikerScale, | 6615 | {MC501CB_NoFliker, MC501CB_NoFlikerScale, |
6610 | MC501CB_50HZ, MC501CB_50HZScale, | 6616 | MC501CB_50HZ, MC501CB_50HZScale, |
6611 | MC501CB_60HZ, MC501CB_60HZScale}, | 6617 | MC501CB_60HZ, MC501CB_60HZScale}, |
6612 | /* SENSOR_OV7620 9 */ | 6618 | /* SENSOR_OV7620 8 */ |
6613 | {OV7620_NoFliker, OV7620_NoFliker, | 6619 | {OV7620_NoFliker, OV7620_NoFliker, |
6614 | OV7620_50HZ, OV7620_50HZ, | 6620 | OV7620_50HZ, OV7620_50HZ, |
6615 | OV7620_60HZ, OV7620_60HZ}, | 6621 | OV7620_60HZ, OV7620_60HZ}, |
6616 | /* SENSOR_OV7630C 10 */ | 6622 | /* SENSOR_OV7630C 9 */ |
6617 | {NULL, NULL, | 6623 | {NULL, NULL, |
6618 | NULL, NULL, | 6624 | NULL, NULL, |
6619 | NULL, NULL}, | 6625 | NULL, NULL}, |
6620 | /* SENSOR_PAS106 11 */ | 6626 | /* SENSOR_PAS106 10 */ |
6621 | {pas106b_NoFliker, pas106b_NoFliker, | 6627 | {pas106b_NoFliker, pas106b_NoFliker, |
6622 | pas106b_50HZ, pas106b_50HZ, | 6628 | pas106b_50HZ, pas106b_50HZ, |
6623 | pas106b_60HZ, pas106b_60HZ}, | 6629 | pas106b_60HZ, pas106b_60HZ}, |
6630 | /* SENSOR_PAS202B 11 */ | ||
6631 | {pas202b_NoFlikerScale, pas202b_NoFliker, | ||
6632 | pas202b_50HZScale, pas202b_50HZ, | ||
6633 | pas202b_60HZScale, pas202b_60HZ}, | ||
6624 | /* SENSOR_PB0330 12 */ | 6634 | /* SENSOR_PB0330 12 */ |
6625 | {pb0330_NoFliker, pb0330_NoFlikerScale, | 6635 | {pb0330_NoFliker, pb0330_NoFlikerScale, |
6626 | pb0330_50HZ, pb0330_50HZScale, | 6636 | pb0330_50HZ, pb0330_50HZScale, |
@@ -7002,15 +7012,15 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
7002 | 5, /* SENSOR_CS2102 0 */ | 7012 | 5, /* SENSOR_CS2102 0 */ |
7003 | 5, /* SENSOR_CS2102K 1 */ | 7013 | 5, /* SENSOR_CS2102K 1 */ |
7004 | 4, /* SENSOR_GC0305 2 */ | 7014 | 4, /* SENSOR_GC0305 2 */ |
7005 | 4, /* SENSOR_HDCS2020 3 */ | 7015 | 4, /* SENSOR_HDCS2020b 3 */ |
7006 | 4, /* SENSOR_HDCS2020b 4 */ | 7016 | 4, /* SENSOR_HV7131B 4 */ |
7007 | 4, /* SENSOR_HV7131B 5 */ | 7017 | 4, /* SENSOR_HV7131C 5 */ |
7008 | 4, /* SENSOR_HV7131C 6 */ | 7018 | 4, /* SENSOR_ICM105A 6 */ |
7009 | 4, /* SENSOR_ICM105A 7 */ | 7019 | 4, /* SENSOR_MC501CB 7 */ |
7010 | 4, /* SENSOR_MC501CB 8 */ | 7020 | 3, /* SENSOR_OV7620 8 */ |
7011 | 3, /* SENSOR_OV7620 9 */ | 7021 | 4, /* SENSOR_OV7630C 9 */ |
7012 | 4, /* SENSOR_OV7630C 10 */ | 7022 | 4, /* SENSOR_PAS106 10 */ |
7013 | 4, /* SENSOR_PAS106 11 */ | 7023 | 4, /* SENSOR_PAS202B 11 */ |
7014 | 4, /* SENSOR_PB0330 12 */ | 7024 | 4, /* SENSOR_PB0330 12 */ |
7015 | 4, /* SENSOR_PO2030 13 */ | 7025 | 4, /* SENSOR_PO2030 13 */ |
7016 | 4, /* SENSOR_TAS5130CK 14 */ | 7026 | 4, /* SENSOR_TAS5130CK 14 */ |
@@ -7066,8 +7076,8 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
7066 | sd->sensor = SENSOR_ICM105A; | 7076 | sd->sensor = SENSOR_ICM105A; |
7067 | break; | 7077 | break; |
7068 | case 0x0e: | 7078 | case 0x0e: |
7069 | PDEBUG(D_PROBE, "Find Sensor HDCS2020"); | 7079 | PDEBUG(D_PROBE, "Find Sensor PAS202B"); |
7070 | sd->sensor = SENSOR_HDCS2020; | 7080 | sd->sensor = SENSOR_PAS202B; |
7071 | sd->sharpness = 1; | 7081 | sd->sharpness = 1; |
7072 | break; | 7082 | break; |
7073 | case 0x0f: | 7083 | case 0x0f: |
@@ -7153,7 +7163,6 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
7153 | sd->gamma = gamma[(int) sd->sensor]; | 7163 | sd->gamma = gamma[(int) sd->sensor]; |
7154 | sd->autogain = sd_ctrls[SD_AUTOGAIN].qctrl.default_value; | 7164 | sd->autogain = sd_ctrls[SD_AUTOGAIN].qctrl.default_value; |
7155 | sd->lightfreq = sd_ctrls[SD_FREQ].qctrl.default_value; | 7165 | sd->lightfreq = sd_ctrls[SD_FREQ].qctrl.default_value; |
7156 | sd->sharpness = sd_ctrls[SD_SHARPNESS].qctrl.default_value; | ||
7157 | 7166 | ||
7158 | switch (sd->sensor) { | 7167 | switch (sd->sensor) { |
7159 | case SENSOR_GC0305: | 7168 | case SENSOR_GC0305: |
@@ -7161,7 +7170,6 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
7161 | case SENSOR_PO2030: | 7170 | case SENSOR_PO2030: |
7162 | gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX); | 7171 | gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX); |
7163 | break; | 7172 | break; |
7164 | case SENSOR_HDCS2020: | ||
7165 | case SENSOR_HV7131B: | 7173 | case SENSOR_HV7131B: |
7166 | case SENSOR_HV7131C: | 7174 | case SENSOR_HV7131C: |
7167 | case SENSOR_OV7630C: | 7175 | case SENSOR_OV7630C: |
@@ -7191,15 +7199,15 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
7191 | {cs2102_InitialScale, cs2102_Initial}, /* 0 */ | 7199 | {cs2102_InitialScale, cs2102_Initial}, /* 0 */ |
7192 | {cs2102K_InitialScale, cs2102K_Initial}, /* 1 */ | 7200 | {cs2102K_InitialScale, cs2102K_Initial}, /* 1 */ |
7193 | {gc0305_Initial, gc0305_InitialScale}, /* 2 */ | 7201 | {gc0305_Initial, gc0305_InitialScale}, /* 2 */ |
7194 | {hdcs2020xx_InitialScale, hdcs2020xx_Initial}, /* 3 */ | 7202 | {hdcs2020xb_InitialScale, hdcs2020xb_Initial}, /* 3 */ |
7195 | {hdcs2020xb_InitialScale, hdcs2020xb_Initial}, /* 4 */ | 7203 | {hv7131bxx_InitialScale, hv7131bxx_Initial}, /* 4 */ |
7196 | {hv7131bxx_InitialScale, hv7131bxx_Initial}, /* 5 */ | 7204 | {hv7131cxx_InitialScale, hv7131cxx_Initial}, /* 5 */ |
7197 | {hv7131cxx_InitialScale, hv7131cxx_Initial}, /* 6 */ | 7205 | {icm105axx_InitialScale, icm105axx_Initial}, /* 6 */ |
7198 | {icm105axx_InitialScale, icm105axx_Initial}, /* 7 */ | 7206 | {MC501CB_InitialScale, MC501CB_Initial}, /* 7 */ |
7199 | {MC501CB_InitialScale, MC501CB_Initial}, /* 9 */ | 7207 | {OV7620_mode0, OV7620_mode1}, /* 8 */ |
7200 | {OV7620_mode0, OV7620_mode1}, /* 9 */ | 7208 | {ov7630c_InitialScale, ov7630c_Initial}, /* 9 */ |
7201 | {ov7630c_InitialScale, ov7630c_Initial}, /* 10 */ | 7209 | {pas106b_InitialScale, pas106b_Initial}, /* 10 */ |
7202 | {pas106b_InitialScale, pas106b_Initial}, /* 11 */ | 7210 | {pas202b_Initial, pas202b_InitialScale}, /* 11 */ |
7203 | {pb0330xx_InitialScale, pb0330xx_Initial}, /* 12 */ | 7211 | {pb0330xx_InitialScale, pb0330xx_Initial}, /* 12 */ |
7204 | /* or {pb03303x_InitialScale, pb03303x_Initial}, */ | 7212 | /* or {pb03303x_InitialScale, pb03303x_Initial}, */ |
7205 | {PO2030_mode0, PO2030_mode1}, /* 13 */ | 7213 | {PO2030_mode0, PO2030_mode1}, /* 13 */ |
@@ -7256,6 +7264,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
7256 | reg_r(gspca_dev, 0x0008); | 7264 | reg_r(gspca_dev, 0x0008); |
7257 | reg_w(dev, 0x00, 0x0008); | 7265 | reg_w(dev, 0x00, 0x0008); |
7258 | break; | 7266 | break; |
7267 | case SENSOR_PAS202B: | ||
7259 | case SENSOR_GC0305: | 7268 | case SENSOR_GC0305: |
7260 | reg_r(gspca_dev, 0x0008); | 7269 | reg_r(gspca_dev, 0x0008); |
7261 | /* fall thru */ | 7270 | /* fall thru */ |
@@ -7269,7 +7278,6 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
7269 | switch (sd->sensor) { | 7278 | switch (sd->sensor) { |
7270 | case SENSOR_CS2102: /* gamma set in xxx_Initial */ | 7279 | case SENSOR_CS2102: /* gamma set in xxx_Initial */ |
7271 | case SENSOR_CS2102K: | 7280 | case SENSOR_CS2102K: |
7272 | case SENSOR_HDCS2020: | ||
7273 | case SENSOR_HDCS2020b: | 7281 | case SENSOR_HDCS2020b: |
7274 | case SENSOR_PB0330: /* pb with chip_revision - see above */ | 7282 | case SENSOR_PB0330: /* pb with chip_revision - see above */ |
7275 | case SENSOR_OV7630C: | 7283 | case SENSOR_OV7630C: |
@@ -7282,6 +7290,7 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
7282 | setmatrix(gspca_dev); /* one more time? */ | 7290 | setmatrix(gspca_dev); /* one more time? */ |
7283 | switch (sd->sensor) { | 7291 | switch (sd->sensor) { |
7284 | case SENSOR_OV7620: | 7292 | case SENSOR_OV7620: |
7293 | case SENSOR_PAS202B: | ||
7285 | reg_r(gspca_dev, 0x0180); /* from win */ | 7294 | reg_r(gspca_dev, 0x0180); /* from win */ |
7286 | reg_w(dev, 0x00, 0x0180); | 7295 | reg_w(dev, 0x00, 0x0180); |
7287 | break; | 7296 | break; |
@@ -7293,37 +7302,29 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
7293 | 7302 | ||
7294 | switch (sd->sensor) { | 7303 | switch (sd->sensor) { |
7295 | case SENSOR_GC0305: | 7304 | case SENSOR_GC0305: |
7296 | case SENSOR_OV7620: | ||
7297 | reg_w(dev, 0x09, 0x01ad); /* (from win traces) */ | 7305 | reg_w(dev, 0x09, 0x01ad); /* (from win traces) */ |
7298 | reg_w(dev, 0x15, 0x01ae); | 7306 | reg_w(dev, 0x15, 0x01ae); |
7299 | sd->autogain = 0; | 7307 | /* fall thru */ |
7300 | break; | 7308 | case SENSOR_PAS202B: |
7301 | case SENSOR_PO2030: | 7309 | case SENSOR_PO2030: |
7302 | reg_w(dev, 0x40, 0x0117); /* (from win traces) */ | 7310 | /* reg_w(dev, 0x40, ZC3XX_R117_GGAIN); * (from win traces) */ |
7303 | reg_r(gspca_dev, 0x0180); | 7311 | reg_r(gspca_dev, 0x0180); |
7304 | break; | 7312 | break; |
7305 | } | ||
7306 | |||
7307 | setautogain(gspca_dev); | ||
7308 | switch (sd->sensor) { | ||
7309 | case SENSOR_GC0305: | ||
7310 | /* setlightfreq(gspca_dev); ?? (end: 80 -> [18d]) */ | ||
7311 | reg_w(dev, 0x09, 0x01ad); /* (from win traces) */ | ||
7312 | reg_w(dev, 0x15, 0x01ae); | ||
7313 | reg_w(dev, 0x40, 0x0180); | ||
7314 | reg_w(dev, 0x40, 0x0117); | ||
7315 | reg_r(gspca_dev, 0x0180); | ||
7316 | sd->autogain = 1; | ||
7317 | setautogain(gspca_dev); | ||
7318 | break; | ||
7319 | case SENSOR_OV7620: | 7313 | case SENSOR_OV7620: |
7314 | reg_w(dev, 0x09, 0x01ad); | ||
7315 | reg_w(dev, 0x15, 0x01ae); | ||
7320 | i2c_read(gspca_dev, 0x13); /*fixme: returns 0xa3 */ | 7316 | i2c_read(gspca_dev, 0x13); /*fixme: returns 0xa3 */ |
7321 | i2c_write(gspca_dev, 0x13, 0xa3, 0x00); | 7317 | i2c_write(gspca_dev, 0x13, 0xa3, 0x00); |
7322 | /*fixme: returned value to send? */ | 7318 | /*fixme: returned value to send? */ |
7323 | reg_w(dev, 0x40, 0x0117); /* (from win traces) */ | 7319 | reg_w(dev, 0x40, 0x0117); |
7324 | reg_r(gspca_dev, 0x0180); | 7320 | reg_r(gspca_dev, 0x0180); |
7325 | setautogain(gspca_dev); | 7321 | break; |
7326 | msleep(500); | 7322 | } |
7323 | |||
7324 | setautogain(gspca_dev); | ||
7325 | switch (sd->sensor) { | ||
7326 | case SENSOR_PAS202B: | ||
7327 | reg_w(dev, 0x00, 0x0007); /* (from win traces) */ | ||
7327 | break; | 7328 | break; |
7328 | case SENSOR_PO2030: | 7329 | case SENSOR_PO2030: |
7329 | msleep(500); | 7330 | msleep(500); |
@@ -7333,6 +7334,8 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
7333 | reg_w(dev, 0x02, 0x0008); | 7334 | reg_w(dev, 0x02, 0x0008); |
7334 | break; | 7335 | break; |
7335 | } | 7336 | } |
7337 | if (sd->sensor == SENSOR_PAS202B) | ||
7338 | reg_w(dev, 0x02, ZC3XX_R008_CLOCKSETTING); | ||
7336 | return 0; | 7339 | return 0; |
7337 | } | 7340 | } |
7338 | 7341 | ||
@@ -7530,6 +7533,7 @@ static const __devinitdata struct usb_device_id device_table[] = { | |||
7530 | {USB_DEVICE(0x0458, 0x700c)}, | 7533 | {USB_DEVICE(0x0458, 0x700c)}, |
7531 | {USB_DEVICE(0x0458, 0x700f)}, | 7534 | {USB_DEVICE(0x0458, 0x700f)}, |
7532 | {USB_DEVICE(0x0461, 0x0a00)}, | 7535 | {USB_DEVICE(0x0461, 0x0a00)}, |
7536 | {USB_DEVICE(0x046d, 0x089d), .driver_info = SENSOR_MC501CB}, | ||
7533 | {USB_DEVICE(0x046d, 0x08a0)}, | 7537 | {USB_DEVICE(0x046d, 0x08a0)}, |
7534 | {USB_DEVICE(0x046d, 0x08a1)}, | 7538 | {USB_DEVICE(0x046d, 0x08a1)}, |
7535 | {USB_DEVICE(0x046d, 0x08a2)}, | 7539 | {USB_DEVICE(0x046d, 0x08a2)}, |