2 * Z-Star/Vimicro zc301/zc302p/vc30x library
4 * Copyright (C) 2009-2010 Jean-Francois Moine <http://moinejf.free.fr>
5 * Copyright (C) 2004 2005 2006 Michel Xhaard mxhaard@magic.fr
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 #define MODULE_NAME "zc3xx"
24 #include <linux/input.h>
28 MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, "
29 "Serge A. Suchkov <Serge.A.S@tochka.ru>");
30 MODULE_DESCRIPTION("GSPCA ZC03xx/VC3xx USB Camera Driver");
31 MODULE_LICENSE("GPL");
33 static int force_sensor
= -1;
35 #define QUANT_VAL 1 /* quantization table */
36 #include "zc3xx-reg.h"
38 /* specific webcam descriptor */
40 struct gspca_dev gspca_dev
; /* !! must be the first item */
48 u8 quality
; /* image quality */
49 #define QUALITY_MIN 40
50 #define QUALITY_MAX 60
51 #define QUALITY_DEF 50
53 u8 sensor
; /* Type of image sensor chip */
54 /* !! values used in different tables */
55 #define SENSOR_ADCM2700 0
56 #define SENSOR_CS2102 1
57 #define SENSOR_CS2102K 2
58 #define SENSOR_GC0305 3
59 #define SENSOR_HDCS2020b 4
60 #define SENSOR_HV7131B 5
61 #define SENSOR_HV7131C 6
62 #define SENSOR_ICM105A 7
63 #define SENSOR_MC501CB 8
64 #define SENSOR_MI0360SOC 9
65 #define SENSOR_OV7620 10
66 /*#define SENSOR_OV7648 10 - same values */
67 #define SENSOR_OV7630C 11
68 #define SENSOR_PAS106 12
69 #define SENSOR_PAS202B 13
70 #define SENSOR_PB0330 14 /* (MI0360) */
71 #define SENSOR_PO2030 15
72 #define SENSOR_TAS5130CK 16
73 #define SENSOR_TAS5130CXX 17
74 #define SENSOR_TAS5130C_VF0250 18
76 unsigned short chip_revision
;
81 /* V4L2 controls supported by the driver */
82 static int sd_setbrightness(struct gspca_dev
*gspca_dev
, __s32 val
);
83 static int sd_getbrightness(struct gspca_dev
*gspca_dev
, __s32
*val
);
84 static int sd_setcontrast(struct gspca_dev
*gspca_dev
, __s32 val
);
85 static int sd_getcontrast(struct gspca_dev
*gspca_dev
, __s32
*val
);
86 static int sd_setautogain(struct gspca_dev
*gspca_dev
, __s32 val
);
87 static int sd_getautogain(struct gspca_dev
*gspca_dev
, __s32
*val
);
88 static int sd_setgamma(struct gspca_dev
*gspca_dev
, __s32 val
);
89 static int sd_getgamma(struct gspca_dev
*gspca_dev
, __s32
*val
);
90 static int sd_setfreq(struct gspca_dev
*gspca_dev
, __s32 val
);
91 static int sd_getfreq(struct gspca_dev
*gspca_dev
, __s32
*val
);
92 static int sd_setsharpness(struct gspca_dev
*gspca_dev
, __s32 val
);
93 static int sd_getsharpness(struct gspca_dev
*gspca_dev
, __s32
*val
);
95 static const struct ctrl sd_ctrls
[] = {
96 #define BRIGHTNESS_IDX 0
99 .id
= V4L2_CID_BRIGHTNESS
,
100 .type
= V4L2_CTRL_TYPE_INTEGER
,
101 .name
= "Brightness",
105 #define BRIGHTNESS_DEF 128
106 .default_value
= BRIGHTNESS_DEF
,
108 .set
= sd_setbrightness
,
109 .get
= sd_getbrightness
,
113 .id
= V4L2_CID_CONTRAST
,
114 .type
= V4L2_CTRL_TYPE_INTEGER
,
119 #define CONTRAST_DEF 128
120 .default_value
= CONTRAST_DEF
,
122 .set
= sd_setcontrast
,
123 .get
= sd_getcontrast
,
127 .id
= V4L2_CID_GAMMA
,
128 .type
= V4L2_CTRL_TYPE_INTEGER
,
140 .id
= V4L2_CID_AUTOGAIN
,
141 .type
= V4L2_CTRL_TYPE_BOOLEAN
,
146 #define AUTOGAIN_DEF 1
147 .default_value
= AUTOGAIN_DEF
,
149 .set
= sd_setautogain
,
150 .get
= sd_getautogain
,
152 #define LIGHTFREQ_IDX 4
155 .id
= V4L2_CID_POWER_LINE_FREQUENCY
,
156 .type
= V4L2_CTRL_TYPE_MENU
,
157 .name
= "Light frequency filter",
159 .maximum
= 2, /* 0: 0, 1: 50Hz, 2:60Hz */
162 .default_value
= FREQ_DEF
,
169 .id
= V4L2_CID_SHARPNESS
,
170 .type
= V4L2_CTRL_TYPE_INTEGER
,
175 #define SHARPNESS_DEF 2
176 .default_value
= SHARPNESS_DEF
,
178 .set
= sd_setsharpness
,
179 .get
= sd_getsharpness
,
183 static const struct v4l2_pix_format vga_mode
[] = {
184 {320, 240, V4L2_PIX_FMT_JPEG
, V4L2_FIELD_NONE
,
186 .sizeimage
= 320 * 240 * 3 / 8 + 590,
187 .colorspace
= V4L2_COLORSPACE_JPEG
,
189 {640, 480, V4L2_PIX_FMT_JPEG
, V4L2_FIELD_NONE
,
191 .sizeimage
= 640 * 480 * 3 / 8 + 590,
192 .colorspace
= V4L2_COLORSPACE_JPEG
,
196 static const struct v4l2_pix_format broken_vga_mode
[] = {
197 {320, 232, V4L2_PIX_FMT_JPEG
, V4L2_FIELD_NONE
,
199 .sizeimage
= 320 * 232 * 4 / 8 + 590,
200 .colorspace
= V4L2_COLORSPACE_JPEG
,
202 {640, 472, V4L2_PIX_FMT_JPEG
, V4L2_FIELD_NONE
,
204 .sizeimage
= 640 * 472 * 3 / 8 + 590,
205 .colorspace
= V4L2_COLORSPACE_JPEG
,
209 static const struct v4l2_pix_format sif_mode
[] = {
210 {176, 144, V4L2_PIX_FMT_JPEG
, V4L2_FIELD_NONE
,
212 .sizeimage
= 176 * 144 * 3 / 8 + 590,
213 .colorspace
= V4L2_COLORSPACE_JPEG
,
215 {352, 288, V4L2_PIX_FMT_JPEG
, V4L2_FIELD_NONE
,
217 .sizeimage
= 352 * 288 * 3 / 8 + 590,
218 .colorspace
= V4L2_COLORSPACE_JPEG
,
229 static const struct usb_action adcm2700_Initial
[] = {
230 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
231 {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,04,cc */
232 {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,03,cc */
233 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
234 {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,d3,cc */
235 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
236 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
237 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
238 {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,d8,cc */
239 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
240 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc */
241 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
242 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
243 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
244 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc */
245 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
246 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc */
247 {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,de,cc */
248 {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,86,cc */
249 {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */
250 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
251 {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */
252 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,37,cc */
253 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
254 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
}, /* 01,89,06,cc */
255 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
256 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
257 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
258 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
259 {0xa0, 0x58, ZC3XX_R116_RGAIN
}, /* 01,16,58,cc */
260 {0xa0, 0x5a, ZC3XX_R118_BGAIN
}, /* 01,18,5a,cc */
261 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,02,cc */
262 {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,d3,cc */
263 {0xbb, 0x00, 0x0408}, /* 04,00,08,bb */
264 {0xdd, 0x00, 0x0200}, /* 00,02,00,dd */
265 {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */
266 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
267 {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */
268 {0xbb, 0xe0, 0x0c2e}, /* 0c,e0,2e,bb */
269 {0xbb, 0x01, 0x2000}, /* 20,01,00,bb */
270 {0xbb, 0x96, 0x2400}, /* 24,96,00,bb */
271 {0xbb, 0x06, 0x1006}, /* 10,06,06,bb */
272 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
273 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
274 {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */
275 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
276 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
277 {0xbb, 0x5f, 0x2090}, /* 20,5f,90,bb */
278 {0xbb, 0x01, 0x8000}, /* 80,01,00,bb */
279 {0xbb, 0x09, 0x8400}, /* 84,09,00,bb */
280 {0xbb, 0x86, 0x0002}, /* 00,86,02,bb */
281 {0xbb, 0xe6, 0x0401}, /* 04,e6,01,bb */
282 {0xbb, 0x86, 0x0802}, /* 08,86,02,bb */
283 {0xbb, 0xe6, 0x0c01}, /* 0c,e6,01,bb */
284 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
285 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
286 {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */
287 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
288 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
289 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
290 {0xaa, 0xfe, 0x0020}, /* 00,fe,20,aa */
292 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
},
293 {0xaa, 0xfe, 0x0002},
294 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
},
295 {0xaa, 0xb4, 0xcd37},
296 {0xaa, 0xa4, 0x0004},
297 {0xaa, 0xa8, 0x0007},
298 {0xaa, 0xac, 0x0004},
300 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
301 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
302 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
303 {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */
304 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
305 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
306 {0xbb, 0x04, 0x0400}, /* 04,04,00,bb */
307 {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */
308 {0xbb, 0x01, 0x0400}, /* 04,01,00,bb */
309 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
310 {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */
311 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
312 {0xbb, 0x41, 0x2803}, /* 28,41,03,bb */
313 {0xbb, 0x40, 0x2c03}, /* 2c,40,03,bb */
314 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
315 {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */
318 static const struct usb_action adcm2700_InitialScale
[] = {
319 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
320 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,10,cc */
321 {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,03,cc */
322 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
323 {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,d3,cc */
324 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
325 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
326 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
327 {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,d0,cc */
328 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
329 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc */
330 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
331 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
332 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
333 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc */
334 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
335 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc */
336 {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,d8,cc */
337 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,88,cc */
338 {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */
339 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
340 {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */
341 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,37,cc */
342 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
343 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
}, /* 01,89,06,cc */
344 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
345 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
346 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
347 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
348 {0xa0, 0x58, ZC3XX_R116_RGAIN
}, /* 01,16,58,cc */
349 {0xa0, 0x5a, ZC3XX_R118_BGAIN
}, /* 01,18,5a,cc */
350 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,02,cc */
351 {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,d3,cc */
352 {0xbb, 0x00, 0x0408}, /* 04,00,08,bb */
353 {0xdd, 0x00, 0x0200}, /* 00,02,00,dd */
354 {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */
355 {0xdd, 0x00, 0x0050}, /* 00,00,50,dd */
356 {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */
357 {0xbb, 0xe0, 0x0c2e}, /* 0c,e0,2e,bb */
358 {0xbb, 0x01, 0x2000}, /* 20,01,00,bb */
359 {0xbb, 0x96, 0x2400}, /* 24,96,00,bb */
360 {0xbb, 0x06, 0x1006}, /* 10,06,06,bb */
361 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
362 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
363 {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */
364 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
365 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
366 {0xbb, 0x5f, 0x2090}, /* 20,5f,90,bb */
367 {0xbb, 0x01, 0x8000}, /* 80,01,00,bb */
368 {0xbb, 0x09, 0x8400}, /* 84,09,00,bb */
369 {0xbb, 0x86, 0x0002}, /* 00,88,02,bb */
370 {0xbb, 0xe6, 0x0401}, /* 04,e6,01,bb */
371 {0xbb, 0x86, 0x0802}, /* 08,88,02,bb */
372 {0xbb, 0xe6, 0x0c01}, /* 0c,e6,01,bb */
373 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
374 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
375 {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */
376 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
377 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
378 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
379 {0xaa, 0xfe, 0x0020}, /* 00,fe,20,aa */
381 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
382 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
383 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
384 {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */
385 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
386 {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */
387 {0xbb, 0x04, 0x0400}, /* 04,04,00,bb */
388 {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */
389 {0xbb, 0x01, 0x0400}, /* 04,01,00,bb */
390 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
391 {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */
392 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
393 {0xbb, 0x41, 0x2803}, /* 28,41,03,bb */
394 {0xbb, 0x40, 0x2c03}, /* 2c,40,03,bb */
395 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
396 {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */
399 static const struct usb_action adcm2700_50HZ
[] = {
400 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
401 {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */
402 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
403 {0xbb, 0x05, 0x8400}, /* 84,05,00,bb */
404 {0xbb, 0xd0, 0xb007}, /* b0,d0,07,bb */
405 {0xbb, 0xa0, 0xb80f}, /* b8,a0,0f,bb */
406 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
407 {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */
408 {0xaa, 0x26, 0x00d0}, /* 00,26,d0,aa */
409 {0xaa, 0x28, 0x0002}, /* 00,28,02,aa */
412 static const struct usb_action adcm2700_60HZ
[] = {
413 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
414 {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */
415 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
416 {0xbb, 0x07, 0x8400}, /* 84,07,00,bb */
417 {0xbb, 0x82, 0xb006}, /* b0,82,06,bb */
418 {0xbb, 0x04, 0xb80d}, /* b8,04,0d,bb */
419 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
420 {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */
421 {0xaa, 0x26, 0x0057}, /* 00,26,57,aa */
422 {0xaa, 0x28, 0x0002}, /* 00,28,02,aa */
425 static const struct usb_action adcm2700_NoFliker
[] = {
426 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
427 {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */
428 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0a,cc */
429 {0xbb, 0x07, 0x8400}, /* 84,07,00,bb */
430 {0xbb, 0x05, 0xb000}, /* b0,05,00,bb */
431 {0xbb, 0xa0, 0xb801}, /* b8,a0,01,bb */
432 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
433 {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */
436 static const struct usb_action cs2102_InitialScale
[] = { /* 320x240 */
437 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
438 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
},
439 {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT
},
440 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
441 {0xa0, 0x20, ZC3XX_R080_HBLANKHIGH
},
442 {0xa0, 0x21, ZC3XX_R081_HBLANKLOW
},
443 {0xa0, 0x30, ZC3XX_R083_RGAINADDR
},
444 {0xa0, 0x31, ZC3XX_R084_GGAINADDR
},
445 {0xa0, 0x32, ZC3XX_R085_BGAINADDR
},
446 {0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH
},
447 {0xa0, 0x24, ZC3XX_R087_EXPTIMEMID
},
448 {0xa0, 0x25, ZC3XX_R088_EXPTIMELOW
},
449 {0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR
},
450 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00 */
451 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
452 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
453 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
454 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
455 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
456 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
457 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
458 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
459 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
460 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
461 {0xaa, 0x02, 0x0008},
462 {0xaa, 0x03, 0x0000},
463 {0xaa, 0x11, 0x0000},
464 {0xaa, 0x12, 0x0089},
465 {0xaa, 0x13, 0x0000},
466 {0xaa, 0x14, 0x00e9},
467 {0xaa, 0x20, 0x0000},
468 {0xaa, 0x22, 0x0000},
469 {0xaa, 0x0b, 0x0004},
470 {0xaa, 0x30, 0x0030},
471 {0xaa, 0x31, 0x0030},
472 {0xaa, 0x32, 0x0030},
473 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
},
474 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
475 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
476 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
477 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
478 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
479 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
480 {0xa0, 0x10, 0x01ae},
481 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
482 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
483 {0xa0, 0x68, ZC3XX_R18D_YTARGET
},
484 {0xa0, 0x00, 0x01ad},
488 static const struct usb_action cs2102_Initial
[] = { /* 640x480 */
489 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
490 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
},
491 {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT
},
492 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
493 {0xa0, 0x20, ZC3XX_R080_HBLANKHIGH
},
494 {0xa0, 0x21, ZC3XX_R081_HBLANKLOW
},
495 {0xa0, 0x30, ZC3XX_R083_RGAINADDR
},
496 {0xa0, 0x31, ZC3XX_R084_GGAINADDR
},
497 {0xa0, 0x32, ZC3XX_R085_BGAINADDR
},
498 {0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH
},
499 {0xa0, 0x24, ZC3XX_R087_EXPTIMEMID
},
500 {0xa0, 0x25, ZC3XX_R088_EXPTIMELOW
},
501 {0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR
},
502 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00 */
503 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
504 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
505 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
506 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
507 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
508 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
509 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
510 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
511 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
512 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
513 {0xaa, 0x02, 0x0008},
514 {0xaa, 0x03, 0x0000},
515 {0xaa, 0x11, 0x0001},
516 {0xaa, 0x12, 0x0087},
517 {0xaa, 0x13, 0x0001},
518 {0xaa, 0x14, 0x00e7},
519 {0xaa, 0x20, 0x0000},
520 {0xaa, 0x22, 0x0000},
521 {0xaa, 0x0b, 0x0004},
522 {0xaa, 0x30, 0x0030},
523 {0xaa, 0x31, 0x0030},
524 {0xaa, 0x32, 0x0030},
525 {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION
},
526 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
527 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
528 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
529 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
530 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
531 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
532 {0xa0, 0x15, 0x01ae},
533 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
534 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
535 {0xa0, 0x68, ZC3XX_R18D_YTARGET
},
536 {0xa0, 0x00, 0x01ad},
539 static const struct usb_action cs2102_50HZScale
[] = {
540 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
541 {0xaa, 0x23, 0x0001},
542 {0xaa, 0x24, 0x005f},
543 {0xaa, 0x25, 0x0090},
544 {0xaa, 0x21, 0x00dd},
545 {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH
},
546 {0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID
},
547 {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW
},
548 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
549 {0xa0, 0x3a, ZC3XX_R196_ANTIFLICKERMID
},
550 {0xa0, 0x98, ZC3XX_R197_ANTIFLICKERLOW
},
551 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
552 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
553 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
},
554 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
555 {0xa0, 0xdd, ZC3XX_R01D_HSYNC_0
},
556 {0xa0, 0xe4, ZC3XX_R01E_HSYNC_1
},
557 {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2
},
558 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
561 static const struct usb_action cs2102_50HZ
[] = {
562 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
563 {0xaa, 0x23, 0x0000},
564 {0xaa, 0x24, 0x00af},
565 {0xaa, 0x25, 0x00c8},
566 {0xaa, 0x21, 0x0068},
567 {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH
},
568 {0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID
},
569 {0xa0, 0x90, ZC3XX_R192_EXPOSURELIMITLOW
},
570 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
571 {0xa0, 0x1d, ZC3XX_R196_ANTIFLICKERMID
},
572 {0xa0, 0x4c, ZC3XX_R197_ANTIFLICKERLOW
},
573 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
574 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
575 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
},
576 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
577 {0xa0, 0x68, ZC3XX_R01D_HSYNC_0
},
578 {0xa0, 0xe3, ZC3XX_R01E_HSYNC_1
},
579 {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2
},
580 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
583 static const struct usb_action cs2102_60HZScale
[] = {
584 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
585 {0xaa, 0x23, 0x0001},
586 {0xaa, 0x24, 0x0055},
587 {0xaa, 0x25, 0x00cc},
588 {0xaa, 0x21, 0x003f},
589 {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH
},
590 {0xa0, 0xab, ZC3XX_R191_EXPOSURELIMITMID
},
591 {0xa0, 0x98, ZC3XX_R192_EXPOSURELIMITLOW
},
592 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
593 {0xa0, 0x30, ZC3XX_R196_ANTIFLICKERMID
},
594 {0xa0, 0xd4, ZC3XX_R197_ANTIFLICKERLOW
},
595 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
596 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
597 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
},
598 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
599 {0xa0, 0x39, ZC3XX_R01D_HSYNC_0
},
600 {0xa0, 0x70, ZC3XX_R01E_HSYNC_1
},
601 {0xa0, 0xb0, ZC3XX_R01F_HSYNC_2
},
602 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
605 static const struct usb_action cs2102_60HZ
[] = {
606 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
607 {0xaa, 0x23, 0x0000},
608 {0xaa, 0x24, 0x00aa},
609 {0xaa, 0x25, 0x00e6},
610 {0xaa, 0x21, 0x003f},
611 {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH
},
612 {0xa0, 0x55, ZC3XX_R191_EXPOSURELIMITMID
},
613 {0xa0, 0xcc, ZC3XX_R192_EXPOSURELIMITLOW
},
614 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
615 {0xa0, 0x18, ZC3XX_R196_ANTIFLICKERMID
},
616 {0xa0, 0x6a, ZC3XX_R197_ANTIFLICKERLOW
},
617 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
618 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
619 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
},
620 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
621 {0xa0, 0x3f, ZC3XX_R01D_HSYNC_0
},
622 {0xa0, 0xa5, ZC3XX_R01E_HSYNC_1
},
623 {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2
},
624 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
627 static const struct usb_action cs2102_NoFlikerScale
[] = {
628 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
629 {0xaa, 0x23, 0x0001},
630 {0xaa, 0x24, 0x005f},
631 {0xaa, 0x25, 0x0000},
632 {0xaa, 0x21, 0x0001},
633 {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH
},
634 {0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID
},
635 {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW
},
636 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
637 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
638 {0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW
},
639 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
640 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
641 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
},
642 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
},
643 {0xa0, 0x01, ZC3XX_R01D_HSYNC_0
},
644 {0xa0, 0x40, ZC3XX_R01E_HSYNC_1
},
645 {0xa0, 0xa0, ZC3XX_R01F_HSYNC_2
},
646 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
649 static const struct usb_action cs2102_NoFliker
[] = {
650 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
651 {0xaa, 0x23, 0x0000},
652 {0xaa, 0x24, 0x00af},
653 {0xaa, 0x25, 0x0080},
654 {0xaa, 0x21, 0x0001},
655 {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH
},
656 {0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID
},
657 {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW
},
658 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
659 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
660 {0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW
},
661 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
662 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
663 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
},
664 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
},
665 {0xa0, 0x01, ZC3XX_R01D_HSYNC_0
},
666 {0xa0, 0x40, ZC3XX_R01E_HSYNC_1
},
667 {0xa0, 0xa0, ZC3XX_R01F_HSYNC_2
},
668 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
673 static const struct usb_action cs2102K_InitialScale
[] = {
674 {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT
},
675 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
676 {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT
},
677 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
678 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
679 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
680 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
681 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
682 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
683 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
684 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
685 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
686 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
687 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
688 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
},
689 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
},
690 {0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR
},
691 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
692 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
693 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
694 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
695 {0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT
},
696 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
697 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
698 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
699 {0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT
},
700 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
701 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
702 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
703 {0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT
},
704 {0xa0, 0x7c, ZC3XX_R093_I2CSETVALUE
},
705 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
706 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
707 {0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT
},
708 {0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE
},
709 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
710 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
711 {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT
},
712 {0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE
},
713 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
714 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
715 {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT
},
716 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
717 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
718 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
719 {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT
},
720 {0xa0, 0x03, ZC3XX_R093_I2CSETVALUE
},
721 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
722 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
723 {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT
},
724 {0xa0, 0x08, ZC3XX_R093_I2CSETVALUE
},
725 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
726 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
727 {0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT
},
728 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
729 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
730 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
731 {0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT
},
732 {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE
},
733 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
734 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
735 {0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT
},
736 {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE
},
737 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
738 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
739 {0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT
},
740 {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE
},
741 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
742 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
743 {0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT
},
744 {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE
},
745 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
746 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
747 {0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT
},
748 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
749 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
750 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
751 {0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT
},
752 {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE
},
753 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
754 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
755 {0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT
},
756 {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE
},
757 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
758 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
759 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
760 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
761 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
762 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
763 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
},
764 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
765 {0xa0, 0x78, ZC3XX_R18D_YTARGET
},
766 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
767 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
768 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
769 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
770 {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID
},
771 {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW
},
772 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
773 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
774 {0xa0, 0x00, 0x01ad},
775 {0xa0, 0x01, 0x01b1},
776 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
},
777 {0xa0, 0x60, ZC3XX_R116_RGAIN
},
778 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
779 {0xa0, 0x4c, ZC3XX_R118_BGAIN
},
780 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* clock ? */
781 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
782 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
783 {0xa0, 0x13, ZC3XX_R120_GAMMA00
}, /* gamma 4 */
784 {0xa0, 0x38, ZC3XX_R121_GAMMA01
},
785 {0xa0, 0x59, ZC3XX_R122_GAMMA02
},
786 {0xa0, 0x79, ZC3XX_R123_GAMMA03
},
787 {0xa0, 0x92, ZC3XX_R124_GAMMA04
},
788 {0xa0, 0xa7, ZC3XX_R125_GAMMA05
},
789 {0xa0, 0xb9, ZC3XX_R126_GAMMA06
},
790 {0xa0, 0xc8, ZC3XX_R127_GAMMA07
},
791 {0xa0, 0xd4, ZC3XX_R128_GAMMA08
},
792 {0xa0, 0xdf, ZC3XX_R129_GAMMA09
},
793 {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A
},
794 {0xa0, 0xee, ZC3XX_R12B_GAMMA0B
},
795 {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C
},
796 {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D
},
797 {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E
},
798 {0xa0, 0xff, ZC3XX_R12F_GAMMA0F
},
799 {0xa0, 0x26, ZC3XX_R130_GAMMA10
},
800 {0xa0, 0x22, ZC3XX_R131_GAMMA11
},
801 {0xa0, 0x20, ZC3XX_R132_GAMMA12
},
802 {0xa0, 0x1c, ZC3XX_R133_GAMMA13
},
803 {0xa0, 0x16, ZC3XX_R134_GAMMA14
},
804 {0xa0, 0x13, ZC3XX_R135_GAMMA15
},
805 {0xa0, 0x10, ZC3XX_R136_GAMMA16
},
806 {0xa0, 0x0d, ZC3XX_R137_GAMMA17
},
807 {0xa0, 0x0b, ZC3XX_R138_GAMMA18
},
808 {0xa0, 0x09, ZC3XX_R139_GAMMA19
},
809 {0xa0, 0x07, ZC3XX_R13A_GAMMA1A
},
810 {0xa0, 0x06, ZC3XX_R13B_GAMMA1B
},
811 {0xa0, 0x05, ZC3XX_R13C_GAMMA1C
},
812 {0xa0, 0x04, ZC3XX_R13D_GAMMA1D
},
813 {0xa0, 0x03, ZC3XX_R13E_GAMMA1E
},
814 {0xa0, 0x02, ZC3XX_R13F_GAMMA1F
},
815 {0xa0, 0x58, ZC3XX_R10A_RGB00
}, /* matrix */
816 {0xa0, 0xf4, ZC3XX_R10B_RGB01
},
817 {0xa0, 0xf4, ZC3XX_R10C_RGB02
},
818 {0xa0, 0xf4, ZC3XX_R10D_RGB10
},
819 {0xa0, 0x58, ZC3XX_R10E_RGB11
},
820 {0xa0, 0xf4, ZC3XX_R10F_RGB12
},
821 {0xa0, 0xf4, ZC3XX_R110_RGB20
},
822 {0xa0, 0xf4, ZC3XX_R111_RGB21
},
823 {0xa0, 0x58, ZC3XX_R112_RGB22
},
824 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
825 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
826 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
827 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
828 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
829 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
830 {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT
},
831 {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE
},
832 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
833 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
834 {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT
},
835 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
836 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
837 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
838 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
839 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
840 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
841 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
842 {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT
},
843 {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE
},
844 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
845 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
846 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
847 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
848 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
849 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
850 {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH
},
851 {0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW
},
852 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
853 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
854 {0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW
},
855 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
856 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
857 {0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW
},
858 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
859 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
860 {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF
},
861 {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP
},
862 {0xa0, 0x04, ZC3XX_R01D_HSYNC_0
},
863 {0xa0, 0x0f, ZC3XX_R01E_HSYNC_1
},
864 {0xa0, 0x19, ZC3XX_R01F_HSYNC_2
},
865 {0xa0, 0x1f, ZC3XX_R020_HSYNC_3
},
866 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
867 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
868 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
869 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
870 {0xa0, 0x60, ZC3XX_R116_RGAIN
},
871 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
872 {0xa0, 0x4c, ZC3XX_R118_BGAIN
},
873 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
874 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
875 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
876 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
877 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
878 {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT
},
879 {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE
},
880 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
881 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
882 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
883 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
884 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
885 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
886 {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT
},
887 {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE
},
888 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
889 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
890 {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT
},
891 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
892 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
893 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
894 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
895 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
896 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
897 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
898 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
899 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
900 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
901 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
902 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
903 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
904 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
905 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
906 {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT
},
907 {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE
},
908 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
909 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
910 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
911 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
912 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
913 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
914 {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT
},
915 {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE
},
916 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
917 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
918 {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT
},
919 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
920 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
921 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
922 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
923 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
924 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
925 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
926 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
927 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
928 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
932 static const struct usb_action cs2102K_Initial
[] = {
933 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
934 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
},
935 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
936 {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT
},
937 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
938 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
939 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
940 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
941 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
942 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
943 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
944 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
945 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
946 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
947 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
948 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
},
949 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
},
950 /*fixme: next sequence = i2c exchanges*/
951 {0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR
},
952 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
953 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
954 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
955 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
956 {0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT
},
957 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
958 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
959 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
960 {0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT
},
961 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
962 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
963 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
964 {0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT
},
965 {0xa0, 0x7b, ZC3XX_R093_I2CSETVALUE
},
966 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
967 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
968 {0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT
},
969 {0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE
},
970 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
971 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
972 {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT
},
973 {0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE
},
974 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
975 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
976 {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT
},
977 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
978 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
979 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
980 {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT
},
981 {0xa0, 0x03, ZC3XX_R093_I2CSETVALUE
},
982 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
983 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
984 {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT
},
985 {0xa0, 0x08, ZC3XX_R093_I2CSETVALUE
},
986 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
987 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
988 {0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT
},
989 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
990 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
991 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
992 {0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT
},
993 {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE
},
994 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
995 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
996 {0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT
},
997 {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE
},
998 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
999 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1000 {0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT
},
1001 {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE
},
1002 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1003 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1004 {0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT
},
1005 {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE
},
1006 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1007 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1008 {0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT
},
1009 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
1010 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1011 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1012 {0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT
},
1013 {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE
},
1014 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1015 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1016 {0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT
},
1017 {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE
},
1018 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1019 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1020 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1021 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
1022 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1023 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1024 {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION
},
1025 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
1026 {0xa0, 0x78, ZC3XX_R18D_YTARGET
},
1027 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
1028 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
1029 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
1030 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
1031 {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID
},
1032 {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW
},
1033 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
1034 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
1035 {0xa0, 0x00, 0x01ad},
1036 {0xa0, 0x01, 0x01b1},
1037 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
},
1038 {0xa0, 0x60, ZC3XX_R116_RGAIN
},
1039 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
1040 {0xa0, 0x4c, ZC3XX_R118_BGAIN
},
1041 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* clock ? */
1042 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
1043 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
1044 {0xa0, 0x13, ZC3XX_R120_GAMMA00
}, /* gamma 4 */
1045 {0xa0, 0x38, ZC3XX_R121_GAMMA01
},
1046 {0xa0, 0x59, ZC3XX_R122_GAMMA02
},
1047 {0xa0, 0x79, ZC3XX_R123_GAMMA03
},
1048 {0xa0, 0x92, ZC3XX_R124_GAMMA04
},
1049 {0xa0, 0xa7, ZC3XX_R125_GAMMA05
},
1050 {0xa0, 0xb9, ZC3XX_R126_GAMMA06
},
1051 {0xa0, 0xc8, ZC3XX_R127_GAMMA07
},
1052 {0xa0, 0xd4, ZC3XX_R128_GAMMA08
},
1053 {0xa0, 0xdf, ZC3XX_R129_GAMMA09
},
1054 {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A
},
1055 {0xa0, 0xee, ZC3XX_R12B_GAMMA0B
},
1056 {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C
},
1057 {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D
},
1058 {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E
},
1059 {0xa0, 0xff, ZC3XX_R12F_GAMMA0F
},
1060 {0xa0, 0x26, ZC3XX_R130_GAMMA10
},
1061 {0xa0, 0x22, ZC3XX_R131_GAMMA11
},
1062 {0xa0, 0x20, ZC3XX_R132_GAMMA12
},
1063 {0xa0, 0x1c, ZC3XX_R133_GAMMA13
},
1064 {0xa0, 0x16, ZC3XX_R134_GAMMA14
},
1065 {0xa0, 0x13, ZC3XX_R135_GAMMA15
},
1066 {0xa0, 0x10, ZC3XX_R136_GAMMA16
},
1067 {0xa0, 0x0d, ZC3XX_R137_GAMMA17
},
1068 {0xa0, 0x0b, ZC3XX_R138_GAMMA18
},
1069 {0xa0, 0x09, ZC3XX_R139_GAMMA19
},
1070 {0xa0, 0x07, ZC3XX_R13A_GAMMA1A
},
1071 {0xa0, 0x06, ZC3XX_R13B_GAMMA1B
},
1072 {0xa0, 0x05, ZC3XX_R13C_GAMMA1C
},
1073 {0xa0, 0x04, ZC3XX_R13D_GAMMA1D
},
1074 {0xa0, 0x03, ZC3XX_R13E_GAMMA1E
},
1075 {0xa0, 0x02, ZC3XX_R13F_GAMMA1F
},
1076 {0xa0, 0x58, ZC3XX_R10A_RGB00
}, /* matrix */
1077 {0xa0, 0xf4, ZC3XX_R10B_RGB01
},
1078 {0xa0, 0xf4, ZC3XX_R10C_RGB02
},
1079 {0xa0, 0xf4, ZC3XX_R10D_RGB10
},
1080 {0xa0, 0x58, ZC3XX_R10E_RGB11
},
1081 {0xa0, 0xf4, ZC3XX_R10F_RGB12
},
1082 {0xa0, 0xf4, ZC3XX_R110_RGB20
},
1083 {0xa0, 0xf4, ZC3XX_R111_RGB21
},
1084 {0xa0, 0x58, ZC3XX_R112_RGB22
},
1085 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
1086 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
1087 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1088 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
1089 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1090 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1091 {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT
},
1092 {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE
},
1093 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1094 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1095 {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT
},
1096 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
1097 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1098 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1099 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
1100 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
1101 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1102 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1103 {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT
},
1104 {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE
},
1105 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1106 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1107 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1108 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
1109 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1110 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1111 {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH
},
1112 {0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW
},
1113 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
1114 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
1115 {0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW
},
1116 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
1117 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
1118 {0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW
},
1119 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
1120 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
1121 {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF
},
1122 {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP
},
1123 {0xa0, 0x04, ZC3XX_R01D_HSYNC_0
},
1124 {0xa0, 0x0f, ZC3XX_R01E_HSYNC_1
},
1125 {0xa0, 0x19, ZC3XX_R01F_HSYNC_2
},
1126 {0xa0, 0x1f, ZC3XX_R020_HSYNC_3
},
1127 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
1128 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
1129 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
1130 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
1131 {0xa0, 0x60, ZC3XX_R116_RGAIN
},
1132 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
1133 {0xa0, 0x4c, ZC3XX_R118_BGAIN
},
1134 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1135 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
1136 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
1137 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1138 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1139 {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT
},
1140 {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE
},
1141 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1142 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1143 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1144 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
1145 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1146 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1147 {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT
},
1148 {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE
},
1149 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1150 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1151 {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT
},
1152 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
1153 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1154 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1155 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1156 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
1157 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1158 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1159 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1160 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1161 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1162 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1163 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
1164 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
1165 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1166 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1167 {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT
},
1168 {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE
},
1169 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1170 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1171 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1172 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
1173 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1174 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1175 {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT
},
1176 {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE
},
1177 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1178 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1179 {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT
},
1180 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
1181 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1182 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1183 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1184 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
1185 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1186 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1187 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1188 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1189 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1190 /*fixme:what does the next sequence?*/
1191 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1192 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1193 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1194 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
1195 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
1196 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1197 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1198 {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT
},
1199 {0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE
},
1200 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1201 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1202 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1203 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
1204 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1205 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1206 {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT
},
1207 {0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE
},
1208 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1209 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1210 {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT
},
1211 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
1212 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1213 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1214 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1215 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
1216 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1217 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1218 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1219 {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING
},
1220 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1221 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1222 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1223 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
1224 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
1225 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1226 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1227 {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT
},
1228 {0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE
},
1229 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1230 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1231 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1232 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
1233 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1234 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1235 {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT
},
1236 {0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE
},
1237 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1238 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1239 {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT
},
1240 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
1241 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1242 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1243 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1244 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
1245 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1246 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1247 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1248 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1249 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1250 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1251 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
1252 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
1253 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1254 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1255 {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT
},
1256 {0xa0, 0x44, ZC3XX_R093_I2CSETVALUE
},
1257 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1258 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1259 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1260 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
1261 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1262 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1263 {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT
},
1264 {0xa0, 0x44, ZC3XX_R093_I2CSETVALUE
},
1265 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1266 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1267 {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT
},
1268 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
1269 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1270 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1271 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1272 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
1273 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1274 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1275 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1276 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1277 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1278 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1279 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
1280 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
1281 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1282 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1283 {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT
},
1284 {0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE
},
1285 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1286 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1287 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1288 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
1289 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1290 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1291 {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT
},
1292 {0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE
},
1293 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1294 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1295 {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT
},
1296 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
1297 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1298 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1299 {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT
},
1300 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
1301 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
1302 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
1303 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1304 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1305 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
1306 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
1310 static const struct usb_action gc0305_Initial
[] = { /* 640x480 */
1311 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
1312 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,03,cc */
1313 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
1314 {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,04,cc */
1315 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
1316 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
1317 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
1318 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,e0,cc */
1319 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
1320 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc */
1321 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
1322 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
1323 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc */
1324 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
1325 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc */
1326 {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,e6,cc */
1327 {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,86,cc */
1328 {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,98,cc */
1329 {0xaa, 0x13, 0x0002}, /* 00,13,02,aa */
1330 {0xaa, 0x15, 0x0003}, /* 00,15,03,aa */
1331 {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */
1332 {0xaa, 0x02, 0x0000}, /* 00,02,00,aa */
1333 {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */
1334 {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa */
1335 {0xaa, 0x1d, 0x0080}, /* 00,1d,80,aa */
1336 {0xaa, 0x1f, 0x0008}, /* 00,1f,08,aa */
1337 {0xaa, 0x21, 0x0012}, /* 00,21,12,aa */
1338 {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH
}, /* 00,86,82,cc */
1339 {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,83,cc */
1340 {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,84,cc */
1341 {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */
1342 {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa */
1343 {0xaa, 0x0b, 0x00b0}, /* 00,0b,b0,aa */
1344 {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa */
1345 {0xaa, 0x0d, 0x00b0}, /* 00,0d,b0,aa */
1346 {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa */
1347 {0xaa, 0x0f, 0x00b0}, /* 00,0f,b0,aa */
1348 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
1349 {0xaa, 0x11, 0x00b0}, /* 00,11,b0,aa */
1350 {0xaa, 0x16, 0x0001}, /* 00,16,01,aa */
1351 {0xaa, 0x17, 0x00e6}, /* 00,17,e6,aa */
1352 {0xaa, 0x18, 0x0002}, /* 00,18,02,aa */
1353 {0xaa, 0x19, 0x0086}, /* 00,19,86,aa */
1354 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
1355 {0xaa, 0x1b, 0x0020}, /* 00,1b,20,aa */
1356 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,b7,cc */
1357 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
1358 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
1359 {0xa0, 0x76, ZC3XX_R189_AWBSTATUS
}, /* 01,89,76,cc */
1360 {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc */
1361 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
1362 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
1363 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
1364 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
1365 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,60,cc */
1366 {0xa0, 0x85, ZC3XX_R18D_YTARGET
}, /* 01,8d,85,cc */
1367 {0xa0, 0x00, 0x011e}, /* 01,1e,00,cc */
1368 {0xa0, 0x52, ZC3XX_R116_RGAIN
}, /* 01,16,52,cc */
1369 {0xa0, 0x40, ZC3XX_R117_GGAIN
}, /* 01,17,40,cc */
1370 {0xa0, 0x52, ZC3XX_R118_BGAIN
}, /* 01,18,52,cc */
1371 {0xa0, 0x03, ZC3XX_R113_RGB03
}, /* 01,13,03,cc */
1374 static const struct usb_action gc0305_InitialScale
[] = { /* 320x240 */
1375 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
1376 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,03,cc */
1377 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
1378 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,10,cc */
1379 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
1380 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
1381 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
1382 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,e0,cc */
1383 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
1384 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc */
1385 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
1386 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
1387 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc */
1388 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
1389 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc */
1390 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,e8,cc */
1391 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,88,cc */
1392 {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,98,cc */
1393 {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */
1394 {0xaa, 0x15, 0x0001}, /* 00,15,01,aa */
1395 {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */
1396 {0xaa, 0x02, 0x0000}, /* 00,02,00,aa */
1397 {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */
1398 {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa */
1399 {0xaa, 0x1d, 0x0080}, /* 00,1d,80,aa */
1400 {0xaa, 0x1f, 0x0008}, /* 00,1f,08,aa */
1401 {0xaa, 0x21, 0x0012}, /* 00,21,12,aa */
1402 {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH
}, /* 00,86,82,cc */
1403 {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,83,cc */
1404 {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,84,cc */
1405 {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */
1406 {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa */
1407 {0xaa, 0x0b, 0x00b0}, /* 00,0b,b0,aa */
1408 {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa */
1409 {0xaa, 0x0d, 0x00b0}, /* 00,0d,b0,aa */
1410 {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa */
1411 {0xaa, 0x0f, 0x00b0}, /* 00,0f,b0,aa */
1412 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
1413 {0xaa, 0x11, 0x00b0}, /* 00,11,b0,aa */
1414 {0xaa, 0x16, 0x0001}, /* 00,16,01,aa */
1415 {0xaa, 0x17, 0x00e8}, /* 00,17,e8,aa */
1416 {0xaa, 0x18, 0x0002}, /* 00,18,02,aa */
1417 {0xaa, 0x19, 0x0088}, /* 00,19,88,aa */
1418 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
1419 {0xaa, 0x1b, 0x0020}, /* 00,1b,20,aa */
1420 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,b7,cc */
1421 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
1422 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
1423 {0xa0, 0x76, ZC3XX_R189_AWBSTATUS
}, /* 01,89,76,cc */
1424 {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc */
1425 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
1426 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
1427 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
1428 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
1429 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,60,cc */
1430 {0xa0, 0x00, 0x011e}, /* 01,1e,00,cc */
1431 {0xa0, 0x52, ZC3XX_R116_RGAIN
}, /* 01,16,52,cc */
1432 {0xa0, 0x40, ZC3XX_R117_GGAIN
}, /* 01,17,40,cc */
1433 {0xa0, 0x52, ZC3XX_R118_BGAIN
}, /* 01,18,52,cc */
1434 {0xa0, 0x03, ZC3XX_R113_RGB03
}, /* 01,13,03,cc */
1437 static const struct usb_action gc0305_50HZ
[] = {
1438 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
1439 {0xaa, 0x83, 0x0002}, /* 00,83,02,aa */
1440 {0xaa, 0x84, 0x0038}, /* 00,84,38,aa */ /* win: 00,84,ec */
1441 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
1442 {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,0b,cc */
1443 {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,18,cc */
1445 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
1446 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
1447 {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,8e,cc */
1449 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0e,cc */
1450 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,15,cc */
1451 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc */
1452 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc */
1453 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,62,cc */
1454 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,90,cc */
1455 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,c8,cc */
1456 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
1457 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,60,cc */
1458 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,42,cc */
1459 /* {0xa0, 0x85, ZC3XX_R18D_YTARGET}, * 01,8d,85,cc *
1463 static const struct usb_action gc0305_60HZ
[] = {
1464 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
1465 {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */
1466 {0xaa, 0x84, 0x00ec}, /* 00,84,ec,aa */
1467 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
1468 {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,0b,cc */
1469 {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,10,cc */
1470 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
1471 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
1472 {0xa0, 0xec, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,ec,cc */
1473 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0e,cc */
1474 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,15,cc */
1475 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc */
1476 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc */
1477 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,62,cc */
1478 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,90,cc */
1479 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,c8,cc */
1480 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
1481 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,60,cc */
1482 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,42,cc */
1483 {0xa0, 0x80, ZC3XX_R18D_YTARGET
}, /* 01,8d,80,cc */
1487 static const struct usb_action gc0305_NoFliker
[] = {
1488 {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0c,cc */
1489 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
1490 {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */
1491 {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */
1492 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
1493 {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,00,cc */
1494 {0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,48,cc */
1495 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
1496 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
1497 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,10,cc */
1498 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0e,cc */
1499 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,15,cc */
1500 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,62,cc */
1501 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,90,cc */
1502 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,c8,cc */
1503 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
1504 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,60,cc */
1505 {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,03,cc */
1506 {0xa0, 0x80, ZC3XX_R18D_YTARGET
}, /* 01,8d,80,cc */
1510 static const struct usb_action hdcs2020b_InitialScale
[] = {
1511 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
1512 {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT
},
1513 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* qtable 0x05 */
1514 {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT
},
1515 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
1516 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
1517 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
1518 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
1519 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
1520 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
1521 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
1522 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
1523 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
1524 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
1525 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
1526 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
},
1527 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
},
1528 {0xaa, 0x1c, 0x0000},
1529 {0xaa, 0x0a, 0x0001},
1530 {0xaa, 0x0b, 0x0006},
1531 {0xaa, 0x0c, 0x007b},
1532 {0xaa, 0x0d, 0x00a7},
1533 {0xaa, 0x03, 0x00fb},
1534 {0xaa, 0x05, 0x0000},
1535 {0xaa, 0x06, 0x0003},
1536 {0xaa, 0x09, 0x0008},
1538 {0xaa, 0x0f, 0x0018}, /* set sensor gain */
1539 {0xaa, 0x10, 0x0018},
1540 {0xaa, 0x11, 0x0018},
1541 {0xaa, 0x12, 0x0018},
1543 {0xaa, 0x15, 0x004e},
1544 {0xaa, 0x1c, 0x0004},
1545 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
},
1546 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
1547 {0xa0, 0x70, ZC3XX_R18D_YTARGET
},
1548 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
1549 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
1550 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
1551 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
1552 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
1553 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
1554 {0xa1, 0x01, 0x0002},
1555 {0xa1, 0x01, 0x0008},
1556 {0xa1, 0x01, 0x0180},
1557 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
},
1558 {0xa0, 0x40, ZC3XX_R116_RGAIN
},
1559 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
1560 {0xa0, 0x40, ZC3XX_R118_BGAIN
},
1561 {0xa1, 0x01, 0x0008},
1562 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* clock ? */
1563 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
1564 {0xa1, 0x01, 0x01c8},
1565 {0xa1, 0x01, 0x01c9},
1566 {0xa1, 0x01, 0x01ca},
1567 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
1568 {0xa0, 0x13, ZC3XX_R120_GAMMA00
}, /* gamma 4 */
1569 {0xa0, 0x38, ZC3XX_R121_GAMMA01
},
1570 {0xa0, 0x59, ZC3XX_R122_GAMMA02
},
1571 {0xa0, 0x79, ZC3XX_R123_GAMMA03
},
1572 {0xa0, 0x92, ZC3XX_R124_GAMMA04
},
1573 {0xa0, 0xa7, ZC3XX_R125_GAMMA05
},
1574 {0xa0, 0xb9, ZC3XX_R126_GAMMA06
},
1575 {0xa0, 0xc8, ZC3XX_R127_GAMMA07
},
1576 {0xa0, 0xd4, ZC3XX_R128_GAMMA08
},
1577 {0xa0, 0xdf, ZC3XX_R129_GAMMA09
},
1578 {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A
},
1579 {0xa0, 0xee, ZC3XX_R12B_GAMMA0B
},
1580 {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C
},
1581 {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D
},
1582 {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E
},
1583 {0xa0, 0xff, ZC3XX_R12F_GAMMA0F
},
1584 {0xa0, 0x26, ZC3XX_R130_GAMMA10
},
1585 {0xa0, 0x22, ZC3XX_R131_GAMMA11
},
1586 {0xa0, 0x20, ZC3XX_R132_GAMMA12
},
1587 {0xa0, 0x1c, ZC3XX_R133_GAMMA13
},
1588 {0xa0, 0x16, ZC3XX_R134_GAMMA14
},
1589 {0xa0, 0x13, ZC3XX_R135_GAMMA15
},
1590 {0xa0, 0x10, ZC3XX_R136_GAMMA16
},
1591 {0xa0, 0x0d, ZC3XX_R137_GAMMA17
},
1592 {0xa0, 0x0b, ZC3XX_R138_GAMMA18
},
1593 {0xa0, 0x09, ZC3XX_R139_GAMMA19
},
1594 {0xa0, 0x07, ZC3XX_R13A_GAMMA1A
},
1595 {0xa0, 0x06, ZC3XX_R13B_GAMMA1B
},
1596 {0xa0, 0x05, ZC3XX_R13C_GAMMA1C
},
1597 {0xa0, 0x04, ZC3XX_R13D_GAMMA1D
},
1598 {0xa0, 0x03, ZC3XX_R13E_GAMMA1E
},
1599 {0xa0, 0x02, ZC3XX_R13F_GAMMA1F
},
1601 {0xa0, 0x66, ZC3XX_R10A_RGB00
}, /* matrix */
1602 {0xa0, 0xed, ZC3XX_R10B_RGB01
},
1603 {0xa0, 0xed, ZC3XX_R10C_RGB02
},
1604 {0xa0, 0xed, ZC3XX_R10D_RGB10
},
1605 {0xa0, 0x66, ZC3XX_R10E_RGB11
},
1606 {0xa0, 0xed, ZC3XX_R10F_RGB12
},
1607 {0xa0, 0xed, ZC3XX_R110_RGB20
},
1608 {0xa0, 0xed, ZC3XX_R111_RGB21
},
1609 {0xa0, 0x66, ZC3XX_R112_RGB22
},
1611 {0xa1, 0x01, 0x0180},
1612 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
1613 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
1614 {0xaa, 0x13, 0x0031},
1615 {0xaa, 0x14, 0x0001},
1616 {0xaa, 0x0e, 0x0004},
1617 {0xaa, 0x19, 0x00cd},
1618 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
1619 {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID
},
1620 {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW
},
1621 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
1622 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
1623 {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW
},
1624 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
1625 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
1627 {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 0x14 */
1628 {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP
},
1629 {0xa0, 0x04, ZC3XX_R01D_HSYNC_0
},
1630 {0xa0, 0x18, ZC3XX_R01E_HSYNC_1
},
1631 {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2
},
1632 {0xa0, 0x41, ZC3XX_R020_HSYNC_3
},
1633 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
1634 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
1635 {0xa1, 0x01, 0x0180},
1636 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
1637 {0xa0, 0x40, ZC3XX_R116_RGAIN
},
1638 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
1639 {0xa0, 0x40, ZC3XX_R118_BGAIN
},
1642 static const struct usb_action hdcs2020b_Initial
[] = {
1643 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
1644 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
},
1645 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
1646 {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT
},
1647 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
1648 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
1649 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
1650 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
1651 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
1652 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
1653 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
1654 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
1655 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
1656 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
1657 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
1658 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
},
1659 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
},
1660 {0xaa, 0x1c, 0x0000},
1661 {0xaa, 0x0a, 0x0001},
1662 {0xaa, 0x0b, 0x0006},
1663 {0xaa, 0x0c, 0x007a},
1664 {0xaa, 0x0d, 0x00a7},
1665 {0xaa, 0x03, 0x00fb},
1666 {0xaa, 0x05, 0x0000},
1667 {0xaa, 0x06, 0x0003},
1668 {0xaa, 0x09, 0x0008},
1669 {0xaa, 0x0f, 0x0018}, /* original setting */
1670 {0xaa, 0x10, 0x0018},
1671 {0xaa, 0x11, 0x0018},
1672 {0xaa, 0x12, 0x0018},
1673 {0xaa, 0x15, 0x004e},
1674 {0xaa, 0x1c, 0x0004},
1675 {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION
},
1676 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
1677 {0xa0, 0x70, ZC3XX_R18D_YTARGET
},
1678 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
1679 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
1680 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
1681 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
1682 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
1683 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
1684 {0xa1, 0x01, 0x0002},
1685 {0xa1, 0x01, 0x0008},
1686 {0xa1, 0x01, 0x0180},
1687 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
},
1688 {0xa0, 0x40, ZC3XX_R116_RGAIN
},
1689 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
1690 {0xa0, 0x40, ZC3XX_R118_BGAIN
},
1691 {0xa1, 0x01, 0x0008},
1692 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* clock ? */
1693 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
1694 {0xa1, 0x01, 0x01c8},
1695 {0xa1, 0x01, 0x01c9},
1696 {0xa1, 0x01, 0x01ca},
1697 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
1698 {0xa0, 0x13, ZC3XX_R120_GAMMA00
}, /* gamma 4 */
1699 {0xa0, 0x38, ZC3XX_R121_GAMMA01
},
1700 {0xa0, 0x59, ZC3XX_R122_GAMMA02
},
1701 {0xa0, 0x79, ZC3XX_R123_GAMMA03
},
1702 {0xa0, 0x92, ZC3XX_R124_GAMMA04
},
1703 {0xa0, 0xa7, ZC3XX_R125_GAMMA05
},
1704 {0xa0, 0xb9, ZC3XX_R126_GAMMA06
},
1705 {0xa0, 0xc8, ZC3XX_R127_GAMMA07
},
1706 {0xa0, 0xd4, ZC3XX_R128_GAMMA08
},
1707 {0xa0, 0xdf, ZC3XX_R129_GAMMA09
},
1708 {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A
},
1709 {0xa0, 0xee, ZC3XX_R12B_GAMMA0B
},
1710 {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C
},
1711 {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D
},
1712 {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E
},
1713 {0xa0, 0xff, ZC3XX_R12F_GAMMA0F
},
1714 {0xa0, 0x26, ZC3XX_R130_GAMMA10
},
1715 {0xa0, 0x22, ZC3XX_R131_GAMMA11
},
1716 {0xa0, 0x20, ZC3XX_R132_GAMMA12
},
1717 {0xa0, 0x1c, ZC3XX_R133_GAMMA13
},
1718 {0xa0, 0x16, ZC3XX_R134_GAMMA14
},
1719 {0xa0, 0x13, ZC3XX_R135_GAMMA15
},
1720 {0xa0, 0x10, ZC3XX_R136_GAMMA16
},
1721 {0xa0, 0x0d, ZC3XX_R137_GAMMA17
},
1722 {0xa0, 0x0b, ZC3XX_R138_GAMMA18
},
1723 {0xa0, 0x09, ZC3XX_R139_GAMMA19
},
1724 {0xa0, 0x07, ZC3XX_R13A_GAMMA1A
},
1725 {0xa0, 0x06, ZC3XX_R13B_GAMMA1B
},
1726 {0xa0, 0x05, ZC3XX_R13C_GAMMA1C
},
1727 {0xa0, 0x04, ZC3XX_R13D_GAMMA1D
},
1728 {0xa0, 0x03, ZC3XX_R13E_GAMMA1E
},
1729 {0xa0, 0x02, ZC3XX_R13F_GAMMA1F
},
1730 {0xa0, 0x66, ZC3XX_R10A_RGB00
}, /* matrix */
1731 {0xa0, 0xed, ZC3XX_R10B_RGB01
},
1732 {0xa0, 0xed, ZC3XX_R10C_RGB02
},
1733 {0xa0, 0xed, ZC3XX_R10D_RGB10
},
1734 {0xa0, 0x66, ZC3XX_R10E_RGB11
},
1735 {0xa0, 0xed, ZC3XX_R10F_RGB12
},
1736 {0xa0, 0xed, ZC3XX_R110_RGB20
},
1737 {0xa0, 0xed, ZC3XX_R111_RGB21
},
1738 {0xa0, 0x66, ZC3XX_R112_RGB22
},
1739 {0xa1, 0x01, 0x0180},
1740 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
1741 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
1742 /**** set exposure ***/
1743 {0xaa, 0x13, 0x0031},
1744 {0xaa, 0x14, 0x0001},
1745 {0xaa, 0x0e, 0x0004},
1746 {0xaa, 0x19, 0x00cd},
1747 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
1748 {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID
},
1749 {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW
},
1750 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
1751 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
1752 {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW
},
1753 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
1754 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
1755 {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF
},
1756 {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP
},
1757 {0xa0, 0x04, ZC3XX_R01D_HSYNC_0
},
1758 {0xa0, 0x18, ZC3XX_R01E_HSYNC_1
},
1759 {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2
},
1760 {0xa0, 0x41, ZC3XX_R020_HSYNC_3
},
1761 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
1762 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
1763 {0xa1, 0x01, 0x0180},
1764 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
1765 {0xa0, 0x40, ZC3XX_R116_RGAIN
},
1766 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
1767 {0xa0, 0x40, ZC3XX_R118_BGAIN
},
1770 static const struct usb_action hdcs2020b_50HZ
[] = {
1771 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
1772 {0xaa, 0x13, 0x0018}, /* 00,13,18,aa */
1773 {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */
1774 {0xaa, 0x0e, 0x0005}, /* 00,0e,05,aa */
1775 {0xaa, 0x19, 0x001f}, /* 00,19,1f,aa */
1776 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
1777 {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,02,cc */
1778 {0xa0, 0x76, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,76,cc */
1779 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
1780 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
1781 {0xa0, 0x46, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,46,cc */
1782 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
1783 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
1784 {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,0c,cc */
1785 {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,28,cc */
1786 {0xa0, 0x05, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,05,cc */
1787 {0xa0, 0x1a, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,1a,cc */
1788 {0xa0, 0x2f, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,2f,cc */
1791 static const struct usb_action hdcs2020b_60HZ
[] = {
1792 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
1793 {0xaa, 0x13, 0x0031}, /* 00,13,31,aa */
1794 {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */
1795 {0xaa, 0x0e, 0x0004}, /* 00,0e,04,aa */
1796 {0xaa, 0x19, 0x00cd}, /* 00,19,cd,aa */
1797 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
1798 {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,02,cc */
1799 {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,62,cc */
1800 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
1801 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
1802 {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,3d,cc */
1803 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
1804 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
1805 {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,0c,cc */
1806 {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,28,cc */
1807 {0xa0, 0x04, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,04,cc */
1808 {0xa0, 0x18, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,18,cc */
1809 {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,2c,cc */
1812 static const struct usb_action hdcs2020b_NoFliker
[] = {
1813 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
1814 {0xaa, 0x13, 0x0010}, /* 00,13,10,aa */
1815 {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */
1816 {0xaa, 0x0e, 0x0004}, /* 00,0e,04,aa */
1817 {0xaa, 0x19, 0x0000}, /* 00,19,00,aa */
1818 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
1819 {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,02,cc */
1820 {0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,70,cc */
1821 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
1822 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
1823 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,10,cc */
1824 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
1825 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
1826 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,00,cc */
1827 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,00,cc */
1828 {0xa0, 0x04, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,04,cc */
1829 {0xa0, 0x17, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,17,cc */
1830 {0xa0, 0x2a, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,2a,cc */
1834 static const struct usb_action hv7131b_InitialScale
[] = { /* 320x240 */
1835 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
1836 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
},
1837 {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT
},
1838 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
1839 {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION
},
1840 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00 */
1841 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
1842 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
1843 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
1844 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
1845 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
1846 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
1847 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
1848 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
1849 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
1850 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
1851 {0xaa, 0x30, 0x002d},
1852 {0xaa, 0x01, 0x0005},
1853 {0xaa, 0x11, 0x0000},
1854 {0xaa, 0x13, 0x0001}, /* {0xaa, 0x13, 0x0000}, */
1855 {0xaa, 0x14, 0x0001},
1856 {0xaa, 0x15, 0x00e8},
1857 {0xaa, 0x16, 0x0002},
1858 {0xaa, 0x17, 0x0086}, /* 00,17,88,aa */
1859 {0xaa, 0x31, 0x0038},
1860 {0xaa, 0x32, 0x0038},
1861 {0xaa, 0x33, 0x0038},
1862 {0xaa, 0x5b, 0x0001},
1863 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
1864 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
1865 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
1866 {0xa0, 0x68, ZC3XX_R18D_YTARGET
},
1867 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
},
1868 {0xa0, 0x00, 0x01ad},
1869 {0xa0, 0xc0, 0x019b},
1870 {0xa0, 0xa0, 0x019c},
1871 {0xa0, 0x02, ZC3XX_R188_MINGAIN
},
1872 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
1873 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
1874 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
1875 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
1876 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
1877 {0xaa, 0x02, 0x0090}, /* 00,02,80,aa */
1881 static const struct usb_action hv7131b_Initial
[] = { /* 640x480*/
1882 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
1883 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
},
1884 {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT
},
1885 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
1886 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
},
1887 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00 */
1888 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
1889 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
1890 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
1891 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
1892 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
1893 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
1894 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
1895 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
1896 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
1897 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
1898 {0xaa, 0x30, 0x002d},
1899 {0xaa, 0x01, 0x0005},
1900 {0xaa, 0x11, 0x0001},
1901 {0xaa, 0x13, 0x0000}, /* {0xaa, 0x13, 0x0001}; */
1902 {0xaa, 0x14, 0x0001},
1903 {0xaa, 0x15, 0x00e6},
1904 {0xaa, 0x16, 0x0002},
1905 {0xaa, 0x17, 0x0086},
1906 {0xaa, 0x31, 0x0038},
1907 {0xaa, 0x32, 0x0038},
1908 {0xaa, 0x33, 0x0038},
1909 {0xaa, 0x5b, 0x0001},
1910 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
1911 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
1912 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
1913 {0xa0, 0x70, ZC3XX_R18D_YTARGET
},
1914 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
},
1915 {0xa0, 0x00, 0x01ad},
1916 {0xa0, 0xc0, 0x019b},
1917 {0xa0, 0xa0, 0x019c},
1918 {0xa0, 0x02, ZC3XX_R188_MINGAIN
},
1919 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
1920 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
1921 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
1922 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
1923 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
1924 {0xaa, 0x02, 0x0090}, /* {0xaa, 0x02, 0x0080}, */
1927 static const struct usb_action hv7131b_50HZ
[] = { /* 640x480*/
1928 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
1929 {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */
1930 {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */
1931 {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */
1932 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
1933 {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */
1934 {0xaa, 0x22, 0x001b}, /* 00,22,1b,aa */
1935 {0xaa, 0x23, 0x00fc}, /* 00,23,fc,aa */
1936 {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,2f,cc */
1937 {0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,9b,cc */
1938 {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,80,cc */
1939 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
1940 {0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,ea,cc */
1941 {0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,60,cc */
1942 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0c,cc */
1943 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,18,cc */
1944 {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,18,cc */
1945 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc */
1946 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,00,cc */
1947 {0xa0, 0x50, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,50,cc */
1948 {0xa0, 0x1b, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,1b,cc */
1949 {0xa0, 0xfc, ZC3XX_R020_HSYNC_3
}, /* 00,20,fc,cc */
1952 static const struct usb_action hv7131b_50HZScale
[] = { /* 320x240 */
1953 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
1954 {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */
1955 {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */
1956 {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */
1957 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
1958 {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */
1959 {0xaa, 0x22, 0x0012}, /* 00,22,12,aa */
1960 {0xaa, 0x23, 0x0080}, /* 00,23,80,aa */
1961 {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,2f,cc */
1962 {0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,9b,cc */
1963 {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,80,cc */
1964 {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,01,cc */
1965 {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,d4,cc */
1966 {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,c0,cc */
1967 {0xa0, 0x07, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,07,cc */
1968 {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,0f,cc */
1969 {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,18,cc */
1970 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc */
1971 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,00,cc */
1972 {0xa0, 0x50, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,50,cc */
1973 {0xa0, 0x12, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,12,cc */
1974 {0xa0, 0x80, ZC3XX_R020_HSYNC_3
}, /* 00,20,80,cc */
1977 static const struct usb_action hv7131b_60HZ
[] = { /* 640x480*/
1978 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
1979 {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */
1980 {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */
1981 {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */
1982 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
1983 {0xaa, 0x21, 0x0040}, /* 00,21,40,aa */
1984 {0xaa, 0x22, 0x0013}, /* 00,22,13,aa */
1985 {0xaa, 0x23, 0x004c}, /* 00,23,4c,aa */
1986 {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,2f,cc */
1987 {0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,4d,cc */
1988 {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,60,cc */
1989 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
1990 {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,c3,cc */
1991 {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,50,cc */
1992 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0c,cc */
1993 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,18,cc */
1994 {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,18,cc */
1995 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc */
1996 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,00,cc */
1997 {0xa0, 0x40, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,40,cc */
1998 {0xa0, 0x13, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,13,cc */
1999 {0xa0, 0x4c, ZC3XX_R020_HSYNC_3
}, /* 00,20,4c,cc */
2002 static const struct usb_action hv7131b_60HZScale
[] = { /* 320x240 */
2003 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
2004 {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */
2005 {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */
2006 {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */
2007 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
2008 {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */
2009 {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */
2010 {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */
2011 {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,2f,cc */
2012 {0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,4d,cc */
2013 {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,60,cc */
2014 {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,01,cc */
2015 {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,86,cc */
2016 {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,a0,cc */
2017 {0xa0, 0x07, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,07,cc */
2018 {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,0f,cc */
2019 {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,18,cc */
2020 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc */
2021 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,00,cc */
2022 {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,a0,cc */
2023 {0xa0, 0x16, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,16,cc */
2024 {0xa0, 0x40, ZC3XX_R020_HSYNC_3
}, /* 00,20,40,cc */
2027 static const struct usb_action hv7131b_NoFliker
[] = { /* 640x480*/
2028 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
2029 {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */
2030 {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */
2031 {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */
2032 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
2033 {0xaa, 0x21, 0x0010}, /* 00,21,10,aa */
2034 {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */
2035 {0xaa, 0x23, 0x0003}, /* 00,23,03,aa */
2036 {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,2f,cc */
2037 {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,f8,cc */
2038 {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,00,cc */
2039 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
2040 {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,02,cc */
2041 {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,00,cc */
2042 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
2043 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
2044 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,00,cc */
2045 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,00,cc */
2046 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,00,cc */
2047 {0xa0, 0x10, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,10,cc */
2048 {0xa0, 0x00, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,00,cc */
2049 {0xa0, 0x03, ZC3XX_R020_HSYNC_3
}, /* 00,20,03,cc */
2052 static const struct usb_action hv7131b_NoFlikerScale
[] = { /* 320x240 */
2053 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
2054 {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */
2055 {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */
2056 {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */
2057 {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */
2058 {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */
2059 {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */
2060 {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */
2061 {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,2f,cc */
2062 {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,f8,cc */
2063 {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,00,cc */
2064 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
2065 {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,02,cc */
2066 {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,00,cc */
2067 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
2068 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
2069 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,00,cc */
2070 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,00,cc */
2071 {0xa0, 0x00, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,00,cc */
2072 {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,a0,cc */
2073 {0xa0, 0x16, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,16,cc */
2074 {0xa0, 0x40, ZC3XX_R020_HSYNC_3
}, /* 00,20,40,cc */
2078 static const struct usb_action hv7131r_InitialScale
[] = {
2079 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
2080 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
},
2081 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
},
2082 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
2083 {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION
},
2084 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
2085 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
2086 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC
},
2087 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
2088 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
2089 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
2090 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
2091 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
2092 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
2093 {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH
},
2094 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
},
2095 {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH
},
2096 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
},
2097 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
2098 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
2099 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
2100 {0xaa, 0x01, 0x000c},
2101 {0xaa, 0x11, 0x0000},
2102 {0xaa, 0x13, 0x0000},
2103 {0xaa, 0x14, 0x0001},
2104 {0xaa, 0x15, 0x00e8},
2105 {0xaa, 0x16, 0x0002},
2106 {0xaa, 0x17, 0x0088},
2108 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
2109 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
2110 {0xa0, 0x89, ZC3XX_R18D_YTARGET
},
2111 {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN
},
2112 {0xa0, 0x00, 0x01ad},
2113 {0xa0, 0xc0, 0x019b},
2114 {0xa0, 0xa0, 0x019c},
2115 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
2116 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
2117 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
2118 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
2119 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
2120 {0xa1, 0x01, 0x0002},
2121 {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT
},
2122 {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND
},
2123 {0xa1, 0x01, 0x0091},
2124 {0xa1, 0x01, 0x0095},
2125 {0xa1, 0x01, 0x0096},
2127 {0xa1, 0x01, 0x0008},
2128 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* clock ? */
2129 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
2130 {0xa1, 0x01, 0x01c8},
2131 {0xa1, 0x01, 0x01c9},
2132 {0xa1, 0x01, 0x01ca},
2133 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
2135 {0xa0, 0x60, ZC3XX_R10A_RGB00
}, /* matrix */
2136 {0xa0, 0xf0, ZC3XX_R10B_RGB01
},
2137 {0xa0, 0xf0, ZC3XX_R10C_RGB02
},
2138 {0xa0, 0xf0, ZC3XX_R10D_RGB10
},
2139 {0xa0, 0x60, ZC3XX_R10E_RGB11
},
2140 {0xa0, 0xf0, ZC3XX_R10F_RGB12
},
2141 {0xa0, 0xf0, ZC3XX_R110_RGB20
},
2142 {0xa0, 0xf0, ZC3XX_R111_RGB21
},
2143 {0xa0, 0x60, ZC3XX_R112_RGB22
},
2144 {0xa1, 0x01, 0x0180},
2145 {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE
},
2146 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
2147 {0xaa, 0x25, 0x0007},
2148 {0xaa, 0x26, 0x0053},
2149 {0xaa, 0x27, 0x0000},
2151 {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 2f */
2152 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 9b */
2153 {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 80 */
2154 {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH
},
2155 {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID
},
2156 {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW
},
2157 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
2158 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
2159 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
},
2160 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
},
2161 {0xa0, 0x13, ZC3XX_R1AA_DIGITALGAINSTEP
},
2162 {0xa1, 0x01, 0x001d},
2163 {0xa1, 0x01, 0x001e},
2164 {0xa1, 0x01, 0x001f},
2165 {0xa1, 0x01, 0x0020},
2166 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE
},
2167 {0xa1, 0x01, 0x0180},
2168 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
2172 static const struct usb_action hv7131r_Initial
[] = {
2173 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
2175 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
}, /* diff */
2176 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
},
2177 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
2178 {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION
},
2179 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
2181 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
2182 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC
},
2184 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
2185 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
2186 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
2187 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 1e0 */
2189 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
2190 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
2191 {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH
},
2192 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
},
2193 {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH
},
2194 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
},
2195 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
2196 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
2197 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
2198 {0xaa, 0x01, 0x000c},
2199 {0xaa, 0x11, 0x0000},
2200 {0xaa, 0x13, 0x0000},
2201 {0xaa, 0x14, 0x0001},
2202 {0xaa, 0x15, 0x00e8},
2203 {0xaa, 0x16, 0x0002},
2204 {0xaa, 0x17, 0x0088},
2206 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00 */
2208 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
2209 {0xa0, 0x89, ZC3XX_R18D_YTARGET
},
2210 {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN
},
2211 {0xa0, 0x00, 0x01ad},
2212 {0xa0, 0xc0, 0x019b},
2213 {0xa0, 0xa0, 0x019c},
2214 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
2215 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
2216 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
2217 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
2218 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
2219 {0xa1, 0x01, 0x0002},
2220 {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT
},
2221 /* read the i2c chips ident */
2222 {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND
},
2223 {0xa1, 0x01, 0x0091},
2224 {0xa1, 0x01, 0x0095},
2225 {0xa1, 0x01, 0x0096},
2227 {0xa1, 0x01, 0x0008},
2228 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* clock ? */
2229 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
2230 {0xa1, 0x01, 0x01c8},
2231 {0xa1, 0x01, 0x01c9},
2232 {0xa1, 0x01, 0x01ca},
2233 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
2235 {0xa0, 0x60, ZC3XX_R10A_RGB00
}, /* matrix */
2236 {0xa0, 0xf0, ZC3XX_R10B_RGB01
},
2237 {0xa0, 0xf0, ZC3XX_R10C_RGB02
},
2238 {0xa0, 0xf0, ZC3XX_R10D_RGB10
},
2239 {0xa0, 0x60, ZC3XX_R10E_RGB11
},
2240 {0xa0, 0xf0, ZC3XX_R10F_RGB12
},
2241 {0xa0, 0xf0, ZC3XX_R110_RGB20
},
2242 {0xa0, 0xf0, ZC3XX_R111_RGB21
},
2243 {0xa0, 0x60, ZC3XX_R112_RGB22
},
2244 {0xa1, 0x01, 0x0180},
2245 {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE
},
2246 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
2247 {0xaa, 0x25, 0x0007},
2248 {0xaa, 0x26, 0x0053},
2249 {0xaa, 0x27, 0x0000},
2251 {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 2f */
2252 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 9b */
2253 {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 80 */
2255 {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH
},
2256 {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID
},
2257 {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW
},
2259 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
2260 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
2261 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
},
2262 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
},
2263 {0xa0, 0x13, ZC3XX_R1AA_DIGITALGAINSTEP
},
2264 {0xa1, 0x01, 0x001d},
2265 {0xa1, 0x01, 0x001e},
2266 {0xa1, 0x01, 0x001f},
2267 {0xa1, 0x01, 0x0020},
2268 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE
},
2269 {0xa1, 0x01, 0x0180},
2270 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
2274 static const struct usb_action icm105a_InitialScale
[] = {
2275 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
2276 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
},
2277 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
2278 {0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT
},
2279 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
2280 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
2281 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
2282 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
2283 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
2284 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
2285 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
2286 {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR
},
2287 {0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH
},
2288 {0xa0, 0x01, ZC3XX_R098_WINYSTARTLOW
},
2289 {0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH
},
2290 {0xa0, 0x01, ZC3XX_R09A_WINXSTARTLOW
},
2291 {0xa0, 0x01, ZC3XX_R11A_FIRSTYLOW
},
2292 {0xa0, 0x01, ZC3XX_R11C_FIRSTXLOW
},
2293 {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH
},
2294 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
},
2295 {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH
},
2296 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
},
2297 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
},
2298 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
2299 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
2300 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
2301 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
2302 {0xaa, 0x01, 0x0010},
2303 {0xaa, 0x03, 0x0000},
2304 {0xaa, 0x04, 0x0001},
2305 {0xaa, 0x05, 0x0020},
2306 {0xaa, 0x06, 0x0001},
2307 {0xaa, 0x08, 0x0000},
2308 {0xaa, 0x03, 0x0001},
2309 {0xaa, 0x04, 0x0011},
2310 {0xaa, 0x05, 0x00a0},
2311 {0xaa, 0x06, 0x0001},
2312 {0xaa, 0x08, 0x0000},
2313 {0xaa, 0x03, 0x0002},
2314 {0xaa, 0x04, 0x0013},
2315 {0xaa, 0x05, 0x0020},
2316 {0xaa, 0x06, 0x0001},
2317 {0xaa, 0x08, 0x0000},
2318 {0xaa, 0x03, 0x0003},
2319 {0xaa, 0x04, 0x0015},
2320 {0xaa, 0x05, 0x0020},
2321 {0xaa, 0x06, 0x0005},
2322 {0xaa, 0x08, 0x0000},
2323 {0xaa, 0x03, 0x0004},
2324 {0xaa, 0x04, 0x0017},
2325 {0xaa, 0x05, 0x0020},
2326 {0xaa, 0x06, 0x000d},
2327 {0xaa, 0x08, 0x0000},
2328 {0xaa, 0x03, 0x0005},
2329 {0xaa, 0x04, 0x0019},
2330 {0xaa, 0x05, 0x0020},
2331 {0xaa, 0x06, 0x0005},
2332 {0xaa, 0x08, 0x0000},
2333 {0xaa, 0x03, 0x0006},
2334 {0xaa, 0x04, 0x0017},
2335 {0xaa, 0x05, 0x0026},
2336 {0xaa, 0x06, 0x0005},
2337 {0xaa, 0x08, 0x0000},
2338 {0xaa, 0x03, 0x0007},
2339 {0xaa, 0x04, 0x0019},
2340 {0xaa, 0x05, 0x0022},
2341 {0xaa, 0x06, 0x0005},
2342 {0xaa, 0x08, 0x0000},
2343 {0xaa, 0x03, 0x0008},
2344 {0xaa, 0x04, 0x0021},
2345 {0xaa, 0x05, 0x00aa},
2346 {0xaa, 0x06, 0x0005},
2347 {0xaa, 0x08, 0x0000},
2348 {0xaa, 0x03, 0x0009},
2349 {0xaa, 0x04, 0x0023},
2350 {0xaa, 0x05, 0x00aa},
2351 {0xaa, 0x06, 0x000d},
2352 {0xaa, 0x08, 0x0000},
2353 {0xaa, 0x03, 0x000a},
2354 {0xaa, 0x04, 0x0025},
2355 {0xaa, 0x05, 0x00aa},
2356 {0xaa, 0x06, 0x0005},
2357 {0xaa, 0x08, 0x0000},
2358 {0xaa, 0x03, 0x000b},
2359 {0xaa, 0x04, 0x00ec},
2360 {0xaa, 0x05, 0x002e},
2361 {0xaa, 0x06, 0x0005},
2362 {0xaa, 0x08, 0x0000},
2363 {0xaa, 0x03, 0x000c},
2364 {0xaa, 0x04, 0x00fa},
2365 {0xaa, 0x05, 0x002a},
2366 {0xaa, 0x06, 0x0005},
2367 {0xaa, 0x08, 0x0000},
2368 {0xaa, 0x07, 0x000d},
2369 {0xaa, 0x01, 0x0005},
2370 {0xaa, 0x94, 0x0002},
2371 {0xaa, 0x90, 0x0000},
2372 {0xaa, 0x91, 0x001f},
2373 {0xaa, 0x10, 0x0064},
2374 {0xaa, 0x9b, 0x00f0},
2375 {0xaa, 0x9c, 0x0002},
2376 {0xaa, 0x14, 0x001a},
2377 {0xaa, 0x20, 0x0080},
2378 {0xaa, 0x22, 0x0080},
2379 {0xaa, 0x24, 0x0080},
2380 {0xaa, 0x26, 0x0080},
2381 {0xaa, 0x00, 0x0084},
2382 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
2383 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
2384 {0xaa, 0xa8, 0x00c0},
2385 {0xa1, 0x01, 0x0002},
2386 {0xa1, 0x01, 0x0008},
2387 {0xa1, 0x01, 0x0180},
2388 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
},
2389 {0xa0, 0x40, ZC3XX_R116_RGAIN
},
2390 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
2391 {0xa0, 0x40, ZC3XX_R118_BGAIN
},
2392 {0xa1, 0x01, 0x0008},
2394 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* clock ? */
2395 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
2396 {0xa1, 0x01, 0x01c8},
2397 {0xa1, 0x01, 0x01c9},
2398 {0xa1, 0x01, 0x01ca},
2399 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
2400 {0xa0, 0x52, ZC3XX_R10A_RGB00
}, /* matrix */
2401 {0xa0, 0xf7, ZC3XX_R10B_RGB01
},
2402 {0xa0, 0xf7, ZC3XX_R10C_RGB02
},
2403 {0xa0, 0xf7, ZC3XX_R10D_RGB10
},
2404 {0xa0, 0x52, ZC3XX_R10E_RGB11
},
2405 {0xa0, 0xf7, ZC3XX_R10F_RGB12
},
2406 {0xa0, 0xf7, ZC3XX_R110_RGB20
},
2407 {0xa0, 0xf7, ZC3XX_R111_RGB21
},
2408 {0xa0, 0x52, ZC3XX_R112_RGB22
},
2409 {0xa1, 0x01, 0x0180},
2410 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
2411 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
2412 {0xaa, 0x0d, 0x0003},
2413 {0xaa, 0x0c, 0x008c},
2414 {0xaa, 0x0e, 0x0095},
2415 {0xaa, 0x0f, 0x0002},
2416 {0xaa, 0x1c, 0x0094},
2417 {0xaa, 0x1d, 0x0002},
2418 {0xaa, 0x20, 0x0080},
2419 {0xaa, 0x22, 0x0080},
2420 {0xaa, 0x24, 0x0080},
2421 {0xaa, 0x26, 0x0080},
2422 {0xaa, 0x00, 0x0084},
2423 {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH
},
2424 {0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW
},
2425 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
2426 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
},
2427 {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW
},
2428 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
2429 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
2430 {0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW
},
2431 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
2432 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
2433 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
},
2434 {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP
},
2435 {0xa0, 0xe3, ZC3XX_R01D_HSYNC_0
},
2436 {0xa0, 0xec, ZC3XX_R01E_HSYNC_1
},
2437 {0xa0, 0xf5, ZC3XX_R01F_HSYNC_2
},
2438 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
2439 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
2440 {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN
},
2441 {0xa0, 0xc0, ZC3XX_R11D_GLOBALGAIN
},
2442 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
2443 {0xa1, 0x01, 0x0180},
2444 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
2445 {0xa0, 0x40, ZC3XX_R116_RGAIN
},
2446 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
2447 {0xa0, 0x40, ZC3XX_R118_BGAIN
},
2451 static const struct usb_action icm105a_Initial
[] = {
2452 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
2453 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
},
2454 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
2455 {0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT
},
2456 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
2457 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
2458 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
2459 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
2460 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
2461 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
2462 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
2463 {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR
},
2464 {0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH
},
2465 {0xa0, 0x02, ZC3XX_R098_WINYSTARTLOW
},
2466 {0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH
},
2467 {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW
},
2468 {0xa0, 0x02, ZC3XX_R11A_FIRSTYLOW
},
2469 {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW
},
2470 {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH
},
2471 {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW
},
2472 {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH
},
2473 {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW
},
2474 {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION
},
2475 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
2476 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
2477 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
2478 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
2479 {0xaa, 0x01, 0x0010},
2480 {0xaa, 0x03, 0x0000},
2481 {0xaa, 0x04, 0x0001},
2482 {0xaa, 0x05, 0x0020},
2483 {0xaa, 0x06, 0x0001},
2484 {0xaa, 0x08, 0x0000},
2485 {0xaa, 0x03, 0x0001},
2486 {0xaa, 0x04, 0x0011},
2487 {0xaa, 0x05, 0x00a0},
2488 {0xaa, 0x06, 0x0001},
2489 {0xaa, 0x08, 0x0000},
2490 {0xaa, 0x03, 0x0002},
2491 {0xaa, 0x04, 0x0013},
2492 {0xaa, 0x05, 0x0020},
2493 {0xaa, 0x06, 0x0001},
2494 {0xaa, 0x08, 0x0000},
2495 {0xaa, 0x03, 0x0003},
2496 {0xaa, 0x04, 0x0015},
2497 {0xaa, 0x05, 0x0020},
2498 {0xaa, 0x06, 0x0005},
2499 {0xaa, 0x08, 0x0000},
2500 {0xaa, 0x03, 0x0004},
2501 {0xaa, 0x04, 0x0017},
2502 {0xaa, 0x05, 0x0020},
2503 {0xaa, 0x06, 0x000d},
2504 {0xaa, 0x08, 0x0000},
2505 {0xaa, 0x03, 0x0005},
2506 {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT
},
2507 {0xa0, 0x19, ZC3XX_R093_I2CSETVALUE
},
2508 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
2509 {0xa1, 0x01, 0x0091},
2510 {0xaa, 0x05, 0x0020},
2511 {0xaa, 0x06, 0x0005},
2512 {0xaa, 0x08, 0x0000},
2513 {0xaa, 0x03, 0x0006},
2514 {0xaa, 0x04, 0x0017},
2515 {0xaa, 0x05, 0x0026},
2516 {0xaa, 0x06, 0x0005},
2517 {0xaa, 0x08, 0x0000},
2518 {0xaa, 0x03, 0x0007},
2519 {0xaa, 0x04, 0x0019},
2520 {0xaa, 0x05, 0x0022},
2521 {0xaa, 0x06, 0x0005},
2522 {0xaa, 0x08, 0x0000},
2523 {0xaa, 0x03, 0x0008},
2524 {0xaa, 0x04, 0x0021},
2525 {0xaa, 0x05, 0x00aa},
2526 {0xaa, 0x06, 0x0005},
2527 {0xaa, 0x08, 0x0000},
2528 {0xaa, 0x03, 0x0009},
2529 {0xaa, 0x04, 0x0023},
2530 {0xaa, 0x05, 0x00aa},
2531 {0xaa, 0x06, 0x000d},
2532 {0xaa, 0x08, 0x0000},
2533 {0xaa, 0x03, 0x000a},
2534 {0xaa, 0x04, 0x0025},
2535 {0xaa, 0x05, 0x00aa},
2536 {0xaa, 0x06, 0x0005},
2537 {0xaa, 0x08, 0x0000},
2538 {0xaa, 0x03, 0x000b},
2539 {0xaa, 0x04, 0x00ec},
2540 {0xaa, 0x05, 0x002e},
2541 {0xaa, 0x06, 0x0005},
2542 {0xaa, 0x08, 0x0000},
2543 {0xaa, 0x03, 0x000c},
2544 {0xaa, 0x04, 0x00fa},
2545 {0xaa, 0x05, 0x002a},
2546 {0xaa, 0x06, 0x0005},
2547 {0xaa, 0x08, 0x0000},
2548 {0xaa, 0x07, 0x000d},
2549 {0xaa, 0x01, 0x0005},
2550 {0xaa, 0x94, 0x0002},
2551 {0xaa, 0x90, 0x0000},
2552 {0xaa, 0x91, 0x0010},
2553 {0xaa, 0x10, 0x0064},
2554 {0xaa, 0x9b, 0x00f0},
2555 {0xaa, 0x9c, 0x0002},
2556 {0xaa, 0x14, 0x001a},
2557 {0xaa, 0x20, 0x0080},
2558 {0xaa, 0x22, 0x0080},
2559 {0xaa, 0x24, 0x0080},
2560 {0xaa, 0x26, 0x0080},
2561 {0xaa, 0x00, 0x0084},
2562 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
2563 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
2564 {0xaa, 0xa8, 0x0080},
2565 {0xa0, 0x78, ZC3XX_R18D_YTARGET
},
2566 {0xa1, 0x01, 0x0002},
2567 {0xa1, 0x01, 0x0008},
2568 {0xa1, 0x01, 0x0180},
2569 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
},
2570 {0xa0, 0x40, ZC3XX_R116_RGAIN
},
2571 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
2572 {0xa0, 0x40, ZC3XX_R118_BGAIN
},
2573 {0xa1, 0x01, 0x0008},
2575 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* clock ? */
2576 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
2577 {0xa1, 0x01, 0x01c8},
2578 {0xa1, 0x01, 0x01c9},
2579 {0xa1, 0x01, 0x01ca},
2580 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
2582 {0xa0, 0x52, ZC3XX_R10A_RGB00
}, /* matrix */
2583 {0xa0, 0xf7, ZC3XX_R10B_RGB01
},
2584 {0xa0, 0xf7, ZC3XX_R10C_RGB02
},
2585 {0xa0, 0xf7, ZC3XX_R10D_RGB10
},
2586 {0xa0, 0x52, ZC3XX_R10E_RGB11
},
2587 {0xa0, 0xf7, ZC3XX_R10F_RGB12
},
2588 {0xa0, 0xf7, ZC3XX_R110_RGB20
},
2589 {0xa0, 0xf7, ZC3XX_R111_RGB21
},
2590 {0xa0, 0x52, ZC3XX_R112_RGB22
},
2591 {0xa1, 0x01, 0x0180},
2592 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
2593 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
2594 {0xaa, 0x0d, 0x0003},
2595 {0xaa, 0x0c, 0x0020},
2596 {0xaa, 0x0e, 0x000e},
2597 {0xaa, 0x0f, 0x0002},
2598 {0xaa, 0x1c, 0x000d},
2599 {0xaa, 0x1d, 0x0002},
2600 {0xaa, 0x20, 0x0080},
2601 {0xaa, 0x22, 0x0080},
2602 {0xaa, 0x24, 0x0080},
2603 {0xaa, 0x26, 0x0080},
2604 {0xaa, 0x00, 0x0084},
2605 {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH
},
2606 {0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW
},
2607 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
2608 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
},
2609 {0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW
},
2610 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
2611 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
2612 {0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW
},
2613 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
2614 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
2615 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
},
2616 {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP
},
2617 {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0
},
2618 {0xa0, 0xd8, ZC3XX_R01E_HSYNC_1
},
2619 {0xa0, 0xea, ZC3XX_R01F_HSYNC_2
},
2620 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
2621 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
},
2622 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
2623 {0xa1, 0x01, 0x0180},
2624 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
2625 {0xa0, 0x40, ZC3XX_R116_RGAIN
},
2626 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
2627 {0xa0, 0x40, ZC3XX_R118_BGAIN
},
2630 static const struct usb_action icm105a_50HZScale
[] = {
2631 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
2632 {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2633 {0xaa, 0x0c, 0x0020}, /* 00,0c,20,aa */
2634 {0xaa, 0x0e, 0x000e}, /* 00,0e,0e,aa */
2635 {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2636 {0xaa, 0x1c, 0x000d}, /* 00,1c,0d,aa */
2637 {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2638 {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2639 {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2640 {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2641 {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2642 {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2643 {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,02,cc */
2644 {0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,0d,cc */
2645 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
2646 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,04,cc */
2647 {0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,1a,cc */
2648 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
2649 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
2650 {0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,4b,cc */
2651 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
2652 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
2653 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc */
2654 {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,12,cc */
2655 {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,c8,cc */
2656 {0xa0, 0xd8, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,d8,cc */
2657 {0xa0, 0xea, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,ea,cc */
2658 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
2661 static const struct usb_action icm105a_50HZ
[] = {
2662 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
2663 {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2664 {0xaa, 0x0c, 0x008c}, /* 00,0c,8c,aa */
2665 {0xaa, 0x0e, 0x0095}, /* 00,0e,95,aa */
2666 {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2667 {0xaa, 0x1c, 0x0094}, /* 00,1c,94,aa */
2668 {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2669 {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2670 {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2671 {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2672 {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2673 {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2674 {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,02,cc */
2675 {0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,94,cc */
2676 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
2677 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,04,cc */
2678 {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,20,cc */
2679 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
2680 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
2681 {0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,84,cc */
2682 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
2683 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
2684 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc */
2685 {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,12,cc */
2686 {0xa0, 0xe3, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,e3,cc */
2687 {0xa0, 0xec, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,ec,cc */
2688 {0xa0, 0xf5, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,f5,cc */
2689 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
2690 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
}, /* 01,a7,00,cc */
2691 {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,c0,cc */
2694 static const struct usb_action icm105a_60HZScale
[] = {
2695 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
2696 {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2697 {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */
2698 {0xaa, 0x0e, 0x000d}, /* 00,0e,0d,aa */
2699 {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2700 {0xaa, 0x1c, 0x0008}, /* 00,1c,08,aa */
2701 {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2702 {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2703 {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2704 {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2705 {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2706 {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2707 {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,02,cc */
2708 {0xa0, 0x08, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,08,cc */
2709 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
2710 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,04,cc */
2711 {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,10,cc */
2712 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
2713 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
2714 {0xa0, 0x41, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,41,cc */
2715 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
2716 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
2717 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc */
2718 {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,12,cc */
2719 {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,c1,cc */
2720 {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,d4,cc */
2721 {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,e8,cc */
2722 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
2725 static const struct usb_action icm105a_60HZ
[] = {
2726 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
2727 {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2728 {0xaa, 0x0c, 0x0008}, /* 00,0c,08,aa */
2729 {0xaa, 0x0e, 0x0086}, /* 00,0e,86,aa */
2730 {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2731 {0xaa, 0x1c, 0x0085}, /* 00,1c,85,aa */
2732 {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2733 {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2734 {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2735 {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2736 {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2737 {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2738 {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,02,cc */
2739 {0xa0, 0x85, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,85,cc */
2740 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
2741 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,04,cc */
2742 {0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,08,cc */
2743 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
2744 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
2745 {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,81,cc */
2746 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
2747 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
2748 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc */
2749 {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,12,cc */
2750 {0xa0, 0xc2, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,c2,cc */
2751 {0xa0, 0xd6, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,d6,cc */
2752 {0xa0, 0xea, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,ea,cc */
2753 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
2754 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
}, /* 01,a7,00,cc */
2755 {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,c0,cc */
2758 static const struct usb_action icm105a_NoFlikerScale
[] = {
2759 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
2760 {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2761 {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */
2762 {0xaa, 0x0e, 0x000d}, /* 00,0e,0d,aa */
2763 {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2764 {0xaa, 0x1c, 0x0000}, /* 00,1c,00,aa */
2765 {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2766 {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2767 {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2768 {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2769 {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2770 {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2771 {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,02,cc */
2772 {0xa0, 0x00, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,00,cc */
2773 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
2774 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,04,cc */
2775 {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,20,cc */
2776 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
2777 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
2778 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,10,cc */
2779 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
2780 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
2781 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,00,cc */
2782 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,00,cc */
2783 {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,c1,cc */
2784 {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,d4,cc */
2785 {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,e8,cc */
2786 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
2789 static const struct usb_action icm105a_NoFliker
[] = {
2790 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
2791 {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2792 {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */
2793 {0xaa, 0x0e, 0x0081}, /* 00,0e,81,aa */
2794 {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2795 {0xaa, 0x1c, 0x0080}, /* 00,1c,80,aa */
2796 {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2797 {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2798 {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2799 {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2800 {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2801 {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2802 {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,02,cc */
2803 {0xa0, 0x80, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,80,cc */
2804 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
2805 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,04,cc */
2806 {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,20,cc */
2807 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
2808 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
2809 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,10,cc */
2810 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
2811 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
2812 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,00,cc */
2813 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,00,cc */
2814 {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,c1,cc */
2815 {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,d4,cc */
2816 {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,e8,cc */
2817 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
2818 {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN
}, /* 01,a7,00,cc */
2819 {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,c0,cc */
2823 static const struct usb_action mc501cb_Initial
[] = {
2824 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
2825 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,00,cc */
2826 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
2827 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
2828 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,03,cc */
2829 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
2830 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
2831 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
2832 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
2833 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
2834 {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,d8,cc */
2835 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
2836 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc */
2837 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
2838 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc */
2839 {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH
}, /* 00,9b,01,cc */
2840 {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,de,cc */
2841 {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH
}, /* 00,9d,02,cc */
2842 {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,86,cc */
2843 {0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH
}, /* 00,86,33,cc */
2844 {0xa0, 0x34, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,34,cc */
2845 {0xa0, 0x35, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,35,cc */
2846 {0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,b0,cc */
2847 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
2848 {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */
2849 {0xaa, 0x01, 0x0003}, /* 00,01,03,aa */
2850 {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */
2851 {0xaa, 0x03, 0x0000}, /* 00,03,00,aa */
2852 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
2853 {0xaa, 0x11, 0x0080}, /* 00,11,80,aa */
2854 {0xaa, 0x12, 0x0000}, /* 00,12,00,aa */
2855 {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */
2856 {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */
2857 {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */
2858 {0xaa, 0x16, 0x0000}, /* 00,16,00,aa */
2859 {0xaa, 0x17, 0x0001}, /* 00,17,01,aa */
2860 {0xaa, 0x18, 0x00de}, /* 00,18,de,aa */
2861 {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */
2862 {0xaa, 0x1a, 0x0086}, /* 00,1a,86,aa */
2863 {0xaa, 0x20, 0x00a8}, /* 00,20,a8,aa */
2864 {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */
2865 {0xaa, 0x23, 0x0000}, /* 00,23,00,aa */
2866 {0xaa, 0x24, 0x0000}, /* 00,24,00,aa */
2867 {0xaa, 0x40, 0x0033}, /* 00,40,33,aa */
2868 {0xaa, 0x41, 0x0077}, /* 00,41,77,aa */
2869 {0xaa, 0x42, 0x0053}, /* 00,42,53,aa */
2870 {0xaa, 0x43, 0x00b0}, /* 00,43,b0,aa */
2871 {0xaa, 0x4b, 0x0001}, /* 00,4b,01,aa */
2872 {0xaa, 0x72, 0x0020}, /* 00,72,20,aa */
2873 {0xaa, 0x73, 0x0000}, /* 00,73,00,aa */
2874 {0xaa, 0x80, 0x0000}, /* 00,80,00,aa */
2875 {0xaa, 0x85, 0x0050}, /* 00,85,50,aa */
2876 {0xaa, 0x91, 0x0070}, /* 00,91,70,aa */
2877 {0xaa, 0x92, 0x0072}, /* 00,92,72,aa */
2878 {0xaa, 0x03, 0x0001}, /* 00,03,01,aa */
2879 {0xaa, 0x10, 0x00a0}, /* 00,10,a0,aa */
2880 {0xaa, 0x11, 0x0001}, /* 00,11,01,aa */
2881 {0xaa, 0x30, 0x0000}, /* 00,30,00,aa */
2882 {0xaa, 0x60, 0x0000}, /* 00,60,00,aa */
2883 {0xaa, 0xa0, ZC3XX_R01A_LASTFRAMESTATE
}, /* 00,a0,1a,aa */
2884 {0xaa, 0xa1, 0x0000}, /* 00,a1,00,aa */
2885 {0xaa, 0xa2, 0x003f}, /* 00,a2,3f,aa */
2886 {0xaa, 0xa3, 0x0028}, /* 00,a3,28,aa */
2887 {0xaa, 0xa4, 0x0010}, /* 00,a4,10,aa */
2888 {0xaa, 0xa5, 0x0020}, /* 00,a5,20,aa */
2889 {0xaa, 0xb1, 0x0044}, /* 00,b1,44,aa */
2890 {0xaa, 0xd0, 0x0001}, /* 00,d0,01,aa */
2891 {0xaa, 0xd1, 0x0085}, /* 00,d1,85,aa */
2892 {0xaa, 0xd2, 0x0080}, /* 00,d2,80,aa */
2893 {0xaa, 0xd3, 0x0080}, /* 00,d3,80,aa */
2894 {0xaa, 0xd4, 0x0080}, /* 00,d4,80,aa */
2895 {0xaa, 0xd5, 0x0080}, /* 00,d5,80,aa */
2896 {0xaa, 0xc0, 0x00c3}, /* 00,c0,c3,aa */
2897 {0xaa, 0xc2, 0x0044}, /* 00,c2,44,aa */
2898 {0xaa, 0xc4, 0x0040}, /* 00,c4,40,aa */
2899 {0xaa, 0xc5, 0x0020}, /* 00,c5,20,aa */
2900 {0xaa, 0xc6, 0x0008}, /* 00,c6,08,aa */
2901 {0xaa, 0x03, 0x0004}, /* 00,03,04,aa */
2902 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
2903 {0xaa, 0x40, 0x0030}, /* 00,40,30,aa */
2904 {0xaa, 0x41, 0x0020}, /* 00,41,20,aa */
2905 {0xaa, 0x42, 0x002d}, /* 00,42,2d,aa */
2906 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2907 {0xaa, 0x1c, 0x0050}, /* 00,1C,50,aa */
2908 {0xaa, 0x11, 0x0081}, /* 00,11,81,aa */
2909 {0xaa, 0x3b, 0x001d}, /* 00,3b,1D,aa */
2910 {0xaa, 0x3c, 0x004c}, /* 00,3c,4C,aa */
2911 {0xaa, 0x3d, 0x0018}, /* 00,3d,18,aa */
2912 {0xaa, 0x3e, 0x006a}, /* 00,3e,6A,aa */
2913 {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */
2914 {0xaa, 0x52, 0x00ff}, /* 00,52,FF,aa */
2915 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
2916 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
2917 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,37,cc */
2918 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
}, /* 01,89,06,cc */
2919 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
2920 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
2921 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
2922 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
2923 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,02,cc */
2924 {0xaa, 0x03, 0x0002}, /* 00,03,02,aa */
2925 {0xaa, 0x51, 0x0027}, /* 00,51,27,aa */
2926 {0xaa, 0x52, 0x0020}, /* 00,52,20,aa */
2927 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2928 {0xaa, 0x50, 0x0010}, /* 00,50,10,aa */
2929 {0xaa, 0x51, 0x0010}, /* 00,51,10,aa */
2930 {0xaa, 0x54, 0x0010}, /* 00,54,10,aa */
2931 {0xaa, 0x55, 0x0010}, /* 00,55,10,aa */
2932 {0xa0, 0xf0, 0x0199}, /* 01,99,F0,cc */
2933 {0xa0, 0x80, 0x019a}, /* 01,9A,80,cc */
2935 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2936 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
2937 {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */
2938 {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */
2939 {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */
2943 static const struct usb_action mc501cb_InitialScale
[] = { /* 320x240 */
2944 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
2945 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,10,cc */
2946 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
2947 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
2948 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,03,cc */
2949 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
2950 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
2951 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
2952 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
2953 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
2954 {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,d0,cc */
2955 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
2956 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc */
2957 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
2958 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc */
2959 {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH
}, /* 00,9b,01,cc */
2960 {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,d8,cc */
2961 {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH
}, /* 00,9d,02,cc */
2962 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,88,cc */
2963 {0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH
}, /* 00,86,33,cc */
2964 {0xa0, 0x34, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,34,cc */
2965 {0xa0, 0x35, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,35,cc */
2966 {0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,b0,cc */
2967 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
2968 {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */
2969 {0xaa, 0x01, 0x0003}, /* 00,01,03,aa */
2970 {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */
2971 {0xaa, 0x03, 0x0000}, /* 00,03,00,aa */
2972 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
2973 {0xaa, 0x11, 0x0080}, /* 00,11,80,aa */
2974 {0xaa, 0x12, 0x0000}, /* 00,12,00,aa */
2975 {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */
2976 {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */
2977 {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */
2978 {0xaa, 0x16, 0x0000}, /* 00,16,00,aa */
2979 {0xaa, 0x17, 0x0001}, /* 00,17,01,aa */
2980 {0xaa, 0x18, 0x00d8}, /* 00,18,d8,aa */
2981 {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */
2982 {0xaa, 0x1a, 0x0088}, /* 00,1a,88,aa */
2983 {0xaa, 0x20, 0x00a8}, /* 00,20,a8,aa */
2984 {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */
2985 {0xaa, 0x23, 0x0000}, /* 00,23,00,aa */
2986 {0xaa, 0x24, 0x0000}, /* 00,24,00,aa */
2987 {0xaa, 0x40, 0x0033}, /* 00,40,33,aa */
2988 {0xaa, 0x41, 0x0077}, /* 00,41,77,aa */
2989 {0xaa, 0x42, 0x0053}, /* 00,42,53,aa */
2990 {0xaa, 0x43, 0x00b0}, /* 00,43,b0,aa */
2991 {0xaa, 0x4b, 0x0001}, /* 00,4b,01,aa */
2992 {0xaa, 0x72, 0x0020}, /* 00,72,20,aa */
2993 {0xaa, 0x73, 0x0000}, /* 00,73,00,aa */
2994 {0xaa, 0x80, 0x0000}, /* 00,80,00,aa */
2995 {0xaa, 0x85, 0x0050}, /* 00,85,50,aa */
2996 {0xaa, 0x91, 0x0070}, /* 00,91,70,aa */
2997 {0xaa, 0x92, 0x0072}, /* 00,92,72,aa */
2998 {0xaa, 0x03, 0x0001}, /* 00,03,01,aa */
2999 {0xaa, 0x10, 0x00a0}, /* 00,10,a0,aa */
3000 {0xaa, 0x11, 0x0001}, /* 00,11,01,aa */
3001 {0xaa, 0x30, 0x0000}, /* 00,30,00,aa */
3002 {0xaa, 0x60, 0x0000}, /* 00,60,00,aa */
3003 {0xaa, 0xa0, ZC3XX_R01A_LASTFRAMESTATE
}, /* 00,a0,1a,aa */
3004 {0xaa, 0xa1, 0x0000}, /* 00,a1,00,aa */
3005 {0xaa, 0xa2, 0x003f}, /* 00,a2,3f,aa */
3006 {0xaa, 0xa3, 0x0028}, /* 00,a3,28,aa */
3007 {0xaa, 0xa4, 0x0010}, /* 00,a4,10,aa */
3008 {0xaa, 0xa5, 0x0020}, /* 00,a5,20,aa */
3009 {0xaa, 0xb1, 0x0044}, /* 00,b1,44,aa */
3010 {0xaa, 0xd0, 0x0001}, /* 00,d0,01,aa */
3011 {0xaa, 0xd1, 0x0085}, /* 00,d1,85,aa */
3012 {0xaa, 0xd2, 0x0080}, /* 00,d2,80,aa */
3013 {0xaa, 0xd3, 0x0080}, /* 00,d3,80,aa */
3014 {0xaa, 0xd4, 0x0080}, /* 00,d4,80,aa */
3015 {0xaa, 0xd5, 0x0080}, /* 00,d5,80,aa */
3016 {0xaa, 0xc0, 0x00c3}, /* 00,c0,c3,aa */
3017 {0xaa, 0xc2, 0x0044}, /* 00,c2,44,aa */
3018 {0xaa, 0xc4, 0x0040}, /* 00,c4,40,aa */
3019 {0xaa, 0xc5, 0x0020}, /* 00,c5,20,aa */
3020 {0xaa, 0xc6, 0x0008}, /* 00,c6,08,aa */
3021 {0xaa, 0x03, 0x0004}, /* 00,03,04,aa */
3022 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
3023 {0xaa, 0x40, 0x0030}, /* 00,40,30,aa */
3024 {0xaa, 0x41, 0x0020}, /* 00,41,20,aa */
3025 {0xaa, 0x42, 0x002d}, /* 00,42,2d,aa */
3026 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3027 {0xaa, 0x1c, 0x0050}, /* 00,1c,50,aa */
3028 {0xaa, 0x11, 0x0081}, /* 00,11,81,aa */
3029 {0xaa, 0x3b, 0x003a}, /* 00,3b,3A,aa */
3030 {0xaa, 0x3c, 0x0098}, /* 00,3c,98,aa */
3031 {0xaa, 0x3d, 0x0030}, /* 00,3d,30,aa */
3032 {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */
3033 {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */
3034 {0xaa, 0x52, 0x00ff}, /* 00,52,FF,aa */
3035 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
3036 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
3037 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,37,cc */
3038 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
}, /* 01,89,06,cc */
3039 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
3040 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
3041 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
3042 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
3043 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,02,cc */
3044 {0xaa, 0x03, 0x0002}, /* 00,03,02,aa */
3045 {0xaa, 0x51, 0x004e}, /* 00,51,4E,aa */
3046 {0xaa, 0x52, 0x0041}, /* 00,52,41,aa */
3047 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3048 {0xaa, 0x50, 0x0010}, /* 00,50,10,aa */
3049 {0xaa, 0x51, 0x0010}, /* 00,51,10,aa */
3050 {0xaa, 0x54, 0x0010}, /* 00,54,10,aa */
3051 {0xaa, 0x55, 0x0010}, /* 00,55,10,aa */
3052 {0xa0, 0xf0, 0x0199}, /* 01,99,F0,cc */
3053 {0xa0, 0x80, 0x019a}, /* 01,9A,80,cc */
3054 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3055 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3056 {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */
3057 {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */
3058 {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */
3062 static const struct usb_action mc501cb_50HZScale
[] = {
3063 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3064 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3065 {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */
3066 {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */
3067 {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */
3068 {0xaa, 0x3c, 0x004c}, /* 00,3C,4C,aa */
3069 {0xaa, 0x3d, 0x001d}, /* 00,3D,1D,aa */
3070 {0xaa, 0x3e, 0x004c}, /* 00,3E,4C,aa */
3071 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3072 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3073 {0xaa, 0x36, 0x003a}, /* 00,36,3A,aa */
3074 {0xaa, 0x37, 0x0098}, /* 00,37,98,aa */
3075 {0xaa, 0x3b, 0x003a}, /* 00,3B,3A,aa */
3079 static const struct usb_action mc501cb_50HZ
[] = {
3080 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3081 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3082 {0xaa, 0x36, 0x003a}, /* 00,36,3A,aa */
3083 {0xaa, 0x37, 0x0098}, /* 00,37,98,aa */
3084 {0xaa, 0x3b, 0x003a}, /* 00,3B,3A,aa */
3085 {0xaa, 0x3c, 0x0098}, /* 00,3C,98,aa */
3086 {0xaa, 0x3d, 0x003a}, /* 00,3D,3A,aa */
3087 {0xaa, 0x3e, 0x0098}, /* 00,3E,98,aa */
3088 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3089 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3090 {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */
3091 {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */
3092 {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */
3096 static const struct usb_action mc501cb_60HZScale
[] = {
3097 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3098 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3099 {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */
3100 {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */
3101 {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */
3102 {0xaa, 0x3e, 0x006a}, /* 00,3E,6A,aa */
3103 {0xaa, 0x3b, 0x0018}, /* 00,3B,18,aa */
3104 {0xaa, 0x3c, 0x006a}, /* 00,3C,6A,aa */
3105 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3106 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3107 {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */
3108 {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */
3109 {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */
3113 static const struct usb_action mc501cb_60HZ
[] = {
3114 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3115 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3116 {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */
3117 {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */
3118 {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */
3119 {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */
3120 {0xaa, 0x3b, 0x0030}, /* 00,3B,30,aa */
3121 {0xaa, 0x3c, 0x00d4}, /* 00,3C,D4,aa */
3122 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3123 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3124 {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */
3125 {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */
3126 {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */
3130 static const struct usb_action mc501cb_NoFlikerScale
[] = {
3131 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3132 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3133 {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */
3134 {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */
3135 {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */
3136 {0xaa, 0x3e, 0x006a}, /* 00,3E,6A,aa */
3137 {0xaa, 0x3b, 0x0018}, /* 00,3B,18,aa */
3138 {0xaa, 0x3c, 0x006a}, /* 00,3C,6A,aa */
3139 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3140 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3141 {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */
3142 {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */
3143 {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */
3147 static const struct usb_action mc501cb_NoFliker
[] = {
3148 {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3149 {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3150 {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */
3151 {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */
3152 {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */
3153 {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */
3154 {0xaa, 0x3b, 0x0030}, /* 00,3B,30,aa */
3155 {0xaa, 0x3c, 0x00d4}, /* 00,3C,D4,aa */
3159 /* from zs211.inf */
3160 static const struct usb_action ov7620_Initial
[] = { /* 640x480 */
3161 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
3162 {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,40,cc */
3163 {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,00,cc */
3164 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
3165 {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,06,cc */
3166 {0xa0, 0x02, ZC3XX_R083_RGAINADDR
}, /* 00,83,02,cc */
3167 {0xa0, 0x01, ZC3XX_R085_BGAINADDR
}, /* 00,85,01,cc */
3168 {0xa0, 0x80, ZC3XX_R086_EXPTIMEHIGH
}, /* 00,86,80,cc */
3169 {0xa0, 0x81, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,81,cc */
3170 {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,10,cc */
3171 {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,a1,cc */
3172 {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE
}, /* 00,8d,08,cc */
3173 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
3174 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
3175 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
3176 {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,d8,cc */
3177 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc */
3178 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
3179 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
3180 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc */
3181 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
3182 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc */
3183 {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,de,cc */
3184 {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,86,cc */
3185 {0xaa, 0x12, 0x0088}, /* 00,12,88,aa */
3186 {0xaa, 0x12, 0x0048}, /* 00,12,48,aa */
3187 {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */
3188 {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */
3189 {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */
3190 {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */
3191 {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */
3192 {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */
3193 {0xaa, 0x17, 0x0018}, /* 00,17,18,aa */
3194 {0xaa, 0x18, 0x00ba}, /* 00,18,ba,aa */
3195 {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */
3196 {0xaa, 0x1a, 0x00f1}, /* 00,1a,f1,aa */
3197 {0xaa, 0x20, 0x0040}, /* 00,20,40,aa */
3198 {0xaa, 0x24, 0x0088}, /* 00,24,88,aa */
3199 {0xaa, 0x25, 0x0078}, /* 00,25,78,aa */
3200 {0xaa, 0x27, 0x00f6}, /* 00,27,f6,aa */
3201 {0xaa, 0x28, 0x00a0}, /* 00,28,a0,aa */
3202 {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */
3203 {0xaa, 0x2a, 0x0083}, /* 00,2a,83,aa */
3204 {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */
3205 {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */
3206 {0xaa, 0x74, 0x0020}, /* 00,74,20,aa */
3207 {0xaa, 0x61, 0x0068}, /* 00,61,68,aa */
3208 {0xaa, 0x64, 0x0088}, /* 00,64,88,aa */
3209 {0xaa, 0x00, 0x0000}, /* 00,00,00,aa */
3210 {0xaa, 0x06, 0x0080}, /* 00,06,80,aa */
3211 {0xaa, 0x01, 0x0090}, /* 00,01,90,aa */
3212 {0xaa, 0x02, 0x0030}, /* 00,02,30,aa */
3213 {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,77,cc */
3214 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
3215 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
3216 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
}, /* 01,89,06,cc */
3217 {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */
3218 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
3219 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
3220 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
3221 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
3222 {0xa0, 0x68, ZC3XX_R116_RGAIN
}, /* 01,16,68,cc */
3223 {0xa0, 0x52, ZC3XX_R118_BGAIN
}, /* 01,18,52,cc */
3224 {0xa0, 0x40, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,40,cc */
3225 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,02,cc */
3226 {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,50,cc */
3229 static const struct usb_action ov7620_InitialScale
[] = { /* 320x240 */
3230 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
3231 {0xa0, 0x50, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,50,cc */
3232 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,00,cc */
3234 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
3235 {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,06,cc */
3236 {0xa0, 0x02, ZC3XX_R083_RGAINADDR
}, /* 00,83,02,cc */
3237 {0xa0, 0x01, ZC3XX_R085_BGAINADDR
}, /* 00,85,01,cc */
3238 {0xa0, 0x80, ZC3XX_R086_EXPTIMEHIGH
}, /* 00,86,80,cc */
3239 {0xa0, 0x81, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,81,cc */
3240 {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,10,cc */
3241 {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,a1,cc */
3242 {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE
}, /* 00,8d,08,cc */
3243 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
3244 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
3245 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
3246 {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,d0,cc */
3247 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc */
3248 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
3249 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
3250 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc */
3251 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
3252 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc */
3253 {0xa0, 0xd6, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,d6,cc */
3254 /* OV7648 00,9c,d8,cc */
3255 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,88,cc */
3256 {0xaa, 0x12, 0x0088}, /* 00,12,88,aa */
3257 {0xaa, 0x12, 0x0048}, /* 00,12,48,aa */
3258 {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */
3259 {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */
3260 {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */
3261 {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */
3262 {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */
3263 {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */
3264 {0xaa, 0x24, 0x0088}, /* 00,24,88,aa */
3265 {0xaa, 0x25, 0x0078}, /* 00,25,78,aa */
3266 {0xaa, 0x17, 0x0018}, /* 00,17,18,aa */
3267 {0xaa, 0x18, 0x00ba}, /* 00,18,ba,aa */
3268 {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */
3269 {0xaa, 0x1a, 0x00f2}, /* 00,1a,f2,aa */
3270 {0xaa, 0x20, 0x0040}, /* 00,20,40,aa */
3271 {0xaa, 0x27, 0x00f6}, /* 00,27,f6,aa */
3272 {0xaa, 0x28, 0x00a0}, /* 00,28,a0,aa */
3273 {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */
3274 {0xaa, 0x2a, 0x0083}, /* 00,2a,83,aa */
3275 {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */
3276 {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */
3277 {0xaa, 0x74, 0x0020}, /* 00,74,20,aa */
3278 {0xaa, 0x61, 0x0068}, /* 00,61,68,aa */
3279 {0xaa, 0x64, 0x0088}, /* 00,64,88,aa */
3280 {0xaa, 0x00, 0x0000}, /* 00,00,00,aa */
3281 {0xaa, 0x06, 0x0080}, /* 00,06,80,aa */
3282 {0xaa, 0x01, 0x0090}, /* 00,01,90,aa */
3283 {0xaa, 0x02, 0x0030}, /* 00,02,30,aa */
3284 {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,77,cc */
3285 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
3286 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
3287 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
}, /* 01,89,06,cc */
3288 {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */
3289 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
3290 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
3291 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
3292 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
3293 {0xa0, 0x68, ZC3XX_R116_RGAIN
}, /* 01,16,68,cc */
3294 {0xa0, 0x52, ZC3XX_R118_BGAIN
}, /* 01,18,52,cc */
3295 {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,50,cc */
3296 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,02,cc */
3297 {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,50,cc */
3300 static const struct usb_action ov7620_50HZ
[] = {
3301 {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */
3302 {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */
3303 {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */
3304 {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */
3305 {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */
3306 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
3307 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,04,cc */
3308 {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,18,cc */
3309 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
3310 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
3311 {0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,83,cc */
3312 {0xaa, 0x10, 0x0082}, /* 00,10,82,aa */
3313 {0xaa, 0x76, 0x0003}, /* 00,76,03,aa */
3314 /* {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, * 00,02,40,cc
3315 if mode0 (640x480) */
3318 static const struct usb_action ov7620_60HZ
[] = {
3319 {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */
3320 /* (bug in zs211.inf) */
3321 {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */
3322 {0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */
3323 {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */
3324 {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */
3325 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
3326 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,04,cc */
3327 {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,18,cc */
3328 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
3329 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
3330 {0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,83,cc */
3331 {0xaa, 0x10, 0x0020}, /* 00,10,20,aa */
3332 {0xaa, 0x76, 0x0003}, /* 00,76,03,aa */
3333 /* {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, * 00,02,40,cc
3334 * if mode0 (640x480) */
3335 /* ?? in gspca v1, it was
3336 {0xa0, 0x00, 0x0039}, * 00,00,00,dd *
3337 {0xa1, 0x01, 0x0037}, */
3340 static const struct usb_action ov7620_NoFliker
[] = {
3341 {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */
3342 /* (bug in zs211.inf) */
3343 {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */
3344 {0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */
3345 {0xaa, 0x75, 0x008e}, /* 00,75,8e,aa */
3346 {0xaa, 0x2d, 0x0001}, /* 00,2d,01,aa */
3347 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
3348 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,04,cc */
3349 {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,18,cc */
3350 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
3351 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
3352 {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,01,cc */
3353 /* {0xa0, 0x44, ZC3XX_R002_CLOCKSELECT}, * 00,02,44,cc
3354 - if mode1 (320x240) */
3356 {0xa0, 0x00, 0x0039}, * 00,00,00,dd *
3357 {0xa1, 0x01, 0x0037}, */
3361 static const struct usb_action ov7630c_InitialScale
[] = {
3362 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
3363 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
},
3364 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
3365 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
},
3366 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
3367 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
3368 {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT
},
3369 {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR
},
3370 {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE
},
3371 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
3372 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
3373 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
3374 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
3375 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
3376 {0xaa, 0x12, 0x0080},
3377 {0xa0, 0x02, ZC3XX_R083_RGAINADDR
},
3378 {0xa0, 0x01, ZC3XX_R085_BGAINADDR
},
3379 {0xa0, 0x90, ZC3XX_R086_EXPTIMEHIGH
},
3380 {0xa0, 0x91, ZC3XX_R087_EXPTIMEMID
},
3381 {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW
},
3382 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
3383 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
3384 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
3385 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
3386 {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW
},
3387 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
},
3388 {0xaa, 0x12, 0x0069},
3389 {0xaa, 0x04, 0x0020},
3390 {0xaa, 0x06, 0x0050},
3391 {0xaa, 0x13, 0x0083},
3392 {0xaa, 0x14, 0x0000},
3393 {0xaa, 0x15, 0x0024},
3394 {0xaa, 0x17, 0x0018},
3395 {0xaa, 0x18, 0x00ba},
3396 {0xaa, 0x19, 0x0002},
3397 {0xaa, 0x1a, 0x00f6},
3398 {0xaa, 0x1b, 0x0002},
3399 {0xaa, 0x20, 0x00c2},
3400 {0xaa, 0x24, 0x0060},
3401 {0xaa, 0x25, 0x0040},
3402 {0xaa, 0x26, 0x0030},
3403 {0xaa, 0x27, 0x00ea},
3404 {0xaa, 0x28, 0x00a0},
3405 {0xaa, 0x21, 0x0000},
3406 {0xaa, 0x2a, 0x0081},
3407 {0xaa, 0x2b, 0x0096},
3408 {0xaa, 0x2d, 0x0094},
3409 {0xaa, 0x2f, 0x003d},
3410 {0xaa, 0x30, 0x0024},
3411 {0xaa, 0x60, 0x0000},
3412 {0xaa, 0x61, 0x0040},
3413 {0xaa, 0x68, 0x007c},
3414 {0xaa, 0x6f, 0x0015},
3415 {0xaa, 0x75, 0x0088},
3416 {0xaa, 0x77, 0x00b5},
3417 {0xaa, 0x01, 0x0060},
3418 {0xaa, 0x02, 0x0060},
3419 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
3420 {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION
},
3421 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
3422 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
3423 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
3424 {0xa0, 0x00, 0x01ad},
3425 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
3426 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
3427 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
3428 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
3429 {0xa0, 0x60, ZC3XX_R116_RGAIN
},
3430 {0xa0, 0x46, ZC3XX_R118_BGAIN
},
3431 {0xa0, 0x04, ZC3XX_R113_RGB03
},
3433 {0xa1, 0x01, 0x0002},
3434 {0xa0, 0x50, ZC3XX_R10A_RGB00
}, /* matrix */
3435 {0xa0, 0xf8, ZC3XX_R10B_RGB01
},
3436 {0xa0, 0xf8, ZC3XX_R10C_RGB02
},
3437 {0xa0, 0xf8, ZC3XX_R10D_RGB10
},
3438 {0xa0, 0x50, ZC3XX_R10E_RGB11
},
3439 {0xa0, 0xf8, ZC3XX_R10F_RGB12
},
3440 {0xa0, 0xf8, ZC3XX_R110_RGB20
},
3441 {0xa0, 0xf8, ZC3XX_R111_RGB21
},
3442 {0xa0, 0x50, ZC3XX_R112_RGB22
},
3444 {0xa1, 0x01, 0x0008},
3445 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* clock ? */
3446 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
3447 {0xa1, 0x01, 0x01c8},
3448 {0xa1, 0x01, 0x01c9},
3449 {0xa1, 0x01, 0x01ca},
3450 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
3451 {0xa0, 0x01, ZC3XX_R120_GAMMA00
}, /* gamma 2 ?*/
3452 {0xa0, 0x0c, ZC3XX_R121_GAMMA01
},
3453 {0xa0, 0x1f, ZC3XX_R122_GAMMA02
},
3454 {0xa0, 0x3a, ZC3XX_R123_GAMMA03
},
3455 {0xa0, 0x53, ZC3XX_R124_GAMMA04
},
3456 {0xa0, 0x6d, ZC3XX_R125_GAMMA05
},
3457 {0xa0, 0x85, ZC3XX_R126_GAMMA06
},
3458 {0xa0, 0x9c, ZC3XX_R127_GAMMA07
},
3459 {0xa0, 0xb0, ZC3XX_R128_GAMMA08
},
3460 {0xa0, 0xc2, ZC3XX_R129_GAMMA09
},
3461 {0xa0, 0xd1, ZC3XX_R12A_GAMMA0A
},
3462 {0xa0, 0xde, ZC3XX_R12B_GAMMA0B
},
3463 {0xa0, 0xe9, ZC3XX_R12C_GAMMA0C
},
3464 {0xa0, 0xf2, ZC3XX_R12D_GAMMA0D
},
3465 {0xa0, 0xf9, ZC3XX_R12E_GAMMA0E
},
3466 {0xa0, 0xff, ZC3XX_R12F_GAMMA0F
},
3467 {0xa0, 0x05, ZC3XX_R130_GAMMA10
},
3468 {0xa0, 0x0f, ZC3XX_R131_GAMMA11
},
3469 {0xa0, 0x16, ZC3XX_R132_GAMMA12
},
3470 {0xa0, 0x1a, ZC3XX_R133_GAMMA13
},
3471 {0xa0, 0x19, ZC3XX_R134_GAMMA14
},
3472 {0xa0, 0x19, ZC3XX_R135_GAMMA15
},
3473 {0xa0, 0x17, ZC3XX_R136_GAMMA16
},
3474 {0xa0, 0x15, ZC3XX_R137_GAMMA17
},
3475 {0xa0, 0x12, ZC3XX_R138_GAMMA18
},
3476 {0xa0, 0x10, ZC3XX_R139_GAMMA19
},
3477 {0xa0, 0x0e, ZC3XX_R13A_GAMMA1A
},
3478 {0xa0, 0x0b, ZC3XX_R13B_GAMMA1B
},
3479 {0xa0, 0x09, ZC3XX_R13C_GAMMA1C
},
3480 {0xa0, 0x08, ZC3XX_R13D_GAMMA1D
},
3481 {0xa0, 0x06, ZC3XX_R13E_GAMMA1E
},
3482 {0xa0, 0x03, ZC3XX_R13F_GAMMA1F
},
3483 {0xa0, 0x50, ZC3XX_R10A_RGB00
}, /* matrix */
3484 {0xa0, 0xf8, ZC3XX_R10B_RGB01
},
3485 {0xa0, 0xf8, ZC3XX_R10C_RGB02
},
3486 {0xa0, 0xf8, ZC3XX_R10D_RGB10
},
3487 {0xa0, 0x50, ZC3XX_R10E_RGB11
},
3488 {0xa0, 0xf8, ZC3XX_R10F_RGB12
},
3489 {0xa0, 0xf8, ZC3XX_R110_RGB20
},
3490 {0xa0, 0xf8, ZC3XX_R111_RGB21
},
3491 {0xa0, 0x50, ZC3XX_R112_RGB22
},
3493 {0xa1, 0x01, 0x0180},
3494 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
3495 {0xaa, 0x10, 0x001b},
3496 {0xaa, 0x76, 0x0002},
3497 {0xaa, 0x2a, 0x0081},
3498 {0xaa, 0x2b, 0x0000},
3499 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
3500 {0xa0, 0x01, ZC3XX_R191_EXPOSURELIMITMID
},
3501 {0xa0, 0xb8, ZC3XX_R192_EXPOSURELIMITLOW
},
3502 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
3503 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
3504 {0xa0, 0x37, ZC3XX_R197_ANTIFLICKERLOW
},
3505 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
3506 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
3507 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
},
3508 {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP
},
3509 {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN
},
3510 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
},
3511 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE
},
3512 {0xaa, 0x13, 0x0083}, /* 40 */
3513 {0xa1, 0x01, 0x0180},
3514 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
3518 static const struct usb_action ov7630c_Initial
[] = {
3519 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
3520 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
},
3521 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
3522 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
3523 {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT
},
3524 {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR
},
3525 {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE
},
3526 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
3527 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
3528 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
3529 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
3530 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
3532 {0xaa, 0x12, 0x0080},
3533 {0xa0, 0x02, ZC3XX_R083_RGAINADDR
},
3534 {0xa0, 0x01, ZC3XX_R085_BGAINADDR
},
3535 {0xa0, 0x90, ZC3XX_R086_EXPTIMEHIGH
},
3536 {0xa0, 0x91, ZC3XX_R087_EXPTIMEMID
},
3537 {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW
},
3538 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
3539 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
3540 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
3541 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
3542 {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW
},
3543 {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW
},
3544 {0xaa, 0x12, 0x0069}, /* i2c */
3545 {0xaa, 0x04, 0x0020},
3546 {0xaa, 0x06, 0x0050},
3547 {0xaa, 0x13, 0x00c3},
3548 {0xaa, 0x14, 0x0000},
3549 {0xaa, 0x15, 0x0024},
3550 {0xaa, 0x19, 0x0003},
3551 {0xaa, 0x1a, 0x00f6},
3552 {0xaa, 0x1b, 0x0002},
3553 {0xaa, 0x20, 0x00c2},
3554 {0xaa, 0x24, 0x0060},
3555 {0xaa, 0x25, 0x0040},
3556 {0xaa, 0x26, 0x0030},
3557 {0xaa, 0x27, 0x00ea},
3558 {0xaa, 0x28, 0x00a0},
3559 {0xaa, 0x21, 0x0000},
3560 {0xaa, 0x2a, 0x0081},
3561 {0xaa, 0x2b, 0x0096},
3562 {0xaa, 0x2d, 0x0084},
3563 {0xaa, 0x2f, 0x003d},
3564 {0xaa, 0x30, 0x0024},
3565 {0xaa, 0x60, 0x0000},
3566 {0xaa, 0x61, 0x0040},
3567 {0xaa, 0x68, 0x007c},
3568 {0xaa, 0x6f, 0x0015},
3569 {0xaa, 0x75, 0x0088},
3570 {0xaa, 0x77, 0x00b5},
3571 {0xaa, 0x01, 0x0060},
3572 {0xaa, 0x02, 0x0060},
3573 {0xaa, 0x17, 0x0018},
3574 {0xaa, 0x18, 0x00ba},
3575 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
3576 {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION
},
3577 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
3578 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
3579 {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN
},
3580 {0xa0, 0x00, 0x01ad},
3581 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
3582 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
3583 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
3584 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
3585 {0xa0, 0x60, ZC3XX_R116_RGAIN
},
3586 {0xa0, 0x46, ZC3XX_R118_BGAIN
},
3587 {0xa0, 0x04, ZC3XX_R113_RGB03
},
3589 {0xa1, 0x01, 0x0002},
3590 {0xa0, 0x4e, ZC3XX_R10A_RGB00
}, /* matrix */
3591 {0xa0, 0xfe, ZC3XX_R10B_RGB01
},
3592 {0xa0, 0xf4, ZC3XX_R10C_RGB02
},
3593 {0xa0, 0xf7, ZC3XX_R10D_RGB10
},
3594 {0xa0, 0x4d, ZC3XX_R10E_RGB11
},
3595 {0xa0, 0xfc, ZC3XX_R10F_RGB12
},
3596 {0xa0, 0x00, ZC3XX_R110_RGB20
},
3597 {0xa0, 0xf6, ZC3XX_R111_RGB21
},
3598 {0xa0, 0x4a, ZC3XX_R112_RGB22
},
3600 {0xa1, 0x01, 0x0008},
3601 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* clock ? */
3602 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
3603 {0xa1, 0x01, 0x01c8},
3604 {0xa1, 0x01, 0x01c9},
3605 {0xa1, 0x01, 0x01ca},
3606 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
3607 {0xa0, 0x16, ZC3XX_R120_GAMMA00
}, /* gamma ~4 */
3608 {0xa0, 0x3a, ZC3XX_R121_GAMMA01
},
3609 {0xa0, 0x5b, ZC3XX_R122_GAMMA02
},
3610 {0xa0, 0x7c, ZC3XX_R123_GAMMA03
},
3611 {0xa0, 0x94, ZC3XX_R124_GAMMA04
},
3612 {0xa0, 0xa9, ZC3XX_R125_GAMMA05
},
3613 {0xa0, 0xbb, ZC3XX_R126_GAMMA06
},
3614 {0xa0, 0xca, ZC3XX_R127_GAMMA07
},
3615 {0xa0, 0xd7, ZC3XX_R128_GAMMA08
},
3616 {0xa0, 0xe1, ZC3XX_R129_GAMMA09
},
3617 {0xa0, 0xea, ZC3XX_R12A_GAMMA0A
},
3618 {0xa0, 0xf1, ZC3XX_R12B_GAMMA0B
},
3619 {0xa0, 0xf7, ZC3XX_R12C_GAMMA0C
},
3620 {0xa0, 0xfc, ZC3XX_R12D_GAMMA0D
},
3621 {0xa0, 0xff, ZC3XX_R12E_GAMMA0E
},
3622 {0xa0, 0xff, ZC3XX_R12F_GAMMA0F
},
3623 {0xa0, 0x20, ZC3XX_R130_GAMMA10
},
3624 {0xa0, 0x22, ZC3XX_R131_GAMMA11
},
3625 {0xa0, 0x20, ZC3XX_R132_GAMMA12
},
3626 {0xa0, 0x1c, ZC3XX_R133_GAMMA13
},
3627 {0xa0, 0x16, ZC3XX_R134_GAMMA14
},
3628 {0xa0, 0x13, ZC3XX_R135_GAMMA15
},
3629 {0xa0, 0x10, ZC3XX_R136_GAMMA16
},
3630 {0xa0, 0x0d, ZC3XX_R137_GAMMA17
},
3631 {0xa0, 0x0b, ZC3XX_R138_GAMMA18
},
3632 {0xa0, 0x09, ZC3XX_R139_GAMMA19
},
3633 {0xa0, 0x07, ZC3XX_R13A_GAMMA1A
},
3634 {0xa0, 0x06, ZC3XX_R13B_GAMMA1B
},
3635 {0xa0, 0x05, ZC3XX_R13C_GAMMA1C
},
3636 {0xa0, 0x04, ZC3XX_R13D_GAMMA1D
},
3637 {0xa0, 0x00, ZC3XX_R13E_GAMMA1E
},
3638 {0xa0, 0x01, ZC3XX_R13F_GAMMA1F
},
3639 {0xa0, 0x4e, ZC3XX_R10A_RGB00
}, /* matrix */
3640 {0xa0, 0xfe, ZC3XX_R10B_RGB01
},
3641 {0xa0, 0xf4, ZC3XX_R10C_RGB02
},
3642 {0xa0, 0xf7, ZC3XX_R10D_RGB10
},
3643 {0xa0, 0x4d, ZC3XX_R10E_RGB11
},
3644 {0xa0, 0xfc, ZC3XX_R10F_RGB12
},
3645 {0xa0, 0x00, ZC3XX_R110_RGB20
},
3646 {0xa0, 0xf6, ZC3XX_R111_RGB21
},
3647 {0xa0, 0x4a, ZC3XX_R112_RGB22
},
3649 {0xa1, 0x01, 0x0180},
3650 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
3651 {0xaa, 0x10, 0x000d},
3652 {0xaa, 0x76, 0x0002},
3653 {0xaa, 0x2a, 0x0081},
3654 {0xaa, 0x2b, 0x0000},
3655 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
3656 {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID
},
3657 {0xa0, 0xd8, ZC3XX_R192_EXPOSURELIMITLOW
},
3658 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
3659 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
3660 {0xa0, 0x1b, ZC3XX_R197_ANTIFLICKERLOW
},
3661 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
3662 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
3663 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
},
3664 {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP
},
3665 {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN
},
3666 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
},
3667 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE
},
3668 {0xaa, 0x13, 0x00c3},
3670 {0xa1, 0x01, 0x0180},
3671 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
3675 static const struct usb_action pas106b_Initial_com
[] = {
3676 /* Sream and Sensor specific */
3677 {0xa1, 0x01, 0x0010}, /* CMOSSensorSelect */
3679 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* SystemControl */
3680 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* SystemControl */
3682 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
}, /* ClockSelect */
3683 {0xa0, 0x03, 0x003a},
3684 {0xa0, 0x0c, 0x003b},
3685 {0xa0, 0x04, 0x0038},
3689 static const struct usb_action pas106b_InitialScale
[] = { /* 176x144 */
3691 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
3692 /* Sream and Sensor specific */
3693 {0xa0, 0x0f, ZC3XX_R010_CMOSSENSORSELECT
},
3695 {0xa0, 0x00, ZC3XX_R003_FRAMEWIDTHHIGH
},
3696 {0xa0, 0xb0, ZC3XX_R004_FRAMEWIDTHLOW
},
3697 {0xa0, 0x00, ZC3XX_R005_FRAMEHEIGHTHIGH
},
3698 {0xa0, 0x90, ZC3XX_R006_FRAMEHEIGHTLOW
},
3700 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
3701 /* Sream and Sensor specific */
3702 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
3703 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
3704 /* Sensor Interface */
3705 {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE
},
3706 /* Window inside sensor array */
3707 {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW
},
3708 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
3709 {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW
},
3710 {0xa0, 0x28, ZC3XX_R09C_WINHEIGHTLOW
},
3711 {0xa0, 0x68, ZC3XX_R09E_WINWIDTHLOW
},
3712 /* Init the sensor */
3713 {0xaa, 0x02, 0x0004},
3714 {0xaa, 0x08, 0x0000},
3715 {0xaa, 0x09, 0x0005},
3716 {0xaa, 0x0a, 0x0002},
3717 {0xaa, 0x0b, 0x0002},
3718 {0xaa, 0x0c, 0x0005},
3719 {0xaa, 0x0d, 0x0000},
3720 {0xaa, 0x0e, 0x0002},
3721 {0xaa, 0x14, 0x0081},
3723 /* Other registors */
3724 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
},
3725 /* Frame retreiving */
3726 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
3728 {0xa0, 0xa0, ZC3XX_R1A8_DIGITALGAIN
},
3730 {0xa0, 0x00, 0x01ad},
3732 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
3733 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
3734 /* Other registors */
3735 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
3736 /* Auto exposure and white balance */
3737 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
3739 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
3741 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
3743 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
3744 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
},
3745 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
},
3746 /* Other registers */
3747 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
3748 /* Auto exposure and white balance */
3749 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
3751 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
3753 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
3755 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
3756 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
},
3757 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
},
3759 {0xa0, 0x58, ZC3XX_R10A_RGB00
}, /* matrix */
3760 {0xa0, 0xf4, ZC3XX_R10B_RGB01
},
3761 {0xa0, 0xf4, ZC3XX_R10C_RGB02
},
3762 {0xa0, 0xf4, ZC3XX_R10D_RGB10
},
3763 {0xa0, 0x58, ZC3XX_R10E_RGB11
},
3764 {0xa0, 0xf4, ZC3XX_R10F_RGB12
},
3765 {0xa0, 0xf4, ZC3XX_R110_RGB20
},
3766 {0xa0, 0xf4, ZC3XX_R111_RGB21
},
3767 {0xa0, 0x58, ZC3XX_R112_RGB22
},
3768 /* Auto correction */
3769 {0xa0, 0x03, ZC3XX_R181_WINXSTART
},
3770 {0xa0, 0x08, ZC3XX_R182_WINXWIDTH
},
3771 {0xa0, 0x16, ZC3XX_R183_WINXCENTER
},
3772 {0xa0, 0x03, ZC3XX_R184_WINYSTART
},
3773 {0xa0, 0x05, ZC3XX_R185_WINYWIDTH
},
3774 {0xa0, 0x14, ZC3XX_R186_WINYCENTER
},
3775 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
3777 /* Auto exposure and white balance */
3778 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
3779 {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID
},
3780 {0xa0, 0xb1, ZC3XX_R192_EXPOSURELIMITLOW
},
3781 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
3782 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
3783 {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW
},
3784 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
},
3785 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
},
3787 {0xaa, 0x07, 0x00b1},
3788 {0xaa, 0x05, 0x0003},
3789 {0xaa, 0x04, 0x0001},
3790 {0xaa, 0x03, 0x003b},
3792 {0xa0, 0x20, ZC3XX_R1A9_DIGITALLIMITDIFF
},
3793 {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP
},
3794 {0xa0, 0xa0, ZC3XX_R11D_GLOBALGAIN
},
3795 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
3796 /* Auto correction */
3797 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE
},
3798 {0xa1, 0x01, 0x0180}, /* AutoCorrectEnable */
3799 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
3801 {0xa0, 0x40, ZC3XX_R116_RGAIN
},
3802 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
3803 {0xa0, 0x40, ZC3XX_R118_BGAIN
},
3807 static const struct usb_action pas106b_Initial
[] = { /* 352x288 */
3809 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
3810 /* Sream and Sensor specific */
3811 {0xa0, 0x0f, ZC3XX_R010_CMOSSENSORSELECT
},
3813 {0xa0, 0x01, ZC3XX_R003_FRAMEWIDTHHIGH
},
3814 {0xa0, 0x60, ZC3XX_R004_FRAMEWIDTHLOW
},
3815 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
3816 {0xa0, 0x20, ZC3XX_R006_FRAMEHEIGHTLOW
},
3818 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
3819 /* Sream and Sensor specific */
3820 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
},
3821 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
3822 /* Sensor Interface */
3823 {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE
},
3824 /* Window inside sensor array */
3825 {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW
},
3826 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
3827 {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW
},
3828 {0xa0, 0x28, ZC3XX_R09C_WINHEIGHTLOW
},
3829 {0xa0, 0x68, ZC3XX_R09E_WINWIDTHLOW
},
3830 /* Init the sensor */
3831 {0xaa, 0x02, 0x0004},
3832 {0xaa, 0x08, 0x0000},
3833 {0xaa, 0x09, 0x0005},
3834 {0xaa, 0x0a, 0x0002},
3835 {0xaa, 0x0b, 0x0002},
3836 {0xaa, 0x0c, 0x0005},
3837 {0xaa, 0x0d, 0x0000},
3838 {0xaa, 0x0e, 0x0002},
3839 {0xaa, 0x14, 0x0081},
3841 /* Other registors */
3842 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
},
3843 /* Frame retreiving */
3844 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
3846 {0xa0, 0xa0, ZC3XX_R1A8_DIGITALGAIN
},
3848 {0xa0, 0x00, 0x01ad},
3850 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
3851 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
3852 /* Other registors */
3853 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
3854 /* Auto exposure and white balance */
3855 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
3856 {0xa0, 0x80, ZC3XX_R18D_YTARGET
},
3858 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
3860 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
3862 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
3863 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
},
3864 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
},
3865 /* Other registers */
3866 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
3867 /* Auto exposure and white balance */
3868 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
3870 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
3872 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
3874 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
3875 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
},
3876 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
},
3878 {0xa0, 0x58, ZC3XX_R10A_RGB00
}, /* matrix */
3879 {0xa0, 0xf4, ZC3XX_R10B_RGB01
},
3880 {0xa0, 0xf4, ZC3XX_R10C_RGB02
},
3881 {0xa0, 0xf4, ZC3XX_R10D_RGB10
},
3882 {0xa0, 0x58, ZC3XX_R10E_RGB11
},
3883 {0xa0, 0xf4, ZC3XX_R10F_RGB12
},
3884 {0xa0, 0xf4, ZC3XX_R110_RGB20
},
3885 {0xa0, 0xf4, ZC3XX_R111_RGB21
},
3886 {0xa0, 0x58, ZC3XX_R112_RGB22
},
3887 /* Auto correction */
3888 {0xa0, 0x03, ZC3XX_R181_WINXSTART
},
3889 {0xa0, 0x08, ZC3XX_R182_WINXWIDTH
},
3890 {0xa0, 0x16, ZC3XX_R183_WINXCENTER
},
3891 {0xa0, 0x03, ZC3XX_R184_WINYSTART
},
3892 {0xa0, 0x05, ZC3XX_R185_WINYWIDTH
},
3893 {0xa0, 0x14, ZC3XX_R186_WINYCENTER
},
3894 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
3896 /* Auto exposure and white balance */
3897 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
3898 {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID
},
3899 {0xa0, 0xb1, ZC3XX_R192_EXPOSURELIMITLOW
},
3901 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
3902 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
3903 {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW
},
3905 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
3906 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
3908 {0xaa, 0x07, 0x00b1},
3909 {0xaa, 0x05, 0x0003},
3910 {0xaa, 0x04, 0x0001},
3911 {0xaa, 0x03, 0x003b},
3913 {0xa0, 0x20, ZC3XX_R1A9_DIGITALLIMITDIFF
},
3914 {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP
},
3915 {0xa0, 0xa0, ZC3XX_R11D_GLOBALGAIN
},
3916 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
3917 /* Auto correction */
3918 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE
},
3919 {0xa1, 0x01, 0x0180}, /* AutoCorrectEnable */
3920 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
3922 {0xa0, 0x40, ZC3XX_R116_RGAIN
},
3923 {0xa0, 0x40, ZC3XX_R117_GGAIN
},
3924 {0xa0, 0x40, ZC3XX_R118_BGAIN
},
3926 {0xa0, 0x00, 0x0007}, /* AutoCorrectEnable */
3927 {0xa0, 0xff, ZC3XX_R018_FRAMELOST
}, /* Frame adjust */
3930 static const struct usb_action pas106b_50HZ
[] = {
3931 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
3932 {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,06,cc */
3933 {0xa0, 0x54, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,54,cc */
3934 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
3935 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
3936 {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,87,cc */
3937 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
3938 {0xa0, 0x30, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,30,cc */
3939 {0xaa, 0x03, 0x0021}, /* 00,03,21,aa */
3940 {0xaa, 0x04, 0x000c}, /* 00,04,0c,aa */
3941 {0xaa, 0x05, 0x0002}, /* 00,05,02,aa */
3942 {0xaa, 0x07, 0x001c}, /* 00,07,1c,aa */
3943 {0xa0, 0x04, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,04,cc */
3946 static const struct usb_action pas106b_60HZ
[] = {
3947 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
3948 {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,06,cc */
3949 {0xa0, 0x2e, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,2e,cc */
3950 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
3951 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
3952 {0xa0, 0x71, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,71,cc */
3953 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
3954 {0xa0, 0x30, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,30,cc */
3955 {0xaa, 0x03, 0x001c}, /* 00,03,1c,aa */
3956 {0xaa, 0x04, 0x0004}, /* 00,04,04,aa */
3957 {0xaa, 0x05, 0x0001}, /* 00,05,01,aa */
3958 {0xaa, 0x07, 0x00c4}, /* 00,07,c4,aa */
3959 {0xa0, 0x04, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,04,cc */
3962 static const struct usb_action pas106b_NoFliker
[] = {
3963 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
3964 {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,06,cc */
3965 {0xa0, 0x50, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,50,cc */
3966 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
3967 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
3968 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,10,cc */
3969 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
3970 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
3971 {0xaa, 0x03, 0x0013}, /* 00,03,13,aa */
3972 {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */
3973 {0xaa, 0x05, 0x0001}, /* 00,05,01,aa */
3974 {0xaa, 0x07, 0x0030}, /* 00,07,30,aa */
3975 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,00,cc */
3979 /* from lvWIMv.inf 046d:08a2/:08aa 2007/06/03 */
3980 static const struct usb_action pas202b_Initial
[] = { /* 640x480 */
3981 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
3982 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
3983 {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0e,cc */
3984 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,00,cc */
3985 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
3986 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
3987 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
3988 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,e0,cc */
3989 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
3990 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc */
3991 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
3992 {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE
}, /* 00,8d,08,cc */
3993 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
3994 {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,03,cc */
3995 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
3996 {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,03,cc */
3997 {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH
}, /* 00,9b,01,cc */
3998 {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,e6,cc */
3999 {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH
}, /* 00,9d,02,cc */
4000 {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,86,cc */
4001 {0xaa, 0x02, 0x0002}, /* 00,02,04,aa --> 02 */
4002 {0xaa, 0x07, 0x0006}, /* 00,07,06,aa */
4003 {0xaa, 0x08, 0x0002}, /* 00,08,02,aa */
4004 {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */
4005 {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */
4006 {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */
4007 {0xaa, 0x0c, 0x0006},
4008 {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */
4009 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
4010 {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */
4011 {0xaa, 0x13, 0x0063}, /* 00,13,63,aa */
4012 {0xaa, 0x15, 0x0070}, /* 00,15,70,aa */
4013 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,b7,cc */
4014 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
4015 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
}, /* 01,89,06,cc */
4016 {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */
4017 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
4018 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
4019 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
4020 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
4021 {0xa0, 0x70, ZC3XX_R18D_YTARGET
}, /* 01,8d,70,cc */
4024 static const struct usb_action pas202b_InitialScale
[] = { /* 320x240 */
4025 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
4026 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
4027 {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,0e,cc */
4028 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,10,cc */
4029 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
4030 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
4031 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
4032 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
4033 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
4034 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc */
4035 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
4036 {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE
}, /* 00,8d,08,cc */
4037 {0xa0, 0x08, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,08,cc */
4038 {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,02,cc */
4039 {0xa0, 0x08, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,08,cc */
4040 {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,02,cc */
4041 {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH
}, /* 00,9b,01,cc */
4042 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
},
4043 {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH
}, /* 00,9d,02,cc */
4044 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,88,cc */
4045 {0xaa, 0x02, 0x0002}, /* 00,02,02,aa */
4046 {0xaa, 0x07, 0x0006}, /* 00,07,06,aa */
4047 {0xaa, 0x08, 0x0002}, /* 00,08,02,aa */
4048 {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */
4049 {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */
4050 {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */
4051 {0xaa, 0x0c, 0x0006},
4052 {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */
4053 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
4054 {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */
4055 {0xaa, 0x13, 0x0063}, /* 00,13,63,aa */
4056 {0xaa, 0x15, 0x0070}, /* 00,15,70,aa */
4057 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,37,cc */
4058 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
4059 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
}, /* 01,89,06,cc */
4060 {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */
4061 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
4062 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
4063 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
4064 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
4065 {0xa0, 0x70, ZC3XX_R18D_YTARGET
}, /* 01,8d,70,cc */
4066 {0xa0, 0xff, ZC3XX_R097_WINYSTARTHIGH
},
4067 {0xa0, 0xfe, ZC3XX_R098_WINYSTARTLOW
},
4070 static const struct usb_action pas202b_50HZ
[] = {
4071 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
4072 {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,20,cc */
4073 {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,21,cc */
4074 {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */
4075 {0xaa, 0x21, 0x001b},
4076 {0xaa, 0x03, 0x0044}, /* 00,03,44,aa */
4077 {0xaa, 0x04, 0x0008},
4078 {0xaa, 0x05, 0x001b},
4079 {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */
4080 {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */
4081 {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4082 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc */
4083 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
4084 {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID
},
4085 {0xa0, 0x1b, ZC3XX_R192_EXPOSURELIMITLOW
},
4086 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
4087 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
4088 {0xa0, 0x4d, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,4d,cc */
4089 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4090 {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE
},
4091 {0xa0, 0x44, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,44,cc */
4092 {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,6f,cc */
4093 {0xa0, 0xad, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,ad,cc */
4094 {0xa0, 0xeb, ZC3XX_R020_HSYNC_3
}, /* 00,20,eb,cc */
4095 {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,0f,cc */
4096 {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,0e,cc */
4099 static const struct usb_action pas202b_50HZScale
[] = {
4100 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
4101 {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,20,cc */
4102 {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,21,cc */
4103 {0xaa, 0x20, 0x0004},
4104 {0xaa, 0x21, 0x003d},
4105 {0xaa, 0x03, 0x0041}, /* 00,03,41,aa */
4106 {0xaa, 0x04, 0x0010},
4107 {0xaa, 0x05, 0x003d},
4108 {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */
4109 {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */
4110 {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4111 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc */
4112 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
4113 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
},
4114 {0xa0, 0x3d, ZC3XX_R192_EXPOSURELIMITLOW
},
4115 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
4116 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
4117 {0xa0, 0x9b, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,9b,cc */
4118 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4119 {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE
},
4120 {0xa0, 0x41, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,41,cc */
4121 {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,6f,cc */
4122 {0xa0, 0xad, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,ad,cc */
4123 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
4124 {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,0f,cc */
4125 {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,0e,cc */
4128 static const struct usb_action pas202b_60HZ
[] = {
4129 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
4130 {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,20,cc */
4131 {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,21,cc */
4132 {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */
4133 {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */
4134 {0xaa, 0x03, 0x0045}, /* 00,03,45,aa */
4135 {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */
4136 {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */
4137 {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */
4138 {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */
4139 {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4140 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc */
4141 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
4142 {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID
},
4143 {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW
},
4144 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
4145 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
4146 {0xa0, 0x40, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,40,cc */
4147 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4148 {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE
},
4149 {0xa0, 0x45, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,45,cc */
4150 {0xa0, 0x8e, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,8e,cc */
4151 {0xa0, 0xc1, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,c1,cc */
4152 {0xa0, 0xf5, ZC3XX_R020_HSYNC_3
}, /* 00,20,f5,cc */
4153 {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,0f,cc */
4154 {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,0e,cc */
4157 static const struct usb_action pas202b_60HZScale
[] = {
4158 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
4159 {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,20,cc */
4160 {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,21,cc */
4161 {0xaa, 0x20, 0x0004},
4162 {0xaa, 0x21, 0x0008},
4163 {0xaa, 0x03, 0x0042}, /* 00,03,42,aa */
4164 {0xaa, 0x04, 0x0010},
4165 {0xaa, 0x05, 0x0008},
4166 {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */
4167 {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */
4168 {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4169 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc */
4170 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
4171 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
},
4172 {0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW
},
4173 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
4174 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
4175 {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,81,cc */
4176 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4177 {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE
},
4178 {0xa0, 0x42, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,42,cc */
4179 {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,6f,cc */
4180 {0xa0, 0xaf, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,af,cc */
4181 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
4182 {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,0f,cc */
4183 {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,0e,cc */
4186 static const struct usb_action pas202b_NoFliker
[] = {
4187 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
4188 {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,20,cc */
4189 {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,21,cc */
4190 {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */
4191 {0xaa, 0x21, 0x0006},
4192 {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */
4193 {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */
4194 {0xaa, 0x05, 0x0006},
4195 {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */
4196 {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */
4197 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
4198 {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID
},
4199 {0xa0, 0x06, ZC3XX_R192_EXPOSURELIMITLOW
},
4200 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
4201 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
4202 {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW
},
4203 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
4204 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
4205 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,00,cc */
4206 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
4207 {0xa0, 0x40, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,40,cc */
4208 {0xa0, 0x60, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,60,cc */
4209 {0xa0, 0x90, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,90,cc */
4210 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
4211 {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,0f,cc */
4212 {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,0e,cc */
4215 static const struct usb_action pas202b_NoFlikerScale
[] = {
4216 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
4217 {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,20,cc */
4218 {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,21,cc */
4219 {0xaa, 0x20, 0x0004},
4220 {0xaa, 0x21, 0x000c},
4221 {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */
4222 {0xaa, 0x04, 0x0010},
4223 {0xaa, 0x05, 0x000c},
4224 {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */
4225 {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */
4226 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
4227 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
},
4228 {0xa0, 0x0c, ZC3XX_R192_EXPOSURELIMITLOW
},
4229 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
4230 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
4231 {0xa0, 0x02, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,02,cc */
4232 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,10,cc */
4233 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,20,cc */
4234 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,00,cc */
4235 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
4236 {0xa0, 0x40, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,40,cc */
4237 {0xa0, 0x60, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,60,cc */
4238 {0xa0, 0x90, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,90,cc */
4239 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
4240 {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,0f,cc */
4241 {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,0e,cc */
4245 /* mi0360soc and pb0330 from vm30x.inf for 0ac8:301b and 0ac8:303b 07/02/13 */
4246 static const struct usb_action mi0360soc_Initial
[] = { /* 640x480 */
4247 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
4248 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
4249 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
},
4250 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
},
4251 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
4252 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
4253 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
4254 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
4255 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR
},
4256 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
4257 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC
}, /*jfm: was 03*/
4258 /* {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, */
4259 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
4260 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
4261 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
4262 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
4263 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR
},
4264 {0xdd, 0x00, 0x0200},
4265 {0xaa, 0x01, 0x0001},
4266 {0xaa, 0x06, 0x0000},
4267 {0xaa, 0x08, 0x0483},
4268 {0xaa, 0x01, 0x0004},
4269 {0xaa, 0x08, 0x0006},
4270 {0xaa, 0x02, 0x0011},
4271 {0xaa, 0x03, 0x01e5}, /*jfm: was 01e7*/
4272 {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/
4273 {0xaa, 0x07, 0x3002},
4274 {0xaa, 0x20, 0x5100}, /*jfm: was 1100*/
4275 {0xaa, 0x35, 0x507f}, /*jfm: was 0050*/
4276 {0xaa, 0x30, 0x0005},
4277 {0xaa, 0x31, 0x0000},
4278 {0xaa, 0x58, 0x0078},
4279 {0xaa, 0x62, 0x0411},
4280 {0xaa, 0x2b, 0x0028},
4281 {0xaa, 0x2c, 0x007f}, /*jfm: was 0030*/
4282 {0xaa, 0x2d, 0x007f}, /*jfm: was 0030*/
4283 {0xaa, 0x2e, 0x007f}, /*jfm: was 0030*/
4284 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID
},
4285 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
}, /*jfm: was 37*/
4286 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
4287 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
4288 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
4289 {0xa0, 0x09, 0x01ad}, /*jfm: was 00*/
4290 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
4291 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
4292 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
4293 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
4294 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
},
4295 {0xa0, 0x6c, ZC3XX_R18D_YTARGET
}, /* jfm: was 78 */
4296 {0xa0, 0x61, ZC3XX_R116_RGAIN
},
4297 {0xa0, 0x65, ZC3XX_R118_BGAIN
},
4300 static const struct usb_action mi0360soc_InitialScale
[] = { /* 320x240 */
4301 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
4302 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
4303 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
},
4304 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
},
4305 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
4306 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
4307 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
4308 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
4309 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR
},
4310 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
4311 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC
}, /*jfm: was 03*/
4312 /* {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, */
4313 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
4314 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
4315 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
4316 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
4317 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR
},
4318 {0xdd, 0x00, 0x0200},
4319 {0xaa, 0x01, 0x0001},
4320 {0xaa, 0x06, 0x0000},
4321 {0xaa, 0x08, 0x0483},
4322 {0xaa, 0x01, 0x0004},
4323 {0xaa, 0x08, 0x0006},
4324 {0xaa, 0x02, 0x0011},
4325 {0xaa, 0x03, 0x01e7},
4326 {0xaa, 0x04, 0x0287},
4327 {0xaa, 0x07, 0x3002},
4328 {0xaa, 0x20, 0x5100}, /*jfm: was 1100*/
4329 {0xaa, 0x35, 0x007f}, /*jfm: was 0050*/
4330 {0xaa, 0x30, 0x0005},
4331 {0xaa, 0x31, 0x0000},
4332 {0xaa, 0x58, 0x0078},
4333 {0xaa, 0x62, 0x0411},
4334 {0xaa, 0x2b, 0x007f}, /*jfm: was 28*/
4335 {0xaa, 0x2c, 0x007f}, /*jfm: was 30*/
4336 {0xaa, 0x2d, 0x007f}, /*jfm: was 30*/
4337 {0xaa, 0x2e, 0x007f}, /*jfm: was 28*/
4338 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID
},
4339 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
}, /*jfm: was 37*/
4340 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
4341 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
4342 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
4343 {0xa0, 0x09, 0x01ad}, /*jfm: was 00*/
4344 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
4345 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
4346 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
4347 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
4348 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
},
4349 {0xa0, 0x6c, ZC3XX_R18D_YTARGET
}, /*jfm: was 78*/
4350 {0xa0, 0x61, ZC3XX_R116_RGAIN
},
4351 {0xa0, 0x65, ZC3XX_R118_BGAIN
},
4354 static const struct usb_action mi360soc_AE50HZ
[] = {
4355 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
4356 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4357 {0xbb, 0x00, 0x0562},
4358 {0xbb, 0x01, 0x09aa},
4359 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4360 {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID
},
4361 {0xa0, 0x9b, ZC3XX_R192_EXPOSURELIMITLOW
},
4362 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4363 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4364 {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW
},
4365 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4366 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE
},
4367 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4368 {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP
},
4369 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
},
4370 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
},
4371 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
},
4372 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
4373 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
4374 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
4377 static const struct usb_action mi360soc_AE50HZScale
[] = {
4378 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
4379 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4380 {0xbb, 0x00, 0x0509},
4381 {0xbb, 0x01, 0x0934},
4382 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4383 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4384 {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW
},
4385 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4386 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4387 {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW
},
4388 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4389 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE
},
4390 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4391 {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP
},
4392 {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0
},
4393 {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1
},
4394 {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2
},
4395 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
4396 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
4399 static const struct usb_action mi360soc_AE60HZ
[] = {
4400 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
4401 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4402 {0xbb, 0x00, 0x053d},
4403 {0xbb, 0x01, 0x096e},
4404 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4405 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4406 {0xa0, 0xdd, ZC3XX_R192_EXPOSURELIMITLOW
},
4407 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4408 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4409 {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW
},
4410 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4411 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE
},
4412 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4413 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
4414 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
},
4415 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
},
4416 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
},
4417 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
4418 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
4419 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
4422 static const struct usb_action mi360soc_AE60HZScale
[] = {
4423 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
4424 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4425 {0xbb, 0x00, 0x0509},
4426 {0xbb, 0x01, 0x0983},
4427 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4428 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4429 {0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW
},
4430 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4431 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4432 {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW
},
4433 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4434 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE
},
4435 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4436 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
4437 {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0
},
4438 {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1
},
4439 {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2
},
4440 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
4441 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
4444 static const struct usb_action mi360soc_AENoFliker
[] = {
4445 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
4446 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4447 {0xbb, 0x00, 0x0509},
4448 {0xbb, 0x01, 0x0960},
4449 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4450 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4451 {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW
},
4452 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4453 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4454 {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW
},
4455 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4456 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE
},
4457 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4458 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
},
4459 {0xa0, 0x09, ZC3XX_R01D_HSYNC_0
},
4460 {0xa0, 0x40, ZC3XX_R01E_HSYNC_1
},
4461 {0xa0, 0x90, ZC3XX_R01F_HSYNC_2
},
4462 {0xa0, 0xe0, ZC3XX_R020_HSYNC_3
},
4463 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
4464 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
4467 static const struct usb_action mi360soc_AENoFlikerScale
[] = {
4468 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
4469 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4470 {0xbb, 0x00, 0x0534},
4471 {0xbb, 0x02, 0x0960},
4472 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4473 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4474 {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW
},
4475 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4476 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4477 {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW
},
4478 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4479 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE
},
4480 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4481 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
},
4482 {0xa0, 0x34, ZC3XX_R01D_HSYNC_0
},
4483 {0xa0, 0x60, ZC3XX_R01E_HSYNC_1
},
4484 {0xa0, 0x90, ZC3XX_R01F_HSYNC_2
},
4485 {0xa0, 0xe0, ZC3XX_R020_HSYNC_3
},
4486 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
4487 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
4491 static const struct usb_action pb0330_Initial
[] = { /* 640x480 */
4492 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
4493 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00 */
4494 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
},
4495 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
},
4496 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
4497 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
4498 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
4499 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
4500 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
4501 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
4502 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC
},
4503 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
4504 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
4505 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
4506 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
4507 {0xdd, 0x00, 0x0200},
4508 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
4509 {0xaa, 0x01, 0x0006},
4510 {0xaa, 0x02, 0x0011},
4511 {0xaa, 0x03, 0x01e5}, /*jfm: was 1e7*/
4512 {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/
4513 {0xaa, 0x06, 0x0003},
4514 {0xaa, 0x07, 0x3002},
4515 {0xaa, 0x20, 0x1100},
4516 {0xaa, 0x2f, 0xf7b0},
4517 {0xaa, 0x30, 0x0005},
4518 {0xaa, 0x31, 0x0000},
4519 {0xaa, 0x34, 0x0100},
4520 {0xaa, 0x35, 0x0060},
4521 {0xaa, 0x3d, 0x068f},
4522 {0xaa, 0x40, 0x01e0},
4523 {0xaa, 0x58, 0x0078},
4524 {0xaa, 0x62, 0x0411},
4525 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID
},
4526 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
},
4527 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
4528 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
4529 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
4530 {0xa0, 0x09, 0x01ad}, /*jfm: was 00 */
4531 {0xa0, 0x15, 0x01ae},
4532 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
4533 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
4534 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
4535 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
4536 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
},
4537 {0xa0, 0x78, ZC3XX_R18D_YTARGET
}, /*jfm: was 6c*/
4540 static const struct usb_action pb0330_InitialScale
[] = { /* 320x240 */
4541 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
4542 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00 */
4543 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
},
4544 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
},
4545 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
4546 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
4547 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
4548 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
4549 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
4550 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
4551 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC
},
4552 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
4553 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
4554 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
4555 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
4556 {0xdd, 0x00, 0x0200},
4557 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
4558 {0xaa, 0x01, 0x0006},
4559 {0xaa, 0x02, 0x0011},
4560 {0xaa, 0x03, 0x01e7},
4561 {0xaa, 0x04, 0x0287},
4562 {0xaa, 0x06, 0x0003},
4563 {0xaa, 0x07, 0x3002},
4564 {0xaa, 0x20, 0x1100},
4565 {0xaa, 0x2f, 0xf7b0},
4566 {0xaa, 0x30, 0x0005},
4567 {0xaa, 0x31, 0x0000},
4568 {0xaa, 0x34, 0x0100},
4569 {0xaa, 0x35, 0x0060},
4570 {0xaa, 0x3d, 0x068f},
4571 {0xaa, 0x40, 0x01e0},
4572 {0xaa, 0x58, 0x0078},
4573 {0xaa, 0x62, 0x0411},
4574 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID
},
4575 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
},
4576 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
4577 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
4578 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
4579 {0xa0, 0x09, 0x01ad},
4580 {0xa0, 0x15, 0x01ae},
4581 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
4582 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
4583 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
4584 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
4585 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
},
4586 {0xa0, 0x78, ZC3XX_R18D_YTARGET
}, /*jfm: was 6c*/
4589 static const struct usb_action pb0330_50HZ
[] = {
4590 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4591 {0xbb, 0x00, 0x055c},
4592 {0xbb, 0x01, 0x09aa},
4593 {0xbb, 0x00, 0x1001},
4594 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
4595 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4596 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4597 {0xa0, 0xc4, ZC3XX_R192_EXPOSURELIMITLOW
},
4598 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4599 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4600 {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW
},
4601 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4602 {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE
},
4603 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4604 {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP
},
4605 {0xa0, 0x5c, ZC3XX_R01D_HSYNC_0
},
4606 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
},
4607 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
},
4608 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
4611 static const struct usb_action pb0330_50HZScale
[] = {
4612 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4613 {0xbb, 0x00, 0x0566},
4614 {0xbb, 0x02, 0x09b2},
4615 {0xbb, 0x00, 0x1002},
4616 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
4617 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4618 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4619 {0xa0, 0x8c, ZC3XX_R192_EXPOSURELIMITLOW
},
4620 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4621 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4622 {0xa0, 0x8a, ZC3XX_R197_ANTIFLICKERLOW
},
4623 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4624 {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE
},
4625 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4626 {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP
},
4627 {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0
},
4628 {0xa0, 0xf0, ZC3XX_R01E_HSYNC_1
},
4629 {0xa0, 0xf8, ZC3XX_R01F_HSYNC_2
},
4630 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
4633 static const struct usb_action pb0330_60HZ
[] = {
4634 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4635 {0xbb, 0x00, 0x0535},
4636 {0xbb, 0x01, 0x0974},
4637 {0xbb, 0x00, 0x1001},
4638 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
4639 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4640 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4641 {0xa0, 0xfe, ZC3XX_R192_EXPOSURELIMITLOW
},
4642 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4643 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4644 {0xa0, 0x3e, ZC3XX_R197_ANTIFLICKERLOW
},
4645 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4646 {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE
},
4647 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4648 {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP
},
4649 {0xa0, 0x35, ZC3XX_R01D_HSYNC_0
},
4650 {0xa0, 0x50, ZC3XX_R01E_HSYNC_1
},
4651 {0xa0, 0x90, ZC3XX_R01F_HSYNC_2
},
4652 {0xa0, 0xd0, ZC3XX_R020_HSYNC_3
},
4655 static const struct usb_action pb0330_60HZScale
[] = {
4656 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4657 {0xbb, 0x00, 0x0535},
4658 {0xbb, 0x02, 0x096c},
4659 {0xbb, 0x00, 0x1002},
4660 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
4661 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4662 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4663 {0xa0, 0xc0, ZC3XX_R192_EXPOSURELIMITLOW
},
4664 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4665 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4666 {0xa0, 0x7c, ZC3XX_R197_ANTIFLICKERLOW
},
4667 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
4668 {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE
},
4669 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4670 {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP
},
4671 {0xa0, 0x35, ZC3XX_R01D_HSYNC_0
},
4672 {0xa0, 0x50, ZC3XX_R01E_HSYNC_1
},
4673 {0xa0, 0x90, ZC3XX_R01F_HSYNC_2
},
4674 {0xa0, 0xd0, ZC3XX_R020_HSYNC_3
},
4677 static const struct usb_action pb0330_NoFliker
[] = {
4678 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4679 {0xbb, 0x00, 0x0509},
4680 {0xbb, 0x02, 0x0940},
4681 {0xbb, 0x00, 0x1002},
4682 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
4683 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4684 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4685 {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW
},
4686 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4687 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4688 {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW
},
4689 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
4690 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
4691 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4692 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
},
4693 {0xa0, 0x09, ZC3XX_R01D_HSYNC_0
},
4694 {0xa0, 0x40, ZC3XX_R01E_HSYNC_1
},
4695 {0xa0, 0x90, ZC3XX_R01F_HSYNC_2
},
4696 {0xa0, 0xe0, ZC3XX_R020_HSYNC_3
},
4699 static const struct usb_action pb0330_NoFlikerScale
[] = {
4700 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
4701 {0xbb, 0x00, 0x0535},
4702 {0xbb, 0x01, 0x0980},
4703 {0xbb, 0x00, 0x1001},
4704 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
4705 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
4706 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
4707 {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW
},
4708 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
4709 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
4710 {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW
},
4711 {0xa0, 0x10, ZC3XX_R18C_AEFREEZE
},
4712 {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE
},
4713 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
},
4714 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
},
4715 {0xa0, 0x35, ZC3XX_R01D_HSYNC_0
},
4716 {0xa0, 0x60, ZC3XX_R01E_HSYNC_1
},
4717 {0xa0, 0x90, ZC3XX_R01F_HSYNC_2
},
4718 {0xa0, 0xe0, ZC3XX_R020_HSYNC_3
},
4723 static const struct usb_action po2030_Initial
[] = { /* 640x480 */
4724 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
4725 {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,04,cc */
4726 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
4727 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
4728 {0xa0, 0x04, ZC3XX_R080_HBLANKHIGH
}, /* 00,80,04,cc */
4729 {0xa0, 0x05, ZC3XX_R081_HBLANKLOW
}, /* 00,81,05,cc */
4730 {0xa0, 0x16, ZC3XX_R083_RGAINADDR
}, /* 00,83,16,cc */
4731 {0xa0, 0x18, ZC3XX_R085_BGAINADDR
}, /* 00,85,18,cc */
4732 {0xa0, 0x1a, ZC3XX_R086_EXPTIMEHIGH
}, /* 00,86,1a,cc */
4733 {0xa0, 0x1b, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,1b,cc */
4734 {0xa0, 0x1c, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,1c,cc */
4735 {0xa0, 0xee, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,ee,cc */
4736 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,03,cc */
4737 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc */
4738 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
4739 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
4740 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
4741 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
4742 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,e0,cc */
4743 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,42,cc */
4744 {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */
4745 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
4746 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc */
4747 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
4748 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc */
4749 {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,e6,cc */
4750 {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,86,cc */
4751 {0xaa, 0x09, 0x00ce}, /* 00,09,ce,aa */
4752 {0xaa, 0x0b, 0x0005}, /* 00,0b,05,aa */
4753 {0xaa, 0x0d, 0x0054}, /* 00,0d,54,aa */
4754 {0xaa, 0x0f, 0x00eb}, /* 00,0f,eb,aa */
4755 {0xaa, 0x87, 0x0000}, /* 00,87,00,aa */
4756 {0xaa, 0x88, 0x0004}, /* 00,88,04,aa */
4757 {0xaa, 0x89, 0x0000}, /* 00,89,00,aa */
4758 {0xaa, 0x8a, 0x0005}, /* 00,8a,05,aa */
4759 {0xaa, 0x13, 0x0003}, /* 00,13,03,aa */
4760 {0xaa, 0x16, 0x0040}, /* 00,16,40,aa */
4761 {0xaa, 0x18, 0x0040}, /* 00,18,40,aa */
4762 {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
4763 {0xaa, 0x29, 0x00e8}, /* 00,29,e8,aa */
4764 {0xaa, 0x45, 0x0045}, /* 00,45,45,aa */
4765 {0xaa, 0x50, 0x00ed}, /* 00,50,ed,aa */
4766 {0xaa, 0x51, 0x0025}, /* 00,51,25,aa */
4767 {0xaa, 0x52, 0x0042}, /* 00,52,42,aa */
4768 {0xaa, 0x53, 0x002f}, /* 00,53,2f,aa */
4769 {0xaa, 0x79, 0x0025}, /* 00,79,25,aa */
4770 {0xaa, 0x7b, 0x0000}, /* 00,7b,00,aa */
4771 {0xaa, 0x7e, 0x0025}, /* 00,7e,25,aa */
4772 {0xaa, 0x7f, 0x0025}, /* 00,7f,25,aa */
4773 {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */
4774 {0xaa, 0x33, 0x0036}, /* 00,33,36,aa */
4775 {0xaa, 0x36, 0x0060}, /* 00,36,60,aa */
4776 {0xaa, 0x37, 0x0008}, /* 00,37,08,aa */
4777 {0xaa, 0x3b, 0x0031}, /* 00,3b,31,aa */
4778 {0xaa, 0x44, 0x000f}, /* 00,44,0f,aa */
4779 {0xaa, 0x58, 0x0002}, /* 00,58,02,aa */
4780 {0xaa, 0x66, 0x00c0}, /* 00,66,c0,aa */
4781 {0xaa, 0x67, 0x0044}, /* 00,67,44,aa */
4782 {0xaa, 0x6b, 0x00a0}, /* 00,6b,a0,aa */
4783 {0xaa, 0x6c, 0x0054}, /* 00,6c,54,aa */
4784 {0xaa, 0xd6, 0x0007}, /* 00,d6,07,aa */
4785 {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,f7,cc */
4786 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
4787 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
4788 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
}, /* 01,89,06,cc */
4789 {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */
4790 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
4791 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
4792 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
4793 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
4794 {0xa0, 0x7a, ZC3XX_R116_RGAIN
}, /* 01,16,7a,cc */
4795 {0xa0, 0x4a, ZC3XX_R118_BGAIN
}, /* 01,18,4a,cc */
4800 static const struct usb_action po2030_InitialScale
[] = { /* 320x240 */
4801 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc */
4802 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,10,cc */
4803 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc */
4804 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc */
4805 {0xa0, 0x04, ZC3XX_R080_HBLANKHIGH
}, /* 00,80,04,cc */
4806 {0xa0, 0x05, ZC3XX_R081_HBLANKLOW
}, /* 00,81,05,cc */
4807 {0xa0, 0x16, ZC3XX_R083_RGAINADDR
}, /* 00,83,16,cc */
4808 {0xa0, 0x18, ZC3XX_R085_BGAINADDR
}, /* 00,85,18,cc */
4809 {0xa0, 0x1a, ZC3XX_R086_EXPTIMEHIGH
}, /* 00,86,1a,cc */
4810 {0xa0, 0x1b, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,1b,cc */
4811 {0xa0, 0x1c, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,1c,cc */
4812 {0xa0, 0xee, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,ee,cc */
4813 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,03,cc */
4814 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc */
4815 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc */
4816 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc */
4817 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc */
4818 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc */
4819 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,e0,cc */
4820 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,42,cc */
4821 {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */
4822 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc */
4823 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc */
4824 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc */
4825 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc */
4826 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,e8,cc */
4827 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,88,cc */
4828 {0xaa, 0x09, 0x00cc}, /* 00,09,cc,aa */
4829 {0xaa, 0x0b, 0x0005}, /* 00,0b,05,aa */
4830 {0xaa, 0x0d, 0x0058}, /* 00,0d,58,aa */
4831 {0xaa, 0x0f, 0x00ed}, /* 00,0f,ed,aa */
4832 {0xaa, 0x87, 0x0000}, /* 00,87,00,aa */
4833 {0xaa, 0x88, 0x0004}, /* 00,88,04,aa */
4834 {0xaa, 0x89, 0x0000}, /* 00,89,00,aa */
4835 {0xaa, 0x8a, 0x0005}, /* 00,8a,05,aa */
4836 {0xaa, 0x13, 0x0003}, /* 00,13,03,aa */
4837 {0xaa, 0x16, 0x0040}, /* 00,16,40,aa */
4838 {0xaa, 0x18, 0x0040}, /* 00,18,40,aa */
4839 {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
4840 {0xaa, 0x29, 0x00e8}, /* 00,29,e8,aa */
4841 {0xaa, 0x45, 0x0045}, /* 00,45,45,aa */
4842 {0xaa, 0x50, 0x00ed}, /* 00,50,ed,aa */
4843 {0xaa, 0x51, 0x0025}, /* 00,51,25,aa */
4844 {0xaa, 0x52, 0x0042}, /* 00,52,42,aa */
4845 {0xaa, 0x53, 0x002f}, /* 00,53,2f,aa */
4846 {0xaa, 0x79, 0x0025}, /* 00,79,25,aa */
4847 {0xaa, 0x7b, 0x0000}, /* 00,7b,00,aa */
4848 {0xaa, 0x7e, 0x0025}, /* 00,7e,25,aa */
4849 {0xaa, 0x7f, 0x0025}, /* 00,7f,25,aa */
4850 {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */
4851 {0xaa, 0x33, 0x0036}, /* 00,33,36,aa */
4852 {0xaa, 0x36, 0x0060}, /* 00,36,60,aa */
4853 {0xaa, 0x37, 0x0008}, /* 00,37,08,aa */
4854 {0xaa, 0x3b, 0x0031}, /* 00,3b,31,aa */
4855 {0xaa, 0x44, 0x000f}, /* 00,44,0f,aa */
4856 {0xaa, 0x58, 0x0002}, /* 00,58,02,aa */
4857 {0xaa, 0x66, 0x00c0}, /* 00,66,c0,aa */
4858 {0xaa, 0x67, 0x0044}, /* 00,67,44,aa */
4859 {0xaa, 0x6b, 0x00a0}, /* 00,6b,a0,aa */
4860 {0xaa, 0x6c, 0x0054}, /* 00,6c,54,aa */
4861 {0xaa, 0xd6, 0x0007}, /* 00,d6,07,aa */
4862 {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,f7,cc */
4863 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc */
4864 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc */
4865 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
}, /* 01,89,06,cc */
4866 {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */
4867 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc */
4868 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc */
4869 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc */
4870 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc */
4871 {0xa0, 0x7a, ZC3XX_R116_RGAIN
}, /* 01,16,7a,cc */
4872 {0xa0, 0x4a, ZC3XX_R118_BGAIN
}, /* 01,18,4a,cc */
4876 static const struct usb_action po2030_50HZ
[] = {
4877 {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */
4878 {0xaa, 0x1a, 0x0001}, /* 00,1a,01,aa */
4879 {0xaa, 0x1b, 0x000a}, /* 00,1b,0a,aa */
4880 {0xaa, 0x1c, 0x00b0}, /* 00,1c,b0,aa */
4881 {0xa0, 0x05, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,05,cc */
4882 {0xa0, 0x35, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,35,cc */
4883 {0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,70,cc */
4884 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
4885 {0xa0, 0x85, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,85,cc */
4886 {0xa0, 0x58, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,58,cc */
4887 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0c,cc */
4888 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,18,cc */
4889 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,60,cc */
4890 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc */
4891 {0xa0, 0x22, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,22,cc */
4892 {0xa0, 0x88, ZC3XX_R18D_YTARGET
}, /* 01,8d,88,cc */
4893 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,58,cc */
4894 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,42,cc */
4898 static const struct usb_action po2030_60HZ
[] = {
4899 {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */
4900 {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */
4901 {0xaa, 0x1b, 0x00de}, /* 00,1b,de,aa */
4902 {0xaa, 0x1c, 0x0040}, /* 00,1c,40,aa */
4903 {0xa0, 0x08, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,08,cc */
4904 {0xa0, 0xae, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,ae,cc */
4905 {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,80,cc */
4906 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
4907 {0xa0, 0x6f, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,6f,cc */
4908 {0xa0, 0x20, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,20,cc */
4909 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0c,cc */
4910 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,18,cc */
4911 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,60,cc */
4912 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc */
4913 {0xa0, 0x22, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,22,cc */
4914 {0xa0, 0x88, ZC3XX_R18D_YTARGET
}, /* 01,8d,88,cc */
4916 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,58,cc */
4917 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,42,cc */
4921 static const struct usb_action po2030_NoFliker
[] = {
4922 {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,02,cc */
4923 {0xaa, 0x8d, 0x000d}, /* 00,8d,0d,aa */
4924 {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */
4925 {0xaa, 0x1b, 0x0002}, /* 00,1b,02,aa */
4926 {0xaa, 0x1c, 0x0078}, /* 00,1c,78,aa */
4927 {0xaa, 0x46, 0x0000}, /* 00,46,00,aa */
4928 {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */
4933 static const struct usb_action tas5130cK_InitialScale
[] = {
4934 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
4935 {0xa0, 0x01, 0x003b},
4936 {0xa0, 0x0e, 0x003a},
4937 {0xa0, 0x01, 0x0038},
4938 {0xa0, 0x0b, 0x0039},
4939 {0xa0, 0x00, 0x0038},
4940 {0xa0, 0x0b, 0x0039},
4941 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
4942 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
4943 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
},
4944 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
},
4945 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
4946 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
4947 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
4948 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
4949 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR
},
4950 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
4951 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC
},
4952 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
4953 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
4954 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
4955 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
4956 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR
},
4957 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
4958 {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT
},
4959 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
4960 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
4961 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
4962 {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT
},
4963 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
4964 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
4965 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
4966 {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT
},
4967 {0xa0, 0x83, ZC3XX_R093_I2CSETVALUE
},
4968 {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK
},
4969 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
4970 {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT
},
4971 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
4972 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
4973 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
4974 {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT
},
4975 {0xa0, 0x06, ZC3XX_R093_I2CSETVALUE
},
4976 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
4977 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
4978 {0xa0, 0x02, ZC3XX_R092_I2CADDRESSSELECT
},
4979 {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE
},
4980 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
4981 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
4982 {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT
},
4983 {0xa0, 0xE7, ZC3XX_R093_I2CSETVALUE
},
4984 {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK
},
4985 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
4986 {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT
},
4987 {0xa0, 0x87, ZC3XX_R093_I2CSETVALUE
},
4988 {0xa0, 0x02, ZC3XX_R094_I2CWRITEACK
},
4989 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
4990 {0xa0, 0x07, ZC3XX_R092_I2CADDRESSSELECT
},
4991 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
4992 {0xa0, 0x30, ZC3XX_R094_I2CWRITEACK
},
4993 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
4994 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
4995 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
4996 {0xa0, 0x51, ZC3XX_R094_I2CWRITEACK
},
4997 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
4998 {0xa0, 0x35, ZC3XX_R092_I2CADDRESSSELECT
},
4999 {0xa0, 0x7F, ZC3XX_R093_I2CSETVALUE
},
5000 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5001 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5002 {0xa0, 0x30, ZC3XX_R092_I2CADDRESSSELECT
},
5003 {0xa0, 0x05, ZC3XX_R093_I2CSETVALUE
},
5004 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5005 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5006 {0xa0, 0x31, ZC3XX_R092_I2CADDRESSSELECT
},
5007 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
5008 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5009 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5010 {0xa0, 0x58, ZC3XX_R092_I2CADDRESSSELECT
},
5011 {0xa0, 0x78, ZC3XX_R093_I2CSETVALUE
},
5012 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5013 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5014 {0xa0, 0x62, ZC3XX_R092_I2CADDRESSSELECT
},
5015 {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE
},
5016 {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK
},
5017 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5018 {0xa0, 0x2B, ZC3XX_R092_I2CADDRESSSELECT
},
5019 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE
},
5020 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5021 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5022 {0xa0, 0x2c, ZC3XX_R092_I2CADDRESSSELECT
},
5023 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE
},
5024 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5025 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5026 {0xa0, 0x2D, ZC3XX_R092_I2CADDRESSSELECT
},
5027 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE
},
5028 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5029 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5030 {0xa0, 0x2e, ZC3XX_R092_I2CADDRESSSELECT
},
5031 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE
},
5032 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5033 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5034 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID
},
5035 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
},
5036 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
5037 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
5038 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
5039 {0xa0, 0x09, 0x01ad},
5040 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
5041 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
5042 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
5043 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
5044 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
},
5045 {0xa0, 0x6c, ZC3XX_R18D_YTARGET
},
5046 {0xa0, 0x61, ZC3XX_R116_RGAIN
},
5047 {0xa0, 0x65, ZC3XX_R118_BGAIN
},
5048 {0xa0, 0x09, 0x01ad},
5049 {0xa0, 0x15, 0x01ae},
5050 {0xa0, 0x4c, ZC3XX_R10A_RGB00
}, /* matrix */
5051 {0xa0, 0xf1, ZC3XX_R10B_RGB01
},
5052 {0xa0, 0x03, ZC3XX_R10C_RGB02
},
5053 {0xa0, 0xfe, ZC3XX_R10D_RGB10
},
5054 {0xa0, 0x51, ZC3XX_R10E_RGB11
},
5055 {0xa0, 0xf1, ZC3XX_R10F_RGB12
},
5056 {0xa0, 0xec, ZC3XX_R110_RGB20
},
5057 {0xa0, 0x03, ZC3XX_R111_RGB21
},
5058 {0xa0, 0x51, ZC3XX_R112_RGB22
},
5059 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
5060 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
5061 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
5062 {0xa0, 0x38, ZC3XX_R120_GAMMA00
}, /* gamma > 5 */
5063 {0xa0, 0x51, ZC3XX_R121_GAMMA01
},
5064 {0xa0, 0x6e, ZC3XX_R122_GAMMA02
},
5065 {0xa0, 0x8c, ZC3XX_R123_GAMMA03
},
5066 {0xa0, 0xa2, ZC3XX_R124_GAMMA04
},
5067 {0xa0, 0xb6, ZC3XX_R125_GAMMA05
},
5068 {0xa0, 0xc8, ZC3XX_R126_GAMMA06
},
5069 {0xa0, 0xd6, ZC3XX_R127_GAMMA07
},
5070 {0xa0, 0xe2, ZC3XX_R128_GAMMA08
},
5071 {0xa0, 0xed, ZC3XX_R129_GAMMA09
},
5072 {0xa0, 0xf5, ZC3XX_R12A_GAMMA0A
},
5073 {0xa0, 0xfc, ZC3XX_R12B_GAMMA0B
},
5074 {0xa0, 0xff, ZC3XX_R12C_GAMMA0C
},
5075 {0xa0, 0xff, ZC3XX_R12D_GAMMA0D
},
5076 {0xa0, 0xff, ZC3XX_R12E_GAMMA0E
},
5077 {0xa0, 0xff, ZC3XX_R12F_GAMMA0F
},
5078 {0xa0, 0x12, ZC3XX_R130_GAMMA10
},
5079 {0xa0, 0x1b, ZC3XX_R131_GAMMA11
},
5080 {0xa0, 0x1d, ZC3XX_R132_GAMMA12
},
5081 {0xa0, 0x1a, ZC3XX_R133_GAMMA13
},
5082 {0xa0, 0x15, ZC3XX_R134_GAMMA14
},
5083 {0xa0, 0x12, ZC3XX_R135_GAMMA15
},
5084 {0xa0, 0x0f, ZC3XX_R136_GAMMA16
},
5085 {0xa0, 0x0d, ZC3XX_R137_GAMMA17
},
5086 {0xa0, 0x0b, ZC3XX_R138_GAMMA18
},
5087 {0xa0, 0x09, ZC3XX_R139_GAMMA19
},
5088 {0xa0, 0x07, ZC3XX_R13A_GAMMA1A
},
5089 {0xa0, 0x05, ZC3XX_R13B_GAMMA1B
},
5090 {0xa0, 0x00, ZC3XX_R13C_GAMMA1C
},
5091 {0xa0, 0x00, ZC3XX_R13D_GAMMA1D
},
5092 {0xa0, 0x00, ZC3XX_R13E_GAMMA1E
},
5093 {0xa0, 0x01, ZC3XX_R13F_GAMMA1F
},
5094 {0xa0, 0x4c, ZC3XX_R10A_RGB00
}, /* matrix */
5095 {0xa0, 0xf1, ZC3XX_R10B_RGB01
},
5096 {0xa0, 0x03, ZC3XX_R10C_RGB02
},
5097 {0xa0, 0xfe, ZC3XX_R10D_RGB10
},
5098 {0xa0, 0x51, ZC3XX_R10E_RGB11
},
5099 {0xa0, 0xf1, ZC3XX_R10F_RGB12
},
5100 {0xa0, 0xec, ZC3XX_R110_RGB20
},
5101 {0xa0, 0x03, ZC3XX_R111_RGB21
},
5102 {0xa0, 0x51, ZC3XX_R112_RGB22
},
5103 {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE
},
5104 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
5105 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
5106 {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT
},
5107 {0xa0, 0x09, ZC3XX_R093_I2CSETVALUE
},
5108 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5109 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5110 {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT
},
5111 {0xa0, 0x34, ZC3XX_R093_I2CSETVALUE
},
5112 {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK
},
5113 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5114 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
5115 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
5116 {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW
},
5117 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
5118 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
5119 {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW
},
5120 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
5121 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE
},
5122 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF
},
5123 {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP
},
5124 {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0
},
5125 {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1
},
5126 {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2
},
5127 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
5128 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
5129 {0xa0, 0x09, 0x01ad},
5130 {0xa0, 0x15, 0x01ae},
5131 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE
},
5132 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
5136 static const struct usb_action tas5130cK_Initial
[] = {
5137 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
5138 {0xa0, 0x01, 0x003b},
5139 {0xa0, 0x0e, 0x003a},
5140 {0xa0, 0x01, 0x0038},
5141 {0xa0, 0x0b, 0x0039},
5142 {0xa0, 0x00, 0x0038},
5143 {0xa0, 0x0b, 0x0039},
5144 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
5145 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
5146 {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT
},
5147 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
},
5148 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
5149 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
5150 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
5151 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
5152 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR
},
5153 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
5154 {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC
},
5155 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
},
5156 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
},
5157 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
},
5158 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
},
5159 {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR
},
5160 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
5161 {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT
},
5162 {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE
},
5163 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5164 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5165 {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT
},
5166 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
5167 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5168 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5169 {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT
},
5170 {0xa0, 0x83, ZC3XX_R093_I2CSETVALUE
},
5171 {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK
},
5172 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5173 {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT
},
5174 {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE
},
5175 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5176 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5177 {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT
},
5178 {0xa0, 0x06, ZC3XX_R093_I2CSETVALUE
},
5179 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5180 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5181 {0xa0, 0x02, ZC3XX_R092_I2CADDRESSSELECT
},
5182 {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE
},
5183 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5184 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5185 {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT
},
5186 {0xa0, 0xe5, ZC3XX_R093_I2CSETVALUE
},
5187 {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK
},
5188 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5189 {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT
},
5190 {0xa0, 0x85, ZC3XX_R093_I2CSETVALUE
},
5191 {0xa0, 0x02, ZC3XX_R094_I2CWRITEACK
},
5192 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5193 {0xa0, 0x07, ZC3XX_R092_I2CADDRESSSELECT
},
5194 {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE
},
5195 {0xa0, 0x30, ZC3XX_R094_I2CWRITEACK
},
5196 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5197 {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT
},
5198 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
5199 {0xa0, 0x51, ZC3XX_R094_I2CWRITEACK
},
5200 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5201 {0xa0, 0x35, ZC3XX_R092_I2CADDRESSSELECT
},
5202 {0xa0, 0x7F, ZC3XX_R093_I2CSETVALUE
},
5203 {0xa0, 0x50, ZC3XX_R094_I2CWRITEACK
},
5204 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5205 {0xa0, 0x30, ZC3XX_R092_I2CADDRESSSELECT
},
5206 {0xa0, 0x05, ZC3XX_R093_I2CSETVALUE
},
5207 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5208 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5209 {0xa0, 0x31, ZC3XX_R092_I2CADDRESSSELECT
},
5210 {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE
},
5211 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5212 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5213 {0xa0, 0x58, ZC3XX_R092_I2CADDRESSSELECT
},
5214 {0xa0, 0x78, ZC3XX_R093_I2CSETVALUE
},
5215 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5216 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5217 {0xa0, 0x62, ZC3XX_R092_I2CADDRESSSELECT
},
5218 {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE
},
5219 {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK
},
5220 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5221 {0xa0, 0x2B, ZC3XX_R092_I2CADDRESSSELECT
},
5222 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE
},
5223 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5224 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5225 {0xa0, 0x2C, ZC3XX_R092_I2CADDRESSSELECT
},
5226 {0xa0, 0x7F, ZC3XX_R093_I2CSETVALUE
},
5227 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5228 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5229 {0xa0, 0x2D, ZC3XX_R092_I2CADDRESSSELECT
},
5230 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE
},
5231 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5232 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5233 {0xa0, 0x2e, ZC3XX_R092_I2CADDRESSSELECT
},
5234 {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE
},
5235 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5236 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5237 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID
},
5238 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
},
5239 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
5240 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
5241 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
5242 {0xa0, 0x09, 0x01ad},
5243 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
5244 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
5245 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
5246 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
5247 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
},
5248 {0xa0, 0x6c, ZC3XX_R18D_YTARGET
},
5249 {0xa0, 0x61, ZC3XX_R116_RGAIN
},
5250 {0xa0, 0x65, ZC3XX_R118_BGAIN
},
5251 {0xa0, 0x09, 0x01ad},
5252 {0xa0, 0x15, 0x01ae},
5253 {0xa0, 0x4c, ZC3XX_R10A_RGB00
}, /* matrix */
5254 {0xa0, 0xf1, ZC3XX_R10B_RGB01
},
5255 {0xa0, 0x03, ZC3XX_R10C_RGB02
},
5256 {0xa0, 0xfe, ZC3XX_R10D_RGB10
},
5257 {0xa0, 0x51, ZC3XX_R10E_RGB11
},
5258 {0xa0, 0xf1, ZC3XX_R10F_RGB12
},
5259 {0xa0, 0xec, ZC3XX_R110_RGB20
},
5260 {0xa0, 0x03, ZC3XX_R111_RGB21
},
5261 {0xa0, 0x51, ZC3XX_R112_RGB22
},
5262 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
5263 {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00
}, /* sharpness+ */
5264 {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05
}, /* sharpness- */
5265 {0xa0, 0x38, ZC3XX_R120_GAMMA00
}, /* gamma > 5 */
5266 {0xa0, 0x51, ZC3XX_R121_GAMMA01
},
5267 {0xa0, 0x6e, ZC3XX_R122_GAMMA02
},
5268 {0xa0, 0x8c, ZC3XX_R123_GAMMA03
},
5269 {0xa0, 0xa2, ZC3XX_R124_GAMMA04
},
5270 {0xa0, 0xb6, ZC3XX_R125_GAMMA05
},
5271 {0xa0, 0xc8, ZC3XX_R126_GAMMA06
},
5272 {0xa0, 0xd6, ZC3XX_R127_GAMMA07
},
5273 {0xa0, 0xe2, ZC3XX_R128_GAMMA08
},
5274 {0xa0, 0xed, ZC3XX_R129_GAMMA09
},
5275 {0xa0, 0xf5, ZC3XX_R12A_GAMMA0A
},
5276 {0xa0, 0xfc, ZC3XX_R12B_GAMMA0B
},
5277 {0xa0, 0xff, ZC3XX_R12C_GAMMA0C
},
5278 {0xa0, 0xff, ZC3XX_R12D_GAMMA0D
},
5279 {0xa0, 0xff, ZC3XX_R12E_GAMMA0E
},
5280 {0xa0, 0xff, ZC3XX_R12F_GAMMA0F
},
5281 {0xa0, 0x12, ZC3XX_R130_GAMMA10
},
5282 {0xa0, 0x1b, ZC3XX_R131_GAMMA11
},
5283 {0xa0, 0x1d, ZC3XX_R132_GAMMA12
},
5284 {0xa0, 0x1a, ZC3XX_R133_GAMMA13
},
5285 {0xa0, 0x15, ZC3XX_R134_GAMMA14
},
5286 {0xa0, 0x12, ZC3XX_R135_GAMMA15
},
5287 {0xa0, 0x0f, ZC3XX_R136_GAMMA16
},
5288 {0xa0, 0x0d, ZC3XX_R137_GAMMA17
},
5289 {0xa0, 0x0b, ZC3XX_R138_GAMMA18
},
5290 {0xa0, 0x09, ZC3XX_R139_GAMMA19
},
5291 {0xa0, 0x07, ZC3XX_R13A_GAMMA1A
},
5292 {0xa0, 0x05, ZC3XX_R13B_GAMMA1B
},
5293 {0xa0, 0x00, ZC3XX_R13C_GAMMA1C
},
5294 {0xa0, 0x00, ZC3XX_R13D_GAMMA1D
},
5295 {0xa0, 0x00, ZC3XX_R13E_GAMMA1E
},
5296 {0xa0, 0x01, ZC3XX_R13F_GAMMA1F
},
5297 {0xa0, 0x4c, ZC3XX_R10A_RGB00
}, /* matrix */
5298 {0xa0, 0xf1, ZC3XX_R10B_RGB01
},
5299 {0xa0, 0x03, ZC3XX_R10C_RGB02
},
5300 {0xa0, 0xfe, ZC3XX_R10D_RGB10
},
5301 {0xa0, 0x51, ZC3XX_R10E_RGB11
},
5302 {0xa0, 0xf1, ZC3XX_R10F_RGB12
},
5303 {0xa0, 0xec, ZC3XX_R110_RGB20
},
5304 {0xa0, 0x03, ZC3XX_R111_RGB21
},
5305 {0xa0, 0x51, ZC3XX_R112_RGB22
},
5306 {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE
},
5307 {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE
},
5308 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
},
5309 {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT
},
5310 {0xa0, 0x62, ZC3XX_R093_I2CSETVALUE
},
5311 {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK
},
5312 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5313 {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT
},
5314 {0xa0, 0xaa, ZC3XX_R093_I2CSETVALUE
},
5315 {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK
},
5316 {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND
},
5317 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
},
5318 {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID
},
5319 {0xa0, 0x9b, ZC3XX_R192_EXPOSURELIMITLOW
},
5320 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
5321 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
5322 {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW
},
5323 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
},
5324 {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE
},
5325 {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF
},
5326 {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP
},
5327 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
},
5328 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
},
5329 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
},
5330 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
},
5331 {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN
},
5332 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
5333 {0xa0, 0x09, 0x01ad},
5334 {0xa0, 0x15, 0x01ae},
5335 {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE
},
5336 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
},
5337 {0xa0, 0x30, 0x0007},
5338 {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING
},
5339 {0xa0, 0x00, 0x0007},
5340 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
5344 static const struct usb_action tas5130cxx_InitialScale
[] = { /* 320x240 */
5345 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
5346 {0xa0, 0x50, ZC3XX_R002_CLOCKSELECT
},
5347 {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING
},
5348 {0xa0, 0x02, ZC3XX_R010_CMOSSENSORSELECT
},
5349 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
5350 {0xa0, 0x00, ZC3XX_R001_SYSTEMOPERATING
},
5351 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
5352 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
5353 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
5354 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
5355 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
5356 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
5357 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
5359 {0xa0, 0x04, ZC3XX_R098_WINYSTARTLOW
},
5360 {0xa0, 0x0f, ZC3XX_R09A_WINXSTARTLOW
},
5361 {0xa0, 0x04, ZC3XX_R11A_FIRSTYLOW
},
5362 {0xa0, 0x0f, ZC3XX_R11C_FIRSTXLOW
},
5363 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
},
5364 {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH
},
5365 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
},
5366 {0xa0, 0x06, ZC3XX_R08D_COMPABILITYMODE
},
5367 {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION
},
5368 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
5369 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
5370 {0xa0, 0x70, ZC3XX_R18D_YTARGET
},
5371 {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN
},
5372 {0xa0, 0x00, 0x01ad},
5373 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
5374 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
5375 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
5376 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
5377 {0xa0, 0x07, ZC3XX_R0A5_EXPOSUREGAIN
},
5378 {0xa0, 0x02, ZC3XX_R0A6_EXPOSUREBLACKLVL
},
5381 static const struct usb_action tas5130cxx_Initial
[] = { /* 640x480 */
5382 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
},
5383 {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT
},
5384 {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING
},
5385 {0xa0, 0x02, ZC3XX_R010_CMOSSENSORSELECT
},
5386 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
5387 {0xa0, 0x00, ZC3XX_R001_SYSTEMOPERATING
},
5388 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
},
5389 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
},
5390 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
},
5391 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
},
5392 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
},
5393 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
},
5394 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
},
5395 {0xa0, 0x05, ZC3XX_R098_WINYSTARTLOW
},
5396 {0xa0, 0x0f, ZC3XX_R09A_WINXSTARTLOW
},
5397 {0xa0, 0x05, ZC3XX_R11A_FIRSTYLOW
},
5398 {0xa0, 0x0f, ZC3XX_R11C_FIRSTXLOW
},
5399 {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW
},
5400 {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH
},
5401 {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW
},
5402 {0xa0, 0x06, ZC3XX_R08D_COMPABILITYMODE
},
5403 {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION
},
5404 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
},
5405 {0xa0, 0x06, ZC3XX_R189_AWBSTATUS
},
5406 {0xa0, 0x70, ZC3XX_R18D_YTARGET
},
5407 {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN
},
5408 {0xa0, 0x00, 0x01ad},
5409 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
},
5410 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
},
5411 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
},
5412 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
},
5413 {0xa0, 0x07, ZC3XX_R0A5_EXPOSUREGAIN
},
5414 {0xa0, 0x02, ZC3XX_R0A6_EXPOSUREBLACKLVL
},
5417 static const struct usb_action tas5130cxx_50HZ
[] = {
5418 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
5419 {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
5420 {0xaa, 0xa4, 0x0063}, /* 00,a4,63,aa */
5421 {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,01,cc */
5422 {0xa0, 0x63, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,63,cc */
5423 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
5424 {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID
},
5425 {0xa0, 0xfe, ZC3XX_R192_EXPOSURELIMITLOW
},
5426 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
5427 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
5428 {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,47,cc */
5429 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
},
5430 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
},
5431 {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF
},
5432 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
5433 {0xa0, 0xd3, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,d3,cc */
5434 {0xa0, 0xda, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,da,cc */
5435 {0xa0, 0xea, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,ea,cc */
5436 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
5437 {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH
}, /* 00,9f,03,cc */
5438 {0xa0, 0x4c, ZC3XX_R0A0_MAXXLOW
},
5439 {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN
},
5442 static const struct usb_action tas5130cxx_50HZScale
[] = {
5443 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
5444 {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
5445 {0xaa, 0xa4, 0x0077}, /* 00,a4,77,aa */
5446 {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,01,cc */
5447 {0xa0, 0x77, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,77,cc */
5448 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
5449 {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID
},
5450 {0xa0, 0xd0, ZC3XX_R192_EXPOSURELIMITLOW
},
5451 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
5452 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
5453 {0xa0, 0x7d, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,7d,cc */
5454 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
},
5455 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
},
5456 {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF
},
5457 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
5458 {0xa0, 0xf0, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,f0,cc */
5459 {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,f4,cc */
5460 {0xa0, 0xf8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,f8,cc */
5461 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
5462 {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH
}, /* 00,9f,03,cc */
5463 {0xa0, 0xc0, ZC3XX_R0A0_MAXXLOW
},
5464 {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN
},
5467 static const struct usb_action tas5130cxx_60HZ
[] = {
5468 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
5469 {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
5470 {0xaa, 0xa4, 0x0036}, /* 00,a4,36,aa */
5471 {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,01,cc */
5472 {0xa0, 0x36, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,36,cc */
5473 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
5474 {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID
},
5475 {0xa0, 0x54, ZC3XX_R192_EXPOSURELIMITLOW
},
5476 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
5477 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
5478 {0xa0, 0x3e, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,3e,cc */
5479 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
},
5480 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
},
5481 {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF
},
5482 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
5483 {0xa0, 0xca, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,ca,cc */
5484 {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,d0,cc */
5485 {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,e0,cc */
5486 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
5487 {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH
}, /* 00,9f,03,cc */
5488 {0xa0, 0x28, ZC3XX_R0A0_MAXXLOW
},
5489 {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN
},
5492 static const struct usb_action tas5130cxx_60HZScale
[] = {
5493 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
5494 {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
5495 {0xaa, 0xa4, 0x0077}, /* 00,a4,77,aa */
5496 {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,01,cc */
5497 {0xa0, 0x77, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,77,cc */
5498 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
5499 {0xa0, 0x09, ZC3XX_R191_EXPOSURELIMITMID
},
5500 {0xa0, 0x47, ZC3XX_R192_EXPOSURELIMITLOW
},
5501 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc */
5502 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc */
5503 {0xa0, 0x7d, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,7d,cc */
5504 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
},
5505 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
},
5506 {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF
},
5507 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
},
5508 {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,c8,cc */
5509 {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,d0,cc */
5510 {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,e0,cc */
5511 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
5512 {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH
}, /* 00,9f,03,cc */
5513 {0xa0, 0x20, ZC3XX_R0A0_MAXXLOW
},
5514 {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN
},
5517 static const struct usb_action tas5130cxx_NoFliker
[] = {
5518 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
5519 {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
5520 {0xaa, 0xa4, 0x0040}, /* 00,a4,40,aa */
5521 {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,01,cc */
5522 {0xa0, 0x40, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,40,cc */
5523 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
5524 {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID
},
5525 {0xa0, 0xa0, ZC3XX_R192_EXPOSURELIMITLOW
},
5526 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
5527 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
5528 {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW
},
5529 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
},
5530 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
},
5531 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,00,cc */
5532 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,00,cc */
5533 {0xa0, 0xbc, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,bc,cc */
5534 {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,d0,cc */
5535 {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,e0,cc */
5536 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
5537 {0xa0, 0x02, ZC3XX_R09F_MAXXHIGH
}, /* 00,9f,02,cc */
5538 {0xa0, 0xf0, ZC3XX_R0A0_MAXXLOW
},
5539 {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN
},
5543 static const struct usb_action tas5130cxx_NoFlikerScale
[] = {
5544 {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS
}, /* 00,19,00,cc */
5545 {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */
5546 {0xaa, 0xa4, 0x0090}, /* 00,a4,90,aa */
5547 {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH
}, /* 00,a3,01,cc */
5548 {0xa0, 0x90, ZC3XX_R0A4_EXPOSURETIMELOW
}, /* 00,a4,90,cc */
5549 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc */
5550 {0xa0, 0x0a, ZC3XX_R191_EXPOSURELIMITMID
},
5551 {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW
},
5552 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
},
5553 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
},
5554 {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW
},
5555 {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE
},
5556 {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE
},
5557 {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,00,cc */
5558 {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,00,cc */
5559 {0xa0, 0xbc, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,bc,cc */
5560 {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,d0,cc */
5561 {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,e0,cc */
5562 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc */
5563 {0xa0, 0x02, ZC3XX_R09F_MAXXHIGH
}, /* 00,9f,02,cc */
5564 {0xa0, 0xf0, ZC3XX_R0A0_MAXXLOW
},
5565 {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN
},
5569 static const struct usb_action tas5130c_vf0250_InitialScale
[] = {
5570 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc, */
5571 {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,02,cc, */
5572 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc, */
5573 {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,00,cc,
5575 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc, */
5576 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc, */
5577 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc, */
5578 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,e0,cc, */
5579 {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,98,cc, */
5580 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc, */
5581 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc, */
5582 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc, */
5583 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc, */
5584 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc, */
5585 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc, */
5586 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc, */
5587 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,e6,cc,
5589 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,86,cc,
5591 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,10,cc, */
5592 {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,98,cc, */
5593 {0xaa, 0x1b, 0x0024}, /* 00,1b,24,aa, */
5594 {0xdd, 0x00, 0x0080}, /* 00,00,80,dd, */
5595 {0xaa, 0x1b, 0x0000}, /* 00,1b,00,aa, */
5596 {0xaa, 0x13, 0x0002}, /* 00,13,02,aa, */
5597 {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */
5598 /*?? {0xaa, 0x01, 0x0000}, */
5599 {0xaa, 0x01, 0x0000},
5600 {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */
5601 {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */
5602 {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH
}, /* 00,86,82,cc, */
5603 {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,83,cc, */
5604 {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,84,cc, */
5605 {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */
5606 {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa, */
5607 {0xaa, 0x0b, 0x00a0}, /* 00,0b,a0,aa, */
5608 {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa, */
5609 {0xaa, 0x0d, 0x00a0}, /* 00,0d,a0,aa, */
5610 {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa, */
5611 {0xaa, 0x0f, 0x00a0}, /* 00,0f,a0,aa, */
5612 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa, */
5613 {0xaa, 0x11, 0x00a0}, /* 00,11,a0,aa, */
5614 /*?? {0xa0, 0x00, 0x0039},
5615 {0xa1, 0x01, 0x0037}, */
5616 {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */
5617 {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa, (e6 -> e8) */
5618 {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */
5619 {0xaa, 0x19, 0x0088}, /* 00,19,86,aa, */
5620 {0xaa, 0x20, 0x0020}, /* 00,20,20,aa, */
5621 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,b7,cc, */
5622 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc, */
5623 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc, */
5624 {0xa0, 0x76, ZC3XX_R189_AWBSTATUS
}, /* 01,89,76,cc, */
5625 {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc, */
5626 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc, */
5627 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc, */
5628 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc, */
5629 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc, */
5630 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,60,cc, */
5631 {0xa0, 0x61, ZC3XX_R116_RGAIN
}, /* 01,16,61,cc, */
5632 {0xa0, 0x65, ZC3XX_R118_BGAIN
}, /* 01,18,65,cc */
5636 static const struct usb_action tas5130c_vf0250_Initial
[] = {
5637 {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL
}, /* 00,00,01,cc, */
5638 {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING
}, /* 00,08,02,cc, */
5639 {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT
}, /* 00,10,01,cc, */
5640 {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT
}, /* 00,02,10,cc, */
5641 {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH
}, /* 00,03,02,cc, */
5642 {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW
}, /* 00,04,80,cc, */
5643 {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH
}, /* 00,05,01,cc, */
5644 {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW
}, /* 00,06,e0,cc, */
5645 {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,98,cc, */
5646 {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING
}, /* 00,01,01,cc, */
5647 {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,03,cc, */
5648 {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,01,cc, */
5649 {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW
}, /* 00,98,00,cc, */
5650 {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW
}, /* 00,9a,00,cc, */
5651 {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW
}, /* 01,1a,00,cc, */
5652 {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW
}, /* 01,1c,00,cc, */
5653 {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW
}, /* 00,9c,e8,cc,
5655 {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW
}, /* 00,9e,88,cc,
5657 {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,10,cc, */
5658 {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR
}, /* 00,8b,98,cc, */
5659 {0xaa, 0x1b, 0x0024}, /* 00,1b,24,aa, */
5660 {0xdd, 0x00, 0x0080}, /* 00,00,80,dd, */
5661 {0xaa, 0x1b, 0x0000}, /* 00,1b,00,aa, */
5662 {0xaa, 0x13, 0x0002}, /* 00,13,02,aa, */
5663 {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */
5664 /*?? {0xaa, 0x01, 0x0000}, */
5665 {0xaa, 0x01, 0x0000},
5666 {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */
5667 {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */
5668 {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH
}, /* 00,86,82,cc, */
5669 {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID
}, /* 00,87,83,cc, */
5670 {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW
}, /* 00,88,84,cc, */
5671 {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */
5672 {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa, */
5673 {0xaa, 0x0b, 0x00a0}, /* 00,0b,a0,aa, */
5674 {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa, */
5675 {0xaa, 0x0d, 0x00a0}, /* 00,0d,a0,aa, */
5676 {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa, */
5677 {0xaa, 0x0f, 0x00a0}, /* 00,0f,a0,aa, */
5678 {0xaa, 0x10, 0x0000}, /* 00,10,00,aa, */
5679 {0xaa, 0x11, 0x00a0}, /* 00,11,a0,aa, */
5680 /*?? {0xa0, 0x00, 0x0039},
5681 {0xa1, 0x01, 0x0037}, */
5682 {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */
5683 {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa (e6 -> e8) */
5684 {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */
5685 {0xaa, 0x19, 0x0088}, /* 00,19,88,aa, */
5686 {0xaa, 0x20, 0x0020}, /* 00,20,20,aa, */
5687 {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION
}, /* 01,01,b7,cc, */
5688 {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC
}, /* 00,12,05,cc, */
5689 {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0d,cc, */
5690 {0xa0, 0x76, ZC3XX_R189_AWBSTATUS
}, /* 01,89,76,cc, */
5691 {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc, */
5692 {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE
}, /* 01,c5,03,cc, */
5693 {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05
}, /* 01,cb,13,cc, */
5694 {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE
}, /* 02,50,08,cc, */
5695 {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS
}, /* 03,01,08,cc, */
5696 {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN
}, /* 01,a8,60,cc, */
5697 {0xa0, 0x61, ZC3XX_R116_RGAIN
}, /* 01,16,61,cc, */
5698 {0xa0, 0x65, ZC3XX_R118_BGAIN
}, /* 01,18,65,cc */
5701 static const struct usb_action tas5130c_vf0250_50HZScale
[] = {
5702 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5703 {0xaa, 0x83, 0x0001}, /* 00,83,01,aa */
5704 {0xaa, 0x84, 0x00aa}, /* 00,84,aa,aa */
5705 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc, */
5706 {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,0d,cc, */
5707 {0xa0, 0xa8, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,50,cc, */
5708 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc, */
5709 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc, */
5710 {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,47,cc, */
5711 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0e,cc, */
5712 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,15,cc, */
5713 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc, */
5714 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc, */
5715 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,62,cc, */
5716 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,90,cc, */
5717 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,c8,cc, */
5718 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc, */
5719 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,58,cc, */
5720 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,42,cc, */
5721 {0xa0, 0x78, ZC3XX_R18D_YTARGET
}, /* 01,8d,78,cc */
5725 static const struct usb_action tas5130c_vf0250_50HZ
[] = {
5726 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5727 {0xaa, 0x83, 0x0003}, /* 00,83,03,aa */
5728 {0xaa, 0x84, 0x0054}, /* 00,84,54,aa */
5729 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc, */
5730 {0xa0, 0x0d, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,0d,cc, */
5731 {0xa0, 0x50, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,50,cc, */
5732 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc, */
5733 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc, */
5734 {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,8e,cc, */
5735 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0e,cc, */
5736 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,15,cc, */
5737 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc, */
5738 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc, */
5739 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,62,cc, */
5740 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,90,cc, */
5741 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,c8,cc, */
5742 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc, */
5743 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,58,cc, */
5744 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,42,cc, */
5745 {0xa0, 0x78, ZC3XX_R18D_YTARGET
}, /* 01,8d,78,cc */
5749 static const struct usb_action tas5130c_vf0250_60HZScale
[] = {
5750 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5751 {0xaa, 0x83, 0x0001}, /* 00,83,01,aa */
5752 {0xaa, 0x84, 0x0062}, /* 00,84,62,aa */
5753 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc, */
5754 {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,05,cc, */
5755 {0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,88,cc, */
5756 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc, */
5757 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc, */
5758 {0xa0, 0x3b, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,3b,cc, */
5759 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0e,cc, */
5760 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,15,cc, */
5761 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,a9,10,cc, */
5762 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,aa,24,cc, */
5763 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,62,cc, */
5764 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,90,cc, */
5765 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,c8,cc, */
5766 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc, */
5767 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,58,cc, */
5768 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,42,cc, */
5769 {0xa0, 0x78, ZC3XX_R18D_YTARGET
}, /* 01,8d,78,cc */
5773 static const struct usb_action tas5130c_vf0250_60HZ
[] = {
5774 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5775 {0xaa, 0x83, 0x0002}, /* 00,83,02,aa */
5776 {0xaa, 0x84, 0x00c4}, /* 00,84,c4,aa */
5777 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc, */
5778 {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,1,0b,cc, */
5779 {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,2,10,cc, */
5780 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,5,00,cc, */
5781 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,6,00,cc, */
5782 {0xa0, 0x76, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,7,76,cc, */
5783 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
}, /* 01,c,0e,cc, */
5784 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE
}, /* 01,f,15,cc, */
5785 {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF
}, /* 01,9,10,cc, */
5786 {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP
}, /* 01,a,24,cc, */
5787 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
}, /* 00,d,62,cc, */
5788 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
}, /* 00,e,90,cc, */
5789 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
}, /* 00,f,c8,cc, */
5790 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,0,ff,cc, */
5791 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN
}, /* 01,d,58,cc, */
5792 {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,42,cc, */
5793 {0xa0, 0x78, ZC3XX_R18D_YTARGET
}, /* 01,d,78,cc */
5797 static const struct usb_action tas5130c_vf0250_NoFlikerScale
[] = {
5798 {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0c,cc, */
5799 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5800 {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */
5801 {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */
5802 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,0,00,cc, */
5803 {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,05,cc, */
5804 {0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,88,cc, */
5805 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc, */
5806 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc, */
5807 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,10,cc, */
5808 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0e,cc, */
5809 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,15,cc, */
5810 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,62,cc, */
5811 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,90,cc, */
5812 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,c8,cc, */
5813 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc, */
5814 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,58,cc, */
5815 {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,03,cc */
5819 static const struct usb_action tas5130c_vf0250_NoFliker
[] = {
5820 {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE
}, /* 01,00,0c,cc, */
5821 {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */
5822 {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */
5823 {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */
5824 {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH
}, /* 01,90,00,cc, */
5825 {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID
}, /* 01,91,0b,cc, */
5826 {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW
}, /* 01,92,10,cc, */
5827 {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH
}, /* 01,95,00,cc, */
5828 {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID
}, /* 01,96,00,cc, */
5829 {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW
}, /* 01,97,10,cc, */
5830 {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE
}, /* 01,8c,0e,cc, */
5831 {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE
}, /* 01,8f,15,cc, */
5832 {0xa0, 0x62, ZC3XX_R01D_HSYNC_0
}, /* 00,1d,62,cc, */
5833 {0xa0, 0x90, ZC3XX_R01E_HSYNC_1
}, /* 00,1e,90,cc, */
5834 {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2
}, /* 00,1f,c8,cc, */
5835 {0xa0, 0xff, ZC3XX_R020_HSYNC_3
}, /* 00,20,ff,cc, */
5836 {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN
}, /* 01,1d,58,cc, */
5837 {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE
}, /* 01,80,03,cc */
5841 static u8
reg_r_i(struct gspca_dev
*gspca_dev
,
5844 usb_control_msg(gspca_dev
->dev
,
5845 usb_rcvctrlpipe(gspca_dev
->dev
, 0),
5847 USB_DIR_IN
| USB_TYPE_VENDOR
| USB_RECIP_DEVICE
,
5849 index
, gspca_dev
->usb_buf
, 1,
5851 return gspca_dev
->usb_buf
[0];
5854 static u8
reg_r(struct gspca_dev
*gspca_dev
,
5859 ret
= reg_r_i(gspca_dev
, index
);
5860 PDEBUG(D_USBI
, "reg r [%04x] -> %02x", index
, ret
);
5864 static void reg_w_i(struct usb_device
*dev
,
5868 usb_control_msg(dev
,
5869 usb_sndctrlpipe(dev
, 0),
5871 USB_DIR_OUT
| USB_TYPE_VENDOR
| USB_RECIP_DEVICE
,
5872 value
, index
, NULL
, 0,
5876 static void reg_w(struct usb_device
*dev
,
5880 PDEBUG(D_USBO
, "reg w [%04x] = %02x", index
, value
);
5881 reg_w_i(dev
, value
, index
);
5884 static u16
i2c_read(struct gspca_dev
*gspca_dev
,
5890 reg_w_i(gspca_dev
->dev
, reg
, 0x0092);
5891 reg_w_i(gspca_dev
->dev
, 0x02, 0x0090); /* <- read command */
5893 retbyte
= reg_r_i(gspca_dev
, 0x0091); /* read status */
5894 if (retbyte
!= 0x00)
5895 err("i2c_r status error %02x", retbyte
);
5896 retval
= reg_r_i(gspca_dev
, 0x0095); /* read Lowbyte */
5897 retval
|= reg_r_i(gspca_dev
, 0x0096) << 8; /* read Hightbyte */
5898 PDEBUG(D_USBI
, "i2c r [%02x] -> %04x (%02x)",
5899 reg
, retval
, retbyte
);
5903 static u8
i2c_write(struct gspca_dev
*gspca_dev
,
5910 reg_w_i(gspca_dev
->dev
, reg
, 0x92);
5911 reg_w_i(gspca_dev
->dev
, valL
, 0x93);
5912 reg_w_i(gspca_dev
->dev
, valH
, 0x94);
5913 reg_w_i(gspca_dev
->dev
, 0x01, 0x90); /* <- write command */
5915 retbyte
= reg_r_i(gspca_dev
, 0x0091); /* read status */
5916 if (retbyte
!= 0x00)
5917 err("i2c_w status error %02x", retbyte
);
5918 PDEBUG(D_USBO
, "i2c w [%02x] = %02x%02x (%02x)",
5919 reg
, valH
, valL
, retbyte
);
5923 static void usb_exchange(struct gspca_dev
*gspca_dev
,
5924 const struct usb_action
*action
)
5926 while (action
->req
) {
5927 switch (action
->req
) {
5928 case 0xa0: /* write register */
5929 reg_w(gspca_dev
->dev
, action
->val
, action
->idx
);
5931 case 0xa1: /* read status */
5932 reg_r(gspca_dev
, action
->idx
);
5935 i2c_write(gspca_dev
,
5936 action
->val
, /* reg */
5937 action
->idx
& 0xff, /* valL */
5938 action
->idx
>> 8); /* valH */
5941 i2c_write(gspca_dev
,
5942 action
->idx
>> 8, /* reg */
5943 action
->idx
& 0xff, /* valL */
5944 action
->val
); /* valH */
5947 /* case 0xdd: * delay */
5948 msleep(action
->val
/ 64 + 10);
5956 static void setmatrix(struct gspca_dev
*gspca_dev
)
5958 struct sd
*sd
= (struct sd
*) gspca_dev
;
5961 static const u8 adcm2700_matrix
[9] =
5962 /* {0x66, 0xed, 0xed, 0xed, 0x66, 0xed, 0xed, 0xed, 0x66}; */
5964 {0x74, 0xed, 0xed, 0xed, 0x74, 0xed, 0xed, 0xed, 0x74};
5965 static const u8 gc0305_matrix
[9] =
5966 {0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50};
5967 static const u8 ov7620_matrix
[9] =
5968 {0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58};
5969 static const u8 pas202b_matrix
[9] =
5970 {0x4c, 0xf5, 0xff, 0xf9, 0x51, 0xf5, 0xfb, 0xed, 0x5f};
5971 static const u8 po2030_matrix
[9] =
5972 {0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60};
5973 static const u8 tas5130c_matrix
[9] =
5974 {0x68, 0xec, 0xec, 0xec, 0x68, 0xec, 0xec, 0xec, 0x68};
5975 static const u8 vf0250_matrix
[9] =
5976 {0x7b, 0xea, 0xea, 0xea, 0x7b, 0xea, 0xea, 0xea, 0x7b};
5977 static const u8
*matrix_tb
[SENSOR_MAX
] = {
5978 adcm2700_matrix
, /* SENSOR_ADCM2700 0 */
5979 ov7620_matrix
, /* SENSOR_CS2102 1 */
5980 NULL
, /* SENSOR_CS2102K 2 */
5981 gc0305_matrix
, /* SENSOR_GC0305 3 */
5982 NULL
, /* SENSOR_HDCS2020b 4 */
5983 NULL
, /* SENSOR_HV7131B 5 */
5984 NULL
, /* SENSOR_HV7131C 6 */
5985 NULL
, /* SENSOR_ICM105A 7 */
5986 NULL
, /* SENSOR_MC501CB 8 */
5987 gc0305_matrix
, /* SENSOR_MI0360SOC 9 */
5988 ov7620_matrix
, /* SENSOR_OV7620 10 */
5989 NULL
, /* SENSOR_OV7630C 11 */
5990 NULL
, /* SENSOR_PAS106 12 */
5991 pas202b_matrix
, /* SENSOR_PAS202B 13 */
5992 gc0305_matrix
, /* SENSOR_PB0330 14 */
5993 po2030_matrix
, /* SENSOR_PO2030 15 */
5994 NULL
, /* SENSOR_TAS5130CK 16 */
5995 tas5130c_matrix
, /* SENSOR_TAS5130CXX 17 */
5996 vf0250_matrix
, /* SENSOR_TAS5130C_VF0250 18 */
5999 matrix
= matrix_tb
[sd
->sensor
];
6001 return; /* matrix already loaded */
6002 for (i
= 0; i
< ARRAY_SIZE(ov7620_matrix
); i
++)
6003 reg_w(gspca_dev
->dev
, matrix
[i
], 0x010a + i
);
6006 static void setbrightness(struct gspca_dev
*gspca_dev
)
6008 struct sd
*sd
= (struct sd
*) gspca_dev
;
6011 switch (sd
->sensor
) {
6014 case SENSOR_PAS202B
:
6018 /*fixme: is it really write to 011d and 018d for all other sensors? */
6019 brightness
= sd
->brightness
;
6020 reg_w(gspca_dev
->dev
, brightness
, 0x011d);
6021 switch (sd
->sensor
) {
6022 case SENSOR_ADCM2700
:
6023 case SENSOR_HV7131B
:
6026 if (brightness
< 0x70)
6030 reg_w(gspca_dev
->dev
, brightness
, 0x018d);
6033 static void setsharpness(struct gspca_dev
*gspca_dev
)
6035 struct sd
*sd
= (struct sd
*) gspca_dev
;
6036 struct usb_device
*dev
= gspca_dev
->dev
;
6038 static const u8 sharpness_tb
[][2] = {
6045 sharpness
= sd
->sharpness
;
6046 reg_w(dev
, sharpness_tb
[sharpness
][0], 0x01c6);
6047 reg_r(gspca_dev
, 0x01c8);
6048 reg_r(gspca_dev
, 0x01c9);
6049 reg_r(gspca_dev
, 0x01ca);
6050 reg_w(dev
, sharpness_tb
[sharpness
][1], 0x01cb);
6053 static void setcontrast(struct gspca_dev
*gspca_dev
)
6055 struct sd
*sd
= (struct sd
*) gspca_dev
;
6056 struct usb_device
*dev
= gspca_dev
->dev
;
6058 int g
, i
, k
, adj
, gp
;
6060 static const u8 delta_tb
[16] = /* delta for contrast */
6061 {0x15, 0x0d, 0x0a, 0x09, 0x08, 0x08, 0x08, 0x08,
6062 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08};
6063 static const u8 gamma_tb
[6][16] = {
6064 {0x00, 0x00, 0x03, 0x0d, 0x1b, 0x2e, 0x45, 0x5f,
6065 0x79, 0x93, 0xab, 0xc1, 0xd4, 0xe5, 0xf3, 0xff},
6066 {0x01, 0x0c, 0x1f, 0x3a, 0x53, 0x6d, 0x85, 0x9c,
6067 0xb0, 0xc2, 0xd1, 0xde, 0xe9, 0xf2, 0xf9, 0xff},
6068 {0x04, 0x16, 0x30, 0x4e, 0x68, 0x81, 0x98, 0xac,
6069 0xbe, 0xcd, 0xda, 0xe4, 0xed, 0xf5, 0xfb, 0xff},
6070 {0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8,
6071 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff},
6072 {0x20, 0x4b, 0x6e, 0x8d, 0xa3, 0xb5, 0xc5, 0xd2,
6073 0xdc, 0xe5, 0xec, 0xf2, 0xf6, 0xfa, 0xfd, 0xff},
6074 {0x24, 0x44, 0x64, 0x84, 0x9d, 0xb2, 0xc4, 0xd3,
6075 0xe0, 0xeb, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff},
6078 Tgamma
= gamma_tb
[sd
->gamma
- 1];
6080 k
= ((int) sd
->contrast
- 128); /* -128 / 128 */
6083 for (i
= 0; i
< 16; i
++) {
6084 g
= Tgamma
[i
] - delta_tb
[i
] * k
/ 128 - adj
/ 2;
6089 reg_w(dev
, g
, 0x0120 + i
); /* gamma */
6103 gr
[15] = gr
[14] / 2;
6104 for (i
= 0; i
< 16; i
++)
6105 reg_w(dev
, gr
[i
], 0x0130 + i
); /* gradient */
6108 static void setquality(struct gspca_dev
*gspca_dev
)
6110 struct sd
*sd
= (struct sd
*) gspca_dev
;
6111 struct usb_device
*dev
= gspca_dev
->dev
;
6114 switch (sd
->sensor
) {
6115 case SENSOR_ADCM2700
:
6117 case SENSOR_HV7131B
:
6119 case SENSOR_PAS202B
:
6123 /*fixme: is it really 0008 0007 0018 for all other sensors? */
6124 reg_w(dev
, QUANT_VAL
, 0x0008);
6126 reg_w(dev
, frxt
, 0x0007);
6127 #if QUANT_VAL == 0 || QUANT_VAL == 1 || QUANT_VAL == 2
6129 #elif QUANT_VAL == 3
6131 #elif QUANT_VAL == 4
6136 reg_w(dev
, frxt
, 0x0018);
6139 /* Matches the sensor's internal frame rate to the lighting frequency.
6140 * Valid frequencies are:
6141 * 50Hz, for European and Asian lighting (default)
6142 * 60Hz, for American lighting
6143 * 0 = No Fliker (for outdoore usage)
6144 * Returns: 0 for success
6146 static int setlightfreq(struct gspca_dev
*gspca_dev
)
6148 struct sd
*sd
= (struct sd
*) gspca_dev
;
6150 const struct usb_action
*zc3_freq
;
6151 static const struct usb_action
*freq_tb
[SENSOR_MAX
][6] = {
6152 /* SENSOR_ADCM2700 0 */
6153 {adcm2700_NoFliker
, adcm2700_NoFliker
,
6154 adcm2700_50HZ
, adcm2700_50HZ
,
6155 adcm2700_60HZ
, adcm2700_60HZ
},
6156 /* SENSOR_CS2102 1 */
6157 {cs2102_NoFliker
, cs2102_NoFlikerScale
,
6158 cs2102_50HZ
, cs2102_50HZScale
,
6159 cs2102_60HZ
, cs2102_60HZScale
},
6160 /* SENSOR_CS2102K 2 */
6161 {cs2102_NoFliker
, cs2102_NoFlikerScale
,
6162 NULL
, NULL
, /* currently disabled */
6164 /* SENSOR_GC0305 3 */
6165 {gc0305_NoFliker
, gc0305_NoFliker
,
6166 gc0305_50HZ
, gc0305_50HZ
,
6167 gc0305_60HZ
, gc0305_60HZ
},
6168 /* SENSOR_HDCS2020b 4 */
6169 {hdcs2020b_NoFliker
, hdcs2020b_NoFliker
,
6170 hdcs2020b_50HZ
, hdcs2020b_50HZ
,
6171 hdcs2020b_60HZ
, hdcs2020b_60HZ
},
6172 /* SENSOR_HV7131B 5 */
6173 {hv7131b_NoFliker
, hv7131b_NoFlikerScale
,
6174 hv7131b_50HZ
, hv7131b_50HZScale
,
6175 hv7131b_60HZ
, hv7131b_60HZScale
},
6176 /* SENSOR_HV7131C 6 */
6180 /* SENSOR_ICM105A 7 */
6181 {icm105a_NoFliker
, icm105a_NoFlikerScale
,
6182 icm105a_50HZ
, icm105a_50HZScale
,
6183 icm105a_60HZ
, icm105a_60HZScale
},
6184 /* SENSOR_MC501CB 8 */
6185 {mc501cb_NoFliker
, mc501cb_NoFlikerScale
,
6186 mc501cb_50HZ
, mc501cb_50HZScale
,
6187 mc501cb_60HZ
, mc501cb_60HZScale
},
6188 /* SENSOR_MI0360SOC 9 */
6189 {mi360soc_AENoFliker
, mi360soc_AENoFlikerScale
,
6190 mi360soc_AE50HZ
, mi360soc_AE50HZScale
,
6191 mi360soc_AE60HZ
, mi360soc_AE60HZScale
},
6192 /* SENSOR_OV7620 10 */
6193 {ov7620_NoFliker
, ov7620_NoFliker
,
6194 ov7620_50HZ
, ov7620_50HZ
,
6195 ov7620_60HZ
, ov7620_60HZ
},
6196 /* SENSOR_OV7630C 11 */
6200 /* SENSOR_PAS106 12 */
6201 {pas106b_NoFliker
, pas106b_NoFliker
,
6202 pas106b_50HZ
, pas106b_50HZ
,
6203 pas106b_60HZ
, pas106b_60HZ
},
6204 /* SENSOR_PAS202B 13 */
6205 {pas202b_NoFlikerScale
, pas202b_NoFliker
,
6206 pas202b_50HZScale
, pas202b_50HZ
,
6207 pas202b_60HZScale
, pas202b_60HZ
},
6208 /* SENSOR_PB0330 14 */
6209 {pb0330_NoFlikerScale
, pb0330_NoFliker
,
6210 pb0330_50HZScale
, pb0330_50HZ
,
6211 pb0330_60HZScale
, pb0330_60HZ
},
6212 /* SENSOR_PO2030 15 */
6213 {po2030_NoFliker
, po2030_NoFliker
,
6214 po2030_50HZ
, po2030_50HZ
,
6215 po2030_60HZ
, po2030_60HZ
},
6216 /* SENSOR_TAS5130CK 16 */
6217 {tas5130cxx_NoFliker
, tas5130cxx_NoFlikerScale
,
6218 tas5130cxx_50HZ
, tas5130cxx_50HZScale
,
6219 tas5130cxx_60HZ
, tas5130cxx_60HZScale
},
6220 /* SENSOR_TAS5130CXX 17 */
6221 {tas5130cxx_NoFliker
, tas5130cxx_NoFlikerScale
,
6222 tas5130cxx_50HZ
, tas5130cxx_50HZScale
,
6223 tas5130cxx_60HZ
, tas5130cxx_60HZScale
},
6224 /* SENSOR_TAS5130C_VF0250 18 */
6225 {tas5130c_vf0250_NoFliker
, tas5130c_vf0250_NoFlikerScale
,
6226 tas5130c_vf0250_50HZ
, tas5130c_vf0250_50HZScale
,
6227 tas5130c_vf0250_60HZ
, tas5130c_vf0250_60HZScale
},
6230 i
= sd
->lightfreq
* 2;
6231 mode
= gspca_dev
->cam
.cam_mode
[(int) gspca_dev
->curr_mode
].priv
;
6234 zc3_freq
= freq_tb
[sd
->sensor
][i
];
6235 if (zc3_freq
!= NULL
) {
6236 usb_exchange(gspca_dev
, zc3_freq
);
6237 switch (sd
->sensor
) {
6239 if (mode
/* if 320x240 */
6240 && sd
->lightfreq
== 1) /* and 50Hz */
6241 reg_w(gspca_dev
->dev
, 0x85, 0x018d);
6242 /* win: 0x80, 0x018d */
6245 if (!mode
) { /* if 640x480 */
6246 if (sd
->lightfreq
!= 0) /* and 50 or 60 Hz */
6247 reg_w(gspca_dev
->dev
, 0x40, 0x0002);
6249 reg_w(gspca_dev
->dev
, 0x44, 0x0002);
6252 case SENSOR_PAS202B
:
6253 reg_w(gspca_dev
->dev
, 0x00, 0x01a7);
6260 static void setautogain(struct gspca_dev
*gspca_dev
)
6262 struct sd
*sd
= (struct sd
*) gspca_dev
;
6269 reg_w(gspca_dev
->dev
, autoval
, 0x0180);
6272 static void send_unknown(struct usb_device
*dev
, int sensor
)
6274 reg_w(dev
, 0x01, 0x0000); /* led off */
6277 reg_w(dev
, 0x03, 0x003a);
6278 reg_w(dev
, 0x0c, 0x003b);
6279 reg_w(dev
, 0x08, 0x0038);
6281 case SENSOR_ADCM2700
:
6284 case SENSOR_MI0360SOC
:
6287 reg_w(dev
, 0x0d, 0x003a);
6288 reg_w(dev
, 0x02, 0x003b);
6289 reg_w(dev
, 0x00, 0x0038);
6291 case SENSOR_PAS202B
:
6292 reg_w(dev
, 0x03, 0x003b);
6293 reg_w(dev
, 0x0c, 0x003a);
6294 reg_w(dev
, 0x0b, 0x0039);
6295 reg_w(dev
, 0x0b, 0x0038);
6300 /* start probe 2 wires */
6301 static void start_2wr_probe(struct usb_device
*dev
, int sensor
)
6303 reg_w(dev
, 0x01, 0x0000);
6304 reg_w(dev
, sensor
, 0x0010);
6305 reg_w(dev
, 0x01, 0x0001);
6306 reg_w(dev
, 0x03, 0x0012);
6307 reg_w(dev
, 0x01, 0x0012);
6311 static int sif_probe(struct gspca_dev
*gspca_dev
)
6315 start_2wr_probe(gspca_dev
->dev
, 0x0f); /* PAS106 */
6316 reg_w(gspca_dev
->dev
, 0x08, 0x008d);
6318 checkword
= ((i2c_read(gspca_dev
, 0x00) & 0x0f) << 4)
6319 | ((i2c_read(gspca_dev
, 0x01) & 0xf0) >> 4);
6320 PDEBUG(D_PROBE
, "probe sif 0x%04x", checkword
);
6321 if (checkword
== 0x0007) {
6322 send_unknown(gspca_dev
->dev
, SENSOR_PAS106
);
6323 return 0x0f; /* PAS106 */
6328 static int vga_2wr_probe(struct gspca_dev
*gspca_dev
)
6330 struct usb_device
*dev
= gspca_dev
->dev
;
6333 start_2wr_probe(dev
, 0x00); /* HV7131B */
6334 i2c_write(gspca_dev
, 0x01, 0xaa, 0x00);
6335 retword
= i2c_read(gspca_dev
, 0x01);
6337 return 0x00; /* HV7131B */
6339 start_2wr_probe(dev
, 0x04); /* CS2102 */
6340 i2c_write(gspca_dev
, 0x01, 0xaa, 0x00);
6341 retword
= i2c_read(gspca_dev
, 0x01);
6343 return 0x04; /* CS2102 */
6345 start_2wr_probe(dev
, 0x06); /* OmniVision */
6346 reg_w(dev
, 0x08, 0x008d);
6347 i2c_write(gspca_dev
, 0x11, 0xaa, 0x00);
6348 retword
= i2c_read(gspca_dev
, 0x11);
6350 /* (should have returned 0xaa) --> Omnivision? */
6351 /* reg_r 0x10 -> 0x06 --> */
6355 start_2wr_probe(dev
, 0x08); /* HDCS2020 */
6356 i2c_write(gspca_dev
, 0x1c, 0x00, 0x00);
6357 i2c_write(gspca_dev
, 0x15, 0xaa, 0x00);
6358 retword
= i2c_read(gspca_dev
, 0x15);
6360 return 0x08; /* HDCS2020 */
6362 start_2wr_probe(dev
, 0x0a); /* PB0330 */
6363 i2c_write(gspca_dev
, 0x07, 0xaa, 0xaa);
6364 retword
= i2c_read(gspca_dev
, 0x07);
6366 return 0x0a; /* PB0330 */
6367 retword
= i2c_read(gspca_dev
, 0x03);
6369 return 0x0a; /* PB0330 ?? */
6370 retword
= i2c_read(gspca_dev
, 0x04);
6372 return 0x0a; /* PB0330 ?? */
6374 start_2wr_probe(dev
, 0x0c); /* ICM105A */
6375 i2c_write(gspca_dev
, 0x01, 0x11, 0x00);
6376 retword
= i2c_read(gspca_dev
, 0x01);
6378 return 0x0c; /* ICM105A */
6380 start_2wr_probe(dev
, 0x0e); /* PAS202BCB */
6381 reg_w(dev
, 0x08, 0x008d);
6382 i2c_write(gspca_dev
, 0x03, 0xaa, 0x00);
6384 retword
= i2c_read(gspca_dev
, 0x03);
6386 send_unknown(dev
, SENSOR_PAS202B
);
6387 return 0x0e; /* PAS202BCB */
6390 start_2wr_probe(dev
, 0x02); /* TAS5130C */
6391 i2c_write(gspca_dev
, 0x01, 0xaa, 0x00);
6392 retword
= i2c_read(gspca_dev
, 0x01);
6394 return 0x02; /* TAS5130C */
6396 reg_r(gspca_dev
, 0x0010); /* ?? */
6397 reg_r(gspca_dev
, 0x0010);
6399 reg_w(dev
, 0x01, 0x0000);
6400 reg_w(dev
, 0x01, 0x0001);
6401 reg_w(dev
, 0x06, 0x0010); /* OmniVision */
6402 reg_w(dev
, 0xa1, 0x008b);
6403 reg_w(dev
, 0x08, 0x008d);
6405 reg_w(dev
, 0x01, 0x0012);
6406 i2c_write(gspca_dev
, 0x12, 0x80, 0x00); /* sensor reset */
6407 retword
= i2c_read(gspca_dev
, 0x0a) << 8;
6408 retword
|= i2c_read(gspca_dev
, 0x0b);
6409 PDEBUG(D_PROBE
, "probe 2wr ov vga 0x%04x", retword
);
6411 case 0x7631: /* OV7630C */
6412 reg_w(dev
, 0x06, 0x0010);
6414 case 0x7620: /* OV7620 */
6415 case 0x7648: /* OV7648 */
6418 return -1; /* not OmniVision */
6423 struct sensor_by_chipset_revision
{
6425 u8 internal_sensor_id
;
6427 static const struct sensor_by_chipset_revision chipset_revision_sensor
[] = {
6428 {0xc000, 0x12}, /* TAS5130C */
6429 {0xc001, 0x13}, /* MI0360SOC */
6432 {0x8000, 0x14}, /* CS2102K */
6433 {0x8400, 0x15}, /* TAS5130K */
6437 static int vga_3wr_probe(struct gspca_dev
*gspca_dev
)
6439 struct sd
*sd
= (struct sd
*) gspca_dev
;
6440 struct usb_device
*dev
= gspca_dev
->dev
;
6445 /*fixme: lack of 8b=b3 (11,12)-> 10, 8b=e0 (14,15,16)-> 12 found in gspcav1*/
6446 reg_w(dev
, 0x02, 0x0010);
6447 reg_r(gspca_dev
, 0x0010);
6448 reg_w(dev
, 0x01, 0x0000);
6449 reg_w(dev
, 0x00, 0x0010);
6450 reg_w(dev
, 0x01, 0x0001);
6451 reg_w(dev
, 0x91, 0x008b);
6452 reg_w(dev
, 0x03, 0x0012);
6453 reg_w(dev
, 0x01, 0x0012);
6454 reg_w(dev
, 0x05, 0x0012);
6455 retword
= i2c_read(gspca_dev
, 0x14);
6457 return 0x11; /* HV7131R */
6458 retword
= i2c_read(gspca_dev
, 0x15);
6460 return 0x11; /* HV7131R */
6461 retword
= i2c_read(gspca_dev
, 0x16);
6463 return 0x11; /* HV7131R */
6465 reg_w(dev
, 0x02, 0x0010);
6466 retword
= reg_r(gspca_dev
, 0x000b) << 8;
6467 retword
|= reg_r(gspca_dev
, 0x000a);
6468 PDEBUG(D_PROBE
, "probe 3wr vga 1 0x%04x", retword
);
6469 reg_r(gspca_dev
, 0x0010);
6470 /* value 0x4001 is meaningless */
6471 if (retword
!= 0x4001) {
6472 if ((retword
& 0xff00) == 0x6400)
6473 return 0x02; /* TAS5130C */
6474 for (i
= 0; i
< ARRAY_SIZE(chipset_revision_sensor
); i
++) {
6475 if (chipset_revision_sensor
[i
].revision
== retword
) {
6476 sd
->chip_revision
= retword
;
6477 send_unknown(dev
, SENSOR_PB0330
);
6478 return chipset_revision_sensor
[i
]
6479 .internal_sensor_id
;
6484 reg_w(dev
, 0x01, 0x0000); /* check PB0330 */
6485 reg_w(dev
, 0x01, 0x0001);
6486 reg_w(dev
, 0xdd, 0x008b);
6487 reg_w(dev
, 0x0a, 0x0010);
6488 reg_w(dev
, 0x03, 0x0012);
6489 reg_w(dev
, 0x01, 0x0012);
6490 retword
= i2c_read(gspca_dev
, 0x00);
6492 PDEBUG(D_PROBE
, "probe 3wr vga type 0a ?");
6493 return 0x0a; /* PB0330 */
6496 reg_w(dev
, 0x01, 0x0000);
6497 reg_w(dev
, 0x01, 0x0001);
6498 reg_w(dev
, 0x98, 0x008b);
6499 reg_w(dev
, 0x01, 0x0010);
6500 reg_w(dev
, 0x03, 0x0012);
6502 reg_w(dev
, 0x01, 0x0012);
6503 retword
= i2c_read(gspca_dev
, 0x00);
6505 PDEBUG(D_PROBE
, "probe 3wr vga type %02x", retword
);
6506 if (retword
== 0x0011) /* VF0250 */
6508 if (retword
== 0x0029) /* gc0305 */
6509 send_unknown(dev
, SENSOR_GC0305
);
6513 reg_w(dev
, 0x01, 0x0000); /* check OmniVision */
6514 reg_w(dev
, 0x01, 0x0001);
6515 reg_w(dev
, 0xa1, 0x008b);
6516 reg_w(dev
, 0x08, 0x008d);
6517 reg_w(dev
, 0x06, 0x0010);
6518 reg_w(dev
, 0x01, 0x0012);
6519 reg_w(dev
, 0x05, 0x0012);
6520 if (i2c_read(gspca_dev
, 0x1c) == 0x007f /* OV7610 - manufacturer ID */
6521 && i2c_read(gspca_dev
, 0x1d) == 0x00a2) {
6522 send_unknown(dev
, SENSOR_OV7620
);
6523 return 0x06; /* OmniVision confirm ? */
6526 reg_w(dev
, 0x01, 0x0000);
6527 reg_w(dev
, 0x00, 0x0002);
6528 reg_w(dev
, 0x01, 0x0010);
6529 reg_w(dev
, 0x01, 0x0001);
6530 reg_w(dev
, 0xee, 0x008b);
6531 reg_w(dev
, 0x03, 0x0012);
6532 reg_w(dev
, 0x01, 0x0012);
6533 reg_w(dev
, 0x05, 0x0012);
6534 retword
= i2c_read(gspca_dev
, 0x00) << 8; /* ID 0 */
6535 retword
|= i2c_read(gspca_dev
, 0x01); /* ID 1 */
6536 PDEBUG(D_PROBE
, "probe 3wr vga 2 0x%04x", retword
);
6537 if (retword
== 0x2030) {
6538 retbyte
= i2c_read(gspca_dev
, 0x02); /* revision number */
6539 PDEBUG(D_PROBE
, "sensor PO2030 rev 0x%02x", retbyte
);
6540 send_unknown(dev
, SENSOR_PO2030
);
6544 reg_w(dev
, 0x01, 0x0000);
6545 reg_w(dev
, 0x0a, 0x0010);
6546 reg_w(dev
, 0xd3, 0x008b);
6547 reg_w(dev
, 0x01, 0x0001);
6548 reg_w(dev
, 0x03, 0x0012);
6549 reg_w(dev
, 0x01, 0x0012);
6550 reg_w(dev
, 0x05, 0x0012);
6551 reg_w(dev
, 0xd3, 0x008b);
6552 retword
= i2c_read(gspca_dev
, 0x01);
6554 PDEBUG(D_PROBE
, "probe 3wr vga type 0a ? ret: %04x", retword
);
6555 return 0x16; /* adcm2700 (6100/6200) */
6560 static int zcxx_probeSensor(struct gspca_dev
*gspca_dev
)
6562 struct sd
*sd
= (struct sd
*) gspca_dev
;
6565 switch (sd
->sensor
) {
6566 case SENSOR_MC501CB
:
6567 return -1; /* don't probe */
6568 case SENSOR_TAS5130C_VF0250
:
6569 /* may probe but with no write in reg 0x0010 */
6570 return -1; /* don't probe */
6572 sensor
= sif_probe(gspca_dev
);
6577 sensor
= vga_2wr_probe(gspca_dev
);
6580 return vga_3wr_probe(gspca_dev
);
6583 /* this function is called at probe time */
6584 static int sd_config(struct gspca_dev
*gspca_dev
,
6585 const struct usb_device_id
*id
)
6587 struct sd
*sd
= (struct sd
*) gspca_dev
;
6590 static const u8 gamma
[SENSOR_MAX
] = {
6591 4, /* SENSOR_ADCM2700 0 */
6592 4, /* SENSOR_CS2102 1 */
6593 5, /* SENSOR_CS2102K 2 */
6594 4, /* SENSOR_GC0305 3 */
6595 4, /* SENSOR_HDCS2020b 4 */
6596 4, /* SENSOR_HV7131B 5 */
6597 4, /* SENSOR_HV7131C 6 */
6598 4, /* SENSOR_ICM105A 7 */
6599 4, /* SENSOR_MC501CB 8 */
6600 4, /* SENSOR_MI0360SOC 9 */
6601 3, /* SENSOR_OV7620 10 */
6602 4, /* SENSOR_OV7630C 11 */
6603 4, /* SENSOR_PAS106 12 */
6604 4, /* SENSOR_PAS202B 13 */
6605 4, /* SENSOR_PB0330 14 */
6606 4, /* SENSOR_PO2030 15 */
6607 4, /* SENSOR_TAS5130CK 16 */
6608 3, /* SENSOR_TAS5130CXX 17 */
6609 3, /* SENSOR_TAS5130C_VF0250 18 */
6611 static const u8 mode_tb
[SENSOR_MAX
] = {
6612 2, /* SENSOR_ADCM2700 0 */
6613 1, /* SENSOR_CS2102 1 */
6614 1, /* SENSOR_CS2102K 2 */
6615 1, /* SENSOR_GC0305 3 */
6616 1, /* SENSOR_HDCS2020b 4 */
6617 1, /* SENSOR_HV7131B 5 */
6618 1, /* SENSOR_HV7131C 6 */
6619 1, /* SENSOR_ICM105A 7 */
6620 2, /* SENSOR_MC501CB 8 */
6621 1, /* SENSOR_MI0360SOC 9 */
6622 2, /* SENSOR_OV7620 10 */
6623 1, /* SENSOR_OV7630C 11 */
6624 0, /* SENSOR_PAS106 12 */
6625 1, /* SENSOR_PAS202B 13 */
6626 1, /* SENSOR_PB0330 14 */
6627 1, /* SENSOR_PO2030 15 */
6628 1, /* SENSOR_TAS5130CK 16 */
6629 1, /* SENSOR_TAS5130CXX 17 */
6630 1, /* SENSOR_TAS5130C_VF0250 18 */
6633 /* define some sensors from the vendor/product */
6634 sd
->sharpness
= SHARPNESS_DEF
;
6635 sd
->sensor
= id
->driver_info
;
6636 sensor
= zcxx_probeSensor(gspca_dev
);
6638 PDEBUG(D_PROBE
, "probe sensor -> %04x", sensor
);
6639 if ((unsigned) force_sensor
< SENSOR_MAX
) {
6640 sd
->sensor
= force_sensor
;
6641 PDEBUG(D_PROBE
, "sensor forced to %d", force_sensor
);
6645 switch (sd
->sensor
) {
6646 case SENSOR_MC501CB
:
6647 PDEBUG(D_PROBE
, "Sensor MC501CB");
6649 case SENSOR_TAS5130C_VF0250
:
6650 PDEBUG(D_PROBE
, "Sensor Tas5130 (VF0250)");
6654 "Sensor UNKNOWN_0 force Tas5130");
6655 sd
->sensor
= SENSOR_TAS5130CXX
;
6659 /* check the sensor type */
6660 sensor
= i2c_read(gspca_dev
, 0x00);
6661 PDEBUG(D_PROBE
, "Sensor hv7131 type %d", sensor
);
6663 case 0: /* hv7131b */
6664 case 1: /* hv7131e */
6665 PDEBUG(D_PROBE
, "Find Sensor HV7131B");
6666 sd
->sensor
= SENSOR_HV7131B
;
6669 /* case 2: * hv7131r */
6670 PDEBUG(D_PROBE
, "Find Sensor HV7131R(c)");
6671 sd
->sensor
= SENSOR_HV7131C
;
6676 PDEBUG(D_PROBE
, "Sensor TAS5130C");
6677 sd
->sensor
= SENSOR_TAS5130CXX
;
6680 PDEBUG(D_PROBE
, "Find Sensor CS2102");
6681 sd
->sensor
= SENSOR_CS2102
;
6684 PDEBUG(D_PROBE
, "Find Sensor HDCS2020(b)");
6685 sd
->sensor
= SENSOR_HDCS2020b
;
6689 "Find Sensor PB0330. Chip revision %x",
6691 sd
->sensor
= SENSOR_PB0330
;
6694 PDEBUG(D_PROBE
, "Find Sensor ICM105A");
6695 sd
->sensor
= SENSOR_ICM105A
;
6698 PDEBUG(D_PROBE
, "Find Sensor PAS202B");
6699 sd
->sensor
= SENSOR_PAS202B
;
6700 /* sd->sharpness = 1; */
6703 PDEBUG(D_PROBE
, "Find Sensor PAS106");
6704 sd
->sensor
= SENSOR_PAS106
;
6708 PDEBUG(D_PROBE
, "Find Sensor TAS5130C");
6709 sd
->sensor
= SENSOR_TAS5130CXX
;
6712 PDEBUG(D_PROBE
, "Find Sensor HV7131R(c)");
6713 sd
->sensor
= SENSOR_HV7131C
;
6717 "Find Sensor MI0360SOC. Chip revision %x",
6719 sd
->sensor
= SENSOR_MI0360SOC
;
6723 "Find Sensor CS2102K?. Chip revision %x",
6725 sd
->sensor
= SENSOR_CS2102K
;
6729 "Find Sensor TAS5130CK?. Chip revision %x",
6731 sd
->sensor
= SENSOR_TAS5130CK
;
6734 PDEBUG(D_PROBE
, "Find Sensor ADCM2700");
6735 sd
->sensor
= SENSOR_ADCM2700
;
6738 PDEBUG(D_PROBE
, "Find Sensor GC0305");
6739 sd
->sensor
= SENSOR_GC0305
;
6742 PDEBUG(D_PROBE
, "Sensor Tas5130 (VF0250)");
6743 sd
->sensor
= SENSOR_TAS5130C_VF0250
;
6746 PDEBUG(D_PROBE
, "Find Sensor PO2030");
6747 sd
->sensor
= SENSOR_PO2030
;
6748 sd
->sharpness
= 0; /* from win traces */
6751 PDEBUG(D_PROBE
, "Find Sensor OV7620");
6752 sd
->sensor
= SENSOR_OV7620
;
6755 PDEBUG(D_PROBE
, "Find Sensor OV7630C");
6756 sd
->sensor
= SENSOR_OV7630C
;
6759 PDEBUG(D_PROBE
, "Find Sensor OV7648");
6760 sd
->sensor
= SENSOR_OV7620
; /* same sensor (?) */
6763 PDEBUG(D_ERR
|D_PROBE
, "Unknown sensor %04x", sensor
);
6767 if (sensor
< 0x20) {
6768 if (sensor
== -1 || sensor
== 0x10 || sensor
== 0x12)
6769 reg_w(gspca_dev
->dev
, 0x02, 0x0010);
6770 reg_r(gspca_dev
, 0x0010);
6773 cam
= &gspca_dev
->cam
;
6776 switch (mode_tb
[sd
->sensor
]) {
6778 cam
->cam_mode
= sif_mode
;
6779 cam
->nmodes
= ARRAY_SIZE(sif_mode
);
6782 cam
->cam_mode
= vga_mode
;
6783 cam
->nmodes
= ARRAY_SIZE(vga_mode
);
6787 cam
->cam_mode
= broken_vga_mode
;
6788 cam
->nmodes
= ARRAY_SIZE(broken_vga_mode
);
6791 sd
->brightness
= BRIGHTNESS_DEF
;
6792 sd
->contrast
= CONTRAST_DEF
;
6793 sd
->gamma
= gamma
[sd
->sensor
];
6794 sd
->autogain
= AUTOGAIN_DEF
;
6795 sd
->lightfreq
= FREQ_DEF
;
6796 sd
->quality
= QUALITY_DEF
;
6798 switch (sd
->sensor
) {
6801 case SENSOR_PAS202B
:
6803 gspca_dev
->ctrl_dis
= (1 << BRIGHTNESS_IDX
);
6805 case SENSOR_HV7131B
:
6806 case SENSOR_HV7131C
:
6807 case SENSOR_OV7630C
:
6808 gspca_dev
->ctrl_dis
= (1 << LIGHTFREQ_IDX
);
6815 /* this function is called at probe and resume time */
6816 static int sd_init(struct gspca_dev
*gspca_dev
)
6818 /* switch off the led */
6819 reg_w(gspca_dev
->dev
, 0x01, 0x0000);
6823 static int sd_start(struct gspca_dev
*gspca_dev
)
6825 struct sd
*sd
= (struct sd
*) gspca_dev
;
6826 struct usb_device
*dev
= gspca_dev
->dev
;
6828 static const struct usb_action
*init_tb
[SENSOR_MAX
][2] = {
6829 {adcm2700_Initial
, adcm2700_InitialScale
}, /* 0 */
6830 {cs2102_Initial
, cs2102_InitialScale
}, /* 1 */
6831 {cs2102K_Initial
, cs2102K_InitialScale
}, /* 2 */
6832 {gc0305_Initial
, gc0305_InitialScale
}, /* 3 */
6833 {hdcs2020b_Initial
, hdcs2020b_InitialScale
}, /* 4 */
6834 {hv7131b_Initial
, hv7131b_InitialScale
}, /* 5 */
6835 {hv7131r_Initial
, hv7131r_InitialScale
}, /* 6 */
6836 {icm105a_Initial
, icm105a_InitialScale
}, /* 7 */
6837 {mc501cb_Initial
, mc501cb_InitialScale
}, /* 8 */
6838 {mi0360soc_Initial
, mi0360soc_InitialScale
}, /* 9 */
6839 {ov7620_Initial
, ov7620_InitialScale
}, /* 10 */
6840 {ov7630c_Initial
, ov7630c_InitialScale
}, /* 11 */
6841 {pas106b_Initial
, pas106b_InitialScale
}, /* 12 */
6842 {pas202b_Initial
, pas202b_InitialScale
}, /* 13 */
6843 {pb0330_Initial
, pb0330_InitialScale
}, /* 14 */
6844 {po2030_Initial
, po2030_InitialScale
}, /* 15 */
6845 {tas5130cK_Initial
, tas5130cK_InitialScale
}, /* 16 */
6846 {tas5130cxx_Initial
, tas5130cxx_InitialScale
}, /* 17 */
6847 {tas5130c_vf0250_Initial
, tas5130c_vf0250_InitialScale
},
6851 /* create the JPEG header */
6852 sd
->jpeg_hdr
= kmalloc(JPEG_HDR_SZ
, GFP_KERNEL
);
6855 jpeg_define(sd
->jpeg_hdr
, gspca_dev
->height
, gspca_dev
->width
,
6856 0x21); /* JPEG 422 */
6857 jpeg_set_qual(sd
->jpeg_hdr
, sd
->quality
);
6859 mode
= gspca_dev
->cam
.cam_mode
[gspca_dev
->curr_mode
].priv
;
6860 switch (sd
->sensor
) {
6861 case SENSOR_HV7131C
:
6862 zcxx_probeSensor(gspca_dev
);
6865 usb_exchange(gspca_dev
, pas106b_Initial_com
);
6868 usb_exchange(gspca_dev
, init_tb
[sd
->sensor
][mode
]);
6870 switch (sd
->sensor
) {
6871 case SENSOR_ADCM2700
:
6875 case SENSOR_TAS5130CXX
:
6876 case SENSOR_TAS5130C_VF0250
:
6877 /* msleep(100); * ?? */
6878 reg_r(gspca_dev
, 0x0002); /* --> 0x40 */
6879 reg_w(dev
, 0x09, 0x01ad); /* (from win traces) */
6880 reg_w(dev
, 0x15, 0x01ae);
6881 if (sd
->sensor
== SENSOR_TAS5130CXX
)
6883 reg_w(dev
, 0x0d, 0x003a);
6884 reg_w(dev
, 0x02, 0x003b);
6885 reg_w(dev
, 0x00, 0x0038);
6887 case SENSOR_PAS202B
:
6888 reg_w(dev
, 0x03, 0x003b);
6889 reg_w(dev
, 0x0c, 0x003a);
6890 reg_w(dev
, 0x0b, 0x0039);
6894 setmatrix(gspca_dev
);
6895 setbrightness(gspca_dev
);
6896 switch (sd
->sensor
) {
6897 case SENSOR_ADCM2700
:
6899 reg_r(gspca_dev
, 0x0008);
6900 reg_w(dev
, 0x00, 0x0008);
6902 case SENSOR_PAS202B
:
6904 case SENSOR_TAS5130CXX
:
6905 reg_r(gspca_dev
, 0x0008);
6908 reg_w(dev
, 0x03, 0x0008);
6911 setsharpness(gspca_dev
);
6913 /* set the gamma tables when not set */
6914 switch (sd
->sensor
) {
6915 case SENSOR_CS2102K
: /* gamma set in xxx_Initial */
6916 case SENSOR_HDCS2020b
:
6917 case SENSOR_OV7630C
:
6918 case SENSOR_TAS5130CK
:
6921 setcontrast(gspca_dev
);
6924 setmatrix(gspca_dev
); /* one more time? */
6925 switch (sd
->sensor
) {
6927 case SENSOR_PAS202B
:
6928 reg_r(gspca_dev
, 0x0180); /* from win */
6929 reg_w(dev
, 0x00, 0x0180);
6932 setquality(gspca_dev
);
6935 setlightfreq(gspca_dev
);
6937 switch (sd
->sensor
) {
6938 case SENSOR_ADCM2700
:
6939 reg_w(dev
, 0x09, 0x01ad); /* (from win traces) */
6940 reg_w(dev
, 0x15, 0x01ae);
6941 reg_w(dev
, 0x02, 0x0180);
6943 reg_w(dev
, 0x40, 0x0117);
6946 case SENSOR_TAS5130CXX
:
6947 reg_w(dev
, 0x09, 0x01ad); /* (from win traces) */
6948 reg_w(dev
, 0x15, 0x01ae);
6950 case SENSOR_PAS202B
:
6952 /* reg_w(dev, 0x40, ZC3XX_R117_GGAIN); * (from win traces) */
6953 reg_r(gspca_dev
, 0x0180);
6956 reg_w(dev
, 0x09, 0x01ad);
6957 reg_w(dev
, 0x15, 0x01ae);
6958 i2c_read(gspca_dev
, 0x13); /*fixme: returns 0xa3 */
6959 i2c_write(gspca_dev
, 0x13, 0xa3, 0x00);
6960 /*fixme: returned value to send? */
6961 reg_w(dev
, 0x40, 0x0117);
6962 reg_r(gspca_dev
, 0x0180);
6966 setautogain(gspca_dev
);
6967 switch (sd
->sensor
) {
6970 reg_w(dev
, 0x00, 0x0007); /* (from win traces) */
6971 reg_w(dev
, 0x02, ZC3XX_R008_CLOCKSETTING
);
6973 case SENSOR_PAS202B
:
6974 reg_w(dev
, 0x32, 0x0007); /* (from win traces) */
6975 reg_w(dev
, 0x02, ZC3XX_R008_CLOCKSETTING
);
6981 /* called on streamoff with alt 0 and on disconnect */
6982 static void sd_stop0(struct gspca_dev
*gspca_dev
)
6984 struct sd
*sd
= (struct sd
*) gspca_dev
;
6986 kfree(sd
->jpeg_hdr
);
6987 if (!gspca_dev
->present
)
6989 send_unknown(gspca_dev
->dev
, sd
->sensor
);
6992 static void sd_pkt_scan(struct gspca_dev
*gspca_dev
,
6996 struct sd
*sd
= (struct sd
*) gspca_dev
;
6998 if (data
[0] == 0xff && data
[1] == 0xd8) { /* start of frame */
6999 gspca_frame_add(gspca_dev
, LAST_PACKET
,
7001 /* put the JPEG header in the new frame */
7002 gspca_frame_add(gspca_dev
, FIRST_PACKET
,
7003 sd
->jpeg_hdr
, JPEG_HDR_SZ
);
7005 /* remove the webcam's header:
7006 * ff d8 ff fe 00 0e 00 00 ss ss 00 01 ww ww hh hh pp pp
7007 * - 'ss ss' is the frame sequence number (BE)
7008 * - 'ww ww' and 'hh hh' are the window dimensions (BE)
7009 * - 'pp pp' is the packet sequence number (BE)
7014 gspca_frame_add(gspca_dev
, INTER_PACKET
, data
, len
);
7017 static int sd_setbrightness(struct gspca_dev
*gspca_dev
, __s32 val
)
7019 struct sd
*sd
= (struct sd
*) gspca_dev
;
7021 sd
->brightness
= val
;
7022 if (gspca_dev
->streaming
)
7023 setbrightness(gspca_dev
);
7027 static int sd_getbrightness(struct gspca_dev
*gspca_dev
, __s32
*val
)
7029 struct sd
*sd
= (struct sd
*) gspca_dev
;
7031 *val
= sd
->brightness
;
7035 static int sd_setcontrast(struct gspca_dev
*gspca_dev
, __s32 val
)
7037 struct sd
*sd
= (struct sd
*) gspca_dev
;
7040 if (gspca_dev
->streaming
)
7041 setcontrast(gspca_dev
);
7045 static int sd_getcontrast(struct gspca_dev
*gspca_dev
, __s32
*val
)
7047 struct sd
*sd
= (struct sd
*) gspca_dev
;
7049 *val
= sd
->contrast
;
7053 static int sd_setautogain(struct gspca_dev
*gspca_dev
, __s32 val
)
7055 struct sd
*sd
= (struct sd
*) gspca_dev
;
7058 if (gspca_dev
->streaming
)
7059 setautogain(gspca_dev
);
7063 static int sd_getautogain(struct gspca_dev
*gspca_dev
, __s32
*val
)
7065 struct sd
*sd
= (struct sd
*) gspca_dev
;
7067 *val
= sd
->autogain
;
7071 static int sd_setgamma(struct gspca_dev
*gspca_dev
, __s32 val
)
7073 struct sd
*sd
= (struct sd
*) gspca_dev
;
7076 if (gspca_dev
->streaming
)
7077 setcontrast(gspca_dev
);
7081 static int sd_getgamma(struct gspca_dev
*gspca_dev
, __s32
*val
)
7083 struct sd
*sd
= (struct sd
*) gspca_dev
;
7089 static int sd_setfreq(struct gspca_dev
*gspca_dev
, __s32 val
)
7091 struct sd
*sd
= (struct sd
*) gspca_dev
;
7093 sd
->lightfreq
= val
;
7094 if (gspca_dev
->streaming
)
7095 setlightfreq(gspca_dev
);
7099 static int sd_getfreq(struct gspca_dev
*gspca_dev
, __s32
*val
)
7101 struct sd
*sd
= (struct sd
*) gspca_dev
;
7103 *val
= sd
->lightfreq
;
7107 static int sd_setsharpness(struct gspca_dev
*gspca_dev
, __s32 val
)
7109 struct sd
*sd
= (struct sd
*) gspca_dev
;
7111 sd
->sharpness
= val
;
7112 if (gspca_dev
->streaming
)
7113 setsharpness(gspca_dev
);
7117 static int sd_getsharpness(struct gspca_dev
*gspca_dev
, __s32
*val
)
7119 struct sd
*sd
= (struct sd
*) gspca_dev
;
7121 *val
= sd
->sharpness
;
7125 static int sd_querymenu(struct gspca_dev
*gspca_dev
,
7126 struct v4l2_querymenu
*menu
)
7129 case V4L2_CID_POWER_LINE_FREQUENCY
:
7130 switch (menu
->index
) {
7131 case 0: /* V4L2_CID_POWER_LINE_FREQUENCY_DISABLED */
7132 strcpy((char *) menu
->name
, "NoFliker");
7134 case 1: /* V4L2_CID_POWER_LINE_FREQUENCY_50HZ */
7135 strcpy((char *) menu
->name
, "50 Hz");
7137 case 2: /* V4L2_CID_POWER_LINE_FREQUENCY_60HZ */
7138 strcpy((char *) menu
->name
, "60 Hz");
7146 static int sd_set_jcomp(struct gspca_dev
*gspca_dev
,
7147 struct v4l2_jpegcompression
*jcomp
)
7149 struct sd
*sd
= (struct sd
*) gspca_dev
;
7151 if (jcomp
->quality
< QUALITY_MIN
)
7152 sd
->quality
= QUALITY_MIN
;
7153 else if (jcomp
->quality
> QUALITY_MAX
)
7154 sd
->quality
= QUALITY_MAX
;
7156 sd
->quality
= jcomp
->quality
;
7157 if (gspca_dev
->streaming
)
7158 jpeg_set_qual(sd
->jpeg_hdr
, sd
->quality
);
7162 static int sd_get_jcomp(struct gspca_dev
*gspca_dev
,
7163 struct v4l2_jpegcompression
*jcomp
)
7165 struct sd
*sd
= (struct sd
*) gspca_dev
;
7167 memset(jcomp
, 0, sizeof *jcomp
);
7168 jcomp
->quality
= sd
->quality
;
7169 jcomp
->jpeg_markers
= V4L2_JPEG_MARKER_DHT
7170 | V4L2_JPEG_MARKER_DQT
;
7175 static int sd_int_pkt_scan(struct gspca_dev
*gspca_dev
,
7176 u8
*data
, /* interrupt packet data */
7177 int len
) /* interrput packet length */
7179 if (len
== 8 && data
[4] == 1) {
7180 input_report_key(gspca_dev
->input_dev
, KEY_CAMERA
, 1);
7181 input_sync(gspca_dev
->input_dev
);
7182 input_report_key(gspca_dev
->input_dev
, KEY_CAMERA
, 0);
7183 input_sync(gspca_dev
->input_dev
);
7190 static const struct sd_desc sd_desc
= {
7191 .name
= MODULE_NAME
,
7193 .nctrls
= ARRAY_SIZE(sd_ctrls
),
7194 .config
= sd_config
,
7198 .pkt_scan
= sd_pkt_scan
,
7199 .querymenu
= sd_querymenu
,
7200 .get_jcomp
= sd_get_jcomp
,
7201 .set_jcomp
= sd_set_jcomp
,
7203 .int_pkt_scan
= sd_int_pkt_scan
,
7207 static const __devinitdata
struct usb_device_id device_table
[] = {
7208 {USB_DEVICE(0x041e, 0x041e)},
7209 {USB_DEVICE(0x041e, 0x4017)},
7210 {USB_DEVICE(0x041e, 0x401c), .driver_info
= SENSOR_PAS106
},
7211 {USB_DEVICE(0x041e, 0x401e)},
7212 {USB_DEVICE(0x041e, 0x401f)},
7213 {USB_DEVICE(0x041e, 0x4022)},
7214 {USB_DEVICE(0x041e, 0x4029)},
7215 {USB_DEVICE(0x041e, 0x4034), .driver_info
= SENSOR_PAS106
},
7216 {USB_DEVICE(0x041e, 0x4035), .driver_info
= SENSOR_PAS106
},
7217 {USB_DEVICE(0x041e, 0x4036)},
7218 {USB_DEVICE(0x041e, 0x403a)},
7219 {USB_DEVICE(0x041e, 0x4051), .driver_info
= SENSOR_TAS5130C_VF0250
},
7220 {USB_DEVICE(0x041e, 0x4053), .driver_info
= SENSOR_TAS5130C_VF0250
},
7221 {USB_DEVICE(0x0458, 0x7007)},
7222 {USB_DEVICE(0x0458, 0x700c)},
7223 {USB_DEVICE(0x0458, 0x700f)},
7224 {USB_DEVICE(0x0461, 0x0a00)},
7225 {USB_DEVICE(0x046d, 0x089d), .driver_info
= SENSOR_MC501CB
},
7226 {USB_DEVICE(0x046d, 0x08a0)},
7227 {USB_DEVICE(0x046d, 0x08a1)},
7228 {USB_DEVICE(0x046d, 0x08a2)},
7229 {USB_DEVICE(0x046d, 0x08a3)},
7230 {USB_DEVICE(0x046d, 0x08a6)},
7231 {USB_DEVICE(0x046d, 0x08a7)},
7232 {USB_DEVICE(0x046d, 0x08a9)},
7233 {USB_DEVICE(0x046d, 0x08aa)},
7234 {USB_DEVICE(0x046d, 0x08ac)},
7235 {USB_DEVICE(0x046d, 0x08ad)},
7236 #if !defined CONFIG_USB_ZC0301 && !defined CONFIG_USB_ZC0301_MODULE
7237 {USB_DEVICE(0x046d, 0x08ae)},
7239 {USB_DEVICE(0x046d, 0x08af)},
7240 {USB_DEVICE(0x046d, 0x08b9)},
7241 {USB_DEVICE(0x046d, 0x08d7)},
7242 {USB_DEVICE(0x046d, 0x08d9)},
7243 {USB_DEVICE(0x046d, 0x08d8)},
7244 {USB_DEVICE(0x046d, 0x08da)},
7245 {USB_DEVICE(0x046d, 0x08dd), .driver_info
= SENSOR_MC501CB
},
7246 {USB_DEVICE(0x0471, 0x0325), .driver_info
= SENSOR_PAS106
},
7247 {USB_DEVICE(0x0471, 0x0326), .driver_info
= SENSOR_PAS106
},
7248 {USB_DEVICE(0x0471, 0x032d), .driver_info
= SENSOR_PAS106
},
7249 {USB_DEVICE(0x0471, 0x032e), .driver_info
= SENSOR_PAS106
},
7250 {USB_DEVICE(0x055f, 0xc005)},
7251 {USB_DEVICE(0x055f, 0xd003)},
7252 {USB_DEVICE(0x055f, 0xd004)},
7253 {USB_DEVICE(0x0698, 0x2003)},
7254 {USB_DEVICE(0x0ac8, 0x0301), .driver_info
= SENSOR_PAS106
},
7255 {USB_DEVICE(0x0ac8, 0x0302), .driver_info
= SENSOR_PAS106
},
7256 {USB_DEVICE(0x0ac8, 0x301b)},
7257 {USB_DEVICE(0x0ac8, 0x303b)},
7258 {USB_DEVICE(0x0ac8, 0x305b)},
7259 {USB_DEVICE(0x0ac8, 0x307b)},
7260 {USB_DEVICE(0x10fd, 0x0128)},
7261 {USB_DEVICE(0x10fd, 0x804d)},
7262 {USB_DEVICE(0x10fd, 0x8050)},
7263 {} /* end of entry */
7266 MODULE_DEVICE_TABLE(usb
, device_table
);
7268 /* -- device connect -- */
7269 static int sd_probe(struct usb_interface
*intf
,
7270 const struct usb_device_id
*id
)
7272 return gspca_dev_probe(intf
, id
, &sd_desc
, sizeof(struct sd
),
7277 static struct usb_driver sd_driver
= {
7278 .name
= MODULE_NAME
,
7279 .id_table
= device_table
,
7281 .disconnect
= gspca_disconnect
,
7283 .suspend
= gspca_suspend
,
7284 .resume
= gspca_resume
,
7288 static int __init
sd_mod_init(void)
7291 ret
= usb_register(&sd_driver
);
7294 PDEBUG(D_PROBE
, "registered");
7298 static void __exit
sd_mod_exit(void)
7300 usb_deregister(&sd_driver
);
7301 PDEBUG(D_PROBE
, "deregistered");
7304 module_init(sd_mod_init
);
7305 module_exit(sd_mod_exit
);
7307 module_param(force_sensor
, int, 0644);
7308 MODULE_PARM_DESC(force_sensor
,
7309 "Force sensor. Only for experts!!!");