diff options
author | Jean-François Moine <moinejf@free.fr> | 2010-08-04 06:12:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-08 22:43:02 -0400 |
commit | 2af0b4c60cc0daf0a3abbaa159380fd729dcf729 (patch) | |
tree | d56fa3ca4eb619f8975604f0c24f4aa8defd99d0 /drivers | |
parent | 5fd450e913c8836ce3f111300ab04d601876af2f (diff) |
V4L/DVB: gspca - zc3xx: Add the light frequency control for sensor hv7131r
The new exchanges are extracted from the public file lPEPI264v.inf of the
ms-Windows driver. In this file, the sensor is named hv7131b but the exchanges
are those of the hv7131r.
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/gspca/zc3xx.c | 241 |
1 files changed, 123 insertions, 118 deletions
diff --git a/drivers/media/video/gspca/zc3xx.c b/drivers/media/video/gspca/zc3xx.c index d796bec62106..5c9113098e7f 100644 --- a/drivers/media/video/gspca/zc3xx.c +++ b/drivers/media/video/gspca/zc3xx.c | |||
@@ -2076,6 +2076,7 @@ static const struct usb_action hv7131b_NoFlikerScale[] = { /* 320x240 */ | |||
2076 | {} | 2076 | {} |
2077 | }; | 2077 | }; |
2078 | 2078 | ||
2079 | /* from lPEPI264v.inf (hv7131b!) */ | ||
2079 | static const struct usb_action hv7131r_InitialScale[] = { | 2080 | static const struct usb_action hv7131r_InitialScale[] = { |
2080 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, | 2081 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
2081 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, | 2082 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
@@ -2083,8 +2084,8 @@ static const struct usb_action hv7131r_InitialScale[] = { | |||
2083 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, | 2084 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
2084 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, | 2085 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
2085 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, | 2086 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
2086 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, | ||
2087 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, | 2087 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
2088 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, | ||
2088 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, | 2089 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
2089 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, | 2090 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
2090 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, | 2091 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
@@ -2097,6 +2098,8 @@ static const struct usb_action hv7131r_InitialScale[] = { | |||
2097 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, | 2098 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
2098 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, | 2099 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
2099 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, | 2100 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
2101 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, | ||
2102 | {0xdd, 0x00, 0x0200}, | ||
2100 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, | 2103 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
2101 | {0xaa, 0x01, 0x000c}, | 2104 | {0xaa, 0x01, 0x000c}, |
2102 | {0xaa, 0x11, 0x0000}, | 2105 | {0xaa, 0x11, 0x0000}, |
@@ -2105,10 +2108,10 @@ static const struct usb_action hv7131r_InitialScale[] = { | |||
2105 | {0xaa, 0x15, 0x00e8}, | 2108 | {0xaa, 0x15, 0x00e8}, |
2106 | {0xaa, 0x16, 0x0002}, | 2109 | {0xaa, 0x16, 0x0002}, |
2107 | {0xaa, 0x17, 0x0088}, | 2110 | {0xaa, 0x17, 0x0088}, |
2108 | 2111 | {0xaa, 0x30, 0x000b}, | |
2109 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | 2112 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
2110 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, | 2113 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
2111 | {0xa0, 0x89, ZC3XX_R18D_YTARGET}, | 2114 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
2112 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, | 2115 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
2113 | {0xa0, 0x00, 0x01ad}, | 2116 | {0xa0, 0x00, 0x01ad}, |
2114 | {0xa0, 0xc0, 0x019b}, | 2117 | {0xa0, 0xc0, 0x019b}, |
@@ -2118,96 +2121,44 @@ static const struct usb_action hv7131r_InitialScale[] = { | |||
2118 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, | 2121 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
2119 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, | 2122 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
2120 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, | 2123 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
2121 | {0xa1, 0x01, 0x0002}, | ||
2122 | {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT}, | ||
2123 | {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND}, | ||
2124 | {0xa1, 0x01, 0x0091}, | ||
2125 | {0xa1, 0x01, 0x0095}, | ||
2126 | {0xa1, 0x01, 0x0096}, | ||
2127 | |||
2128 | {0xa1, 0x01, 0x0008}, | ||
2129 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ | ||
2130 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ | ||
2131 | {0xa1, 0x01, 0x01c8}, | ||
2132 | {0xa1, 0x01, 0x01c9}, | ||
2133 | {0xa1, 0x01, 0x01ca}, | ||
2134 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ | ||
2135 | |||
2136 | {0xa0, 0x60, ZC3XX_R10A_RGB00}, /* matrix */ | ||
2137 | {0xa0, 0xf0, ZC3XX_R10B_RGB01}, | ||
2138 | {0xa0, 0xf0, ZC3XX_R10C_RGB02}, | ||
2139 | {0xa0, 0xf0, ZC3XX_R10D_RGB10}, | ||
2140 | {0xa0, 0x60, ZC3XX_R10E_RGB11}, | ||
2141 | {0xa0, 0xf0, ZC3XX_R10F_RGB12}, | ||
2142 | {0xa0, 0xf0, ZC3XX_R110_RGB20}, | ||
2143 | {0xa0, 0xf0, ZC3XX_R111_RGB21}, | ||
2144 | {0xa0, 0x60, ZC3XX_R112_RGB22}, | ||
2145 | {0xa1, 0x01, 0x0180}, | ||
2146 | {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
2147 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | ||
2148 | {0xaa, 0x25, 0x0007}, | ||
2149 | {0xaa, 0x26, 0x0053}, | ||
2150 | {0xaa, 0x27, 0x0000}, | ||
2151 | |||
2152 | {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 2f */ | ||
2153 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 9b */ | ||
2154 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 80 */ | ||
2155 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, | ||
2156 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, | ||
2157 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, | ||
2158 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, | ||
2159 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, | ||
2160 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, | ||
2161 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, | ||
2162 | {0xa0, 0x13, ZC3XX_R1AA_DIGITALGAINSTEP}, | ||
2163 | {0xa1, 0x01, 0x001d}, | ||
2164 | {0xa1, 0x01, 0x001e}, | ||
2165 | {0xa1, 0x01, 0x001f}, | ||
2166 | {0xa1, 0x01, 0x0020}, | ||
2167 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
2168 | {0xa1, 0x01, 0x0180}, | ||
2169 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
2170 | {} | 2124 | {} |
2171 | }; | 2125 | }; |
2172 | |||
2173 | static const struct usb_action hv7131r_Initial[] = { | 2126 | static const struct usb_action hv7131r_Initial[] = { |
2174 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, | 2127 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
2175 | 2128 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, | |
2176 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* diff */ | ||
2177 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, | 2129 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, |
2178 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, | 2130 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
2179 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, | 2131 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
2180 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, | 2132 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
2181 | |||
2182 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, | ||
2183 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, | 2133 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
2184 | 2134 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, | |
2185 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, | 2135 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
2186 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, | 2136 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
2187 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, | 2137 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
2188 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 1e0 */ | 2138 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
2189 | 2139 | ||
2190 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, | 2140 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
2191 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, | 2141 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
2192 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, | 2142 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
2193 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, | 2143 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
2194 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, | 2144 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
2195 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, | 2145 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
2196 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, | 2146 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
2197 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, | 2147 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
2148 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, | ||
2149 | {0xdd, 0x00, 0x0200}, | ||
2198 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, | 2150 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
2199 | {0xaa, 0x01, 0x000c}, | 2151 | {0xaa, 0x01, 0x000c}, |
2200 | {0xaa, 0x11, 0x0000}, | 2152 | {0xaa, 0x11, 0x0000}, |
2201 | {0xaa, 0x13, 0x0000}, | 2153 | {0xaa, 0x13, 0x0000}, |
2202 | {0xaa, 0x14, 0x0001}, | 2154 | {0xaa, 0x14, 0x0001}, |
2203 | {0xaa, 0x15, 0x00e8}, | 2155 | {0xaa, 0x15, 0x00e6}, |
2204 | {0xaa, 0x16, 0x0002}, | 2156 | {0xaa, 0x16, 0x0002}, |
2205 | {0xaa, 0x17, 0x0088}, | 2157 | {0xaa, 0x17, 0x0086}, |
2206 | 2158 | {0xaa, 0x30, 0x000b}, | |
2207 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00 */ | 2159 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
2208 | |||
2209 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, | 2160 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
2210 | {0xa0, 0x89, ZC3XX_R18D_YTARGET}, | 2161 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
2211 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, | 2162 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
2212 | {0xa0, 0x00, 0x01ad}, | 2163 | {0xa0, 0x00, 0x01ad}, |
2213 | {0xa0, 0xc0, 0x019b}, | 2164 | {0xa0, 0xc0, 0x019b}, |
@@ -2217,58 +2168,114 @@ static const struct usb_action hv7131r_Initial[] = { | |||
2217 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, | 2168 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
2218 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, | 2169 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
2219 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, | 2170 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
2220 | {0xa1, 0x01, 0x0002}, | 2171 | {} |
2221 | {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT}, | 2172 | }; |
2222 | /* read the i2c chips ident */ | 2173 | static const struct usb_action hv7131r_50HZ[] = { |
2223 | {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND}, | ||
2224 | {0xa1, 0x01, 0x0091}, | ||
2225 | {0xa1, 0x01, 0x0095}, | ||
2226 | {0xa1, 0x01, 0x0096}, | ||
2227 | |||
2228 | {0xa1, 0x01, 0x0008}, | ||
2229 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ | ||
2230 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ | ||
2231 | {0xa1, 0x01, 0x01c8}, | ||
2232 | {0xa1, 0x01, 0x01c9}, | ||
2233 | {0xa1, 0x01, 0x01ca}, | ||
2234 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ | ||
2235 | |||
2236 | {0xa0, 0x60, ZC3XX_R10A_RGB00}, /* matrix */ | ||
2237 | {0xa0, 0xf0, ZC3XX_R10B_RGB01}, | ||
2238 | {0xa0, 0xf0, ZC3XX_R10C_RGB02}, | ||
2239 | {0xa0, 0xf0, ZC3XX_R10D_RGB10}, | ||
2240 | {0xa0, 0x60, ZC3XX_R10E_RGB11}, | ||
2241 | {0xa0, 0xf0, ZC3XX_R10F_RGB12}, | ||
2242 | {0xa0, 0xf0, ZC3XX_R110_RGB20}, | ||
2243 | {0xa0, 0xf0, ZC3XX_R111_RGB21}, | ||
2244 | {0xa0, 0x60, ZC3XX_R112_RGB22}, | ||
2245 | {0xa1, 0x01, 0x0180}, | ||
2246 | {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE}, | ||
2247 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | 2174 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
2248 | {0xaa, 0x25, 0x0007}, | 2175 | {0xa0, 0x06, ZC3XX_R190_EXPOSURELIMITHIGH}, |
2249 | {0xaa, 0x26, 0x0053}, | 2176 | {0xa0, 0x68, ZC3XX_R191_EXPOSURELIMITMID}, |
2250 | {0xaa, 0x27, 0x0000}, | 2177 | {0xa0, 0xa0, ZC3XX_R192_EXPOSURELIMITLOW}, |
2251 | 2178 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, | |
2252 | {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 2f */ | 2179 | {0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID}, |
2253 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 9b */ | 2180 | {0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW}, |
2254 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 80 */ | 2181 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, |
2255 | 2182 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, | |
2183 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, | ||
2184 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, | ||
2185 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, | ||
2186 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, | ||
2187 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, | ||
2188 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, | ||
2189 | {} | ||
2190 | }; | ||
2191 | static const struct usb_action hv7131r_50HZScale[] = { | ||
2192 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | ||
2193 | {0xa0, 0x0c, ZC3XX_R190_EXPOSURELIMITHIGH}, | ||
2194 | {0xa0, 0xd1, ZC3XX_R191_EXPOSURELIMITMID}, | ||
2195 | {0xa0, 0x40, ZC3XX_R192_EXPOSURELIMITLOW}, | ||
2256 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, | 2196 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, |
2257 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, | 2197 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, |
2258 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, | 2198 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, |
2259 | 2199 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, | |
2260 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, | ||
2261 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, | 2200 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
2262 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, | ||
2263 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, | 2201 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
2264 | {0xa0, 0x13, ZC3XX_R1AA_DIGITALGAINSTEP}, | 2202 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
2265 | {0xa1, 0x01, 0x001d}, | 2203 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
2266 | {0xa1, 0x01, 0x001e}, | 2204 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
2267 | {0xa1, 0x01, 0x001f}, | 2205 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
2268 | {0xa1, 0x01, 0x0020}, | 2206 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
2269 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, | 2207 | {} |
2270 | {0xa1, 0x01, 0x0180}, | 2208 | }; |
2271 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, | 2209 | static const struct usb_action hv7131r_60HZ[] = { |
2210 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | ||
2211 | {0xa0, 0x06, ZC3XX_R190_EXPOSURELIMITHIGH}, | ||
2212 | {0xa0, 0x1a, ZC3XX_R191_EXPOSURELIMITMID}, | ||
2213 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, | ||
2214 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, | ||
2215 | {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID}, | ||
2216 | {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW}, | ||
2217 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, | ||
2218 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, | ||
2219 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, | ||
2220 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, | ||
2221 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, | ||
2222 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, | ||
2223 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, | ||
2224 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, | ||
2225 | {} | ||
2226 | }; | ||
2227 | static const struct usb_action hv7131r_60HZScale[] = { | ||
2228 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | ||
2229 | {0xa0, 0x0c, ZC3XX_R190_EXPOSURELIMITHIGH}, | ||
2230 | {0xa0, 0x35, ZC3XX_R191_EXPOSURELIMITMID}, | ||
2231 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, | ||
2232 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, | ||
2233 | {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID}, | ||
2234 | {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW}, | ||
2235 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, | ||
2236 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, | ||
2237 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, | ||
2238 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, | ||
2239 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, | ||
2240 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, | ||
2241 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, | ||
2242 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, | ||
2243 | {} | ||
2244 | }; | ||
2245 | static const struct usb_action hv7131r_NoFliker[] = { | ||
2246 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | ||
2247 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, | ||
2248 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, | ||
2249 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, | ||
2250 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, | ||
2251 | {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID}, | ||
2252 | {0xa0, 0x58, ZC3XX_R197_ANTIFLICKERLOW}, | ||
2253 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, | ||
2254 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, | ||
2255 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, | ||
2256 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, | ||
2257 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, | ||
2258 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, | ||
2259 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, | ||
2260 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, | ||
2261 | {} | ||
2262 | }; | ||
2263 | static const struct usb_action hv7131r_NoFlikerScale[] = { | ||
2264 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, | ||
2265 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, | ||
2266 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, | ||
2267 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, | ||
2268 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, | ||
2269 | {0xa0, 0x04, ZC3XX_R196_ANTIFLICKERMID}, | ||
2270 | {0xa0, 0xb0, ZC3XX_R197_ANTIFLICKERLOW}, | ||
2271 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, | ||
2272 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, | ||
2273 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, | ||
2274 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, | ||
2275 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, | ||
2276 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, | ||
2277 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, | ||
2278 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, | ||
2272 | {} | 2279 | {} |
2273 | }; | 2280 | }; |
2274 | 2281 | ||
@@ -6167,9 +6174,9 @@ static void setlightfreq(struct gspca_dev *gspca_dev) | |||
6167 | hv7131b_50HZ, hv7131b_50HZScale, | 6174 | hv7131b_50HZ, hv7131b_50HZScale, |
6168 | hv7131b_60HZ, hv7131b_60HZScale}, | 6175 | hv7131b_60HZ, hv7131b_60HZScale}, |
6169 | [SENSOR_HV7131R] = | 6176 | [SENSOR_HV7131R] = |
6170 | {NULL, NULL, | 6177 | {hv7131r_NoFliker, hv7131r_NoFlikerScale, |
6171 | NULL, NULL, | 6178 | hv7131r_50HZ, hv7131r_50HZScale, |
6172 | NULL, NULL}, | 6179 | hv7131r_60HZ, hv7131r_60HZScale}, |
6173 | [SENSOR_ICM105A] = | 6180 | [SENSOR_ICM105A] = |
6174 | {icm105a_NoFliker, icm105a_NoFlikerScale, | 6181 | {icm105a_NoFliker, icm105a_NoFlikerScale, |
6175 | icm105a_50HZ, icm105a_50HZScale, | 6182 | icm105a_50HZ, icm105a_50HZScale, |
@@ -6791,8 +6798,6 @@ static int sd_init(struct gspca_dev *gspca_dev) | |||
6791 | sd->gamma = gamma[sd->sensor]; | 6798 | sd->gamma = gamma[sd->sensor]; |
6792 | 6799 | ||
6793 | switch (sd->sensor) { | 6800 | switch (sd->sensor) { |
6794 | case SENSOR_HV7131B: | ||
6795 | case SENSOR_HV7131R: | ||
6796 | case SENSOR_OV7630C: | 6801 | case SENSOR_OV7630C: |
6797 | gspca_dev->ctrl_dis = (1 << LIGHTFREQ_IDX); | 6802 | gspca_dev->ctrl_dis = (1 << LIGHTFREQ_IDX); |
6798 | break; | 6803 | break; |