treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157
[sfrench/cifs-2.6.git] / drivers / media / usb / gspca / zc3xx.c
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Z-Star/Vimicro zc301/zc302p/vc30x driver
4  *
5  * Copyright (C) 2009-2012 Jean-Francois Moine <http://moinejf.free.fr>
6  * Copyright (C) 2004 2005 2006 Michel Xhaard mxhaard@magic.fr
7  */
8
9 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
10
11 #include <linux/input.h>
12 #include "gspca.h"
13 #include "jpeg.h"
14
15 MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, Serge A. Suchkov <Serge.A.S@tochka.ru>");
16 MODULE_DESCRIPTION("GSPCA ZC03xx/VC3xx USB Camera Driver");
17 MODULE_LICENSE("GPL");
18
19 static int force_sensor = -1;
20
21 #define REG08_DEF 3             /* default JPEG compression (75%) */
22 #include "zc3xx-reg.h"
23
24 /* specific webcam descriptor */
25 struct sd {
26         struct gspca_dev gspca_dev;     /* !! must be the first item */
27
28         struct { /* gamma/brightness/contrast control cluster */
29                 struct v4l2_ctrl *gamma;
30                 struct v4l2_ctrl *brightness;
31                 struct v4l2_ctrl *contrast;
32         };
33         struct { /* autogain/exposure control cluster */
34                 struct v4l2_ctrl *autogain;
35                 struct v4l2_ctrl *exposure;
36         };
37         struct v4l2_ctrl *plfreq;
38         struct v4l2_ctrl *sharpness;
39         struct v4l2_ctrl *jpegqual;
40
41         struct work_struct work;
42
43         u8 reg08;               /* webcam compression quality */
44
45         u8 bridge;
46         u8 sensor;              /* Type of image sensor chip */
47         u16 chip_revision;
48
49         u8 jpeg_hdr[JPEG_HDR_SZ];
50 };
51 enum bridges {
52         BRIDGE_ZC301,
53         BRIDGE_ZC303,
54 };
55 enum sensors {
56         SENSOR_ADCM2700,
57         SENSOR_CS2102,
58         SENSOR_CS2102K,
59         SENSOR_GC0303,
60         SENSOR_GC0305,
61         SENSOR_HDCS2020,
62         SENSOR_HV7131B,
63         SENSOR_HV7131R,
64         SENSOR_ICM105A,
65         SENSOR_MC501CB,
66         SENSOR_MT9V111_1,       /* (mi360soc) zc301 */
67         SENSOR_MT9V111_3,       /* (mi360soc) zc303 */
68         SENSOR_OV7620,          /* OV7648 - same values */
69         SENSOR_OV7630C,
70         SENSOR_PAS106,
71         SENSOR_PAS202B,
72         SENSOR_PB0330,
73         SENSOR_PO2030,
74         SENSOR_TAS5130C,
75         SENSOR_MAX
76 };
77
78 static const struct v4l2_pix_format vga_mode[] = {
79         {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
80                 .bytesperline = 320,
81                 .sizeimage = 320 * 240 * 3 / 8 + 590,
82                 .colorspace = V4L2_COLORSPACE_JPEG,
83                 .priv = 1},
84         {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
85                 .bytesperline = 640,
86                 .sizeimage = 640 * 480 * 3 / 8 + 590,
87                 .colorspace = V4L2_COLORSPACE_JPEG,
88                 .priv = 0},
89 };
90
91 static const struct v4l2_pix_format broken_vga_mode[] = {
92         {320, 232, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
93                 .bytesperline = 320,
94                 .sizeimage = 320 * 232 * 4 / 8 + 590,
95                 .colorspace = V4L2_COLORSPACE_JPEG,
96                 .priv = 1},
97         {640, 472, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
98                 .bytesperline = 640,
99                 .sizeimage = 640 * 472 * 3 / 8 + 590,
100                 .colorspace = V4L2_COLORSPACE_JPEG,
101                 .priv = 0},
102 };
103
104 static const struct v4l2_pix_format sif_mode[] = {
105         {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
106                 .bytesperline = 176,
107                 .sizeimage = 176 * 144 * 3 / 8 + 590,
108                 .colorspace = V4L2_COLORSPACE_JPEG,
109                 .priv = 1},
110         {352, 288, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE,
111                 .bytesperline = 352,
112                 .sizeimage = 352 * 288 * 3 / 8 + 590,
113                 .colorspace = V4L2_COLORSPACE_JPEG,
114                 .priv = 0},
115 };
116
117 /*
118  * Bridge reg08 bits 1-2 -> JPEG quality conversion table. Note the highest
119  * quality setting is not usable as USB 1 does not have enough bandwidth.
120  */
121 static u8 jpeg_qual[] = {50, 75, 87, /* 94 */};
122
123 /* usb exchanges */
124 struct usb_action {
125         u8      req;
126         u8      val;
127         u16     idx;
128 };
129
130 static const struct usb_action adcm2700_Initial[] = {
131         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},         /* 00,00,01,cc */
132         {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT},           /* 00,02,04,cc */
133         {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING},          /* 00,08,03,cc */
134         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
135         {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR},         /* 00,8b,d3,cc */
136         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},        /* 00,03,02,cc */
137         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},         /* 00,04,80,cc */
138         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},       /* 00,05,01,cc */
139         {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW},        /* 00,06,d8,cc */
140         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},       /* 00,01,01,cc */
141         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,03,cc */
142         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,01,cc */
143         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,05,cc */
144         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},          /* 00,98,00,cc */
145         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},          /* 00,9a,00,cc */
146         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},             /* 01,1a,00,cc */
147         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},             /* 01,1c,00,cc */
148         {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW},          /* 00,9c,de,cc */
149         {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},           /* 00,9e,86,cc */
150         {0xbb, 0x00, 0x0400},                           /* 04,00,00,bb */
151         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
152         {0xbb, 0x0f, 0x140f},                           /* 14,0f,0f,bb */
153         {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},      /* 01,01,37,cc */
154         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},         /* 01,00,0d,cc */
155         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},             /* 01,89,06,cc */
156         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},         /* 01,c5,03,cc */
157         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},           /* 01,cb,13,cc */
158         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},        /* 02,50,08,cc */
159         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},          /* 03,01,08,cc */
160         {0xa0, 0x58, ZC3XX_R116_RGAIN},                 /* 01,16,58,cc */
161         {0xa0, 0x5a, ZC3XX_R118_BGAIN},                 /* 01,18,5a,cc */
162         {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},     /* 01,80,02,cc */
163         {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR},         /* 00,8b,d3,cc */
164         {0xbb, 0x00, 0x0408},                           /* 04,00,08,bb */
165         {0xdd, 0x00, 0x0200},                           /* 00,02,00,dd */
166         {0xbb, 0x00, 0x0400},                           /* 04,00,00,bb */
167         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
168         {0xbb, 0x0f, 0x140f},                           /* 14,0f,0f,bb */
169         {0xbb, 0xe0, 0x0c2e},                           /* 0c,e0,2e,bb */
170         {0xbb, 0x01, 0x2000},                           /* 20,01,00,bb */
171         {0xbb, 0x96, 0x2400},                           /* 24,96,00,bb */
172         {0xbb, 0x06, 0x1006},                           /* 10,06,06,bb */
173         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
174         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
175         {0xaa, 0xfe, 0x0002},                           /* 00,fe,02,aa */
176         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
177         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
178         {0xbb, 0x5f, 0x2090},                           /* 20,5f,90,bb */
179         {0xbb, 0x01, 0x8000},                           /* 80,01,00,bb */
180         {0xbb, 0x09, 0x8400},                           /* 84,09,00,bb */
181         {0xbb, 0x86, 0x0002},                           /* 00,86,02,bb */
182         {0xbb, 0xe6, 0x0401},                           /* 04,e6,01,bb */
183         {0xbb, 0x86, 0x0802},                           /* 08,86,02,bb */
184         {0xbb, 0xe6, 0x0c01},                           /* 0c,e6,01,bb */
185         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
186         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
187         {0xaa, 0xfe, 0x0000},                           /* 00,fe,00,aa */
188         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
189         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
190         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
191         {0xaa, 0xfe, 0x0020},                           /* 00,fe,20,aa */
192 /*mswin+*/
193         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
194         {0xaa, 0xfe, 0x0002},
195         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},
196         {0xaa, 0xb4, 0xcd37},
197         {0xaa, 0xa4, 0x0004},
198         {0xaa, 0xa8, 0x0007},
199         {0xaa, 0xac, 0x0004},
200 /*mswin-*/
201         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
202         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
203         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
204         {0xaa, 0xfe, 0x0000},                           /* 00,fe,00,aa */
205         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
206         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
207         {0xbb, 0x04, 0x0400},                           /* 04,04,00,bb */
208         {0xdd, 0x00, 0x0100},                           /* 00,01,00,dd */
209         {0xbb, 0x01, 0x0400},                           /* 04,01,00,bb */
210         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
211         {0xaa, 0xfe, 0x0002},                           /* 00,fe,02,aa */
212         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
213         {0xbb, 0x41, 0x2803},                           /* 28,41,03,bb */
214         {0xbb, 0x40, 0x2c03},                           /* 2c,40,03,bb */
215         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
216         {0xaa, 0xfe, 0x0010},                           /* 00,fe,10,aa */
217         {}
218 };
219 static const struct usb_action adcm2700_InitialScale[] = {
220         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},         /* 00,00,01,cc */
221         {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},           /* 00,02,10,cc */
222         {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING},          /* 00,08,03,cc */
223         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
224         {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR},         /* 00,8b,d3,cc */
225         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},        /* 00,03,02,cc */
226         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},         /* 00,04,80,cc */
227         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},       /* 00,05,01,cc */
228         {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW},        /* 00,06,d0,cc */
229         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},       /* 00,01,01,cc */
230         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,03,cc */
231         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,01,cc */
232         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,05,cc */
233         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},          /* 00,98,00,cc */
234         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},          /* 00,9a,00,cc */
235         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},             /* 01,1a,00,cc */
236         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},             /* 01,1c,00,cc */
237         {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW},          /* 00,9c,d8,cc */
238         {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},           /* 00,9e,88,cc */
239         {0xbb, 0x00, 0x0400},                           /* 04,00,00,bb */
240         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
241         {0xbb, 0x0f, 0x140f},                           /* 14,0f,0f,bb */
242         {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},      /* 01,01,37,cc */
243         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},         /* 01,00,0d,cc */
244         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},             /* 01,89,06,cc */
245         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},         /* 01,c5,03,cc */
246         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},           /* 01,cb,13,cc */
247         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},        /* 02,50,08,cc */
248         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},          /* 03,01,08,cc */
249         {0xa0, 0x58, ZC3XX_R116_RGAIN},                 /* 01,16,58,cc */
250         {0xa0, 0x5a, ZC3XX_R118_BGAIN},                 /* 01,18,5a,cc */
251         {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},     /* 01,80,02,cc */
252         {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR},         /* 00,8b,d3,cc */
253         {0xbb, 0x00, 0x0408},                           /* 04,00,08,bb */
254         {0xdd, 0x00, 0x0200},                           /* 00,02,00,dd */
255         {0xbb, 0x00, 0x0400},                           /* 04,00,00,bb */
256         {0xdd, 0x00, 0x0050},                           /* 00,00,50,dd */
257         {0xbb, 0x0f, 0x140f},                           /* 14,0f,0f,bb */
258         {0xbb, 0xe0, 0x0c2e},                           /* 0c,e0,2e,bb */
259         {0xbb, 0x01, 0x2000},                           /* 20,01,00,bb */
260         {0xbb, 0x96, 0x2400},                           /* 24,96,00,bb */
261         {0xbb, 0x06, 0x1006},                           /* 10,06,06,bb */
262         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
263         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
264         {0xaa, 0xfe, 0x0002},                           /* 00,fe,02,aa */
265         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
266         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
267         {0xbb, 0x5f, 0x2090},                           /* 20,5f,90,bb */
268         {0xbb, 0x01, 0x8000},                           /* 80,01,00,bb */
269         {0xbb, 0x09, 0x8400},                           /* 84,09,00,bb */
270         {0xbb, 0x86, 0x0002},                           /* 00,88,02,bb */
271         {0xbb, 0xe6, 0x0401},                           /* 04,e6,01,bb */
272         {0xbb, 0x86, 0x0802},                           /* 08,88,02,bb */
273         {0xbb, 0xe6, 0x0c01},                           /* 0c,e6,01,bb */
274         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
275         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
276         {0xaa, 0xfe, 0x0000},                           /* 00,fe,00,aa */
277         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
278         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
279         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
280         {0xaa, 0xfe, 0x0020},                           /* 00,fe,20,aa */
281         /*******/
282         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
283         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
284         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
285         {0xaa, 0xfe, 0x0000},                           /* 00,fe,00,aa */
286         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
287         {0xdd, 0x00, 0x0010},                           /* 00,00,10,dd */
288         {0xbb, 0x04, 0x0400},                           /* 04,04,00,bb */
289         {0xdd, 0x00, 0x0100},                           /* 00,01,00,dd */
290         {0xbb, 0x01, 0x0400},                           /* 04,01,00,bb */
291         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
292         {0xaa, 0xfe, 0x0002},                           /* 00,fe,02,aa */
293         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
294         {0xbb, 0x41, 0x2803},                           /* 28,41,03,bb */
295         {0xbb, 0x40, 0x2c03},                           /* 2c,40,03,bb */
296         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
297         {0xaa, 0xfe, 0x0010},                           /* 00,fe,10,aa */
298         {}
299 };
300 static const struct usb_action adcm2700_50HZ[] = {
301         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
302         {0xaa, 0xfe, 0x0002},                           /* 00,fe,02,aa */
303         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
304         {0xbb, 0x05, 0x8400},                           /* 84,05,00,bb */
305         {0xbb, 0xd0, 0xb007},                           /* b0,d0,07,bb */
306         {0xbb, 0xa0, 0xb80f},                           /* b8,a0,0f,bb */
307         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
308         {0xaa, 0xfe, 0x0010},                           /* 00,fe,10,aa */
309         {0xaa, 0x26, 0x00d0},                           /* 00,26,d0,aa */
310         {0xaa, 0x28, 0x0002},                           /* 00,28,02,aa */
311         {}
312 };
313 static const struct usb_action adcm2700_60HZ[] = {
314         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
315         {0xaa, 0xfe, 0x0002},                           /* 00,fe,02,aa */
316         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
317         {0xbb, 0x07, 0x8400},                           /* 84,07,00,bb */
318         {0xbb, 0x82, 0xb006},                           /* b0,82,06,bb */
319         {0xbb, 0x04, 0xb80d},                           /* b8,04,0d,bb */
320         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
321         {0xaa, 0xfe, 0x0010},                           /* 00,fe,10,aa */
322         {0xaa, 0x26, 0x0057},                           /* 00,26,57,aa */
323         {0xaa, 0x28, 0x0002},                           /* 00,28,02,aa */
324         {}
325 };
326 static const struct usb_action adcm2700_NoFliker[] = {
327         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
328         {0xaa, 0xfe, 0x0002},                           /* 00,fe,02,aa */
329         {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,0a,cc */
330         {0xbb, 0x07, 0x8400},                           /* 84,07,00,bb */
331         {0xbb, 0x05, 0xb000},                           /* b0,05,00,bb */
332         {0xbb, 0xa0, 0xb801},                           /* b8,a0,01,bb */
333         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
334         {0xaa, 0xfe, 0x0010},                           /* 00,fe,10,aa */
335         {}
336 };
337 static const struct usb_action cs2102_InitialScale[] = {        /* 320x240 */
338         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
339         {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
340         {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT},
341         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
342         {0xa0, 0x20, ZC3XX_R080_HBLANKHIGH},
343         {0xa0, 0x21, ZC3XX_R081_HBLANKLOW},
344         {0xa0, 0x30, ZC3XX_R083_RGAINADDR},
345         {0xa0, 0x31, ZC3XX_R084_GGAINADDR},
346         {0xa0, 0x32, ZC3XX_R085_BGAINADDR},
347         {0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH},
348         {0xa0, 0x24, ZC3XX_R087_EXPTIMEMID},
349         {0xa0, 0x25, ZC3XX_R088_EXPTIMELOW},
350         {0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR},
351         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* 00 */
352         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
353         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
354         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
355         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
356         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
357         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
358         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
359         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
360         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
361         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
362         {0xaa, 0x02, 0x0008},
363         {0xaa, 0x03, 0x0000},
364         {0xaa, 0x11, 0x0000},
365         {0xaa, 0x12, 0x0089},
366         {0xaa, 0x13, 0x0000},
367         {0xaa, 0x14, 0x00e9},
368         {0xaa, 0x20, 0x0000},
369         {0xaa, 0x22, 0x0000},
370         {0xaa, 0x0b, 0x0004},
371         {0xaa, 0x30, 0x0030},
372         {0xaa, 0x31, 0x0030},
373         {0xaa, 0x32, 0x0030},
374         {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
375         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
376         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
377         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
378         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
379         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
380         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
381         {0xa0, 0x10, 0x01ae},
382         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
383         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
384         {0xa0, 0x68, ZC3XX_R18D_YTARGET},
385         {0xa0, 0x00, 0x01ad},
386         {}
387 };
388
389 static const struct usb_action cs2102_Initial[] = {     /* 640x480 */
390         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
391         {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
392         {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT},
393         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
394         {0xa0, 0x20, ZC3XX_R080_HBLANKHIGH},
395         {0xa0, 0x21, ZC3XX_R081_HBLANKLOW},
396         {0xa0, 0x30, ZC3XX_R083_RGAINADDR},
397         {0xa0, 0x31, ZC3XX_R084_GGAINADDR},
398         {0xa0, 0x32, ZC3XX_R085_BGAINADDR},
399         {0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH},
400         {0xa0, 0x24, ZC3XX_R087_EXPTIMEMID},
401         {0xa0, 0x25, ZC3XX_R088_EXPTIMELOW},
402         {0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR},
403         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* 00 */
404         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
405         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
406         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
407         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
408         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
409         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
410         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
411         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
412         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
413         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
414         {0xaa, 0x02, 0x0008},
415         {0xaa, 0x03, 0x0000},
416         {0xaa, 0x11, 0x0001},
417         {0xaa, 0x12, 0x0087},
418         {0xaa, 0x13, 0x0001},
419         {0xaa, 0x14, 0x00e7},
420         {0xaa, 0x20, 0x0000},
421         {0xaa, 0x22, 0x0000},
422         {0xaa, 0x0b, 0x0004},
423         {0xaa, 0x30, 0x0030},
424         {0xaa, 0x31, 0x0030},
425         {0xaa, 0x32, 0x0030},
426         {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
427         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
428         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
429         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
430         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
431         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
432         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
433         {0xa0, 0x15, 0x01ae},
434         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
435         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
436         {0xa0, 0x68, ZC3XX_R18D_YTARGET},
437         {0xa0, 0x00, 0x01ad},
438         {}
439 };
440 static const struct usb_action cs2102_50HZScale[] = {
441         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
442         {0xaa, 0x23, 0x0001},
443         {0xaa, 0x24, 0x005f},
444         {0xaa, 0x25, 0x0090},
445         {0xaa, 0x21, 0x00dd},
446         {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH},
447         {0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID},
448         {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW},
449         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
450         {0xa0, 0x3a, ZC3XX_R196_ANTIFLICKERMID},
451         {0xa0, 0x98, ZC3XX_R197_ANTIFLICKERLOW},
452         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
453         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
454         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
455         {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
456         {0xa0, 0xdd, ZC3XX_R01D_HSYNC_0},
457         {0xa0, 0xe4, ZC3XX_R01E_HSYNC_1},
458         {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2},
459         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
460         {}
461 };
462 static const struct usb_action cs2102_50HZ[] = {
463         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
464         {0xaa, 0x23, 0x0000},
465         {0xaa, 0x24, 0x00af},
466         {0xaa, 0x25, 0x00c8},
467         {0xaa, 0x21, 0x0068},
468         {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH},
469         {0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID},
470         {0xa0, 0x90, ZC3XX_R192_EXPOSURELIMITLOW},
471         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
472         {0xa0, 0x1d, ZC3XX_R196_ANTIFLICKERMID},
473         {0xa0, 0x4c, ZC3XX_R197_ANTIFLICKERLOW},
474         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
475         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
476         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
477         {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
478         {0xa0, 0x68, ZC3XX_R01D_HSYNC_0},
479         {0xa0, 0xe3, ZC3XX_R01E_HSYNC_1},
480         {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2},
481         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
482         {}
483 };
484 static const struct usb_action cs2102_60HZScale[] = {
485         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
486         {0xaa, 0x23, 0x0001},
487         {0xaa, 0x24, 0x0055},
488         {0xaa, 0x25, 0x00cc},
489         {0xaa, 0x21, 0x003f},
490         {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH},
491         {0xa0, 0xab, ZC3XX_R191_EXPOSURELIMITMID},
492         {0xa0, 0x98, ZC3XX_R192_EXPOSURELIMITLOW},
493         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
494         {0xa0, 0x30, ZC3XX_R196_ANTIFLICKERMID},
495         {0xa0, 0xd4, ZC3XX_R197_ANTIFLICKERLOW},
496         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
497         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
498         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
499         {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
500         {0xa0, 0x39, ZC3XX_R01D_HSYNC_0},
501         {0xa0, 0x70, ZC3XX_R01E_HSYNC_1},
502         {0xa0, 0xb0, ZC3XX_R01F_HSYNC_2},
503         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
504         {}
505 };
506 static const struct usb_action cs2102_60HZ[] = {
507         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
508         {0xaa, 0x23, 0x0000},
509         {0xaa, 0x24, 0x00aa},
510         {0xaa, 0x25, 0x00e6},
511         {0xaa, 0x21, 0x003f},
512         {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH},
513         {0xa0, 0x55, ZC3XX_R191_EXPOSURELIMITMID},
514         {0xa0, 0xcc, ZC3XX_R192_EXPOSURELIMITLOW},
515         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
516         {0xa0, 0x18, ZC3XX_R196_ANTIFLICKERMID},
517         {0xa0, 0x6a, ZC3XX_R197_ANTIFLICKERLOW},
518         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
519         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
520         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
521         {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},
522         {0xa0, 0x3f, ZC3XX_R01D_HSYNC_0},
523         {0xa0, 0xa5, ZC3XX_R01E_HSYNC_1},
524         {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2},
525         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
526         {}
527 };
528 static const struct usb_action cs2102_NoFlikerScale[] = {
529         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
530         {0xaa, 0x23, 0x0001},
531         {0xaa, 0x24, 0x005f},
532         {0xaa, 0x25, 0x0000},
533         {0xaa, 0x21, 0x0001},
534         {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH},
535         {0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID},
536         {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
537         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
538         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
539         {0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW},
540         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
541         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
542         {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
543         {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
544         {0xa0, 0x01, ZC3XX_R01D_HSYNC_0},
545         {0xa0, 0x40, ZC3XX_R01E_HSYNC_1},
546         {0xa0, 0xa0, ZC3XX_R01F_HSYNC_2},
547         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
548         {}
549 };
550 static const struct usb_action cs2102_NoFliker[] = {
551         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
552         {0xaa, 0x23, 0x0000},
553         {0xaa, 0x24, 0x00af},
554         {0xaa, 0x25, 0x0080},
555         {0xaa, 0x21, 0x0001},
556         {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH},
557         {0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID},
558         {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW},
559         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
560         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
561         {0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW},
562         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
563         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
564         {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
565         {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
566         {0xa0, 0x01, ZC3XX_R01D_HSYNC_0},
567         {0xa0, 0x40, ZC3XX_R01E_HSYNC_1},
568         {0xa0, 0xa0, ZC3XX_R01F_HSYNC_2},
569         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
570         {}
571 };
572
573 /* CS2102_KOCOM */
574 static const struct usb_action cs2102K_InitialScale[] = {
575         {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT},
576         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
577         {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT},
578         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
579         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
580         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
581         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
582         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
583         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
584         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
585         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
586         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
587         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
588         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
589         {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
590         {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
591         {0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR},
592         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
593         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
594         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
595         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
596         {0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT},
597         {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
598         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
599         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
600         {0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT},
601         {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
602         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
603         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
604         {0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT},
605         {0xa0, 0x7c, ZC3XX_R093_I2CSETVALUE},
606         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
607         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
608         {0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT},
609         {0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE},
610         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
611         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
612         {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT},
613         {0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE},
614         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
615         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
616         {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT},
617         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
618         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
619         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
620         {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT},
621         {0xa0, 0x03, ZC3XX_R093_I2CSETVALUE},
622         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
623         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
624         {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT},
625         {0xa0, 0x08, ZC3XX_R093_I2CSETVALUE},
626         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
627         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
628         {0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT},
629         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
630         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
631         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
632         {0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT},
633         {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
634         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
635         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
636         {0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT},
637         {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
638         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
639         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
640         {0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT},
641         {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
642         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
643         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
644         {0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT},
645         {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
646         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
647         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
648         {0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT},
649         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
650         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
651         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
652         {0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT},
653         {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE},
654         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
655         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
656         {0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT},
657         {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE},
658         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
659         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
660         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
661         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
662         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
663         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
664         {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
665         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
666         {0xa0, 0x78, ZC3XX_R18D_YTARGET},
667         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
668         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
669         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
670         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
671         {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID},
672         {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW},
673         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
674         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
675         {0xa0, 0x00, 0x01ad},
676         {0xa0, 0x01, 0x01b1},
677         {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
678         {0xa0, 0x60, ZC3XX_R116_RGAIN},
679         {0xa0, 0x40, ZC3XX_R117_GGAIN},
680         {0xa0, 0x4c, ZC3XX_R118_BGAIN},
681         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* clock ? */
682         {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},   /* sharpness+ */
683         {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},   /* sharpness- */
684         {0xa0, 0x13, ZC3XX_R120_GAMMA00},       /* gamma 4 */
685         {0xa0, 0x38, ZC3XX_R121_GAMMA01},
686         {0xa0, 0x59, ZC3XX_R122_GAMMA02},
687         {0xa0, 0x79, ZC3XX_R123_GAMMA03},
688         {0xa0, 0x92, ZC3XX_R124_GAMMA04},
689         {0xa0, 0xa7, ZC3XX_R125_GAMMA05},
690         {0xa0, 0xb9, ZC3XX_R126_GAMMA06},
691         {0xa0, 0xc8, ZC3XX_R127_GAMMA07},
692         {0xa0, 0xd4, ZC3XX_R128_GAMMA08},
693         {0xa0, 0xdf, ZC3XX_R129_GAMMA09},
694         {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A},
695         {0xa0, 0xee, ZC3XX_R12B_GAMMA0B},
696         {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C},
697         {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D},
698         {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E},
699         {0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
700         {0xa0, 0x26, ZC3XX_R130_GAMMA10},
701         {0xa0, 0x22, ZC3XX_R131_GAMMA11},
702         {0xa0, 0x20, ZC3XX_R132_GAMMA12},
703         {0xa0, 0x1c, ZC3XX_R133_GAMMA13},
704         {0xa0, 0x16, ZC3XX_R134_GAMMA14},
705         {0xa0, 0x13, ZC3XX_R135_GAMMA15},
706         {0xa0, 0x10, ZC3XX_R136_GAMMA16},
707         {0xa0, 0x0d, ZC3XX_R137_GAMMA17},
708         {0xa0, 0x0b, ZC3XX_R138_GAMMA18},
709         {0xa0, 0x09, ZC3XX_R139_GAMMA19},
710         {0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
711         {0xa0, 0x06, ZC3XX_R13B_GAMMA1B},
712         {0xa0, 0x05, ZC3XX_R13C_GAMMA1C},
713         {0xa0, 0x04, ZC3XX_R13D_GAMMA1D},
714         {0xa0, 0x03, ZC3XX_R13E_GAMMA1E},
715         {0xa0, 0x02, ZC3XX_R13F_GAMMA1F},
716         {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */
717         {0xa0, 0xf4, ZC3XX_R10B_RGB01},
718         {0xa0, 0xf4, ZC3XX_R10C_RGB02},
719         {0xa0, 0xf4, ZC3XX_R10D_RGB10},
720         {0xa0, 0x58, ZC3XX_R10E_RGB11},
721         {0xa0, 0xf4, ZC3XX_R10F_RGB12},
722         {0xa0, 0xf4, ZC3XX_R110_RGB20},
723         {0xa0, 0xf4, ZC3XX_R111_RGB21},
724         {0xa0, 0x58, ZC3XX_R112_RGB22},
725         {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
726         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
727         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
728         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
729         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
730         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
731         {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
732         {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE},
733         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
734         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
735         {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
736         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
737         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
738         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
739         {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
740         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
741         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
742         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
743         {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
744         {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE},
745         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
746         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
747         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
748         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
749         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
750         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
751         {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH},
752         {0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW},
753         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
754         {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
755         {0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW},
756         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
757         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
758         {0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW},
759         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
760         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
761         {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF},
762         {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP},
763         {0xa0, 0x04, ZC3XX_R01D_HSYNC_0},
764         {0xa0, 0x0f, ZC3XX_R01E_HSYNC_1},
765         {0xa0, 0x19, ZC3XX_R01F_HSYNC_2},
766         {0xa0, 0x1f, ZC3XX_R020_HSYNC_3},
767         {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
768         {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
769         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
770         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
771         {0xa0, 0x60, ZC3XX_R116_RGAIN},
772         {0xa0, 0x40, ZC3XX_R117_GGAIN},
773         {0xa0, 0x4c, ZC3XX_R118_BGAIN},
774         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
775         {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
776         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
777         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
778         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
779         {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
780         {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE},
781         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
782         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
783         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
784         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
785         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
786         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
787         {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
788         {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE},
789         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
790         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
791         {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
792         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
793         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
794         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
795         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
796         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
797         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
798         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
799         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
800         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
801         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
802         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
803         {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
804         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
805         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
806         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
807         {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
808         {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE},
809         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
810         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
811         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
812         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
813         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
814         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
815         {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
816         {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE},
817         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
818         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
819         {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
820         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
821         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
822         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
823         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
824         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
825         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
826         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
827         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
828         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
829         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
830         {}
831 };
832
833 static const struct usb_action cs2102K_Initial[] = {
834         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
835         {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
836         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
837         {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT},
838         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
839         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
840         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
841         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
842         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
843         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
844         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
845         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
846         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
847         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
848         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
849         {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
850         {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
851 /*fixme: next sequence = i2c exchanges*/
852         {0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR},
853         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
854         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
855         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
856         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
857         {0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT},
858         {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
859         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
860         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
861         {0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT},
862         {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
863         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
864         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
865         {0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT},
866         {0xa0, 0x7b, ZC3XX_R093_I2CSETVALUE},
867         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
868         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
869         {0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT},
870         {0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE},
871         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
872         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
873         {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT},
874         {0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE},
875         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
876         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
877         {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT},
878         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
879         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
880         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
881         {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT},
882         {0xa0, 0x03, ZC3XX_R093_I2CSETVALUE},
883         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
884         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
885         {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT},
886         {0xa0, 0x08, ZC3XX_R093_I2CSETVALUE},
887         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
888         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
889         {0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT},
890         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
891         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
892         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
893         {0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT},
894         {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
895         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
896         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
897         {0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT},
898         {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
899         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
900         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
901         {0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT},
902         {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
903         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
904         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
905         {0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT},
906         {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE},
907         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
908         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
909         {0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT},
910         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
911         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
912         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
913         {0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT},
914         {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE},
915         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
916         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
917         {0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT},
918         {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE},
919         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
920         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
921         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
922         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
923         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
924         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
925         {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION},
926         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
927         {0xa0, 0x78, ZC3XX_R18D_YTARGET},
928         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
929         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
930         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
931         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
932         {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID},
933         {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW},
934         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
935         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
936         {0xa0, 0x00, 0x01ad},
937         {0xa0, 0x01, 0x01b1},
938         {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
939         {0xa0, 0x60, ZC3XX_R116_RGAIN},
940         {0xa0, 0x40, ZC3XX_R117_GGAIN},
941         {0xa0, 0x4c, ZC3XX_R118_BGAIN},
942         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* clock ? */
943         {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},   /* sharpness+ */
944         {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},   /* sharpness- */
945         {0xa0, 0x13, ZC3XX_R120_GAMMA00},       /* gamma 4 */
946         {0xa0, 0x38, ZC3XX_R121_GAMMA01},
947         {0xa0, 0x59, ZC3XX_R122_GAMMA02},
948         {0xa0, 0x79, ZC3XX_R123_GAMMA03},
949         {0xa0, 0x92, ZC3XX_R124_GAMMA04},
950         {0xa0, 0xa7, ZC3XX_R125_GAMMA05},
951         {0xa0, 0xb9, ZC3XX_R126_GAMMA06},
952         {0xa0, 0xc8, ZC3XX_R127_GAMMA07},
953         {0xa0, 0xd4, ZC3XX_R128_GAMMA08},
954         {0xa0, 0xdf, ZC3XX_R129_GAMMA09},
955         {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A},
956         {0xa0, 0xee, ZC3XX_R12B_GAMMA0B},
957         {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C},
958         {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D},
959         {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E},
960         {0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
961         {0xa0, 0x26, ZC3XX_R130_GAMMA10},
962         {0xa0, 0x22, ZC3XX_R131_GAMMA11},
963         {0xa0, 0x20, ZC3XX_R132_GAMMA12},
964         {0xa0, 0x1c, ZC3XX_R133_GAMMA13},
965         {0xa0, 0x16, ZC3XX_R134_GAMMA14},
966         {0xa0, 0x13, ZC3XX_R135_GAMMA15},
967         {0xa0, 0x10, ZC3XX_R136_GAMMA16},
968         {0xa0, 0x0d, ZC3XX_R137_GAMMA17},
969         {0xa0, 0x0b, ZC3XX_R138_GAMMA18},
970         {0xa0, 0x09, ZC3XX_R139_GAMMA19},
971         {0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
972         {0xa0, 0x06, ZC3XX_R13B_GAMMA1B},
973         {0xa0, 0x05, ZC3XX_R13C_GAMMA1C},
974         {0xa0, 0x04, ZC3XX_R13D_GAMMA1D},
975         {0xa0, 0x03, ZC3XX_R13E_GAMMA1E},
976         {0xa0, 0x02, ZC3XX_R13F_GAMMA1F},
977         {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */
978         {0xa0, 0xf4, ZC3XX_R10B_RGB01},
979         {0xa0, 0xf4, ZC3XX_R10C_RGB02},
980         {0xa0, 0xf4, ZC3XX_R10D_RGB10},
981         {0xa0, 0x58, ZC3XX_R10E_RGB11},
982         {0xa0, 0xf4, ZC3XX_R10F_RGB12},
983         {0xa0, 0xf4, ZC3XX_R110_RGB20},
984         {0xa0, 0xf4, ZC3XX_R111_RGB21},
985         {0xa0, 0x58, ZC3XX_R112_RGB22},
986         {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
987         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
988         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
989         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
990         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
991         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
992         {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
993         {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE},
994         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
995         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
996         {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
997         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
998         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
999         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1000         {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
1001         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
1002         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1003         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1004         {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
1005         {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE},
1006         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1007         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1008         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1009         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
1010         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1011         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1012         {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH},
1013         {0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW},
1014         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
1015         {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID},
1016         {0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW},
1017         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
1018         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
1019         {0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW},
1020         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
1021         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
1022         {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF},
1023         {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP},
1024         {0xa0, 0x04, ZC3XX_R01D_HSYNC_0},
1025         {0xa0, 0x0f, ZC3XX_R01E_HSYNC_1},
1026         {0xa0, 0x19, ZC3XX_R01F_HSYNC_2},
1027         {0xa0, 0x1f, ZC3XX_R020_HSYNC_3},
1028         {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
1029         {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
1030         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
1031         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
1032         {0xa0, 0x60, ZC3XX_R116_RGAIN},
1033         {0xa0, 0x40, ZC3XX_R117_GGAIN},
1034         {0xa0, 0x4c, ZC3XX_R118_BGAIN},
1035         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1036         {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
1037         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
1038         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1039         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1040         {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
1041         {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE},
1042         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1043         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1044         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1045         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
1046         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1047         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1048         {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
1049         {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE},
1050         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1051         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1052         {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
1053         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
1054         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1055         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1056         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1057         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
1058         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1059         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1060         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1061         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1062         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1063         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1064         {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
1065         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
1066         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1067         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1068         {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
1069         {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE},
1070         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1071         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1072         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1073         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
1074         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1075         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1076         {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
1077         {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE},
1078         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1079         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1080         {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
1081         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
1082         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1083         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1084         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1085         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
1086         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1087         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1088         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1089         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1090         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1091 /*fixme:what does the next sequence?*/
1092         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1093         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1094         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1095         {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
1096         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
1097         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1098         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1099         {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
1100         {0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE},
1101         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1102         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1103         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1104         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
1105         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1106         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1107         {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
1108         {0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE},
1109         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1110         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1111         {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
1112         {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE},
1113         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1114         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1115         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1116         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
1117         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1118         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1119         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1120         {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING},
1121         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1122         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1123         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1124         {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
1125         {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
1126         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1127         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1128         {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
1129         {0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE},
1130         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1131         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1132         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1133         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
1134         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1135         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1136         {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
1137         {0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE},
1138         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1139         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1140         {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
1141         {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
1142         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1143         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1144         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1145         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
1146         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1147         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1148         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1149         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1150         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1151         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1152         {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
1153         {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
1154         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1155         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1156         {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
1157         {0xa0, 0x44, ZC3XX_R093_I2CSETVALUE},
1158         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1159         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1160         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1161         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
1162         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1163         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1164         {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
1165         {0xa0, 0x44, ZC3XX_R093_I2CSETVALUE},
1166         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1167         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1168         {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
1169         {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
1170         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1171         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1172         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1173         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
1174         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1175         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1176         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1177         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1178         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1179         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1180         {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT},
1181         {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
1182         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1183         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1184         {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT},
1185         {0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE},
1186         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1187         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1188         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1189         {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE},
1190         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1191         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1192         {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT},
1193         {0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE},
1194         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1195         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1196         {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT},
1197         {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE},
1198         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1199         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1200         {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT},
1201         {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE},
1202         {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK},
1203         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
1204         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1205         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1206         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
1207         {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN},
1208         {}
1209 };
1210
1211 static const struct usb_action gc0305_Initial[] = {     /* 640x480 */
1212         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */
1213         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* 00,08,03,cc */
1214         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
1215         {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT},   /* 00,02,04,cc */
1216         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},        /* 00,03,02,cc */
1217         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */
1218         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},       /* 00,05,01,cc */
1219         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},        /* 00,06,e0,cc */
1220         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},       /* 00,01,01,cc */
1221         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,03,cc */
1222         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,01,cc */
1223         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},  /* 00,98,00,cc */
1224         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},  /* 00,9a,00,cc */
1225         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},     /* 01,1a,00,cc */
1226         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},     /* 01,1c,00,cc */
1227         {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW},  /* 00,9c,e6,cc */
1228         {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},   /* 00,9e,86,cc */
1229         {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc */
1230         {0xaa, 0x13, 0x0002},   /* 00,13,02,aa */
1231         {0xaa, 0x15, 0x0003},   /* 00,15,03,aa */
1232         {0xaa, 0x01, 0x0000},   /* 00,01,00,aa */
1233         {0xaa, 0x02, 0x0000},   /* 00,02,00,aa */
1234         {0xaa, 0x1a, 0x0000},   /* 00,1a,00,aa */
1235         {0xaa, 0x1c, 0x0017},   /* 00,1c,17,aa */
1236         {0xaa, 0x1d, 0x0080},   /* 00,1d,80,aa */
1237         {0xaa, 0x1f, 0x0008},   /* 00,1f,08,aa */
1238         {0xaa, 0x21, 0x0012},   /* 00,21,12,aa */
1239         {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH},   /* 00,86,82,cc */
1240         {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID},    /* 00,87,83,cc */
1241         {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW},    /* 00,88,84,cc */
1242         {0xaa, 0x05, 0x0000},   /* 00,05,00,aa */
1243         {0xaa, 0x0a, 0x0000},   /* 00,0a,00,aa */
1244         {0xaa, 0x0b, 0x00b0},   /* 00,0b,b0,aa */
1245         {0xaa, 0x0c, 0x0000},   /* 00,0c,00,aa */
1246         {0xaa, 0x0d, 0x00b0},   /* 00,0d,b0,aa */
1247         {0xaa, 0x0e, 0x0000},   /* 00,0e,00,aa */
1248         {0xaa, 0x0f, 0x00b0},   /* 00,0f,b0,aa */
1249         {0xaa, 0x10, 0x0000},   /* 00,10,00,aa */
1250         {0xaa, 0x11, 0x00b0},   /* 00,11,b0,aa */
1251         {0xaa, 0x16, 0x0001},   /* 00,16,01,aa */
1252         {0xaa, 0x17, 0x00e6},   /* 00,17,e6,aa */
1253         {0xaa, 0x18, 0x0002},   /* 00,18,02,aa */
1254         {0xaa, 0x19, 0x0086},   /* 00,19,86,aa */
1255         {0xaa, 0x20, 0x0000},   /* 00,20,00,aa */
1256         {0xaa, 0x1b, 0x0020},   /* 00,1b,20,aa */
1257         {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},      /* 01,01,b7,cc */
1258         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,05,cc */
1259         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */
1260         {0xa0, 0x76, ZC3XX_R189_AWBSTATUS},     /* 01,89,76,cc */
1261         {0xa0, 0x09, 0x01ad},   /* 01,ad,09,cc */
1262         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */
1263         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},   /* 01,cb,13,cc */
1264         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},        /* 02,50,08,cc */
1265         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},  /* 03,01,08,cc */
1266         {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},   /* 01,a8,60,cc */
1267         {0xa0, 0x85, ZC3XX_R18D_YTARGET},       /* 01,8d,85,cc */
1268         {0xa0, 0x00, 0x011e},   /* 01,1e,00,cc */
1269         {0xa0, 0x52, ZC3XX_R116_RGAIN}, /* 01,16,52,cc */
1270         {0xa0, 0x40, ZC3XX_R117_GGAIN}, /* 01,17,40,cc */
1271         {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */
1272         {0xa0, 0x03, ZC3XX_R113_RGB03}, /* 01,13,03,cc */
1273         {}
1274 };
1275 static const struct usb_action gc0305_InitialScale[] = { /* 320x240 */
1276         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */
1277         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* 00,08,03,cc */
1278         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},      /* 00,10,01,cc */
1279         {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},   /* 00,02,10,cc */
1280         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},        /* 00,03,02,cc */
1281         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */
1282         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},       /* 00,05,01,cc */
1283         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},        /* 00,06,e0,cc */
1284         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},       /* 00,01,01,cc */
1285         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,03,cc */
1286         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,01,cc */
1287         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},  /* 00,98,00,cc */
1288         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},  /* 00,9a,00,cc */
1289         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},     /* 01,1a,00,cc */
1290         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},     /* 01,1c,00,cc */
1291         {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},  /* 00,9c,e8,cc */
1292         {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},   /* 00,9e,88,cc */
1293         {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc */
1294         {0xaa, 0x13, 0x0000},   /* 00,13,00,aa */
1295         {0xaa, 0x15, 0x0001},   /* 00,15,01,aa */
1296         {0xaa, 0x01, 0x0000},   /* 00,01,00,aa */
1297         {0xaa, 0x02, 0x0000},   /* 00,02,00,aa */
1298         {0xaa, 0x1a, 0x0000},   /* 00,1a,00,aa */
1299         {0xaa, 0x1c, 0x0017},   /* 00,1c,17,aa */
1300         {0xaa, 0x1d, 0x0080},   /* 00,1d,80,aa */
1301         {0xaa, 0x1f, 0x0008},   /* 00,1f,08,aa */
1302         {0xaa, 0x21, 0x0012},   /* 00,21,12,aa */
1303         {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH},   /* 00,86,82,cc */
1304         {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID},    /* 00,87,83,cc */
1305         {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW},    /* 00,88,84,cc */
1306         {0xaa, 0x05, 0x0000},   /* 00,05,00,aa */
1307         {0xaa, 0x0a, 0x0000},   /* 00,0a,00,aa */
1308         {0xaa, 0x0b, 0x00b0},   /* 00,0b,b0,aa */
1309         {0xaa, 0x0c, 0x0000},   /* 00,0c,00,aa */
1310         {0xaa, 0x0d, 0x00b0},   /* 00,0d,b0,aa */
1311         {0xaa, 0x0e, 0x0000},   /* 00,0e,00,aa */
1312         {0xaa, 0x0f, 0x00b0},   /* 00,0f,b0,aa */
1313         {0xaa, 0x10, 0x0000},   /* 00,10,00,aa */
1314         {0xaa, 0x11, 0x00b0},   /* 00,11,b0,aa */
1315         {0xaa, 0x16, 0x0001},   /* 00,16,01,aa */
1316         {0xaa, 0x17, 0x00e8},   /* 00,17,e8,aa */
1317         {0xaa, 0x18, 0x0002},   /* 00,18,02,aa */
1318         {0xaa, 0x19, 0x0088},   /* 00,19,88,aa */
1319         {0xaa, 0x20, 0x0000},   /* 00,20,00,aa */
1320         {0xaa, 0x1b, 0x0020},   /* 00,1b,20,aa */
1321         {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},      /* 01,01,b7,cc */
1322         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},      /* 00,12,05,cc */
1323         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */
1324         {0xa0, 0x76, ZC3XX_R189_AWBSTATUS},     /* 01,89,76,cc */
1325         {0xa0, 0x09, 0x01ad},   /* 01,ad,09,cc */
1326         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */
1327         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},   /* 01,cb,13,cc */
1328         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},        /* 02,50,08,cc */
1329         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},  /* 03,01,08,cc */
1330         {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},   /* 01,a8,60,cc */
1331         {0xa0, 0x00, 0x011e},   /* 01,1e,00,cc */
1332         {0xa0, 0x52, ZC3XX_R116_RGAIN}, /* 01,16,52,cc */
1333         {0xa0, 0x40, ZC3XX_R117_GGAIN}, /* 01,17,40,cc */
1334         {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */
1335         {0xa0, 0x03, ZC3XX_R113_RGB03}, /* 01,13,03,cc */
1336         {}
1337 };
1338 static const struct usb_action gc0305_50HZ[] = {
1339         {0xaa, 0x82, 0x0000},   /* 00,82,00,aa */
1340         {0xaa, 0x83, 0x0002},   /* 00,83,02,aa */
1341         {0xaa, 0x84, 0x0038},   /* 00,84,38,aa */       /* win: 00,84,ec */
1342         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},     /* 01,90,00,cc */
1343         {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID},      /* 01,91,0b,cc */
1344         {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW},      /* 01,92,18,cc */
1345                                                         /* win: 01,92,10 */
1346         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},       /* 01,95,00,cc */
1347         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},        /* 01,96,00,cc */
1348         {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW},        /* 01,97,8e,cc */
1349                                                         /* win: 01,97,ec */
1350         {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},      /* 01,8c,0e,cc */
1351         {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},    /* 01,8f,15,cc */
1352         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},      /* 01,a9,10,cc */
1353         {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},       /* 01,aa,24,cc */
1354         {0xa0, 0x62, ZC3XX_R01D_HSYNC_0},       /* 00,1d,62,cc */
1355         {0xa0, 0x90, ZC3XX_R01E_HSYNC_1},       /* 00,1e,90,cc */
1356         {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},       /* 00,1f,c8,cc */
1357         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},       /* 00,20,ff,cc */
1358         {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},    /* 01,1d,60,cc */
1359         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},     /* 01,80,42,cc */
1360 /*      {0xa0, 0x85, ZC3XX_R18D_YTARGET},        * 01,8d,85,cc *
1361                                                  * if 640x480 */
1362         {}
1363 };
1364 static const struct usb_action gc0305_60HZ[] = {
1365         {0xaa, 0x82, 0x0000},   /* 00,82,00,aa */
1366         {0xaa, 0x83, 0x0000},   /* 00,83,00,aa */
1367         {0xaa, 0x84, 0x00ec},   /* 00,84,ec,aa */
1368         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},     /* 01,90,00,cc */
1369         {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID},      /* 01,91,0b,cc */
1370         {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW},      /* 01,92,10,cc */
1371         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},       /* 01,95,00,cc */
1372         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},        /* 01,96,00,cc */
1373         {0xa0, 0xec, ZC3XX_R197_ANTIFLICKERLOW},        /* 01,97,ec,cc */
1374         {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},      /* 01,8c,0e,cc */
1375         {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},    /* 01,8f,15,cc */
1376         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},      /* 01,a9,10,cc */
1377         {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},       /* 01,aa,24,cc */
1378         {0xa0, 0x62, ZC3XX_R01D_HSYNC_0},       /* 00,1d,62,cc */
1379         {0xa0, 0x90, ZC3XX_R01E_HSYNC_1},       /* 00,1e,90,cc */
1380         {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},       /* 00,1f,c8,cc */
1381         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},       /* 00,20,ff,cc */
1382         {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},    /* 01,1d,60,cc */
1383         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},     /* 01,80,42,cc */
1384         {0xa0, 0x80, ZC3XX_R18D_YTARGET},       /* 01,8d,80,cc */
1385         {}
1386 };
1387
1388 static const struct usb_action gc0305_NoFliker[] = {
1389         {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc */
1390         {0xaa, 0x82, 0x0000},   /* 00,82,00,aa */
1391         {0xaa, 0x83, 0x0000},   /* 00,83,00,aa */
1392         {0xaa, 0x84, 0x0020},   /* 00,84,20,aa */
1393         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},     /* 01,90,00,cc */
1394         {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID},      /* 01,91,00,cc */
1395         {0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW},      /* 01,92,48,cc */
1396         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},       /* 01,95,00,cc */
1397         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},        /* 01,96,00,cc */
1398         {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW},        /* 01,97,10,cc */
1399         {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE},      /* 01,8c,0e,cc */
1400         {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE},    /* 01,8f,15,cc */
1401         {0xa0, 0x62, ZC3XX_R01D_HSYNC_0},       /* 00,1d,62,cc */
1402         {0xa0, 0x90, ZC3XX_R01E_HSYNC_1},       /* 00,1e,90,cc */
1403         {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2},       /* 00,1f,c8,cc */
1404         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},       /* 00,20,ff,cc */
1405         {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},    /* 01,1d,60,cc */
1406         {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE},     /* 01,80,03,cc */
1407         {0xa0, 0x80, ZC3XX_R18D_YTARGET},       /* 01,8d,80,cc */
1408         {}
1409 };
1410
1411 static const struct usb_action hdcs2020_InitialScale[] = {
1412         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
1413         {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT},
1414         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* qtable 0x05 */
1415         {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT},
1416         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
1417         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
1418         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
1419         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
1420         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
1421         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
1422         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
1423         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
1424         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
1425         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
1426         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
1427         {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
1428         {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
1429         {0xaa, 0x1c, 0x0000},
1430         {0xaa, 0x0a, 0x0001},
1431         {0xaa, 0x0b, 0x0006},
1432         {0xaa, 0x0c, 0x007b},
1433         {0xaa, 0x0d, 0x00a7},
1434         {0xaa, 0x03, 0x00fb},
1435         {0xaa, 0x05, 0x0000},
1436         {0xaa, 0x06, 0x0003},
1437         {0xaa, 0x09, 0x0008},
1438
1439         {0xaa, 0x0f, 0x0018},   /* set sensor gain */
1440         {0xaa, 0x10, 0x0018},
1441         {0xaa, 0x11, 0x0018},
1442         {0xaa, 0x12, 0x0018},
1443
1444         {0xaa, 0x15, 0x004e},
1445         {0xaa, 0x1c, 0x0004},
1446         {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION},
1447         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
1448         {0xa0, 0x70, ZC3XX_R18D_YTARGET},
1449         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
1450         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
1451         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
1452         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
1453         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
1454         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
1455         {0xa1, 0x01, 0x0002},
1456         {0xa1, 0x01, 0x0008},
1457         {0xa1, 0x01, 0x0180},
1458         {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
1459         {0xa0, 0x40, ZC3XX_R116_RGAIN},
1460         {0xa0, 0x40, ZC3XX_R117_GGAIN},
1461         {0xa0, 0x40, ZC3XX_R118_BGAIN},
1462         {0xa1, 0x01, 0x0008},
1463         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* clock ? */
1464         {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},   /* sharpness+ */
1465         {0xa1, 0x01, 0x01c8},
1466         {0xa1, 0x01, 0x01c9},
1467         {0xa1, 0x01, 0x01ca},
1468         {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},   /* sharpness- */
1469         {0xa0, 0x13, ZC3XX_R120_GAMMA00},       /* gamma 4 */
1470         {0xa0, 0x38, ZC3XX_R121_GAMMA01},
1471         {0xa0, 0x59, ZC3XX_R122_GAMMA02},
1472         {0xa0, 0x79, ZC3XX_R123_GAMMA03},
1473         {0xa0, 0x92, ZC3XX_R124_GAMMA04},
1474         {0xa0, 0xa7, ZC3XX_R125_GAMMA05},
1475         {0xa0, 0xb9, ZC3XX_R126_GAMMA06},
1476         {0xa0, 0xc8, ZC3XX_R127_GAMMA07},
1477         {0xa0, 0xd4, ZC3XX_R128_GAMMA08},
1478         {0xa0, 0xdf, ZC3XX_R129_GAMMA09},
1479         {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A},
1480         {0xa0, 0xee, ZC3XX_R12B_GAMMA0B},
1481         {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C},
1482         {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D},
1483         {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E},
1484         {0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
1485         {0xa0, 0x26, ZC3XX_R130_GAMMA10},
1486         {0xa0, 0x22, ZC3XX_R131_GAMMA11},
1487         {0xa0, 0x20, ZC3XX_R132_GAMMA12},
1488         {0xa0, 0x1c, ZC3XX_R133_GAMMA13},
1489         {0xa0, 0x16, ZC3XX_R134_GAMMA14},
1490         {0xa0, 0x13, ZC3XX_R135_GAMMA15},
1491         {0xa0, 0x10, ZC3XX_R136_GAMMA16},
1492         {0xa0, 0x0d, ZC3XX_R137_GAMMA17},
1493         {0xa0, 0x0b, ZC3XX_R138_GAMMA18},
1494         {0xa0, 0x09, ZC3XX_R139_GAMMA19},
1495         {0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
1496         {0xa0, 0x06, ZC3XX_R13B_GAMMA1B},
1497         {0xa0, 0x05, ZC3XX_R13C_GAMMA1C},
1498         {0xa0, 0x04, ZC3XX_R13D_GAMMA1D},
1499         {0xa0, 0x03, ZC3XX_R13E_GAMMA1E},
1500         {0xa0, 0x02, ZC3XX_R13F_GAMMA1F},
1501
1502         {0xa0, 0x66, ZC3XX_R10A_RGB00}, /* matrix */
1503         {0xa0, 0xed, ZC3XX_R10B_RGB01},
1504         {0xa0, 0xed, ZC3XX_R10C_RGB02},
1505         {0xa0, 0xed, ZC3XX_R10D_RGB10},
1506         {0xa0, 0x66, ZC3XX_R10E_RGB11},
1507         {0xa0, 0xed, ZC3XX_R10F_RGB12},
1508         {0xa0, 0xed, ZC3XX_R110_RGB20},
1509         {0xa0, 0xed, ZC3XX_R111_RGB21},
1510         {0xa0, 0x66, ZC3XX_R112_RGB22},
1511
1512         {0xa1, 0x01, 0x0180},
1513         {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
1514         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
1515         {0xaa, 0x13, 0x0031},
1516         {0xaa, 0x14, 0x0001},
1517         {0xaa, 0x0e, 0x0004},
1518         {0xaa, 0x19, 0x00cd},
1519         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
1520         {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID},
1521         {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW},
1522         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
1523         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
1524         {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW},
1525         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
1526         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
1527
1528         {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF},      /* 0x14 */
1529         {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP},
1530         {0xa0, 0x04, ZC3XX_R01D_HSYNC_0},
1531         {0xa0, 0x18, ZC3XX_R01E_HSYNC_1},
1532         {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2},
1533         {0xa0, 0x41, ZC3XX_R020_HSYNC_3},
1534         {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
1535         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
1536         {0xa1, 0x01, 0x0180},
1537         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
1538         {0xa0, 0x40, ZC3XX_R116_RGAIN},
1539         {0xa0, 0x40, ZC3XX_R117_GGAIN},
1540         {0xa0, 0x40, ZC3XX_R118_BGAIN},
1541         {}
1542 };
1543 static const struct usb_action hdcs2020_Initial[] = {
1544         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
1545         {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
1546         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
1547         {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT},
1548         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
1549         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
1550         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
1551         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
1552         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
1553         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
1554         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
1555         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
1556         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
1557         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
1558         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
1559         {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
1560         {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
1561         {0xaa, 0x1c, 0x0000},
1562         {0xaa, 0x0a, 0x0001},
1563         {0xaa, 0x0b, 0x0006},
1564         {0xaa, 0x0c, 0x007a},
1565         {0xaa, 0x0d, 0x00a7},
1566         {0xaa, 0x03, 0x00fb},
1567         {0xaa, 0x05, 0x0000},
1568         {0xaa, 0x06, 0x0003},
1569         {0xaa, 0x09, 0x0008},
1570         {0xaa, 0x0f, 0x0018},   /* original setting */
1571         {0xaa, 0x10, 0x0018},
1572         {0xaa, 0x11, 0x0018},
1573         {0xaa, 0x12, 0x0018},
1574         {0xaa, 0x15, 0x004e},
1575         {0xaa, 0x1c, 0x0004},
1576         {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION},
1577         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
1578         {0xa0, 0x70, ZC3XX_R18D_YTARGET},
1579         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
1580         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
1581         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
1582         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
1583         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
1584         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
1585         {0xa1, 0x01, 0x0002},
1586         {0xa1, 0x01, 0x0008},
1587         {0xa1, 0x01, 0x0180},
1588         {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
1589         {0xa0, 0x40, ZC3XX_R116_RGAIN},
1590         {0xa0, 0x40, ZC3XX_R117_GGAIN},
1591         {0xa0, 0x40, ZC3XX_R118_BGAIN},
1592         {0xa1, 0x01, 0x0008},
1593         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* clock ? */
1594         {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},   /* sharpness+ */
1595         {0xa1, 0x01, 0x01c8},
1596         {0xa1, 0x01, 0x01c9},
1597         {0xa1, 0x01, 0x01ca},
1598         {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},   /* sharpness- */
1599         {0xa0, 0x13, ZC3XX_R120_GAMMA00},       /* gamma 4 */
1600         {0xa0, 0x38, ZC3XX_R121_GAMMA01},
1601         {0xa0, 0x59, ZC3XX_R122_GAMMA02},
1602         {0xa0, 0x79, ZC3XX_R123_GAMMA03},
1603         {0xa0, 0x92, ZC3XX_R124_GAMMA04},
1604         {0xa0, 0xa7, ZC3XX_R125_GAMMA05},
1605         {0xa0, 0xb9, ZC3XX_R126_GAMMA06},
1606         {0xa0, 0xc8, ZC3XX_R127_GAMMA07},
1607         {0xa0, 0xd4, ZC3XX_R128_GAMMA08},
1608         {0xa0, 0xdf, ZC3XX_R129_GAMMA09},
1609         {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A},
1610         {0xa0, 0xee, ZC3XX_R12B_GAMMA0B},
1611         {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C},
1612         {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D},
1613         {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E},
1614         {0xa0, 0xff, ZC3XX_R12F_GAMMA0F},
1615         {0xa0, 0x26, ZC3XX_R130_GAMMA10},
1616         {0xa0, 0x22, ZC3XX_R131_GAMMA11},
1617         {0xa0, 0x20, ZC3XX_R132_GAMMA12},
1618         {0xa0, 0x1c, ZC3XX_R133_GAMMA13},
1619         {0xa0, 0x16, ZC3XX_R134_GAMMA14},
1620         {0xa0, 0x13, ZC3XX_R135_GAMMA15},
1621         {0xa0, 0x10, ZC3XX_R136_GAMMA16},
1622         {0xa0, 0x0d, ZC3XX_R137_GAMMA17},
1623         {0xa0, 0x0b, ZC3XX_R138_GAMMA18},
1624         {0xa0, 0x09, ZC3XX_R139_GAMMA19},
1625         {0xa0, 0x07, ZC3XX_R13A_GAMMA1A},
1626         {0xa0, 0x06, ZC3XX_R13B_GAMMA1B},
1627         {0xa0, 0x05, ZC3XX_R13C_GAMMA1C},
1628         {0xa0, 0x04, ZC3XX_R13D_GAMMA1D},
1629         {0xa0, 0x03, ZC3XX_R13E_GAMMA1E},
1630         {0xa0, 0x02, ZC3XX_R13F_GAMMA1F},
1631         {0xa0, 0x66, ZC3XX_R10A_RGB00}, /* matrix */
1632         {0xa0, 0xed, ZC3XX_R10B_RGB01},
1633         {0xa0, 0xed, ZC3XX_R10C_RGB02},
1634         {0xa0, 0xed, ZC3XX_R10D_RGB10},
1635         {0xa0, 0x66, ZC3XX_R10E_RGB11},
1636         {0xa0, 0xed, ZC3XX_R10F_RGB12},
1637         {0xa0, 0xed, ZC3XX_R110_RGB20},
1638         {0xa0, 0xed, ZC3XX_R111_RGB21},
1639         {0xa0, 0x66, ZC3XX_R112_RGB22},
1640         {0xa1, 0x01, 0x0180},
1641         {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
1642         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
1643  /**** set exposure ***/
1644         {0xaa, 0x13, 0x0031},
1645         {0xaa, 0x14, 0x0001},
1646         {0xaa, 0x0e, 0x0004},
1647         {0xaa, 0x19, 0x00cd},
1648         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
1649         {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID},
1650         {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW},
1651         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
1652         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
1653         {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW},
1654         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
1655         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
1656         {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF},
1657         {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP},
1658         {0xa0, 0x04, ZC3XX_R01D_HSYNC_0},
1659         {0xa0, 0x18, ZC3XX_R01E_HSYNC_1},
1660         {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2},
1661         {0xa0, 0x41, ZC3XX_R020_HSYNC_3},
1662         {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN},
1663         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
1664         {0xa1, 0x01, 0x0180},
1665         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
1666         {0xa0, 0x40, ZC3XX_R116_RGAIN},
1667         {0xa0, 0x40, ZC3XX_R117_GGAIN},
1668         {0xa0, 0x40, ZC3XX_R118_BGAIN},
1669         {}
1670 };
1671 static const struct usb_action hdcs2020_50HZ[] = {
1672         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
1673         {0xaa, 0x13, 0x0018},                   /* 00,13,18,aa */
1674         {0xaa, 0x14, 0x0001},                   /* 00,14,01,aa */
1675         {0xaa, 0x0e, 0x0005},                   /* 00,0e,05,aa */
1676         {0xaa, 0x19, 0x001f},                   /* 00,19,1f,aa */
1677         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */
1678         {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */
1679         {0xa0, 0x76, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,76,cc */
1680         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */
1681         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */
1682         {0xa0, 0x46, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,46,cc */
1683         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
1684         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
1685         {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,0c,cc */
1686         {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,28,cc */
1687         {0xa0, 0x05, ZC3XX_R01D_HSYNC_0}, /* 00,1d,05,cc */
1688         {0xa0, 0x1a, ZC3XX_R01E_HSYNC_1}, /* 00,1e,1a,cc */
1689         {0xa0, 0x2f, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2f,cc */
1690         {}
1691 };
1692 static const struct usb_action hdcs2020_60HZ[] = {
1693         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
1694         {0xaa, 0x13, 0x0031},                   /* 00,13,31,aa */
1695         {0xaa, 0x14, 0x0001},                   /* 00,14,01,aa */
1696         {0xaa, 0x0e, 0x0004},                   /* 00,0e,04,aa */
1697         {0xaa, 0x19, 0x00cd},                   /* 00,19,cd,aa */
1698         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */
1699         {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */
1700         {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,62,cc */
1701         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */
1702         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */
1703         {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,3d,cc */
1704         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
1705         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
1706         {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,0c,cc */
1707         {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,28,cc */
1708         {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, /* 00,1d,04,cc */
1709         {0xa0, 0x18, ZC3XX_R01E_HSYNC_1}, /* 00,1e,18,cc */
1710         {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2c,cc */
1711         {}
1712 };
1713 static const struct usb_action hdcs2020_NoFliker[] = {
1714         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
1715         {0xaa, 0x13, 0x0010},                   /* 00,13,10,aa */
1716         {0xaa, 0x14, 0x0001},                   /* 00,14,01,aa */
1717         {0xaa, 0x0e, 0x0004},                   /* 00,0e,04,aa */
1718         {0xaa, 0x19, 0x0000},                   /* 00,19,00,aa */
1719         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */
1720         {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */
1721         {0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,70,cc */
1722         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */
1723         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */
1724         {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */
1725         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
1726         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
1727         {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */
1728         {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */
1729         {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, /* 00,1d,04,cc */
1730         {0xa0, 0x17, ZC3XX_R01E_HSYNC_1}, /* 00,1e,17,cc */
1731         {0xa0, 0x2a, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2a,cc */
1732         {}
1733 };
1734
1735 static const struct usb_action hv7131b_InitialScale[] = {       /* 320x240 */
1736         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
1737         {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
1738         {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT},
1739         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
1740         {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
1741         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* 00 */
1742         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
1743         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
1744         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
1745         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
1746         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
1747         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
1748         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
1749         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
1750         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
1751         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
1752         {0xaa, 0x30, 0x002d},
1753         {0xaa, 0x01, 0x0005},
1754         {0xaa, 0x11, 0x0000},
1755         {0xaa, 0x13, 0x0001},   /* {0xaa, 0x13, 0x0000}, */
1756         {0xaa, 0x14, 0x0001},
1757         {0xaa, 0x15, 0x00e8},
1758         {0xaa, 0x16, 0x0002},
1759         {0xaa, 0x17, 0x0086},           /* 00,17,88,aa */
1760         {0xaa, 0x31, 0x0038},
1761         {0xaa, 0x32, 0x0038},
1762         {0xaa, 0x33, 0x0038},
1763         {0xaa, 0x5b, 0x0001},
1764         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
1765         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
1766         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
1767         {0xa0, 0x68, ZC3XX_R18D_YTARGET},
1768         {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
1769         {0xa0, 0x00, 0x01ad},
1770         {0xa0, 0xc0, 0x019b},
1771         {0xa0, 0xa0, 0x019c},
1772         {0xa0, 0x02, ZC3XX_R188_MINGAIN},
1773         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
1774         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
1775         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
1776         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
1777         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
1778         {0xaa, 0x02, 0x0090},                   /* 00,02,80,aa */
1779         {}
1780 };
1781
1782 static const struct usb_action hv7131b_Initial[] = {    /* 640x480*/
1783         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
1784         {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
1785         {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT},
1786         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
1787         {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
1788         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* 00 */
1789         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
1790         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
1791         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
1792         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
1793         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
1794         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
1795         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
1796         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
1797         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
1798         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
1799         {0xaa, 0x30, 0x002d},
1800         {0xaa, 0x01, 0x0005},
1801         {0xaa, 0x11, 0x0001},
1802         {0xaa, 0x13, 0x0000},   /* {0xaa, 0x13, 0x0001}; */
1803         {0xaa, 0x14, 0x0001},
1804         {0xaa, 0x15, 0x00e6},
1805         {0xaa, 0x16, 0x0002},
1806         {0xaa, 0x17, 0x0086},
1807         {0xaa, 0x31, 0x0038},
1808         {0xaa, 0x32, 0x0038},
1809         {0xaa, 0x33, 0x0038},
1810         {0xaa, 0x5b, 0x0001},
1811         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
1812         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
1813         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
1814         {0xa0, 0x70, ZC3XX_R18D_YTARGET},
1815         {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN},
1816         {0xa0, 0x00, 0x01ad},
1817         {0xa0, 0xc0, 0x019b},
1818         {0xa0, 0xa0, 0x019c},
1819         {0xa0, 0x02, ZC3XX_R188_MINGAIN},
1820         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
1821         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
1822         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
1823         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
1824         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
1825         {0xaa, 0x02, 0x0090},   /* {0xaa, 0x02, 0x0080}, */
1826         {}
1827 };
1828 static const struct usb_action hv7131b_50HZ[] = {       /* 640x480*/
1829         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
1830         {0xaa, 0x25, 0x0007},                   /* 00,25,07,aa */
1831         {0xaa, 0x26, 0x0053},                   /* 00,26,53,aa */
1832         {0xaa, 0x27, 0x0000},                   /* 00,27,00,aa */
1833         {0xaa, 0x20, 0x0000},                   /* 00,20,00,aa */
1834         {0xaa, 0x21, 0x0050},                   /* 00,21,50,aa */
1835         {0xaa, 0x22, 0x001b},                   /* 00,22,1b,aa */
1836         {0xaa, 0x23, 0x00fc},                   /* 00,23,fc,aa */
1837         {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},     /* 01,90,2f,cc */
1838         {0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID},      /* 01,91,9b,cc */
1839         {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW},      /* 01,92,80,cc */
1840         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},       /* 01,95,00,cc */
1841         {0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID},        /* 01,96,ea,cc */
1842         {0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW},        /* 01,97,60,cc */
1843         {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},      /* 01,8c,0c,cc */
1844         {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},    /* 01,8f,18,cc */
1845         {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF},      /* 01,a9,18,cc */
1846         {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},       /* 01,aa,24,cc */
1847         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},       /* 00,1d,00,cc */
1848         {0xa0, 0x50, ZC3XX_R01E_HSYNC_1},       /* 00,1e,50,cc */
1849         {0xa0, 0x1b, ZC3XX_R01F_HSYNC_2},       /* 00,1f,1b,cc */
1850         {0xa0, 0xfc, ZC3XX_R020_HSYNC_3},       /* 00,20,fc,cc */
1851         {}
1852 };
1853 static const struct usb_action hv7131b_50HZScale[] = {  /* 320x240 */
1854         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
1855         {0xaa, 0x25, 0x0007},                   /* 00,25,07,aa */
1856         {0xaa, 0x26, 0x0053},                   /* 00,26,53,aa */
1857         {0xaa, 0x27, 0x0000},                   /* 00,27,00,aa */
1858         {0xaa, 0x20, 0x0000},                   /* 00,20,00,aa */
1859         {0xaa, 0x21, 0x0050},                   /* 00,21,50,aa */
1860         {0xaa, 0x22, 0x0012},                   /* 00,22,12,aa */
1861         {0xaa, 0x23, 0x0080},                   /* 00,23,80,aa */
1862         {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},     /* 01,90,2f,cc */
1863         {0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID},      /* 01,91,9b,cc */
1864         {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW},      /* 01,92,80,cc */
1865         {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH},       /* 01,95,01,cc */
1866         {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID},        /* 01,96,d4,cc */
1867         {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW},        /* 01,97,c0,cc */
1868         {0xa0, 0x07, ZC3XX_R18C_AEFREEZE},      /* 01,8c,07,cc */
1869         {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE},    /* 01,8f,0f,cc */
1870         {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF},      /* 01,a9,18,cc */
1871         {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},       /* 01,aa,24,cc */
1872         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},       /* 00,1d,00,cc */
1873         {0xa0, 0x50, ZC3XX_R01E_HSYNC_1},       /* 00,1e,50,cc */
1874         {0xa0, 0x12, ZC3XX_R01F_HSYNC_2},       /* 00,1f,12,cc */
1875         {0xa0, 0x80, ZC3XX_R020_HSYNC_3},       /* 00,20,80,cc */
1876         {}
1877 };
1878 static const struct usb_action hv7131b_60HZ[] = {       /* 640x480*/
1879         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
1880         {0xaa, 0x25, 0x0007},                   /* 00,25,07,aa */
1881         {0xaa, 0x26, 0x00a1},                   /* 00,26,a1,aa */
1882         {0xaa, 0x27, 0x0020},                   /* 00,27,20,aa */
1883         {0xaa, 0x20, 0x0000},                   /* 00,20,00,aa */
1884         {0xaa, 0x21, 0x0040},                   /* 00,21,40,aa */
1885         {0xaa, 0x22, 0x0013},                   /* 00,22,13,aa */
1886         {0xaa, 0x23, 0x004c},                   /* 00,23,4c,aa */
1887         {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},     /* 01,90,2f,cc */
1888         {0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID},      /* 01,91,4d,cc */
1889         {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW},      /* 01,92,60,cc */
1890         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},       /* 01,95,00,cc */
1891         {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID},        /* 01,96,c3,cc */
1892         {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW},        /* 01,97,50,cc */
1893         {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},      /* 01,8c,0c,cc */
1894         {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},    /* 01,8f,18,cc */
1895         {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF},      /* 01,a9,18,cc */
1896         {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},       /* 01,aa,24,cc */
1897         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},       /* 00,1d,00,cc */
1898         {0xa0, 0x40, ZC3XX_R01E_HSYNC_1},       /* 00,1e,40,cc */
1899         {0xa0, 0x13, ZC3XX_R01F_HSYNC_2},       /* 00,1f,13,cc */
1900         {0xa0, 0x4c, ZC3XX_R020_HSYNC_3},       /* 00,20,4c,cc */
1901         {}
1902 };
1903 static const struct usb_action hv7131b_60HZScale[] = {  /* 320x240 */
1904         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
1905         {0xaa, 0x25, 0x0007},                   /* 00,25,07,aa */
1906         {0xaa, 0x26, 0x00a1},                   /* 00,26,a1,aa */
1907         {0xaa, 0x27, 0x0020},                   /* 00,27,20,aa */
1908         {0xaa, 0x20, 0x0000},                   /* 00,20,00,aa */
1909         {0xaa, 0x21, 0x00a0},                   /* 00,21,a0,aa */
1910         {0xaa, 0x22, 0x0016},                   /* 00,22,16,aa */
1911         {0xaa, 0x23, 0x0040},                   /* 00,23,40,aa */
1912         {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},     /* 01,90,2f,cc */
1913         {0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID},      /* 01,91,4d,cc */
1914         {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW},      /* 01,92,60,cc */
1915         {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH},       /* 01,95,01,cc */
1916         {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID},        /* 01,96,86,cc */
1917         {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW},        /* 01,97,a0,cc */
1918         {0xa0, 0x07, ZC3XX_R18C_AEFREEZE},      /* 01,8c,07,cc */
1919         {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE},    /* 01,8f,0f,cc */
1920         {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF},      /* 01,a9,18,cc */
1921         {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP},       /* 01,aa,24,cc */
1922         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},       /* 00,1d,00,cc */
1923         {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1},       /* 00,1e,a0,cc */
1924         {0xa0, 0x16, ZC3XX_R01F_HSYNC_2},       /* 00,1f,16,cc */
1925         {0xa0, 0x40, ZC3XX_R020_HSYNC_3},       /* 00,20,40,cc */
1926         {}
1927 };
1928 static const struct usb_action hv7131b_NoFliker[] = {   /* 640x480*/
1929         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
1930         {0xaa, 0x25, 0x0003},                   /* 00,25,03,aa */
1931         {0xaa, 0x26, 0x0000},                   /* 00,26,00,aa */
1932         {0xaa, 0x27, 0x0000},                   /* 00,27,00,aa */
1933         {0xaa, 0x20, 0x0000},                   /* 00,20,00,aa */
1934         {0xaa, 0x21, 0x0010},                   /* 00,21,10,aa */
1935         {0xaa, 0x22, 0x0000},                   /* 00,22,00,aa */
1936         {0xaa, 0x23, 0x0003},                   /* 00,23,03,aa */
1937         {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},     /* 01,90,2f,cc */
1938         {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID},      /* 01,91,f8,cc */
1939         {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},      /* 01,92,00,cc */
1940         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},       /* 01,95,00,cc */
1941         {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID},        /* 01,96,02,cc */
1942         {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW},        /* 01,97,00,cc */
1943         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},      /* 01,8c,10,cc */
1944         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},    /* 01,8f,20,cc */
1945         {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},      /* 01,a9,00,cc */
1946         {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},       /* 01,aa,00,cc */
1947         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},       /* 00,1d,00,cc */
1948         {0xa0, 0x10, ZC3XX_R01E_HSYNC_1},       /* 00,1e,10,cc */
1949         {0xa0, 0x00, ZC3XX_R01F_HSYNC_2},       /* 00,1f,00,cc */
1950         {0xa0, 0x03, ZC3XX_R020_HSYNC_3},       /* 00,20,03,cc */
1951         {}
1952 };
1953 static const struct usb_action hv7131b_NoFlikerScale[] = { /* 320x240 */
1954         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
1955         {0xaa, 0x25, 0x0003},                   /* 00,25,03,aa */
1956         {0xaa, 0x26, 0x0000},                   /* 00,26,00,aa */
1957         {0xaa, 0x27, 0x0000},                   /* 00,27,00,aa */
1958         {0xaa, 0x20, 0x0000},                   /* 00,20,00,aa */
1959         {0xaa, 0x21, 0x00a0},                   /* 00,21,a0,aa */
1960         {0xaa, 0x22, 0x0016},                   /* 00,22,16,aa */
1961         {0xaa, 0x23, 0x0040},                   /* 00,23,40,aa */
1962         {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},     /* 01,90,2f,cc */
1963         {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID},      /* 01,91,f8,cc */
1964         {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},      /* 01,92,00,cc */
1965         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},       /* 01,95,00,cc */
1966         {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID},        /* 01,96,02,cc */
1967         {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW},        /* 01,97,00,cc */
1968         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},      /* 01,8c,10,cc */
1969         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},    /* 01,8f,20,cc */
1970         {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},      /* 01,a9,00,cc */
1971         {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},       /* 01,aa,00,cc */
1972         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},       /* 00,1d,00,cc */
1973         {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1},       /* 00,1e,a0,cc */
1974         {0xa0, 0x16, ZC3XX_R01F_HSYNC_2},       /* 00,1f,16,cc */
1975         {0xa0, 0x40, ZC3XX_R020_HSYNC_3},       /* 00,20,40,cc */
1976         {}
1977 };
1978
1979 /* from lPEPI264v.inf (hv7131b!) */
1980 static const struct usb_action hv7131r_InitialScale[] = {
1981         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
1982         {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
1983         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
1984         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
1985         {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
1986         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
1987         {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
1988         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
1989         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
1990         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
1991         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
1992         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
1993         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
1994         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
1995         {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
1996         {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
1997         {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
1998         {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
1999         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
2000         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
2001         {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
2002         {0xdd, 0x00, 0x0200},
2003         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
2004         {0xaa, 0x01, 0x000c},
2005         {0xaa, 0x11, 0x0000},
2006         {0xaa, 0x13, 0x0000},
2007         {0xaa, 0x14, 0x0001},
2008         {0xaa, 0x15, 0x00e8},
2009         {0xaa, 0x16, 0x0002},
2010         {0xaa, 0x17, 0x0088},
2011         {0xaa, 0x30, 0x000b},
2012         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2013         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
2014         {0xa0, 0x78, ZC3XX_R18D_YTARGET},
2015         {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN},
2016         {0xa0, 0x00, 0x01ad},
2017         {0xa0, 0xc0, 0x019b},
2018         {0xa0, 0xa0, 0x019c},
2019         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
2020         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
2021         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
2022         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
2023         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
2024         {}
2025 };
2026 static const struct usb_action hv7131r_Initial[] = {
2027         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
2028         {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
2029         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT},
2030         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
2031         {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
2032         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
2033         {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
2034         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
2035         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
2036         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
2037         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
2038         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
2039         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW},
2040         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW},
2041         {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
2042         {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW},
2043         {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
2044         {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
2045         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW},
2046         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW},
2047         {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC},
2048         {0xdd, 0x00, 0x0200},
2049         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC},
2050         {0xaa, 0x01, 0x000c},
2051         {0xaa, 0x11, 0x0000},
2052         {0xaa, 0x13, 0x0000},
2053         {0xaa, 0x14, 0x0001},
2054         {0xaa, 0x15, 0x00e6},
2055         {0xaa, 0x16, 0x0002},
2056         {0xaa, 0x17, 0x0086},
2057         {0xaa, 0x30, 0x000b},
2058         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2059         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
2060         {0xa0, 0x78, ZC3XX_R18D_YTARGET},
2061         {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN},
2062         {0xa0, 0x00, 0x01ad},
2063         {0xa0, 0xc0, 0x019b},
2064         {0xa0, 0xa0, 0x019c},
2065         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
2066         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
2067         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
2068         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
2069         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
2070         {}
2071 };
2072 static const struct usb_action hv7131r_50HZ[] = {
2073         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2074         {0xa0, 0x06, ZC3XX_R190_EXPOSURELIMITHIGH},
2075         {0xa0, 0x68, ZC3XX_R191_EXPOSURELIMITMID},
2076         {0xa0, 0xa0, ZC3XX_R192_EXPOSURELIMITLOW},
2077         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
2078         {0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID},
2079         {0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW},
2080         {0xa0, 0x18, ZC3XX_R18C_AEFREEZE},
2081         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
2082         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
2083         {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
2084         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
2085         {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
2086         {0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
2087         {0xa0, 0x08, ZC3XX_R020_HSYNC_3},
2088         {}
2089 };
2090 static const struct usb_action hv7131r_50HZScale[] = {
2091         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2092         {0xa0, 0x0c, ZC3XX_R190_EXPOSURELIMITHIGH},
2093         {0xa0, 0xd1, ZC3XX_R191_EXPOSURELIMITMID},
2094         {0xa0, 0x40, ZC3XX_R192_EXPOSURELIMITLOW},
2095         {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH},
2096         {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID},
2097         {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW},
2098         {0xa0, 0x18, ZC3XX_R18C_AEFREEZE},
2099         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
2100         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
2101         {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
2102         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
2103         {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
2104         {0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
2105         {0xa0, 0x08, ZC3XX_R020_HSYNC_3},
2106         {}
2107 };
2108 static const struct usb_action hv7131r_60HZ[] = {
2109         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2110         {0xa0, 0x06, ZC3XX_R190_EXPOSURELIMITHIGH},
2111         {0xa0, 0x1a, ZC3XX_R191_EXPOSURELIMITMID},
2112         {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW},
2113         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
2114         {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID},
2115         {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW},
2116         {0xa0, 0x18, ZC3XX_R18C_AEFREEZE},
2117         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
2118         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
2119         {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
2120         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
2121         {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
2122         {0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
2123         {0xa0, 0x08, ZC3XX_R020_HSYNC_3},
2124         {}
2125 };
2126 static const struct usb_action hv7131r_60HZScale[] = {
2127         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2128         {0xa0, 0x0c, ZC3XX_R190_EXPOSURELIMITHIGH},
2129         {0xa0, 0x35, ZC3XX_R191_EXPOSURELIMITMID},
2130         {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
2131         {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH},
2132         {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID},
2133         {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW},
2134         {0xa0, 0x18, ZC3XX_R18C_AEFREEZE},
2135         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
2136         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
2137         {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP},
2138         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
2139         {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
2140         {0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
2141         {0xa0, 0x08, ZC3XX_R020_HSYNC_3},
2142         {}
2143 };
2144 static const struct usb_action hv7131r_NoFliker[] = {
2145         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2146         {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},
2147         {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID},
2148         {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
2149         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
2150         {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID},
2151         {0xa0, 0x58, ZC3XX_R197_ANTIFLICKERLOW},
2152         {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
2153         {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
2154         {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
2155         {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
2156         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
2157         {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
2158         {0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
2159         {0xa0, 0x08, ZC3XX_R020_HSYNC_3},
2160         {}
2161 };
2162 static const struct usb_action hv7131r_NoFlikerScale[] = {
2163         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2164         {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH},
2165         {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID},
2166         {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW},
2167         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
2168         {0xa0, 0x04, ZC3XX_R196_ANTIFLICKERMID},
2169         {0xa0, 0xb0, ZC3XX_R197_ANTIFLICKERLOW},
2170         {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE},
2171         {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE},
2172         {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF},
2173         {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP},
2174         {0xa0, 0x00, ZC3XX_R01D_HSYNC_0},
2175         {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1},
2176         {0xa0, 0x00, ZC3XX_R01F_HSYNC_2},
2177         {0xa0, 0x08, ZC3XX_R020_HSYNC_3},
2178         {}
2179 };
2180
2181 static const struct usb_action icm105a_InitialScale[] = {
2182         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
2183         {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT},
2184         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
2185         {0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT},
2186         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
2187         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
2188         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
2189         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
2190         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
2191         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
2192         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
2193         {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR},
2194         {0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH},
2195         {0xa0, 0x01, ZC3XX_R098_WINYSTARTLOW},
2196         {0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH},
2197         {0xa0, 0x01, ZC3XX_R09A_WINXSTARTLOW},
2198         {0xa0, 0x01, ZC3XX_R11A_FIRSTYLOW},
2199         {0xa0, 0x01, ZC3XX_R11C_FIRSTXLOW},
2200         {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
2201         {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW},
2202         {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
2203         {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW},
2204         {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION},
2205         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
2206         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
2207         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
2208         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
2209         {0xaa, 0x01, 0x0010},
2210         {0xaa, 0x03, 0x0000},
2211         {0xaa, 0x04, 0x0001},
2212         {0xaa, 0x05, 0x0020},
2213         {0xaa, 0x06, 0x0001},
2214         {0xaa, 0x08, 0x0000},
2215         {0xaa, 0x03, 0x0001},
2216         {0xaa, 0x04, 0x0011},
2217         {0xaa, 0x05, 0x00a0},
2218         {0xaa, 0x06, 0x0001},
2219         {0xaa, 0x08, 0x0000},
2220         {0xaa, 0x03, 0x0002},
2221         {0xaa, 0x04, 0x0013},
2222         {0xaa, 0x05, 0x0020},
2223         {0xaa, 0x06, 0x0001},
2224         {0xaa, 0x08, 0x0000},
2225         {0xaa, 0x03, 0x0003},
2226         {0xaa, 0x04, 0x0015},
2227         {0xaa, 0x05, 0x0020},
2228         {0xaa, 0x06, 0x0005},
2229         {0xaa, 0x08, 0x0000},
2230         {0xaa, 0x03, 0x0004},
2231         {0xaa, 0x04, 0x0017},
2232         {0xaa, 0x05, 0x0020},
2233         {0xaa, 0x06, 0x000d},
2234         {0xaa, 0x08, 0x0000},
2235         {0xaa, 0x03, 0x0005},
2236         {0xaa, 0x04, 0x0019},
2237         {0xaa, 0x05, 0x0020},
2238         {0xaa, 0x06, 0x0005},
2239         {0xaa, 0x08, 0x0000},
2240         {0xaa, 0x03, 0x0006},
2241         {0xaa, 0x04, 0x0017},
2242         {0xaa, 0x05, 0x0026},
2243         {0xaa, 0x06, 0x0005},
2244         {0xaa, 0x08, 0x0000},
2245         {0xaa, 0x03, 0x0007},
2246         {0xaa, 0x04, 0x0019},
2247         {0xaa, 0x05, 0x0022},
2248         {0xaa, 0x06, 0x0005},
2249         {0xaa, 0x08, 0x0000},
2250         {0xaa, 0x03, 0x0008},
2251         {0xaa, 0x04, 0x0021},
2252         {0xaa, 0x05, 0x00aa},
2253         {0xaa, 0x06, 0x0005},
2254         {0xaa, 0x08, 0x0000},
2255         {0xaa, 0x03, 0x0009},
2256         {0xaa, 0x04, 0x0023},
2257         {0xaa, 0x05, 0x00aa},
2258         {0xaa, 0x06, 0x000d},
2259         {0xaa, 0x08, 0x0000},
2260         {0xaa, 0x03, 0x000a},
2261         {0xaa, 0x04, 0x0025},
2262         {0xaa, 0x05, 0x00aa},
2263         {0xaa, 0x06, 0x0005},
2264         {0xaa, 0x08, 0x0000},
2265         {0xaa, 0x03, 0x000b},
2266         {0xaa, 0x04, 0x00ec},
2267         {0xaa, 0x05, 0x002e},
2268         {0xaa, 0x06, 0x0005},
2269         {0xaa, 0x08, 0x0000},
2270         {0xaa, 0x03, 0x000c},
2271         {0xaa, 0x04, 0x00fa},
2272         {0xaa, 0x05, 0x002a},
2273         {0xaa, 0x06, 0x0005},
2274         {0xaa, 0x08, 0x0000},
2275         {0xaa, 0x07, 0x000d},
2276         {0xaa, 0x01, 0x0005},
2277         {0xaa, 0x94, 0x0002},
2278         {0xaa, 0x90, 0x0000},
2279         {0xaa, 0x91, 0x001f},
2280         {0xaa, 0x10, 0x0064},
2281         {0xaa, 0x9b, 0x00f0},
2282         {0xaa, 0x9c, 0x0002},
2283         {0xaa, 0x14, 0x001a},
2284         {0xaa, 0x20, 0x0080},
2285         {0xaa, 0x22, 0x0080},
2286         {0xaa, 0x24, 0x0080},
2287         {0xaa, 0x26, 0x0080},
2288         {0xaa, 0x00, 0x0084},
2289         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
2290         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
2291         {0xaa, 0xa8, 0x00c0},
2292         {0xa1, 0x01, 0x0002},
2293         {0xa1, 0x01, 0x0008},
2294         {0xa1, 0x01, 0x0180},
2295         {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
2296         {0xa0, 0x40, ZC3XX_R116_RGAIN},
2297         {0xa0, 0x40, ZC3XX_R117_GGAIN},
2298         {0xa0, 0x40, ZC3XX_R118_BGAIN},
2299         {0xa1, 0x01, 0x0008},
2300
2301         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* clock ? */
2302         {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},   /* sharpness+ */
2303         {0xa1, 0x01, 0x01c8},
2304         {0xa1, 0x01, 0x01c9},
2305         {0xa1, 0x01, 0x01ca},
2306         {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},   /* sharpness- */
2307         {0xa0, 0x52, ZC3XX_R10A_RGB00}, /* matrix */
2308         {0xa0, 0xf7, ZC3XX_R10B_RGB01},
2309         {0xa0, 0xf7, ZC3XX_R10C_RGB02},
2310         {0xa0, 0xf7, ZC3XX_R10D_RGB10},
2311         {0xa0, 0x52, ZC3XX_R10E_RGB11},
2312         {0xa0, 0xf7, ZC3XX_R10F_RGB12},
2313         {0xa0, 0xf7, ZC3XX_R110_RGB20},
2314         {0xa0, 0xf7, ZC3XX_R111_RGB21},
2315         {0xa0, 0x52, ZC3XX_R112_RGB22},
2316         {0xa1, 0x01, 0x0180},
2317         {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
2318         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2319         {0xaa, 0x0d, 0x0003},
2320         {0xaa, 0x0c, 0x008c},
2321         {0xaa, 0x0e, 0x0095},
2322         {0xaa, 0x0f, 0x0002},
2323         {0xaa, 0x1c, 0x0094},
2324         {0xaa, 0x1d, 0x0002},
2325         {0xaa, 0x20, 0x0080},
2326         {0xaa, 0x22, 0x0080},
2327         {0xaa, 0x24, 0x0080},
2328         {0xaa, 0x26, 0x0080},
2329         {0xaa, 0x00, 0x0084},
2330         {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH},
2331         {0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW},
2332         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
2333         {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
2334         {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW},
2335         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
2336         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
2337         {0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW},
2338         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
2339         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
2340         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
2341         {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP},
2342         {0xa0, 0xe3, ZC3XX_R01D_HSYNC_0},
2343         {0xa0, 0xec, ZC3XX_R01E_HSYNC_1},
2344         {0xa0, 0xf5, ZC3XX_R01F_HSYNC_2},
2345         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
2346         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
2347         {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN},
2348         {0xa0, 0xc0, ZC3XX_R11D_GLOBALGAIN},
2349         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
2350         {0xa1, 0x01, 0x0180},
2351         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
2352         {0xa0, 0x40, ZC3XX_R116_RGAIN},
2353         {0xa0, 0x40, ZC3XX_R117_GGAIN},
2354         {0xa0, 0x40, ZC3XX_R118_BGAIN},
2355         {}
2356 };
2357
2358 static const struct usb_action icm105a_Initial[] = {
2359         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL},
2360         {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT},
2361         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},
2362         {0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT},
2363         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH},
2364         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW},
2365         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH},
2366         {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW},
2367         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING},
2368         {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC},
2369         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC},
2370         {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR},
2371         {0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH},
2372         {0xa0, 0x02, ZC3XX_R098_WINYSTARTLOW},
2373         {0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH},
2374         {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW},
2375         {0xa0, 0x02, ZC3XX_R11A_FIRSTYLOW},
2376         {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW},
2377         {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH},
2378         {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW},
2379         {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH},
2380         {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW},
2381         {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION},
2382         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE},
2383         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS},
2384         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE},
2385         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05},
2386         {0xaa, 0x01, 0x0010},
2387         {0xaa, 0x03, 0x0000},
2388         {0xaa, 0x04, 0x0001},
2389         {0xaa, 0x05, 0x0020},
2390         {0xaa, 0x06, 0x0001},
2391         {0xaa, 0x08, 0x0000},
2392         {0xaa, 0x03, 0x0001},
2393         {0xaa, 0x04, 0x0011},
2394         {0xaa, 0x05, 0x00a0},
2395         {0xaa, 0x06, 0x0001},
2396         {0xaa, 0x08, 0x0000},
2397         {0xaa, 0x03, 0x0002},
2398         {0xaa, 0x04, 0x0013},
2399         {0xaa, 0x05, 0x0020},
2400         {0xaa, 0x06, 0x0001},
2401         {0xaa, 0x08, 0x0000},
2402         {0xaa, 0x03, 0x0003},
2403         {0xaa, 0x04, 0x0015},
2404         {0xaa, 0x05, 0x0020},
2405         {0xaa, 0x06, 0x0005},
2406         {0xaa, 0x08, 0x0000},
2407         {0xaa, 0x03, 0x0004},
2408         {0xaa, 0x04, 0x0017},
2409         {0xaa, 0x05, 0x0020},
2410         {0xaa, 0x06, 0x000d},
2411         {0xaa, 0x08, 0x0000},
2412         {0xaa, 0x03, 0x0005},
2413         {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT},
2414         {0xa0, 0x19, ZC3XX_R093_I2CSETVALUE},
2415         {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND},
2416         {0xa1, 0x01, 0x0091},
2417         {0xaa, 0x05, 0x0020},
2418         {0xaa, 0x06, 0x0005},
2419         {0xaa, 0x08, 0x0000},
2420         {0xaa, 0x03, 0x0006},
2421         {0xaa, 0x04, 0x0017},
2422         {0xaa, 0x05, 0x0026},
2423         {0xaa, 0x06, 0x0005},
2424         {0xaa, 0x08, 0x0000},
2425         {0xaa, 0x03, 0x0007},
2426         {0xaa, 0x04, 0x0019},
2427         {0xaa, 0x05, 0x0022},
2428         {0xaa, 0x06, 0x0005},
2429         {0xaa, 0x08, 0x0000},
2430         {0xaa, 0x03, 0x0008},
2431         {0xaa, 0x04, 0x0021},
2432         {0xaa, 0x05, 0x00aa},
2433         {0xaa, 0x06, 0x0005},
2434         {0xaa, 0x08, 0x0000},
2435         {0xaa, 0x03, 0x0009},
2436         {0xaa, 0x04, 0x0023},
2437         {0xaa, 0x05, 0x00aa},
2438         {0xaa, 0x06, 0x000d},
2439         {0xaa, 0x08, 0x0000},
2440         {0xaa, 0x03, 0x000a},
2441         {0xaa, 0x04, 0x0025},
2442         {0xaa, 0x05, 0x00aa},
2443         {0xaa, 0x06, 0x0005},
2444         {0xaa, 0x08, 0x0000},
2445         {0xaa, 0x03, 0x000b},
2446         {0xaa, 0x04, 0x00ec},
2447         {0xaa, 0x05, 0x002e},
2448         {0xaa, 0x06, 0x0005},
2449         {0xaa, 0x08, 0x0000},
2450         {0xaa, 0x03, 0x000c},
2451         {0xaa, 0x04, 0x00fa},
2452         {0xaa, 0x05, 0x002a},
2453         {0xaa, 0x06, 0x0005},
2454         {0xaa, 0x08, 0x0000},
2455         {0xaa, 0x07, 0x000d},
2456         {0xaa, 0x01, 0x0005},
2457         {0xaa, 0x94, 0x0002},
2458         {0xaa, 0x90, 0x0000},
2459         {0xaa, 0x91, 0x0010},
2460         {0xaa, 0x10, 0x0064},
2461         {0xaa, 0x9b, 0x00f0},
2462         {0xaa, 0x9c, 0x0002},
2463         {0xaa, 0x14, 0x001a},
2464         {0xaa, 0x20, 0x0080},
2465         {0xaa, 0x22, 0x0080},
2466         {0xaa, 0x24, 0x0080},
2467         {0xaa, 0x26, 0x0080},
2468         {0xaa, 0x00, 0x0084},
2469         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE},
2470         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS},
2471         {0xaa, 0xa8, 0x0080},
2472         {0xa0, 0x78, ZC3XX_R18D_YTARGET},
2473         {0xa1, 0x01, 0x0002},
2474         {0xa1, 0x01, 0x0008},
2475         {0xa1, 0x01, 0x0180},
2476         {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE},
2477         {0xa0, 0x40, ZC3XX_R116_RGAIN},
2478         {0xa0, 0x40, ZC3XX_R117_GGAIN},
2479         {0xa0, 0x40, ZC3XX_R118_BGAIN},
2480         {0xa1, 0x01, 0x0008},
2481
2482         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING},  /* clock ? */
2483         {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00},   /* sharpness+ */
2484         {0xa1, 0x01, 0x01c8},
2485         {0xa1, 0x01, 0x01c9},
2486         {0xa1, 0x01, 0x01ca},
2487         {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05},   /* sharpness- */
2488
2489         {0xa0, 0x52, ZC3XX_R10A_RGB00}, /* matrix */
2490         {0xa0, 0xf7, ZC3XX_R10B_RGB01},
2491         {0xa0, 0xf7, ZC3XX_R10C_RGB02},
2492         {0xa0, 0xf7, ZC3XX_R10D_RGB10},
2493         {0xa0, 0x52, ZC3XX_R10E_RGB11},
2494         {0xa0, 0xf7, ZC3XX_R10F_RGB12},
2495         {0xa0, 0xf7, ZC3XX_R110_RGB20},
2496         {0xa0, 0xf7, ZC3XX_R111_RGB21},
2497         {0xa0, 0x52, ZC3XX_R112_RGB22},
2498         {0xa1, 0x01, 0x0180},
2499         {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE},
2500         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS},
2501         {0xaa, 0x0d, 0x0003},
2502         {0xaa, 0x0c, 0x0020},
2503         {0xaa, 0x0e, 0x000e},
2504         {0xaa, 0x0f, 0x0002},
2505         {0xaa, 0x1c, 0x000d},
2506         {0xaa, 0x1d, 0x0002},
2507         {0xaa, 0x20, 0x0080},
2508         {0xaa, 0x22, 0x0080},
2509         {0xaa, 0x24, 0x0080},
2510         {0xaa, 0x26, 0x0080},
2511         {0xaa, 0x00, 0x0084},
2512         {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH},
2513         {0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW},
2514         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH},
2515         {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID},
2516         {0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW},
2517         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH},
2518         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID},
2519         {0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW},
2520         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE},
2521         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE},
2522         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF},
2523         {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP},
2524         {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0},
2525         {0xa0, 0xd8, ZC3XX_R01E_HSYNC_1},
2526         {0xa0, 0xea, ZC3XX_R01F_HSYNC_2},
2527         {0xa0, 0xff, ZC3XX_R020_HSYNC_3},
2528         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN},
2529         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
2530         {0xa1, 0x01, 0x0180},
2531         {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE},
2532         {0xa0, 0x40, ZC3XX_R116_RGAIN},
2533         {0xa0, 0x40, ZC3XX_R117_GGAIN},
2534         {0xa0, 0x40, ZC3XX_R118_BGAIN},
2535         {}
2536 };
2537 static const struct usb_action icm105a_50HZScale[] = {
2538         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2539         {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2540         {0xaa, 0x0c, 0x0020}, /* 00,0c,20,aa */
2541         {0xaa, 0x0e, 0x000e}, /* 00,0e,0e,aa */
2542         {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2543         {0xaa, 0x1c, 0x000d}, /* 00,1c,0d,aa */
2544         {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2545         {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2546         {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2547         {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2548         {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2549         {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2550         {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */
2551         {0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,0d,cc */
2552         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */
2553         {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */
2554         {0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,1a,cc */
2555         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */
2556         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */
2557         {0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,4b,cc */
2558         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
2559         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
2560         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */
2561         {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */
2562         {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c8,cc */
2563         {0xa0, 0xd8, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d8,cc */
2564         {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */
2565         {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */
2566         {}
2567 };
2568 static const struct usb_action icm105a_50HZ[] = {
2569         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2570         {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2571         {0xaa, 0x0c, 0x008c}, /* 00,0c,8c,aa */
2572         {0xaa, 0x0e, 0x0095}, /* 00,0e,95,aa */
2573         {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2574         {0xaa, 0x1c, 0x0094}, /* 00,1c,94,aa */
2575         {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2576         {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2577         {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2578         {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2579         {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2580         {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2581         {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */
2582         {0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,94,cc */
2583         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */
2584         {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */
2585         {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */
2586         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */
2587         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */
2588         {0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,84,cc */
2589         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
2590         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
2591         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */
2592         {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */
2593         {0xa0, 0xe3, ZC3XX_R01D_HSYNC_0}, /* 00,1d,e3,cc */
2594         {0xa0, 0xec, ZC3XX_R01E_HSYNC_1}, /* 00,1e,ec,cc */
2595         {0xa0, 0xf5, ZC3XX_R01F_HSYNC_2}, /* 00,1f,f5,cc */
2596         {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */
2597         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */
2598         {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,cc */
2599         {}
2600 };
2601 static const struct usb_action icm105a_60HZScale[] = {
2602         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2603         {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2604         {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */
2605         {0xaa, 0x0e, 0x000d}, /* 00,0e,0d,aa */
2606         {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2607         {0xaa, 0x1c, 0x0008}, /* 00,1c,08,aa */
2608         {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2609         {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2610         {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2611         {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2612         {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2613         {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2614         {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */
2615         {0xa0, 0x08, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,08,cc */
2616         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */
2617         {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */
2618         {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,10,cc */
2619         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */
2620         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */
2621         {0xa0, 0x41, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,41,cc */
2622         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
2623         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
2624         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */
2625         {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */
2626         {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */
2627         {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */
2628         {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */
2629         {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */
2630         {}
2631 };
2632 static const struct usb_action icm105a_60HZ[] = {
2633         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2634         {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2635         {0xaa, 0x0c, 0x0008}, /* 00,0c,08,aa */
2636         {0xaa, 0x0e, 0x0086}, /* 00,0e,86,aa */
2637         {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2638         {0xaa, 0x1c, 0x0085}, /* 00,1c,85,aa */
2639         {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2640         {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2641         {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2642         {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2643         {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2644         {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2645         {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */
2646         {0xa0, 0x85, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,85,cc */
2647         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */
2648         {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */
2649         {0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,08,cc */
2650         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */
2651         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */
2652         {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,81,cc */
2653         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
2654         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
2655         {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */
2656         {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */
2657         {0xa0, 0xc2, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c2,cc */
2658         {0xa0, 0xd6, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d6,cc */
2659         {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */
2660         {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */
2661         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */
2662         {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,cc */
2663         {}
2664 };
2665 static const struct usb_action icm105a_NoFlikerScale[] = {
2666         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2667         {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2668         {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */
2669         {0xaa, 0x0e, 0x000d}, /* 00,0e,0d,aa */
2670         {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2671         {0xaa, 0x1c, 0x0000}, /* 00,1c,00,aa */
2672         {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2673         {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2674         {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2675         {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2676         {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2677         {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2678         {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */
2679         {0xa0, 0x00, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,00,cc */
2680         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */
2681         {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */
2682         {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */
2683         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */
2684         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */
2685         {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */
2686         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
2687         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
2688         {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */
2689         {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */
2690         {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */
2691         {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */
2692         {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */
2693         {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */
2694         {}
2695 };
2696 static const struct usb_action icm105a_NoFliker[] = {
2697         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2698         {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */
2699         {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */
2700         {0xaa, 0x0e, 0x0081}, /* 00,0e,81,aa */
2701         {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */
2702         {0xaa, 0x1c, 0x0080}, /* 00,1c,80,aa */
2703         {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */
2704         {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */
2705         {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */
2706         {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */
2707         {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */
2708         {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */
2709         {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */
2710         {0xa0, 0x80, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,80,cc */
2711         {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */
2712         {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */
2713         {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */
2714         {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */
2715         {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */
2716         {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */
2717         {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */
2718         {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */
2719         {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */
2720         {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */
2721         {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */
2722         {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */
2723         {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */
2724         {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */
2725         {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */
2726         {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,cc */
2727         {}
2728 };
2729
2730 static const struct usb_action mc501cb_Initial[] = {
2731         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */
2732         {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc */
2733         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */
2734         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */
2735         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */
2736         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */
2737         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */
2738         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */
2739         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */
2740         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */
2741         {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d8,cc */
2742         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */
2743         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */
2744         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */
2745         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */
2746         {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */
2747         {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,de,cc */
2748         {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */
2749         {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */
2750         {0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,33,cc */
2751         {0xa0, 0x34, ZC3XX_R087_EXPTIMEMID}, /* 00,87,34,cc */
2752         {0xa0, 0x35, ZC3XX_R088_EXPTIMELOW}, /* 00,88,35,cc */
2753         {0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,b0,cc */
2754         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */
2755         {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */
2756         {0xaa, 0x01, 0x0003}, /* 00,01,03,aa */
2757         {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */
2758         {0xaa, 0x03, 0x0000}, /* 00,03,00,aa */
2759         {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
2760         {0xaa, 0x11, 0x0080}, /* 00,11,80,aa */
2761         {0xaa, 0x12, 0x0000}, /* 00,12,00,aa */
2762         {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */
2763         {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */
2764         {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */
2765         {0xaa, 0x16, 0x0000}, /* 00,16,00,aa */
2766         {0xaa, 0x17, 0x0001}, /* 00,17,01,aa */
2767         {0xaa, 0x18, 0x00de}, /* 00,18,de,aa */
2768         {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */
2769         {0xaa, 0x1a, 0x0086}, /* 00,1a,86,aa */
2770         {0xaa, 0x20, 0x00a8}, /* 00,20,a8,aa */
2771         {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */
2772         {0xaa, 0x23, 0x0000}, /* 00,23,00,aa */
2773         {0xaa, 0x24, 0x0000}, /* 00,24,00,aa */
2774         {0xaa, 0x40, 0x0033}, /* 00,40,33,aa */
2775         {0xaa, 0x41, 0x0077}, /* 00,41,77,aa */
2776         {0xaa, 0x42, 0x0053}, /* 00,42,53,aa */
2777         {0xaa, 0x43, 0x00b0}, /* 00,43,b0,aa */
2778         {0xaa, 0x4b, 0x0001}, /* 00,4b,01,aa */
2779         {0xaa, 0x72, 0x0020}, /* 00,72,20,aa */
2780         {0xaa, 0x73, 0x0000}, /* 00,73,00,aa */
2781         {0xaa, 0x80, 0x0000}, /* 00,80,00,aa */
2782         {0xaa, 0x85, 0x0050}, /* 00,85,50,aa */
2783         {0xaa, 0x91, 0x0070}, /* 00,91,70,aa */
2784         {0xaa, 0x92, 0x0072}, /* 00,92,72,aa */
2785         {0xaa, 0x03, 0x0001}, /* 00,03,01,aa */
2786         {0xaa, 0x10, 0x00a0}, /* 00,10,a0,aa */
2787         {0xaa, 0x11, 0x0001}, /* 00,11,01,aa */
2788         {0xaa, 0x30, 0x0000}, /* 00,30,00,aa */
2789         {0xaa, 0x60, 0x0000}, /* 00,60,00,aa */
2790         {0xaa, 0xa0, 0x001a}, /* 00,a0,1a,aa */
2791         {0xaa, 0xa1, 0x0000}, /* 00,a1,00,aa */
2792         {0xaa, 0xa2, 0x003f}, /* 00,a2,3f,aa */
2793         {0xaa, 0xa3, 0x0028}, /* 00,a3,28,aa */
2794         {0xaa, 0xa4, 0x0010}, /* 00,a4,10,aa */
2795         {0xaa, 0xa5, 0x0020}, /* 00,a5,20,aa */
2796         {0xaa, 0xb1, 0x0044}, /* 00,b1,44,aa */
2797         {0xaa, 0xd0, 0x0001}, /* 00,d0,01,aa */
2798         {0xaa, 0xd1, 0x0085}, /* 00,d1,85,aa */
2799         {0xaa, 0xd2, 0x0080}, /* 00,d2,80,aa */
2800         {0xaa, 0xd3, 0x0080}, /* 00,d3,80,aa */
2801         {0xaa, 0xd4, 0x0080}, /* 00,d4,80,aa */
2802         {0xaa, 0xd5, 0x0080}, /* 00,d5,80,aa */
2803         {0xaa, 0xc0, 0x00c3}, /* 00,c0,c3,aa */
2804         {0xaa, 0xc2, 0x0044}, /* 00,c2,44,aa */
2805         {0xaa, 0xc4, 0x0040}, /* 00,c4,40,aa */
2806         {0xaa, 0xc5, 0x0020}, /* 00,c5,20,aa */
2807         {0xaa, 0xc6, 0x0008}, /* 00,c6,08,aa */
2808         {0xaa, 0x03, 0x0004}, /* 00,03,04,aa */
2809         {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
2810         {0xaa, 0x40, 0x0030}, /* 00,40,30,aa */
2811         {0xaa, 0x41, 0x0020}, /* 00,41,20,aa */
2812         {0xaa, 0x42, 0x002d}, /* 00,42,2d,aa */
2813         {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2814         {0xaa, 0x1c, 0x0050}, /* 00,1C,50,aa */
2815         {0xaa, 0x11, 0x0081}, /* 00,11,81,aa */
2816         {0xaa, 0x3b, 0x001d}, /* 00,3b,1D,aa */
2817         {0xaa, 0x3c, 0x004c}, /* 00,3c,4C,aa */
2818         {0xaa, 0x3d, 0x0018}, /* 00,3d,18,aa */
2819         {0xaa, 0x3e, 0x006a}, /* 00,3e,6A,aa */
2820         {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */
2821         {0xaa, 0x52, 0x00ff}, /* 00,52,FF,aa */
2822         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2823         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */
2824         {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */
2825         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */
2826         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */
2827         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */
2828         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */
2829         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */
2830         {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */
2831         {0xaa, 0x03, 0x0002}, /* 00,03,02,aa */
2832         {0xaa, 0x51, 0x0027}, /* 00,51,27,aa */
2833         {0xaa, 0x52, 0x0020}, /* 00,52,20,aa */
2834         {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2835         {0xaa, 0x50, 0x0010}, /* 00,50,10,aa */
2836         {0xaa, 0x51, 0x0010}, /* 00,51,10,aa */
2837         {0xaa, 0x54, 0x0010}, /* 00,54,10,aa */
2838         {0xaa, 0x55, 0x0010}, /* 00,55,10,aa */
2839         {0xa0, 0xf0, 0x0199}, /* 01,99,F0,cc */
2840         {0xa0, 0x80, 0x019a}, /* 01,9A,80,cc */
2841
2842         {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2843         {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
2844         {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */
2845         {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */
2846         {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */
2847         {}
2848 };
2849
2850 static const struct usb_action mc501cb_InitialScale[] = {       /* 320x240 */
2851         {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */
2852         {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */
2853         {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */
2854         {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */
2855         {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */
2856         {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */
2857         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */
2858         {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */
2859         {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */
2860         {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */
2861         {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */
2862         {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */
2863         {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */
2864         {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */
2865         {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */
2866         {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */
2867         {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d8,cc */
2868         {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */
2869         {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */
2870         {0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,33,cc */
2871         {0xa0, 0x34, ZC3XX_R087_EXPTIMEMID}, /* 00,87,34,cc */
2872         {0xa0, 0x35, ZC3XX_R088_EXPTIMELOW}, /* 00,88,35,cc */
2873         {0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,b0,cc */
2874         {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */
2875         {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */
2876         {0xaa, 0x01, 0x0003}, /* 00,01,03,aa */
2877         {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */
2878         {0xaa, 0x03, 0x0000}, /* 00,03,00,aa */
2879         {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
2880         {0xaa, 0x11, 0x0080}, /* 00,11,80,aa */
2881         {0xaa, 0x12, 0x0000}, /* 00,12,00,aa */
2882         {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */
2883         {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */
2884         {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */
2885         {0xaa, 0x16, 0x0000}, /* 00,16,00,aa */
2886         {0xaa, 0x17, 0x0001}, /* 00,17,01,aa */
2887         {0xaa, 0x18, 0x00d8}, /* 00,18,d8,aa */
2888         {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */
2889         {0xaa, 0x1a, 0x0088}, /* 00,1a,88,aa */
2890         {0xaa, 0x20, 0x00a8}, /* 00,20,a8,aa */
2891         {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */
2892         {0xaa, 0x23, 0x0000}, /* 00,23,00,aa */
2893         {0xaa, 0x24, 0x0000}, /* 00,24,00,aa */
2894         {0xaa, 0x40, 0x0033}, /* 00,40,33,aa */
2895         {0xaa, 0x41, 0x0077}, /* 00,41,77,aa */
2896         {0xaa, 0x42, 0x0053}, /* 00,42,53,aa */
2897         {0xaa, 0x43, 0x00b0}, /* 00,43,b0,aa */
2898         {0xaa, 0x4b, 0x0001}, /* 00,4b,01,aa */
2899         {0xaa, 0x72, 0x0020}, /* 00,72,20,aa */
2900         {0xaa, 0x73, 0x0000}, /* 00,73,00,aa */
2901         {0xaa, 0x80, 0x0000}, /* 00,80,00,aa */
2902         {0xaa, 0x85, 0x0050}, /* 00,85,50,aa */
2903         {0xaa, 0x91, 0x0070}, /* 00,91,70,aa */
2904         {0xaa, 0x92, 0x0072}, /* 00,92,72,aa */
2905         {0xaa, 0x03, 0x0001}, /* 00,03,01,aa */
2906         {0xaa, 0x10, 0x00a0}, /* 00,10,a0,aa */
2907         {0xaa, 0x11, 0x0001}, /* 00,11,01,aa */
2908         {0xaa, 0x30, 0x0000}, /* 00,30,00,aa */
2909         {0xaa, 0x60, 0x0000}, /* 00,60,00,aa */
2910         {0xaa, 0xa0, 0x001a}, /* 00,a0,1a,aa */
2911         {0xaa, 0xa1, 0x0000}, /* 00,a1,00,aa */
2912         {0xaa, 0xa2, 0x003f}, /* 00,a2,3f,aa */
2913         {0xaa, 0xa3, 0x0028}, /* 00,a3,28,aa */
2914         {0xaa, 0xa4, 0x0010}, /* 00,a4,10,aa */
2915         {0xaa, 0xa5, 0x0020}, /* 00,a5,20,aa */
2916         {0xaa, 0xb1, 0x0044}, /* 00,b1,44,aa */
2917         {0xaa, 0xd0, 0x0001}, /* 00,d0,01,aa */
2918         {0xaa, 0xd1, 0x0085}, /* 00,d1,85,aa */
2919         {0xaa, 0xd2, 0x0080}, /* 00,d2,80,aa */
2920         {0xaa, 0xd3, 0x0080}, /* 00,d3,80,aa */
2921         {0xaa, 0xd4, 0x0080}, /* 00,d4,80,aa */
2922         {0xaa, 0xd5, 0x0080}, /* 00,d5,80,aa */
2923         {0xaa, 0xc0, 0x00c3}, /* 00,c0,c3,aa */
2924         {0xaa, 0xc2, 0x0044}, /* 00,c2,44,aa */
2925         {0xaa, 0xc4, 0x0040}, /* 00,c4,40,aa */
2926         {0xaa, 0xc5, 0x0020}, /* 00,c5,20,aa */
2927         {0xaa, 0xc6, 0x0008}, /* 00,c6,08,aa */
2928         {0xaa, 0x03, 0x0004}, /* 00,03,04,aa */
2929         {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */
2930         {0xaa, 0x40, 0x0030}, /* 00,40,30,aa */
2931         {0xaa, 0x41, 0x0020}, /* 00,41,20,aa */
2932         {0xaa, 0x42, 0x002d}, /* 00,42,2d,aa */
2933         {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2934         {0xaa, 0x1c, 0x0050}, /* 00,1c,50,aa */
2935         {0xaa, 0x11, 0x0081}, /* 00,11,81,aa */
2936         {0xaa, 0x3b, 0x003a}, /* 00,3b,3A,aa */
2937         {0xaa, 0x3c, 0x0098}, /* 00,3c,98,aa */
2938         {0xaa, 0x3d, 0x0030}, /* 00,3d,30,aa */
2939         {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */
2940         {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */
2941         {0xaa, 0x52, 0x00ff}, /* 00,52,FF,aa */
2942         {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */
2943         {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */
2944         {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */
2945         {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */
2946         {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */
2947         {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */
2948         {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */
2949         {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */
2950         {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */
2951         {0xaa, 0x03, 0x0002}, /* 00,03,02,aa */
2952         {0xaa, 0x51, 0x004e}, /* 00,51,4E,aa */
2953         {0xaa, 0x52, 0x0041}, /* 00,52,41,aa */
2954         {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2955         {0xaa, 0x50, 0x0010}, /* 00,50,10,aa */
2956         {0xaa, 0x51, 0x0010}, /* 00,51,10,aa */
2957         {0xaa, 0x54, 0x0010}, /* 00,54,10,aa */
2958         {0xaa, 0x55, 0x0010}, /* 00,55,10,aa */
2959         {0xa0, 0xf0, 0x0199}, /* 01,99,F0,cc */
2960         {0xa0, 0x80, 0x019a}, /* 01,9A,80,cc */
2961         {}
2962 };
2963
2964 static const struct usb_action mc501cb_50HZ[] = {
2965         {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2966         {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
2967         {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */
2968         {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */
2969         {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */
2970         {0xaa, 0x3c, 0x004c}, /* 00,3C,4C,aa */
2971         {0xaa, 0x3d, 0x001d}, /* 00,3D,1D,aa */
2972         {0xaa, 0x3e, 0x004c}, /* 00,3E,4C,aa */
2973         {}
2974 };
2975
2976 static const struct usb_action mc501cb_50HZScale[] = {
2977         {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2978         {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
2979         {0xaa, 0x36, 0x003a}, /* 00,36,3A,aa */
2980         {0xaa, 0x37, 0x0098}, /* 00,37,98,aa */
2981         {0xaa, 0x3b, 0x003a}, /* 00,3B,3A,aa */
2982         {0xaa, 0x3c, 0x0098}, /* 00,3C,98,aa */
2983         {0xaa, 0x3d, 0x003a}, /* 00,3D,3A,aa */
2984         {0xaa, 0x3e, 0x0098}, /* 00,3E,98,aa */
2985         {}
2986 };
2987
2988 static const struct usb_action mc501cb_60HZ[] = {
2989         {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
2990         {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
2991         {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */
2992         {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */
2993         {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */
2994         {0xaa, 0x3e, 0x006a}, /* 00,3E,6A,aa */
2995         {0xaa, 0x3b, 0x0018}, /* 00,3B,18,aa */
2996         {0xaa, 0x3c, 0x006a}, /* 00,3C,6A,aa */
2997         {}
2998 };
2999
3000 static const struct usb_action mc501cb_60HZScale[] = {
3001         {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3002         {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3003         {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */
3004         {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */
3005         {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */
3006         {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */
3007         {0xaa, 0x3b, 0x0030}, /* 00,3B,30,aa */
3008         {0xaa, 0x3c, 0x00d4}, /* 00,3C,D4,aa */
3009         {}
3010 };
3011
3012 static const struct usb_action mc501cb_NoFliker[] = {
3013         {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */
3014         {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */
3015         {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */
3016         {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */
3017         {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */
3018         {0xaa, 0x3e, 0x006a}, /* 00,3E,6A,aa */