Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1 | /* |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 2 | * Z-Star/Vimicro zc301/zc302p/vc30x library |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3 | * |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 4 | * Copyright (C) 2009-2010 Jean-Francois Moine <http://moinejf.free.fr> |
| 5 | * Copyright (C) 2004 2005 2006 Michel Xhaard mxhaard@magic.fr |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | */ |
| 21 | |
| 22 | #define MODULE_NAME "zc3xx" |
| 23 | |
Hans de Goede | 1a35102 | 2010-01-29 11:05:25 -0300 | [diff] [blame] | 24 | #include <linux/input.h> |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 25 | #include "gspca.h" |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 26 | #include "jpeg.h" |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 27 | |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 28 | MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, " |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 29 | "Serge A. Suchkov <Serge.A.S@tochka.ru>"); |
| 30 | MODULE_DESCRIPTION("GSPCA ZC03xx/VC3xx USB Camera Driver"); |
| 31 | MODULE_LICENSE("GPL"); |
| 32 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 33 | static int force_sensor = -1; |
| 34 | |
Jean-Francois Moine | 36e819d | 2009-01-07 16:49:57 -0300 | [diff] [blame] | 35 | #define QUANT_VAL 1 /* quantization table */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 36 | #include "zc3xx-reg.h" |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 37 | |
| 38 | /* specific webcam descriptor */ |
| 39 | struct sd { |
| 40 | struct gspca_dev gspca_dev; /* !! must be the first item */ |
| 41 | |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 42 | u8 brightness; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 43 | u8 contrast; |
| 44 | u8 gamma; |
| 45 | u8 autogain; |
| 46 | u8 lightfreq; |
| 47 | u8 sharpness; |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 48 | u8 quality; /* image quality */ |
Jean-François Moine | db6cf42 | 2010-06-04 05:48:52 -0300 | [diff] [blame] | 49 | #define QUALITY_MIN 50 |
| 50 | #define QUALITY_MAX 80 |
| 51 | #define QUALITY_DEF 70 |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 52 | |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 53 | u8 bridge; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 54 | u8 sensor; /* Type of image sensor chip */ |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 55 | u16 chip_revision; |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 56 | |
Jean-François Moine | 9a731a3 | 2010-06-04 05:26:42 -0300 | [diff] [blame] | 57 | u8 jpeg_hdr[JPEG_HDR_SZ]; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 58 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 59 | enum bridges { |
| 60 | BRIDGE_ZC301, |
| 61 | BRIDGE_ZC303, |
| 62 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 63 | enum sensors { |
| 64 | SENSOR_ADCM2700, |
| 65 | SENSOR_CS2102, |
| 66 | SENSOR_CS2102K, |
| 67 | SENSOR_GC0305, |
| 68 | SENSOR_HDCS2020b, |
| 69 | SENSOR_HV7131B, |
| 70 | SENSOR_HV7131R, |
| 71 | SENSOR_ICM105A, |
| 72 | SENSOR_MC501CB, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 73 | SENSOR_MT9V111_1, /* (mi360soc) zc301 */ |
| 74 | SENSOR_MT9V111_3, /* (mi360soc) zc303 */ |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 75 | SENSOR_OV7620, /* OV7648 - same values */ |
| 76 | SENSOR_OV7630C, |
| 77 | SENSOR_PAS106, |
| 78 | SENSOR_PAS202B, |
| 79 | SENSOR_PB0330, |
| 80 | SENSOR_PO2030, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 81 | SENSOR_TAS5130C, |
| 82 | SENSOR_TAS5130C_VF0250, |
| 83 | SENSOR_MAX |
| 84 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 85 | |
| 86 | /* V4L2 controls supported by the driver */ |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 87 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val); |
| 88 | static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 89 | static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val); |
| 90 | static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val); |
| 91 | static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val); |
| 92 | static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 93 | static int sd_setgamma(struct gspca_dev *gspca_dev, __s32 val); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 94 | static int sd_getgamma(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 95 | static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val); |
| 96 | static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val); |
| 97 | static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val); |
| 98 | static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 99 | |
Marton Nemeth | 7e64dc4 | 2009-12-30 09:12:41 -0300 | [diff] [blame] | 100 | static const struct ctrl sd_ctrls[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 101 | { |
| 102 | { |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 103 | .id = V4L2_CID_BRIGHTNESS, |
| 104 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 105 | .name = "Brightness", |
| 106 | .minimum = 0, |
| 107 | .maximum = 255, |
| 108 | .step = 1, |
| 109 | #define BRIGHTNESS_DEF 128 |
| 110 | .default_value = BRIGHTNESS_DEF, |
| 111 | }, |
| 112 | .set = sd_setbrightness, |
| 113 | .get = sd_getbrightness, |
| 114 | }, |
| 115 | { |
| 116 | { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 117 | .id = V4L2_CID_CONTRAST, |
| 118 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 119 | .name = "Contrast", |
| 120 | .minimum = 0, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 121 | .maximum = 255, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 122 | .step = 1, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 123 | #define CONTRAST_DEF 128 |
| 124 | .default_value = CONTRAST_DEF, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 125 | }, |
| 126 | .set = sd_setcontrast, |
| 127 | .get = sd_getcontrast, |
| 128 | }, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 129 | { |
| 130 | { |
| 131 | .id = V4L2_CID_GAMMA, |
| 132 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 133 | .name = "Gamma", |
| 134 | .minimum = 1, |
| 135 | .maximum = 6, |
| 136 | .step = 1, |
| 137 | .default_value = 4, |
| 138 | }, |
| 139 | .set = sd_setgamma, |
| 140 | .get = sd_getgamma, |
| 141 | }, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 142 | { |
| 143 | { |
| 144 | .id = V4L2_CID_AUTOGAIN, |
| 145 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
| 146 | .name = "Auto Gain", |
| 147 | .minimum = 0, |
| 148 | .maximum = 1, |
| 149 | .step = 1, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 150 | #define AUTOGAIN_DEF 1 |
| 151 | .default_value = AUTOGAIN_DEF, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 152 | }, |
| 153 | .set = sd_setautogain, |
| 154 | .get = sd_getautogain, |
| 155 | }, |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 156 | #define LIGHTFREQ_IDX 4 |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 157 | { |
| 158 | { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 159 | .id = V4L2_CID_POWER_LINE_FREQUENCY, |
| 160 | .type = V4L2_CTRL_TYPE_MENU, |
| 161 | .name = "Light frequency filter", |
| 162 | .minimum = 0, |
| 163 | .maximum = 2, /* 0: 0, 1: 50Hz, 2:60Hz */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 164 | .step = 1, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 165 | #define FREQ_DEF 0 |
| 166 | .default_value = FREQ_DEF, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 167 | }, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 168 | .set = sd_setfreq, |
| 169 | .get = sd_getfreq, |
| 170 | }, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 171 | { |
| 172 | { |
| 173 | .id = V4L2_CID_SHARPNESS, |
| 174 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 175 | .name = "Sharpness", |
| 176 | .minimum = 0, |
| 177 | .maximum = 3, |
| 178 | .step = 1, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 179 | #define SHARPNESS_DEF 2 |
| 180 | .default_value = SHARPNESS_DEF, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 181 | }, |
| 182 | .set = sd_setsharpness, |
| 183 | .get = sd_getsharpness, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 184 | }, |
| 185 | }; |
| 186 | |
Jean-Francois Moine | cc611b8 | 2008-12-29 07:49:41 -0300 | [diff] [blame] | 187 | static const struct v4l2_pix_format vga_mode[] = { |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 188 | {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 189 | .bytesperline = 320, |
| 190 | .sizeimage = 320 * 240 * 3 / 8 + 590, |
| 191 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 192 | .priv = 1}, |
| 193 | {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 194 | .bytesperline = 640, |
| 195 | .sizeimage = 640 * 480 * 3 / 8 + 590, |
| 196 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 197 | .priv = 0}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 198 | }; |
| 199 | |
Hans de Goede | 9919fe8 | 2010-01-13 07:12:28 -0300 | [diff] [blame] | 200 | static const struct v4l2_pix_format broken_vga_mode[] = { |
| 201 | {320, 232, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 202 | .bytesperline = 320, |
| 203 | .sizeimage = 320 * 232 * 4 / 8 + 590, |
| 204 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 205 | .priv = 1}, |
| 206 | {640, 472, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 207 | .bytesperline = 640, |
| 208 | .sizeimage = 640 * 472 * 3 / 8 + 590, |
| 209 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 210 | .priv = 0}, |
| 211 | }; |
| 212 | |
Jean-Francois Moine | cc611b8 | 2008-12-29 07:49:41 -0300 | [diff] [blame] | 213 | static const struct v4l2_pix_format sif_mode[] = { |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 214 | {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 215 | .bytesperline = 176, |
| 216 | .sizeimage = 176 * 144 * 3 / 8 + 590, |
| 217 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 218 | .priv = 1}, |
| 219 | {352, 288, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 220 | .bytesperline = 352, |
| 221 | .sizeimage = 352 * 288 * 3 / 8 + 590, |
| 222 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 223 | .priv = 0}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 224 | }; |
| 225 | |
| 226 | /* usb exchanges */ |
| 227 | struct usb_action { |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 228 | u8 req; |
| 229 | u8 val; |
| 230 | u16 idx; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 231 | }; |
| 232 | |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 233 | static const struct usb_action adcm2700_Initial[] = { |
| 234 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 235 | {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT}, /* 00,02,04,cc */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 236 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 237 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 238 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 239 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 240 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 241 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 242 | {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d8,cc */ |
| 243 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 244 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 245 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 246 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 247 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 248 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 249 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 250 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 251 | {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,de,cc */ |
| 252 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 253 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 254 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 255 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 256 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 257 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 258 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 259 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 260 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 261 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 262 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 263 | {0xa0, 0x58, ZC3XX_R116_RGAIN}, /* 01,16,58,cc */ |
| 264 | {0xa0, 0x5a, ZC3XX_R118_BGAIN}, /* 01,18,5a,cc */ |
| 265 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 266 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 267 | {0xbb, 0x00, 0x0408}, /* 04,00,08,bb */ |
| 268 | {0xdd, 0x00, 0x0200}, /* 00,02,00,dd */ |
| 269 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 270 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 271 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
| 272 | {0xbb, 0xe0, 0x0c2e}, /* 0c,e0,2e,bb */ |
| 273 | {0xbb, 0x01, 0x2000}, /* 20,01,00,bb */ |
| 274 | {0xbb, 0x96, 0x2400}, /* 24,96,00,bb */ |
| 275 | {0xbb, 0x06, 0x1006}, /* 10,06,06,bb */ |
| 276 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 277 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 278 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 279 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 280 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 281 | {0xbb, 0x5f, 0x2090}, /* 20,5f,90,bb */ |
| 282 | {0xbb, 0x01, 0x8000}, /* 80,01,00,bb */ |
| 283 | {0xbb, 0x09, 0x8400}, /* 84,09,00,bb */ |
| 284 | {0xbb, 0x86, 0x0002}, /* 00,86,02,bb */ |
| 285 | {0xbb, 0xe6, 0x0401}, /* 04,e6,01,bb */ |
| 286 | {0xbb, 0x86, 0x0802}, /* 08,86,02,bb */ |
| 287 | {0xbb, 0xe6, 0x0c01}, /* 0c,e6,01,bb */ |
| 288 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 289 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 290 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 291 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 292 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 293 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 294 | {0xaa, 0xfe, 0x0020}, /* 00,fe,20,aa */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 295 | /*mswin+*/ |
| 296 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, |
| 297 | {0xaa, 0xfe, 0x0002}, |
| 298 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 299 | {0xaa, 0xb4, 0xcd37}, |
| 300 | {0xaa, 0xa4, 0x0004}, |
| 301 | {0xaa, 0xa8, 0x0007}, |
| 302 | {0xaa, 0xac, 0x0004}, |
| 303 | /*mswin-*/ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 304 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 305 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 306 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 307 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 308 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 309 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 310 | {0xbb, 0x04, 0x0400}, /* 04,04,00,bb */ |
| 311 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 312 | {0xbb, 0x01, 0x0400}, /* 04,01,00,bb */ |
| 313 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 314 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 315 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 316 | {0xbb, 0x41, 0x2803}, /* 28,41,03,bb */ |
| 317 | {0xbb, 0x40, 0x2c03}, /* 2c,40,03,bb */ |
| 318 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 319 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 320 | {} |
| 321 | }; |
| 322 | static const struct usb_action adcm2700_InitialScale[] = { |
| 323 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 324 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 325 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 326 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 327 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 328 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 329 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 330 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 331 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ |
| 332 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 333 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 334 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 335 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 336 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 337 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 338 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 339 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 340 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d8,cc */ |
| 341 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 342 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 343 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 344 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 345 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 346 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 347 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 348 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 349 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 350 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 351 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 352 | {0xa0, 0x58, ZC3XX_R116_RGAIN}, /* 01,16,58,cc */ |
| 353 | {0xa0, 0x5a, ZC3XX_R118_BGAIN}, /* 01,18,5a,cc */ |
| 354 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 355 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 356 | {0xbb, 0x00, 0x0408}, /* 04,00,08,bb */ |
| 357 | {0xdd, 0x00, 0x0200}, /* 00,02,00,dd */ |
| 358 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 359 | {0xdd, 0x00, 0x0050}, /* 00,00,50,dd */ |
| 360 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
| 361 | {0xbb, 0xe0, 0x0c2e}, /* 0c,e0,2e,bb */ |
| 362 | {0xbb, 0x01, 0x2000}, /* 20,01,00,bb */ |
| 363 | {0xbb, 0x96, 0x2400}, /* 24,96,00,bb */ |
| 364 | {0xbb, 0x06, 0x1006}, /* 10,06,06,bb */ |
| 365 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 366 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 367 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 368 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 369 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 370 | {0xbb, 0x5f, 0x2090}, /* 20,5f,90,bb */ |
| 371 | {0xbb, 0x01, 0x8000}, /* 80,01,00,bb */ |
| 372 | {0xbb, 0x09, 0x8400}, /* 84,09,00,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 373 | {0xbb, 0x86, 0x0002}, /* 00,88,02,bb */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 374 | {0xbb, 0xe6, 0x0401}, /* 04,e6,01,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 375 | {0xbb, 0x86, 0x0802}, /* 08,88,02,bb */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 376 | {0xbb, 0xe6, 0x0c01}, /* 0c,e6,01,bb */ |
| 377 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 378 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 379 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 380 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 381 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 382 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 383 | {0xaa, 0xfe, 0x0020}, /* 00,fe,20,aa */ |
| 384 | /*******/ |
| 385 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 386 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 387 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 388 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 389 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 390 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 391 | {0xbb, 0x04, 0x0400}, /* 04,04,00,bb */ |
| 392 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 393 | {0xbb, 0x01, 0x0400}, /* 04,01,00,bb */ |
| 394 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 395 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 396 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 397 | {0xbb, 0x41, 0x2803}, /* 28,41,03,bb */ |
| 398 | {0xbb, 0x40, 0x2c03}, /* 2c,40,03,bb */ |
| 399 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 400 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 401 | {} |
| 402 | }; |
| 403 | static const struct usb_action adcm2700_50HZ[] = { |
| 404 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 405 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 406 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 407 | {0xbb, 0x05, 0x8400}, /* 84,05,00,bb */ |
| 408 | {0xbb, 0xd0, 0xb007}, /* b0,d0,07,bb */ |
| 409 | {0xbb, 0xa0, 0xb80f}, /* b8,a0,0f,bb */ |
| 410 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 411 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 412 | {0xaa, 0x26, 0x00d0}, /* 00,26,d0,aa */ |
| 413 | {0xaa, 0x28, 0x0002}, /* 00,28,02,aa */ |
| 414 | {} |
| 415 | }; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 416 | static const struct usb_action adcm2700_60HZ[] = { |
| 417 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 418 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 419 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 420 | {0xbb, 0x07, 0x8400}, /* 84,07,00,bb */ |
| 421 | {0xbb, 0x82, 0xb006}, /* b0,82,06,bb */ |
| 422 | {0xbb, 0x04, 0xb80d}, /* b8,04,0d,bb */ |
| 423 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 424 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 425 | {0xaa, 0x26, 0x0057}, /* 00,26,57,aa */ |
| 426 | {0xaa, 0x28, 0x0002}, /* 00,28,02,aa */ |
| 427 | {} |
| 428 | }; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 429 | static const struct usb_action adcm2700_NoFliker[] = { |
| 430 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 431 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 432 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 433 | {0xbb, 0x07, 0x8400}, /* 84,07,00,bb */ |
| 434 | {0xbb, 0x05, 0xb000}, /* b0,05,00,bb */ |
| 435 | {0xbb, 0xa0, 0xb801}, /* b8,a0,01,bb */ |
| 436 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 437 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 438 | {} |
| 439 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 440 | static const struct usb_action cs2102_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 441 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 442 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 443 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 444 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 445 | {0xa0, 0x20, ZC3XX_R080_HBLANKHIGH}, |
| 446 | {0xa0, 0x21, ZC3XX_R081_HBLANKLOW}, |
| 447 | {0xa0, 0x30, ZC3XX_R083_RGAINADDR}, |
| 448 | {0xa0, 0x31, ZC3XX_R084_GGAINADDR}, |
| 449 | {0xa0, 0x32, ZC3XX_R085_BGAINADDR}, |
| 450 | {0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH}, |
| 451 | {0xa0, 0x24, ZC3XX_R087_EXPTIMEMID}, |
| 452 | {0xa0, 0x25, ZC3XX_R088_EXPTIMELOW}, |
| 453 | {0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR}, |
| 454 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 455 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 456 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 457 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 458 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 459 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 460 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 461 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 462 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 463 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 464 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 465 | {0xaa, 0x02, 0x0008}, |
| 466 | {0xaa, 0x03, 0x0000}, |
| 467 | {0xaa, 0x11, 0x0000}, |
| 468 | {0xaa, 0x12, 0x0089}, |
| 469 | {0xaa, 0x13, 0x0000}, |
| 470 | {0xaa, 0x14, 0x00e9}, |
| 471 | {0xaa, 0x20, 0x0000}, |
| 472 | {0xaa, 0x22, 0x0000}, |
| 473 | {0xaa, 0x0b, 0x0004}, |
| 474 | {0xaa, 0x30, 0x0030}, |
| 475 | {0xaa, 0x31, 0x0030}, |
| 476 | {0xaa, 0x32, 0x0030}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 477 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 478 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 479 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 480 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 481 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 482 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 483 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 484 | {0xa0, 0x10, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 485 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 486 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 487 | {0xa0, 0x68, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 488 | {0xa0, 0x00, 0x01ad}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 489 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 490 | }; |
| 491 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 492 | static const struct usb_action cs2102_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 493 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 494 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 495 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 496 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 497 | {0xa0, 0x20, ZC3XX_R080_HBLANKHIGH}, |
| 498 | {0xa0, 0x21, ZC3XX_R081_HBLANKLOW}, |
| 499 | {0xa0, 0x30, ZC3XX_R083_RGAINADDR}, |
| 500 | {0xa0, 0x31, ZC3XX_R084_GGAINADDR}, |
| 501 | {0xa0, 0x32, ZC3XX_R085_BGAINADDR}, |
| 502 | {0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH}, |
| 503 | {0xa0, 0x24, ZC3XX_R087_EXPTIMEMID}, |
| 504 | {0xa0, 0x25, ZC3XX_R088_EXPTIMELOW}, |
| 505 | {0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR}, |
| 506 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 507 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 508 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 509 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 510 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 511 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 512 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 513 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 514 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 515 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 516 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 517 | {0xaa, 0x02, 0x0008}, |
| 518 | {0xaa, 0x03, 0x0000}, |
| 519 | {0xaa, 0x11, 0x0001}, |
| 520 | {0xaa, 0x12, 0x0087}, |
| 521 | {0xaa, 0x13, 0x0001}, |
| 522 | {0xaa, 0x14, 0x00e7}, |
| 523 | {0xaa, 0x20, 0x0000}, |
| 524 | {0xaa, 0x22, 0x0000}, |
| 525 | {0xaa, 0x0b, 0x0004}, |
| 526 | {0xaa, 0x30, 0x0030}, |
| 527 | {0xaa, 0x31, 0x0030}, |
| 528 | {0xaa, 0x32, 0x0030}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 529 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 530 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 531 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 532 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 533 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 534 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 535 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 536 | {0xa0, 0x15, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 537 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 538 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 539 | {0xa0, 0x68, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 540 | {0xa0, 0x00, 0x01ad}, |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 541 | {} |
| 542 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 543 | static const struct usb_action cs2102_50HZScale[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 544 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 545 | {0xaa, 0x23, 0x0001}, |
| 546 | {0xaa, 0x24, 0x005f}, |
| 547 | {0xaa, 0x25, 0x0090}, |
| 548 | {0xaa, 0x21, 0x00dd}, |
| 549 | {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 550 | {0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID}, |
| 551 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 552 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 553 | {0xa0, 0x3a, ZC3XX_R196_ANTIFLICKERMID}, |
| 554 | {0xa0, 0x98, ZC3XX_R197_ANTIFLICKERLOW}, |
| 555 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 556 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 557 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 558 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 559 | {0xa0, 0xdd, ZC3XX_R01D_HSYNC_0}, |
| 560 | {0xa0, 0xe4, ZC3XX_R01E_HSYNC_1}, |
| 561 | {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2}, |
| 562 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 563 | {} |
| 564 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 565 | static const struct usb_action cs2102_50HZ[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 566 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 567 | {0xaa, 0x23, 0x0000}, |
| 568 | {0xaa, 0x24, 0x00af}, |
| 569 | {0xaa, 0x25, 0x00c8}, |
| 570 | {0xaa, 0x21, 0x0068}, |
| 571 | {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 572 | {0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID}, |
| 573 | {0xa0, 0x90, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 574 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 575 | {0xa0, 0x1d, ZC3XX_R196_ANTIFLICKERMID}, |
| 576 | {0xa0, 0x4c, ZC3XX_R197_ANTIFLICKERLOW}, |
| 577 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 578 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 579 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 580 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 581 | {0xa0, 0x68, ZC3XX_R01D_HSYNC_0}, |
| 582 | {0xa0, 0xe3, ZC3XX_R01E_HSYNC_1}, |
| 583 | {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2}, |
| 584 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 585 | {} |
| 586 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 587 | static const struct usb_action cs2102_60HZScale[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 588 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 589 | {0xaa, 0x23, 0x0001}, |
| 590 | {0xaa, 0x24, 0x0055}, |
| 591 | {0xaa, 0x25, 0x00cc}, |
| 592 | {0xaa, 0x21, 0x003f}, |
| 593 | {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 594 | {0xa0, 0xab, ZC3XX_R191_EXPOSURELIMITMID}, |
| 595 | {0xa0, 0x98, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 596 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 597 | {0xa0, 0x30, ZC3XX_R196_ANTIFLICKERMID}, |
| 598 | {0xa0, 0xd4, ZC3XX_R197_ANTIFLICKERLOW}, |
| 599 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 600 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 601 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 602 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 603 | {0xa0, 0x39, ZC3XX_R01D_HSYNC_0}, |
| 604 | {0xa0, 0x70, ZC3XX_R01E_HSYNC_1}, |
| 605 | {0xa0, 0xb0, ZC3XX_R01F_HSYNC_2}, |
| 606 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 607 | {} |
| 608 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 609 | static const struct usb_action cs2102_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 610 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 611 | {0xaa, 0x23, 0x0000}, |
| 612 | {0xaa, 0x24, 0x00aa}, |
| 613 | {0xaa, 0x25, 0x00e6}, |
| 614 | {0xaa, 0x21, 0x003f}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 615 | {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 616 | {0xa0, 0x55, ZC3XX_R191_EXPOSURELIMITMID}, |
| 617 | {0xa0, 0xcc, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 618 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 619 | {0xa0, 0x18, ZC3XX_R196_ANTIFLICKERMID}, |
| 620 | {0xa0, 0x6a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 621 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 622 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 623 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 624 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 625 | {0xa0, 0x3f, ZC3XX_R01D_HSYNC_0}, |
| 626 | {0xa0, 0xa5, ZC3XX_R01E_HSYNC_1}, |
| 627 | {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2}, |
| 628 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 629 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 630 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 631 | static const struct usb_action cs2102_NoFlikerScale[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 632 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 633 | {0xaa, 0x23, 0x0001}, |
| 634 | {0xaa, 0x24, 0x005f}, |
| 635 | {0xaa, 0x25, 0x0000}, |
| 636 | {0xaa, 0x21, 0x0001}, |
| 637 | {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 638 | {0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID}, |
| 639 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 640 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 641 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 642 | {0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW}, |
| 643 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 644 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 645 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 646 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 647 | {0xa0, 0x01, ZC3XX_R01D_HSYNC_0}, |
| 648 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 649 | {0xa0, 0xa0, ZC3XX_R01F_HSYNC_2}, |
| 650 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 651 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 652 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 653 | static const struct usb_action cs2102_NoFliker[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 654 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 655 | {0xaa, 0x23, 0x0000}, |
| 656 | {0xaa, 0x24, 0x00af}, |
| 657 | {0xaa, 0x25, 0x0080}, |
| 658 | {0xaa, 0x21, 0x0001}, |
| 659 | {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 660 | {0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID}, |
| 661 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 662 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 663 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 664 | {0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW}, |
| 665 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 666 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 667 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 668 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 669 | {0xa0, 0x01, ZC3XX_R01D_HSYNC_0}, |
| 670 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 671 | {0xa0, 0xa0, ZC3XX_R01F_HSYNC_2}, |
| 672 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 673 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 674 | }; |
| 675 | |
| 676 | /* CS2102_KOCOM */ |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 677 | static const struct usb_action cs2102K_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 678 | {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT}, |
| 679 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 680 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 681 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 682 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 683 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 684 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 685 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 686 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 687 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 688 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 689 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 690 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 691 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 692 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 693 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 694 | {0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR}, |
| 695 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 696 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 697 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 698 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 699 | {0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT}, |
| 700 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 701 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 702 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 703 | {0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT}, |
| 704 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 705 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 706 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 707 | {0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT}, |
| 708 | {0xa0, 0x7c, ZC3XX_R093_I2CSETVALUE}, |
| 709 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 710 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 711 | {0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT}, |
| 712 | {0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE}, |
| 713 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 714 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 715 | {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT}, |
| 716 | {0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE}, |
| 717 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 718 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 719 | {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT}, |
| 720 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 721 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 722 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 723 | {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT}, |
| 724 | {0xa0, 0x03, ZC3XX_R093_I2CSETVALUE}, |
| 725 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 726 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 727 | {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT}, |
| 728 | {0xa0, 0x08, ZC3XX_R093_I2CSETVALUE}, |
| 729 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 730 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 731 | {0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT}, |
| 732 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 733 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 734 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 735 | {0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT}, |
| 736 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 737 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 738 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 739 | {0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT}, |
| 740 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 741 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 742 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 743 | {0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT}, |
| 744 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 745 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 746 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 747 | {0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT}, |
| 748 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 749 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 750 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 751 | {0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT}, |
| 752 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 753 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 754 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 755 | {0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT}, |
| 756 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 757 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 758 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 759 | {0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT}, |
| 760 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 761 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 762 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 763 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 764 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 765 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 766 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 767 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
| 768 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 769 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
| 770 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 771 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 772 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 773 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 774 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, |
| 775 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, |
| 776 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 777 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 778 | {0xa0, 0x00, 0x01ad}, |
| 779 | {0xa0, 0x01, 0x01b1}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 780 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 781 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 782 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 783 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
| 784 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 785 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
| 786 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 787 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 788 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 789 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 790 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 791 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 792 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 793 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 794 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 795 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 796 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 797 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 798 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 799 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 800 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 801 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 802 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 803 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 804 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 805 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 806 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 807 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 808 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 809 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 810 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 811 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 812 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 813 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 814 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 815 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 816 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 817 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 818 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
| 819 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 820 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 821 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 822 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 823 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 824 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 825 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 826 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 827 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
| 828 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 829 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 830 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 831 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 832 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 833 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 834 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 835 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 836 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 837 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 838 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 839 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 840 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 841 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 842 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 843 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 844 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 845 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 846 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 847 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 848 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 849 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 850 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 851 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 852 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 853 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 854 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 855 | {0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 856 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 857 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 858 | {0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 859 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 860 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 861 | {0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 862 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 863 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 864 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 865 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 866 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 867 | {0xa0, 0x0f, ZC3XX_R01E_HSYNC_1}, |
| 868 | {0xa0, 0x19, ZC3XX_R01F_HSYNC_2}, |
| 869 | {0xa0, 0x1f, ZC3XX_R020_HSYNC_3}, |
| 870 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 871 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 872 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 873 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 874 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 875 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 876 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
| 877 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 878 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 879 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 880 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 881 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 882 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 883 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 884 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 885 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 886 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 887 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 888 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 889 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 890 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 891 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 892 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 893 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 894 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 895 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 896 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 897 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 898 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 899 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 900 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 901 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 902 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 903 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 904 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 905 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 906 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 907 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 908 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 909 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 910 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 911 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 912 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 913 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 914 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 915 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 916 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 917 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 918 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 919 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 920 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 921 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 922 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 923 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 924 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 925 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 926 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 927 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 928 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 929 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 930 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 931 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 932 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 933 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 934 | }; |
| 935 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 936 | static const struct usb_action cs2102K_Initial[] = { |
Jean-Francois Moine | f1ee8e8 | 2009-01-20 08:14:17 -0300 | [diff] [blame] | 937 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 938 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 939 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 940 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 941 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 942 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 943 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 944 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 945 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 946 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 947 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 948 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 949 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 950 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 951 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 952 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 953 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | f1ee8e8 | 2009-01-20 08:14:17 -0300 | [diff] [blame] | 954 | /*fixme: next sequence = i2c exchanges*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 955 | {0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR}, |
| 956 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 957 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 958 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 959 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 960 | {0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT}, |
| 961 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 962 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 963 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 964 | {0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT}, |
| 965 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 966 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 967 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 968 | {0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT}, |
| 969 | {0xa0, 0x7b, ZC3XX_R093_I2CSETVALUE}, |
| 970 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 971 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 972 | {0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT}, |
| 973 | {0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE}, |
| 974 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 975 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 976 | {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT}, |
| 977 | {0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE}, |
| 978 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 979 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 980 | {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT}, |
| 981 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 982 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 983 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 984 | {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT}, |
| 985 | {0xa0, 0x03, ZC3XX_R093_I2CSETVALUE}, |
| 986 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 987 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 988 | {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT}, |
| 989 | {0xa0, 0x08, ZC3XX_R093_I2CSETVALUE}, |
| 990 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 991 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 992 | {0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT}, |
| 993 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 994 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 995 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 996 | {0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT}, |
| 997 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 998 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 999 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1000 | {0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1001 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 1002 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1003 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1004 | {0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1005 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 1006 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1007 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1008 | {0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1009 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 1010 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1011 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1012 | {0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1013 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1014 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1015 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1016 | {0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1017 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 1018 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1019 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1020 | {0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1021 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 1022 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1023 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1024 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1025 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1026 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1027 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1028 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, |
| 1029 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1030 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
| 1031 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1032 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1033 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1034 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1035 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, |
| 1036 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, |
| 1037 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1038 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1039 | {0xa0, 0x00, 0x01ad}, |
| 1040 | {0xa0, 0x01, 0x01b1}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1041 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1042 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 1043 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1044 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
| 1045 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 1046 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
| 1047 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 1048 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 1049 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 1050 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 1051 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 1052 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 1053 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 1054 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 1055 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 1056 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 1057 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 1058 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 1059 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 1060 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 1061 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 1062 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 1063 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 1064 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 1065 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 1066 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 1067 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 1068 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 1069 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 1070 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 1071 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 1072 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 1073 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 1074 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 1075 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 1076 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 1077 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 1078 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 1079 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
| 1080 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 1081 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 1082 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 1083 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 1084 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 1085 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 1086 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 1087 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 1088 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
| 1089 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1090 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 1091 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1092 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1093 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1094 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1095 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1096 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 1097 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1098 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1099 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1100 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1101 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1102 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1103 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1104 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1105 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1106 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1107 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1108 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 1109 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1110 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1111 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1112 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1113 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1114 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1115 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 1116 | {0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 1117 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 1118 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 1119 | {0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 1120 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 1121 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 1122 | {0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 1123 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 1124 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 1125 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 1126 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 1127 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 1128 | {0xa0, 0x0f, ZC3XX_R01E_HSYNC_1}, |
| 1129 | {0xa0, 0x19, ZC3XX_R01F_HSYNC_2}, |
| 1130 | {0xa0, 0x1f, ZC3XX_R020_HSYNC_3}, |
| 1131 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1132 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1133 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1134 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1135 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 1136 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1137 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1138 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1139 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1140 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1141 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1142 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1143 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1144 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 1145 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1146 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1147 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1148 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1149 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1150 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1151 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1152 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 1153 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1154 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1155 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1156 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1157 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1158 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1159 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1160 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1161 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1162 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1163 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1164 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1165 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1166 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1167 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1168 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1169 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1170 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1171 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1172 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 1173 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1174 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1175 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1176 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1177 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1178 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1179 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1180 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 1181 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1182 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1183 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1184 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1185 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1186 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1187 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1188 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1189 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1190 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1191 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1192 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1193 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | f1ee8e8 | 2009-01-20 08:14:17 -0300 | [diff] [blame] | 1194 | /*fixme:what does the next sequence?*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1195 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1196 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1197 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1198 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1199 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1200 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1201 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1202 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1203 | {0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE}, |
| 1204 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1205 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1206 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1207 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1208 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1209 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1210 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1211 | {0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE}, |
| 1212 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1213 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1214 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1215 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1216 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1217 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1218 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1219 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1220 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1221 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1222 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1223 | {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, |
| 1224 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1225 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1226 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1227 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1228 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1229 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1230 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1231 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1232 | {0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE}, |
| 1233 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1234 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1235 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1236 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1237 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1238 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1239 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1240 | {0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE}, |
| 1241 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1242 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1243 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1244 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1245 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1246 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1247 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1248 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1249 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1250 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1251 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1252 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1253 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1254 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1255 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1256 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1257 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1258 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1259 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1260 | {0xa0, 0x44, ZC3XX_R093_I2CSETVALUE}, |
| 1261 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1262 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1263 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1264 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1265 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1266 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1267 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1268 | {0xa0, 0x44, ZC3XX_R093_I2CSETVALUE}, |
| 1269 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1270 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1271 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1272 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1273 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1274 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1275 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1276 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1277 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1278 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1279 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1280 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1281 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1282 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1283 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1284 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1285 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1286 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1287 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1288 | {0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE}, |
| 1289 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1290 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1291 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1292 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1293 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1294 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1295 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1296 | {0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE}, |
| 1297 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1298 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1299 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1300 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1301 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1302 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1303 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1304 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1305 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1306 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1307 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1308 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1309 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1310 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1311 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1312 | }; |
| 1313 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1314 | static const struct usb_action gc0305_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1315 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 1316 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 1317 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 1318 | {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT}, /* 00,02,04,cc */ |
| 1319 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 1320 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 1321 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 1322 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 1323 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 1324 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 1325 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 1326 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 1327 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 1328 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 1329 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 1330 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc */ |
| 1331 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 1332 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1333 | {0xaa, 0x13, 0x0002}, /* 00,13,02,aa */ |
| 1334 | {0xaa, 0x15, 0x0003}, /* 00,15,03,aa */ |
| 1335 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 1336 | {0xaa, 0x02, 0x0000}, /* 00,02,00,aa */ |
| 1337 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 1338 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa */ |
| 1339 | {0xaa, 0x1d, 0x0080}, /* 00,1d,80,aa */ |
| 1340 | {0xaa, 0x1f, 0x0008}, /* 00,1f,08,aa */ |
| 1341 | {0xaa, 0x21, 0x0012}, /* 00,21,12,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1342 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc */ |
| 1343 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc */ |
| 1344 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1345 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 1346 | {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa */ |
| 1347 | {0xaa, 0x0b, 0x00b0}, /* 00,0b,b0,aa */ |
| 1348 | {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa */ |
| 1349 | {0xaa, 0x0d, 0x00b0}, /* 00,0d,b0,aa */ |
| 1350 | {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa */ |
| 1351 | {0xaa, 0x0f, 0x00b0}, /* 00,0f,b0,aa */ |
| 1352 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 1353 | {0xaa, 0x11, 0x00b0}, /* 00,11,b0,aa */ |
| 1354 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa */ |
| 1355 | {0xaa, 0x17, 0x00e6}, /* 00,17,e6,aa */ |
| 1356 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa */ |
| 1357 | {0xaa, 0x19, 0x0086}, /* 00,19,86,aa */ |
| 1358 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1359 | {0xaa, 0x1b, 0x0020}, /* 00,1b,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1360 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc */ |
| 1361 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 1362 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 1363 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1364 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1365 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 1366 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 1367 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 1368 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 1369 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
| 1370 | {0xa0, 0x85, ZC3XX_R18D_YTARGET}, /* 01,8d,85,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1371 | {0xa0, 0x00, 0x011e}, /* 01,1e,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1372 | {0xa0, 0x52, ZC3XX_R116_RGAIN}, /* 01,16,52,cc */ |
| 1373 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, /* 01,17,40,cc */ |
| 1374 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 1375 | {0xa0, 0x03, ZC3XX_R113_RGB03}, /* 01,13,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1376 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1377 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1378 | static const struct usb_action gc0305_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1379 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 1380 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 1381 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 1382 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 1383 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 1384 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 1385 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 1386 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 1387 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 1388 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 1389 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 1390 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 1391 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 1392 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 1393 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 1394 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e8,cc */ |
| 1395 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 1396 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1397 | {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */ |
| 1398 | {0xaa, 0x15, 0x0001}, /* 00,15,01,aa */ |
| 1399 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 1400 | {0xaa, 0x02, 0x0000}, /* 00,02,00,aa */ |
| 1401 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 1402 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa */ |
| 1403 | {0xaa, 0x1d, 0x0080}, /* 00,1d,80,aa */ |
| 1404 | {0xaa, 0x1f, 0x0008}, /* 00,1f,08,aa */ |
| 1405 | {0xaa, 0x21, 0x0012}, /* 00,21,12,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1406 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc */ |
| 1407 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc */ |
| 1408 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1409 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 1410 | {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa */ |
| 1411 | {0xaa, 0x0b, 0x00b0}, /* 00,0b,b0,aa */ |
| 1412 | {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa */ |
| 1413 | {0xaa, 0x0d, 0x00b0}, /* 00,0d,b0,aa */ |
| 1414 | {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa */ |
| 1415 | {0xaa, 0x0f, 0x00b0}, /* 00,0f,b0,aa */ |
| 1416 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 1417 | {0xaa, 0x11, 0x00b0}, /* 00,11,b0,aa */ |
| 1418 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa */ |
| 1419 | {0xaa, 0x17, 0x00e8}, /* 00,17,e8,aa */ |
| 1420 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa */ |
| 1421 | {0xaa, 0x19, 0x0088}, /* 00,19,88,aa */ |
| 1422 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1423 | {0xaa, 0x1b, 0x0020}, /* 00,1b,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1424 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc */ |
| 1425 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 1426 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 1427 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1428 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1429 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 1430 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 1431 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 1432 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 1433 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1434 | {0xa0, 0x00, 0x011e}, /* 01,1e,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1435 | {0xa0, 0x52, ZC3XX_R116_RGAIN}, /* 01,16,52,cc */ |
| 1436 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, /* 01,17,40,cc */ |
| 1437 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 1438 | {0xa0, 0x03, ZC3XX_R113_RGB03}, /* 01,13,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1439 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1440 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1441 | static const struct usb_action gc0305_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1442 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 1443 | {0xaa, 0x83, 0x0002}, /* 00,83,02,aa */ |
| 1444 | {0xaa, 0x84, 0x0038}, /* 00,84,38,aa */ /* win: 00,84,ec */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1445 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1446 | {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0b,cc */ |
| 1447 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 1448 | /* win: 01,92,10 */ |
| 1449 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1450 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1451 | {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,8e,cc */ |
| 1452 | /* win: 01,97,ec */ |
| 1453 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc */ |
| 1454 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc */ |
| 1455 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 1456 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1457 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc */ |
| 1458 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc */ |
| 1459 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc */ |
| 1460 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 1461 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,60,cc */ |
| 1462 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 1463 | /* {0xa0, 0x85, ZC3XX_R18D_YTARGET}, * 01,8d,85,cc * |
| 1464 | * if 640x480 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1465 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1466 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1467 | static const struct usb_action gc0305_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1468 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 1469 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 1470 | {0xaa, 0x84, 0x00ec}, /* 00,84,ec,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1471 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1472 | {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0b,cc */ |
| 1473 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,10,cc */ |
| 1474 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1475 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1476 | {0xa0, 0xec, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,ec,cc */ |
| 1477 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc */ |
| 1478 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc */ |
| 1479 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 1480 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1481 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc */ |
| 1482 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc */ |
| 1483 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc */ |
| 1484 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 1485 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,60,cc */ |
| 1486 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 1487 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, /* 01,8d,80,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1488 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1489 | }; |
| 1490 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1491 | static const struct usb_action gc0305_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1492 | {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1493 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 1494 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 1495 | {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1496 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1497 | {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,00,cc */ |
| 1498 | {0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,48,cc */ |
| 1499 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1500 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1501 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 1502 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc */ |
| 1503 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc */ |
| 1504 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc */ |
| 1505 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc */ |
| 1506 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc */ |
| 1507 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 1508 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,60,cc */ |
| 1509 | {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,03,cc */ |
| 1510 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, /* 01,8d,80,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1511 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1512 | }; |
| 1513 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 1514 | static const struct usb_action hdcs2020b_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1515 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1516 | {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT}, |
| 1517 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* qtable 0x05 */ |
| 1518 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1519 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1520 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1521 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1522 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1523 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1524 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1525 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1526 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1527 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1528 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1529 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 1530 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 1531 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1532 | {0xaa, 0x1c, 0x0000}, |
| 1533 | {0xaa, 0x0a, 0x0001}, |
| 1534 | {0xaa, 0x0b, 0x0006}, |
| 1535 | {0xaa, 0x0c, 0x007b}, |
| 1536 | {0xaa, 0x0d, 0x00a7}, |
| 1537 | {0xaa, 0x03, 0x00fb}, |
| 1538 | {0xaa, 0x05, 0x0000}, |
| 1539 | {0xaa, 0x06, 0x0003}, |
| 1540 | {0xaa, 0x09, 0x0008}, |
| 1541 | |
| 1542 | {0xaa, 0x0f, 0x0018}, /* set sensor gain */ |
| 1543 | {0xaa, 0x10, 0x0018}, |
| 1544 | {0xaa, 0x11, 0x0018}, |
| 1545 | {0xaa, 0x12, 0x0018}, |
| 1546 | |
| 1547 | {0xaa, 0x15, 0x004e}, |
| 1548 | {0xaa, 0x1c, 0x0004}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1549 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
| 1550 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1551 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
| 1552 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1553 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1554 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1555 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1556 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1557 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1558 | {0xa1, 0x01, 0x0002}, |
| 1559 | {0xa1, 0x01, 0x0008}, |
| 1560 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1561 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1562 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1563 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1564 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1565 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1566 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 1567 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1568 | {0xa1, 0x01, 0x01c8}, |
| 1569 | {0xa1, 0x01, 0x01c9}, |
| 1570 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1571 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 1572 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 1573 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 1574 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 1575 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 1576 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 1577 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 1578 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 1579 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 1580 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 1581 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 1582 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 1583 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 1584 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 1585 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 1586 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 1587 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 1588 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 1589 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 1590 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 1591 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 1592 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 1593 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 1594 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 1595 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 1596 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 1597 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 1598 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 1599 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 1600 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 1601 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 1602 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 1603 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1604 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1605 | {0xa0, 0x66, ZC3XX_R10A_RGB00}, /* matrix */ |
| 1606 | {0xa0, 0xed, ZC3XX_R10B_RGB01}, |
| 1607 | {0xa0, 0xed, ZC3XX_R10C_RGB02}, |
| 1608 | {0xa0, 0xed, ZC3XX_R10D_RGB10}, |
| 1609 | {0xa0, 0x66, ZC3XX_R10E_RGB11}, |
| 1610 | {0xa0, 0xed, ZC3XX_R10F_RGB12}, |
| 1611 | {0xa0, 0xed, ZC3XX_R110_RGB20}, |
| 1612 | {0xa0, 0xed, ZC3XX_R111_RGB21}, |
| 1613 | {0xa0, 0x66, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1614 | |
| 1615 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1616 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1617 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1618 | {0xaa, 0x13, 0x0031}, |
| 1619 | {0xaa, 0x14, 0x0001}, |
| 1620 | {0xaa, 0x0e, 0x0004}, |
| 1621 | {0xaa, 0x19, 0x00cd}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1622 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 1623 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 1624 | {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 1625 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 1626 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 1627 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, |
| 1628 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 1629 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1630 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1631 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 0x14 */ |
| 1632 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 1633 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 1634 | {0xa0, 0x18, ZC3XX_R01E_HSYNC_1}, |
| 1635 | {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2}, |
| 1636 | {0xa0, 0x41, ZC3XX_R020_HSYNC_3}, |
| 1637 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1638 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1639 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1640 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1641 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1642 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1643 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1644 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1645 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 1646 | static const struct usb_action hdcs2020b_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1647 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1648 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 1649 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 1650 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1651 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1652 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1653 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1654 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1655 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1656 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1657 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1658 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1659 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1660 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1661 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 1662 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 1663 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1664 | {0xaa, 0x1c, 0x0000}, |
| 1665 | {0xaa, 0x0a, 0x0001}, |
| 1666 | {0xaa, 0x0b, 0x0006}, |
| 1667 | {0xaa, 0x0c, 0x007a}, |
| 1668 | {0xaa, 0x0d, 0x00a7}, |
| 1669 | {0xaa, 0x03, 0x00fb}, |
| 1670 | {0xaa, 0x05, 0x0000}, |
| 1671 | {0xaa, 0x06, 0x0003}, |
| 1672 | {0xaa, 0x09, 0x0008}, |
| 1673 | {0xaa, 0x0f, 0x0018}, /* original setting */ |
| 1674 | {0xaa, 0x10, 0x0018}, |
| 1675 | {0xaa, 0x11, 0x0018}, |
| 1676 | {0xaa, 0x12, 0x0018}, |
| 1677 | {0xaa, 0x15, 0x004e}, |
| 1678 | {0xaa, 0x1c, 0x0004}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1679 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, |
| 1680 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1681 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
| 1682 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1683 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1684 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1685 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1686 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1687 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1688 | {0xa1, 0x01, 0x0002}, |
| 1689 | {0xa1, 0x01, 0x0008}, |
| 1690 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1691 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1692 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1693 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1694 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1695 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1696 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 1697 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1698 | {0xa1, 0x01, 0x01c8}, |
| 1699 | {0xa1, 0x01, 0x01c9}, |
| 1700 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1701 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 1702 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 1703 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 1704 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 1705 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 1706 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 1707 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 1708 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 1709 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 1710 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 1711 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 1712 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 1713 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 1714 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 1715 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 1716 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 1717 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 1718 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 1719 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 1720 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 1721 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 1722 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 1723 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 1724 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 1725 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 1726 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 1727 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 1728 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 1729 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 1730 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 1731 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 1732 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 1733 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
| 1734 | {0xa0, 0x66, ZC3XX_R10A_RGB00}, /* matrix */ |
| 1735 | {0xa0, 0xed, ZC3XX_R10B_RGB01}, |
| 1736 | {0xa0, 0xed, ZC3XX_R10C_RGB02}, |
| 1737 | {0xa0, 0xed, ZC3XX_R10D_RGB10}, |
| 1738 | {0xa0, 0x66, ZC3XX_R10E_RGB11}, |
| 1739 | {0xa0, 0xed, ZC3XX_R10F_RGB12}, |
| 1740 | {0xa0, 0xed, ZC3XX_R110_RGB20}, |
| 1741 | {0xa0, 0xed, ZC3XX_R111_RGB21}, |
| 1742 | {0xa0, 0x66, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1743 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1744 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1745 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1746 | /**** set exposure ***/ |
| 1747 | {0xaa, 0x13, 0x0031}, |
| 1748 | {0xaa, 0x14, 0x0001}, |
| 1749 | {0xaa, 0x0e, 0x0004}, |
| 1750 | {0xaa, 0x19, 0x00cd}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1751 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 1752 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 1753 | {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 1754 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 1755 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 1756 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, |
| 1757 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 1758 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 1759 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 1760 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 1761 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 1762 | {0xa0, 0x18, ZC3XX_R01E_HSYNC_1}, |
| 1763 | {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2}, |
| 1764 | {0xa0, 0x41, ZC3XX_R020_HSYNC_3}, |
| 1765 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1766 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1767 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1768 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1769 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1770 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1771 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1772 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1773 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1774 | static const struct usb_action hdcs2020b_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1775 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 1776 | {0xaa, 0x13, 0x0018}, /* 00,13,18,aa */ |
| 1777 | {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */ |
| 1778 | {0xaa, 0x0e, 0x0005}, /* 00,0e,05,aa */ |
| 1779 | {0xaa, 0x19, 0x001f}, /* 00,19,1f,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1780 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1781 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */ |
| 1782 | {0xa0, 0x76, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,76,cc */ |
| 1783 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1784 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1785 | {0xa0, 0x46, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,46,cc */ |
| 1786 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 1787 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 1788 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,0c,cc */ |
| 1789 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,28,cc */ |
| 1790 | {0xa0, 0x05, ZC3XX_R01D_HSYNC_0}, /* 00,1d,05,cc */ |
| 1791 | {0xa0, 0x1a, ZC3XX_R01E_HSYNC_1}, /* 00,1e,1a,cc */ |
| 1792 | {0xa0, 0x2f, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2f,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1793 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1794 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1795 | static const struct usb_action hdcs2020b_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1796 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 1797 | {0xaa, 0x13, 0x0031}, /* 00,13,31,aa */ |
| 1798 | {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */ |
| 1799 | {0xaa, 0x0e, 0x0004}, /* 00,0e,04,aa */ |
| 1800 | {0xaa, 0x19, 0x00cd}, /* 00,19,cd,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1801 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1802 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */ |
| 1803 | {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,62,cc */ |
| 1804 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1805 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1806 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,3d,cc */ |
| 1807 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 1808 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 1809 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,0c,cc */ |
| 1810 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,28,cc */ |
| 1811 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, /* 00,1d,04,cc */ |
| 1812 | {0xa0, 0x18, ZC3XX_R01E_HSYNC_1}, /* 00,1e,18,cc */ |
| 1813 | {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2c,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1814 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1815 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1816 | static const struct usb_action hdcs2020b_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1817 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 1818 | {0xaa, 0x13, 0x0010}, /* 00,13,10,aa */ |
| 1819 | {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */ |
| 1820 | {0xaa, 0x0e, 0x0004}, /* 00,0e,04,aa */ |
| 1821 | {0xaa, 0x19, 0x0000}, /* 00,19,00,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1822 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1823 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */ |
| 1824 | {0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,70,cc */ |
| 1825 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1826 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1827 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 1828 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 1829 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 1830 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 1831 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 1832 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, /* 00,1d,04,cc */ |
| 1833 | {0xa0, 0x17, ZC3XX_R01E_HSYNC_1}, /* 00,1e,17,cc */ |
| 1834 | {0xa0, 0x2a, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2a,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1835 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1836 | }; |
| 1837 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 1838 | static const struct usb_action hv7131b_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1839 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1840 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 1841 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1842 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1843 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 1844 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 1845 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1846 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1847 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1848 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1849 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1850 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1851 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1852 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1853 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1854 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1855 | {0xaa, 0x30, 0x002d}, |
| 1856 | {0xaa, 0x01, 0x0005}, |
| 1857 | {0xaa, 0x11, 0x0000}, |
| 1858 | {0xaa, 0x13, 0x0001}, /* {0xaa, 0x13, 0x0000}, */ |
| 1859 | {0xaa, 0x14, 0x0001}, |
| 1860 | {0xaa, 0x15, 0x00e8}, |
| 1861 | {0xaa, 0x16, 0x0002}, |
Jean-Francois Moine | c9ff1b6 | 2008-11-06 15:29:47 -0300 | [diff] [blame] | 1862 | {0xaa, 0x17, 0x0086}, /* 00,17,88,aa */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1863 | {0xaa, 0x31, 0x0038}, |
| 1864 | {0xaa, 0x32, 0x0038}, |
| 1865 | {0xaa, 0x33, 0x0038}, |
| 1866 | {0xaa, 0x5b, 0x0001}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1867 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 1868 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1869 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1870 | {0xa0, 0x68, ZC3XX_R18D_YTARGET}, |
| 1871 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1872 | {0xa0, 0x00, 0x01ad}, |
| 1873 | {0xa0, 0xc0, 0x019b}, |
| 1874 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1875 | {0xa0, 0x02, ZC3XX_R188_MINGAIN}, |
| 1876 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1877 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1878 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1879 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1880 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | c9ff1b6 | 2008-11-06 15:29:47 -0300 | [diff] [blame] | 1881 | {0xaa, 0x02, 0x0090}, /* 00,02,80,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1882 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1883 | }; |
| 1884 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 1885 | static const struct usb_action hv7131b_Initial[] = { /* 640x480*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1886 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1887 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 1888 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1889 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1890 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 1891 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 1892 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1893 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1894 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1895 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1896 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1897 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1898 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1899 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1900 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1901 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1902 | {0xaa, 0x30, 0x002d}, |
| 1903 | {0xaa, 0x01, 0x0005}, |
| 1904 | {0xaa, 0x11, 0x0001}, |
| 1905 | {0xaa, 0x13, 0x0000}, /* {0xaa, 0x13, 0x0001}; */ |
| 1906 | {0xaa, 0x14, 0x0001}, |
| 1907 | {0xaa, 0x15, 0x00e6}, |
| 1908 | {0xaa, 0x16, 0x0002}, |
| 1909 | {0xaa, 0x17, 0x0086}, |
| 1910 | {0xaa, 0x31, 0x0038}, |
| 1911 | {0xaa, 0x32, 0x0038}, |
| 1912 | {0xaa, 0x33, 0x0038}, |
| 1913 | {0xaa, 0x5b, 0x0001}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1914 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 1915 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1916 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1917 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
| 1918 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1919 | {0xa0, 0x00, 0x01ad}, |
| 1920 | {0xa0, 0xc0, 0x019b}, |
| 1921 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1922 | {0xa0, 0x02, ZC3XX_R188_MINGAIN}, |
| 1923 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1924 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1925 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1926 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1927 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1928 | {0xaa, 0x02, 0x0090}, /* {0xaa, 0x02, 0x0080}, */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1929 | {} |
| 1930 | }; |
| 1931 | static const struct usb_action hv7131b_50HZ[] = { /* 640x480*/ |
| 1932 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 1933 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
| 1934 | {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */ |
| 1935 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
| 1936 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1937 | {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */ |
| 1938 | {0xaa, 0x22, 0x001b}, /* 00,22,1b,aa */ |
| 1939 | {0xaa, 0x23, 0x00fc}, /* 00,23,fc,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 1940 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 1941 | {0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,9b,cc */ |
| 1942 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,80,cc */ |
| 1943 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1944 | {0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,ea,cc */ |
| 1945 | {0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,60,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1946 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 1947 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
| 1948 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
| 1949 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1950 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 1951 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, /* 00,1e,50,cc */ |
| 1952 | {0xa0, 0x1b, ZC3XX_R01F_HSYNC_2}, /* 00,1f,1b,cc */ |
| 1953 | {0xa0, 0xfc, ZC3XX_R020_HSYNC_3}, /* 00,20,fc,cc */ |
| 1954 | {} |
| 1955 | }; |
| 1956 | static const struct usb_action hv7131b_50HZScale[] = { /* 320x240 */ |
| 1957 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 1958 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
| 1959 | {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */ |
| 1960 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
| 1961 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1962 | {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */ |
| 1963 | {0xaa, 0x22, 0x0012}, /* 00,22,12,aa */ |
| 1964 | {0xaa, 0x23, 0x0080}, /* 00,23,80,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 1965 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 1966 | {0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,9b,cc */ |
| 1967 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,80,cc */ |
| 1968 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,01,cc */ |
| 1969 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,d4,cc */ |
| 1970 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,c0,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1971 | {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, /* 01,8c,07,cc */ |
| 1972 | {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,0f,cc */ |
| 1973 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
| 1974 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1975 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 1976 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, /* 00,1e,50,cc */ |
| 1977 | {0xa0, 0x12, ZC3XX_R01F_HSYNC_2}, /* 00,1f,12,cc */ |
| 1978 | {0xa0, 0x80, ZC3XX_R020_HSYNC_3}, /* 00,20,80,cc */ |
| 1979 | {} |
| 1980 | }; |
| 1981 | static const struct usb_action hv7131b_60HZ[] = { /* 640x480*/ |
| 1982 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 1983 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
| 1984 | {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */ |
| 1985 | {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */ |
| 1986 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1987 | {0xaa, 0x21, 0x0040}, /* 00,21,40,aa */ |
| 1988 | {0xaa, 0x22, 0x0013}, /* 00,22,13,aa */ |
| 1989 | {0xaa, 0x23, 0x004c}, /* 00,23,4c,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 1990 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 1991 | {0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,4d,cc */ |
| 1992 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,60,cc */ |
| 1993 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1994 | {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,c3,cc */ |
| 1995 | {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,50,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1996 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 1997 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
| 1998 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
| 1999 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 2000 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 2001 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, /* 00,1e,40,cc */ |
| 2002 | {0xa0, 0x13, ZC3XX_R01F_HSYNC_2}, /* 00,1f,13,cc */ |
| 2003 | {0xa0, 0x4c, ZC3XX_R020_HSYNC_3}, /* 00,20,4c,cc */ |
| 2004 | {} |
| 2005 | }; |
| 2006 | static const struct usb_action hv7131b_60HZScale[] = { /* 320x240 */ |
| 2007 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 2008 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
| 2009 | {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */ |
| 2010 | {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */ |
| 2011 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 2012 | {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */ |
| 2013 | {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */ |
| 2014 | {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 2015 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 2016 | {0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,4d,cc */ |
| 2017 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,60,cc */ |
| 2018 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,01,cc */ |
| 2019 | {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,86,cc */ |
| 2020 | {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,a0,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 2021 | {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, /* 01,8c,07,cc */ |
| 2022 | {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,0f,cc */ |
| 2023 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
| 2024 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 2025 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 2026 | {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,a0,cc */ |
| 2027 | {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, /* 00,1f,16,cc */ |
| 2028 | {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, /* 00,20,40,cc */ |
| 2029 | {} |
| 2030 | }; |
| 2031 | static const struct usb_action hv7131b_NoFliker[] = { /* 640x480*/ |
| 2032 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 2033 | {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */ |
| 2034 | {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */ |
| 2035 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
| 2036 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 2037 | {0xaa, 0x21, 0x0010}, /* 00,21,10,aa */ |
| 2038 | {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */ |
| 2039 | {0xaa, 0x23, 0x0003}, /* 00,23,03,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 2040 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 2041 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,f8,cc */ |
| 2042 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,00,cc */ |
| 2043 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2044 | {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,02,cc */ |
| 2045 | {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,00,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 2046 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2047 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2048 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 2049 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 2050 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 2051 | {0xa0, 0x10, ZC3XX_R01E_HSYNC_1}, /* 00,1e,10,cc */ |
| 2052 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, /* 00,1f,00,cc */ |
| 2053 | {0xa0, 0x03, ZC3XX_R020_HSYNC_3}, /* 00,20,03,cc */ |
| 2054 | {} |
| 2055 | }; |
| 2056 | static const struct usb_action hv7131b_NoFlikerScale[] = { /* 320x240 */ |
| 2057 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 2058 | {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */ |
| 2059 | {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */ |
| 2060 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
| 2061 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 2062 | {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */ |
| 2063 | {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */ |
| 2064 | {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 2065 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 2066 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,f8,cc */ |
| 2067 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,00,cc */ |
| 2068 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2069 | {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,02,cc */ |
| 2070 | {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,00,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 2071 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2072 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2073 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 2074 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 2075 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 2076 | {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,a0,cc */ |
| 2077 | {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, /* 00,1f,16,cc */ |
| 2078 | {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, /* 00,20,40,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2079 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2080 | }; |
| 2081 | |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2082 | /* from lPEPI264v.inf (hv7131b!) */ |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2083 | static const struct usb_action hv7131r_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2084 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 2085 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 2086 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2087 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2088 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 2089 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2090 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2091 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2092 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2093 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2094 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 2095 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 2096 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 2097 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 2098 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
| 2099 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 2100 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 2101 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 2102 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 2103 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2104 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2105 | {0xdd, 0x00, 0x0200}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2106 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2107 | {0xaa, 0x01, 0x000c}, |
| 2108 | {0xaa, 0x11, 0x0000}, |
| 2109 | {0xaa, 0x13, 0x0000}, |
| 2110 | {0xaa, 0x14, 0x0001}, |
| 2111 | {0xaa, 0x15, 0x00e8}, |
| 2112 | {0xaa, 0x16, 0x0002}, |
| 2113 | {0xaa, 0x17, 0x0088}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2114 | {0xaa, 0x30, 0x000b}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2115 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2116 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2117 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2118 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2119 | {0xa0, 0x00, 0x01ad}, |
| 2120 | {0xa0, 0xc0, 0x019b}, |
| 2121 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2122 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2123 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2124 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 2125 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2126 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2127 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2128 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2129 | static const struct usb_action hv7131r_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2130 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2131 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2132 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2133 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2134 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 2135 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2136 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2137 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2138 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2139 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2140 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2141 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2142 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2143 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 2144 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 2145 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2146 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2147 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2148 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2149 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 2150 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2151 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2152 | {0xdd, 0x00, 0x0200}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2153 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2154 | {0xaa, 0x01, 0x000c}, |
| 2155 | {0xaa, 0x11, 0x0000}, |
| 2156 | {0xaa, 0x13, 0x0000}, |
| 2157 | {0xaa, 0x14, 0x0001}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2158 | {0xaa, 0x15, 0x00e6}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2159 | {0xaa, 0x16, 0x0002}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2160 | {0xaa, 0x17, 0x0086}, |
| 2161 | {0xaa, 0x30, 0x000b}, |
| 2162 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2163 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2164 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2165 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2166 | {0xa0, 0x00, 0x01ad}, |
| 2167 | {0xa0, 0xc0, 0x019b}, |
| 2168 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2169 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2170 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2171 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 2172 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2173 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2174 | {} |
| 2175 | }; |
| 2176 | static const struct usb_action hv7131r_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2177 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2178 | {0xa0, 0x06, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2179 | {0xa0, 0x68, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2180 | {0xa0, 0xa0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2181 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2182 | {0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID}, |
| 2183 | {0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2184 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, |
| 2185 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2186 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2187 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2188 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2189 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2190 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2191 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
| 2192 | {} |
| 2193 | }; |
| 2194 | static const struct usb_action hv7131r_50HZScale[] = { |
| 2195 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2196 | {0xa0, 0x0c, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2197 | {0xa0, 0xd1, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2198 | {0xa0, 0x40, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2199 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2200 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, |
| 2201 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2202 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2203 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2204 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2205 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2206 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2207 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2208 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2209 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
| 2210 | {} |
| 2211 | }; |
| 2212 | static const struct usb_action hv7131r_60HZ[] = { |
| 2213 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2214 | {0xa0, 0x06, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2215 | {0xa0, 0x1a, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2216 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2217 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2218 | {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID}, |
| 2219 | {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2220 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, |
| 2221 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2222 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2223 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2224 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2225 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2226 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2227 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
| 2228 | {} |
| 2229 | }; |
| 2230 | static const struct usb_action hv7131r_60HZScale[] = { |
| 2231 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2232 | {0xa0, 0x0c, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2233 | {0xa0, 0x35, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2234 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2235 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2236 | {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID}, |
| 2237 | {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2238 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, |
| 2239 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2240 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2241 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2242 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2243 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2244 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2245 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
| 2246 | {} |
| 2247 | }; |
| 2248 | static const struct usb_action hv7131r_NoFliker[] = { |
| 2249 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2250 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2251 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2252 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2253 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2254 | {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID}, |
| 2255 | {0xa0, 0x58, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2256 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 2257 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 2258 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2259 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2260 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2261 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2262 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2263 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
| 2264 | {} |
| 2265 | }; |
| 2266 | static const struct usb_action hv7131r_NoFlikerScale[] = { |
| 2267 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2268 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2269 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2270 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2271 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2272 | {0xa0, 0x04, ZC3XX_R196_ANTIFLICKERMID}, |
| 2273 | {0xa0, 0xb0, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2274 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 2275 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 2276 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2277 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2278 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2279 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2280 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2281 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2282 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2283 | }; |
| 2284 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2285 | static const struct usb_action icm105a_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2286 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 2287 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 2288 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 2289 | {0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2290 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2291 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2292 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 2293 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 2294 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2295 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2296 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2297 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 2298 | {0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH}, |
| 2299 | {0xa0, 0x01, ZC3XX_R098_WINYSTARTLOW}, |
| 2300 | {0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH}, |
| 2301 | {0xa0, 0x01, ZC3XX_R09A_WINXSTARTLOW}, |
| 2302 | {0xa0, 0x01, ZC3XX_R11A_FIRSTYLOW}, |
| 2303 | {0xa0, 0x01, ZC3XX_R11C_FIRSTXLOW}, |
| 2304 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
| 2305 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 2306 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 2307 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 2308 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 2309 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 2310 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2311 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2312 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2313 | {0xaa, 0x01, 0x0010}, |
| 2314 | {0xaa, 0x03, 0x0000}, |
| 2315 | {0xaa, 0x04, 0x0001}, |
| 2316 | {0xaa, 0x05, 0x0020}, |
| 2317 | {0xaa, 0x06, 0x0001}, |
| 2318 | {0xaa, 0x08, 0x0000}, |
| 2319 | {0xaa, 0x03, 0x0001}, |
| 2320 | {0xaa, 0x04, 0x0011}, |
| 2321 | {0xaa, 0x05, 0x00a0}, |
| 2322 | {0xaa, 0x06, 0x0001}, |
| 2323 | {0xaa, 0x08, 0x0000}, |
| 2324 | {0xaa, 0x03, 0x0002}, |
| 2325 | {0xaa, 0x04, 0x0013}, |
| 2326 | {0xaa, 0x05, 0x0020}, |
| 2327 | {0xaa, 0x06, 0x0001}, |
| 2328 | {0xaa, 0x08, 0x0000}, |
| 2329 | {0xaa, 0x03, 0x0003}, |
| 2330 | {0xaa, 0x04, 0x0015}, |
| 2331 | {0xaa, 0x05, 0x0020}, |
| 2332 | {0xaa, 0x06, 0x0005}, |
| 2333 | {0xaa, 0x08, 0x0000}, |
| 2334 | {0xaa, 0x03, 0x0004}, |
| 2335 | {0xaa, 0x04, 0x0017}, |
| 2336 | {0xaa, 0x05, 0x0020}, |
| 2337 | {0xaa, 0x06, 0x000d}, |
| 2338 | {0xaa, 0x08, 0x0000}, |
| 2339 | {0xaa, 0x03, 0x0005}, |
| 2340 | {0xaa, 0x04, 0x0019}, |
| 2341 | {0xaa, 0x05, 0x0020}, |
| 2342 | {0xaa, 0x06, 0x0005}, |
| 2343 | {0xaa, 0x08, 0x0000}, |
| 2344 | {0xaa, 0x03, 0x0006}, |
| 2345 | {0xaa, 0x04, 0x0017}, |
| 2346 | {0xaa, 0x05, 0x0026}, |
| 2347 | {0xaa, 0x06, 0x0005}, |
| 2348 | {0xaa, 0x08, 0x0000}, |
| 2349 | {0xaa, 0x03, 0x0007}, |
| 2350 | {0xaa, 0x04, 0x0019}, |
| 2351 | {0xaa, 0x05, 0x0022}, |
| 2352 | {0xaa, 0x06, 0x0005}, |
| 2353 | {0xaa, 0x08, 0x0000}, |
| 2354 | {0xaa, 0x03, 0x0008}, |
| 2355 | {0xaa, 0x04, 0x0021}, |
| 2356 | {0xaa, 0x05, 0x00aa}, |
| 2357 | {0xaa, 0x06, 0x0005}, |
| 2358 | {0xaa, 0x08, 0x0000}, |
| 2359 | {0xaa, 0x03, 0x0009}, |
| 2360 | {0xaa, 0x04, 0x0023}, |
| 2361 | {0xaa, 0x05, 0x00aa}, |
| 2362 | {0xaa, 0x06, 0x000d}, |
| 2363 | {0xaa, 0x08, 0x0000}, |
| 2364 | {0xaa, 0x03, 0x000a}, |
| 2365 | {0xaa, 0x04, 0x0025}, |
| 2366 | {0xaa, 0x05, 0x00aa}, |
| 2367 | {0xaa, 0x06, 0x0005}, |
| 2368 | {0xaa, 0x08, 0x0000}, |
| 2369 | {0xaa, 0x03, 0x000b}, |
| 2370 | {0xaa, 0x04, 0x00ec}, |
| 2371 | {0xaa, 0x05, 0x002e}, |
| 2372 | {0xaa, 0x06, 0x0005}, |
| 2373 | {0xaa, 0x08, 0x0000}, |
| 2374 | {0xaa, 0x03, 0x000c}, |
| 2375 | {0xaa, 0x04, 0x00fa}, |
| 2376 | {0xaa, 0x05, 0x002a}, |
| 2377 | {0xaa, 0x06, 0x0005}, |
| 2378 | {0xaa, 0x08, 0x0000}, |
| 2379 | {0xaa, 0x07, 0x000d}, |
| 2380 | {0xaa, 0x01, 0x0005}, |
| 2381 | {0xaa, 0x94, 0x0002}, |
| 2382 | {0xaa, 0x90, 0x0000}, |
| 2383 | {0xaa, 0x91, 0x001f}, |
| 2384 | {0xaa, 0x10, 0x0064}, |
| 2385 | {0xaa, 0x9b, 0x00f0}, |
| 2386 | {0xaa, 0x9c, 0x0002}, |
| 2387 | {0xaa, 0x14, 0x001a}, |
| 2388 | {0xaa, 0x20, 0x0080}, |
| 2389 | {0xaa, 0x22, 0x0080}, |
| 2390 | {0xaa, 0x24, 0x0080}, |
| 2391 | {0xaa, 0x26, 0x0080}, |
| 2392 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2393 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2394 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2395 | {0xaa, 0xa8, 0x00c0}, |
| 2396 | {0xa1, 0x01, 0x0002}, |
| 2397 | {0xa1, 0x01, 0x0008}, |
| 2398 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2399 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2400 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2401 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2402 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2403 | {0xa1, 0x01, 0x0008}, |
| 2404 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2405 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 2406 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2407 | {0xa1, 0x01, 0x01c8}, |
| 2408 | {0xa1, 0x01, 0x01c9}, |
| 2409 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2410 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 2411 | {0xa0, 0x52, ZC3XX_R10A_RGB00}, /* matrix */ |
| 2412 | {0xa0, 0xf7, ZC3XX_R10B_RGB01}, |
| 2413 | {0xa0, 0xf7, ZC3XX_R10C_RGB02}, |
| 2414 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 2415 | {0xa0, 0x52, ZC3XX_R10E_RGB11}, |
| 2416 | {0xa0, 0xf7, ZC3XX_R10F_RGB12}, |
| 2417 | {0xa0, 0xf7, ZC3XX_R110_RGB20}, |
| 2418 | {0xa0, 0xf7, ZC3XX_R111_RGB21}, |
| 2419 | {0xa0, 0x52, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2420 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2421 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2422 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2423 | {0xaa, 0x0d, 0x0003}, |
| 2424 | {0xaa, 0x0c, 0x008c}, |
| 2425 | {0xaa, 0x0e, 0x0095}, |
| 2426 | {0xaa, 0x0f, 0x0002}, |
| 2427 | {0xaa, 0x1c, 0x0094}, |
| 2428 | {0xaa, 0x1d, 0x0002}, |
| 2429 | {0xaa, 0x20, 0x0080}, |
| 2430 | {0xaa, 0x22, 0x0080}, |
| 2431 | {0xaa, 0x24, 0x0080}, |
| 2432 | {0xaa, 0x26, 0x0080}, |
| 2433 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2434 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 2435 | {0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 2436 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2437 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2438 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2439 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2440 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 2441 | {0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2442 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 2443 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2444 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2445 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2446 | {0xa0, 0xe3, ZC3XX_R01D_HSYNC_0}, |
| 2447 | {0xa0, 0xec, ZC3XX_R01E_HSYNC_1}, |
| 2448 | {0xa0, 0xf5, ZC3XX_R01F_HSYNC_2}, |
| 2449 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 2450 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 2451 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, |
| 2452 | {0xa0, 0xc0, ZC3XX_R11D_GLOBALGAIN}, |
| 2453 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2454 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2455 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2456 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2457 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2458 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2459 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2460 | }; |
| 2461 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2462 | static const struct usb_action icm105a_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2463 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 2464 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 2465 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 2466 | {0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2467 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2468 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2469 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 2470 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 2471 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2472 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2473 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2474 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 2475 | {0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH}, |
| 2476 | {0xa0, 0x02, ZC3XX_R098_WINYSTARTLOW}, |
| 2477 | {0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH}, |
| 2478 | {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW}, |
| 2479 | {0xa0, 0x02, ZC3XX_R11A_FIRSTYLOW}, |
| 2480 | {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW}, |
| 2481 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
| 2482 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
| 2483 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 2484 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
| 2485 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 2486 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 2487 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2488 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2489 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2490 | {0xaa, 0x01, 0x0010}, |
| 2491 | {0xaa, 0x03, 0x0000}, |
| 2492 | {0xaa, 0x04, 0x0001}, |
| 2493 | {0xaa, 0x05, 0x0020}, |
| 2494 | {0xaa, 0x06, 0x0001}, |
| 2495 | {0xaa, 0x08, 0x0000}, |
| 2496 | {0xaa, 0x03, 0x0001}, |
| 2497 | {0xaa, 0x04, 0x0011}, |
| 2498 | {0xaa, 0x05, 0x00a0}, |
| 2499 | {0xaa, 0x06, 0x0001}, |
| 2500 | {0xaa, 0x08, 0x0000}, |
| 2501 | {0xaa, 0x03, 0x0002}, |
| 2502 | {0xaa, 0x04, 0x0013}, |
| 2503 | {0xaa, 0x05, 0x0020}, |
| 2504 | {0xaa, 0x06, 0x0001}, |
| 2505 | {0xaa, 0x08, 0x0000}, |
| 2506 | {0xaa, 0x03, 0x0003}, |
| 2507 | {0xaa, 0x04, 0x0015}, |
| 2508 | {0xaa, 0x05, 0x0020}, |
| 2509 | {0xaa, 0x06, 0x0005}, |
| 2510 | {0xaa, 0x08, 0x0000}, |
| 2511 | {0xaa, 0x03, 0x0004}, |
| 2512 | {0xaa, 0x04, 0x0017}, |
| 2513 | {0xaa, 0x05, 0x0020}, |
| 2514 | {0xaa, 0x06, 0x000d}, |
| 2515 | {0xaa, 0x08, 0x0000}, |
| 2516 | {0xaa, 0x03, 0x0005}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2517 | {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT}, |
| 2518 | {0xa0, 0x19, ZC3XX_R093_I2CSETVALUE}, |
| 2519 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2520 | {0xa1, 0x01, 0x0091}, |
| 2521 | {0xaa, 0x05, 0x0020}, |
| 2522 | {0xaa, 0x06, 0x0005}, |
| 2523 | {0xaa, 0x08, 0x0000}, |
| 2524 | {0xaa, 0x03, 0x0006}, |
| 2525 | {0xaa, 0x04, 0x0017}, |
| 2526 | {0xaa, 0x05, 0x0026}, |
| 2527 | {0xaa, 0x06, 0x0005}, |
| 2528 | {0xaa, 0x08, 0x0000}, |
| 2529 | {0xaa, 0x03, 0x0007}, |
| 2530 | {0xaa, 0x04, 0x0019}, |
| 2531 | {0xaa, 0x05, 0x0022}, |
| 2532 | {0xaa, 0x06, 0x0005}, |
| 2533 | {0xaa, 0x08, 0x0000}, |
| 2534 | {0xaa, 0x03, 0x0008}, |
| 2535 | {0xaa, 0x04, 0x0021}, |
| 2536 | {0xaa, 0x05, 0x00aa}, |
| 2537 | {0xaa, 0x06, 0x0005}, |
| 2538 | {0xaa, 0x08, 0x0000}, |
| 2539 | {0xaa, 0x03, 0x0009}, |
| 2540 | {0xaa, 0x04, 0x0023}, |
| 2541 | {0xaa, 0x05, 0x00aa}, |
| 2542 | {0xaa, 0x06, 0x000d}, |
| 2543 | {0xaa, 0x08, 0x0000}, |
| 2544 | {0xaa, 0x03, 0x000a}, |
| 2545 | {0xaa, 0x04, 0x0025}, |
| 2546 | {0xaa, 0x05, 0x00aa}, |
| 2547 | {0xaa, 0x06, 0x0005}, |
| 2548 | {0xaa, 0x08, 0x0000}, |
| 2549 | {0xaa, 0x03, 0x000b}, |
| 2550 | {0xaa, 0x04, 0x00ec}, |
| 2551 | {0xaa, 0x05, 0x002e}, |
| 2552 | {0xaa, 0x06, 0x0005}, |
| 2553 | {0xaa, 0x08, 0x0000}, |
| 2554 | {0xaa, 0x03, 0x000c}, |
| 2555 | {0xaa, 0x04, 0x00fa}, |
| 2556 | {0xaa, 0x05, 0x002a}, |
| 2557 | {0xaa, 0x06, 0x0005}, |
| 2558 | {0xaa, 0x08, 0x0000}, |
| 2559 | {0xaa, 0x07, 0x000d}, |
| 2560 | {0xaa, 0x01, 0x0005}, |
| 2561 | {0xaa, 0x94, 0x0002}, |
| 2562 | {0xaa, 0x90, 0x0000}, |
| 2563 | {0xaa, 0x91, 0x0010}, |
| 2564 | {0xaa, 0x10, 0x0064}, |
| 2565 | {0xaa, 0x9b, 0x00f0}, |
| 2566 | {0xaa, 0x9c, 0x0002}, |
| 2567 | {0xaa, 0x14, 0x001a}, |
| 2568 | {0xaa, 0x20, 0x0080}, |
| 2569 | {0xaa, 0x22, 0x0080}, |
| 2570 | {0xaa, 0x24, 0x0080}, |
| 2571 | {0xaa, 0x26, 0x0080}, |
| 2572 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2573 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2574 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2575 | {0xaa, 0xa8, 0x0080}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2576 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2577 | {0xa1, 0x01, 0x0002}, |
| 2578 | {0xa1, 0x01, 0x0008}, |
| 2579 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2580 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2581 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2582 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2583 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2584 | {0xa1, 0x01, 0x0008}, |
| 2585 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2586 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 2587 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2588 | {0xa1, 0x01, 0x01c8}, |
| 2589 | {0xa1, 0x01, 0x01c9}, |
| 2590 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2591 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2592 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2593 | {0xa0, 0x52, ZC3XX_R10A_RGB00}, /* matrix */ |
| 2594 | {0xa0, 0xf7, ZC3XX_R10B_RGB01}, |
| 2595 | {0xa0, 0xf7, ZC3XX_R10C_RGB02}, |
| 2596 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 2597 | {0xa0, 0x52, ZC3XX_R10E_RGB11}, |
| 2598 | {0xa0, 0xf7, ZC3XX_R10F_RGB12}, |
| 2599 | {0xa0, 0xf7, ZC3XX_R110_RGB20}, |
| 2600 | {0xa0, 0xf7, ZC3XX_R111_RGB21}, |
| 2601 | {0xa0, 0x52, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2602 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2603 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2604 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2605 | {0xaa, 0x0d, 0x0003}, |
| 2606 | {0xaa, 0x0c, 0x0020}, |
| 2607 | {0xaa, 0x0e, 0x000e}, |
| 2608 | {0xaa, 0x0f, 0x0002}, |
| 2609 | {0xaa, 0x1c, 0x000d}, |
| 2610 | {0xaa, 0x1d, 0x0002}, |
| 2611 | {0xaa, 0x20, 0x0080}, |
| 2612 | {0xaa, 0x22, 0x0080}, |
| 2613 | {0xaa, 0x24, 0x0080}, |
| 2614 | {0xaa, 0x26, 0x0080}, |
| 2615 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2616 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 2617 | {0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 2618 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2619 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2620 | {0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2621 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2622 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 2623 | {0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2624 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 2625 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2626 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2627 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2628 | {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0}, |
| 2629 | {0xa0, 0xd8, ZC3XX_R01E_HSYNC_1}, |
| 2630 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, |
| 2631 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 2632 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 2633 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2634 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2635 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2636 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2637 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2638 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2639 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2640 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2641 | static const struct usb_action icm105a_50HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2642 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2643 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2644 | {0xaa, 0x0c, 0x0020}, /* 00,0c,20,aa */ |
| 2645 | {0xaa, 0x0e, 0x000e}, /* 00,0e,0e,aa */ |
| 2646 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2647 | {0xaa, 0x1c, 0x000d}, /* 00,1c,0d,aa */ |
| 2648 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2649 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2650 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2651 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2652 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2653 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2654 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2655 | {0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,0d,cc */ |
| 2656 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2657 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2658 | {0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,1a,cc */ |
| 2659 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2660 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2661 | {0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,4b,cc */ |
| 2662 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2663 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2664 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 2665 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */ |
| 2666 | {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c8,cc */ |
| 2667 | {0xa0, 0xd8, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d8,cc */ |
| 2668 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */ |
| 2669 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2670 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2671 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2672 | static const struct usb_action icm105a_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2673 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2674 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2675 | {0xaa, 0x0c, 0x008c}, /* 00,0c,8c,aa */ |
| 2676 | {0xaa, 0x0e, 0x0095}, /* 00,0e,95,aa */ |
| 2677 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2678 | {0xaa, 0x1c, 0x0094}, /* 00,1c,94,aa */ |
| 2679 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2680 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2681 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2682 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2683 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2684 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2685 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2686 | {0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,94,cc */ |
| 2687 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2688 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2689 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */ |
| 2690 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2691 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2692 | {0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,84,cc */ |
| 2693 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2694 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2695 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 2696 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */ |
| 2697 | {0xa0, 0xe3, ZC3XX_R01D_HSYNC_0}, /* 00,1d,e3,cc */ |
| 2698 | {0xa0, 0xec, ZC3XX_R01E_HSYNC_1}, /* 00,1e,ec,cc */ |
| 2699 | {0xa0, 0xf5, ZC3XX_R01F_HSYNC_2}, /* 00,1f,f5,cc */ |
| 2700 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 2701 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */ |
| 2702 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2703 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2704 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2705 | static const struct usb_action icm105a_60HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2706 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2707 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2708 | {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */ |
| 2709 | {0xaa, 0x0e, 0x000d}, /* 00,0e,0d,aa */ |
| 2710 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2711 | {0xaa, 0x1c, 0x0008}, /* 00,1c,08,aa */ |
| 2712 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2713 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2714 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2715 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2716 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2717 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2718 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2719 | {0xa0, 0x08, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,08,cc */ |
| 2720 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2721 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2722 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,10,cc */ |
| 2723 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2724 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2725 | {0xa0, 0x41, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,41,cc */ |
| 2726 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2727 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2728 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 2729 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */ |
| 2730 | {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */ |
| 2731 | {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */ |
| 2732 | {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */ |
| 2733 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2734 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2735 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2736 | static const struct usb_action icm105a_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2737 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2738 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2739 | {0xaa, 0x0c, 0x0008}, /* 00,0c,08,aa */ |
| 2740 | {0xaa, 0x0e, 0x0086}, /* 00,0e,86,aa */ |
| 2741 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2742 | {0xaa, 0x1c, 0x0085}, /* 00,1c,85,aa */ |
| 2743 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2744 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2745 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2746 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2747 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2748 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2749 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2750 | {0xa0, 0x85, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,85,cc */ |
| 2751 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2752 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2753 | {0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,08,cc */ |
| 2754 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2755 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2756 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,81,cc */ |
| 2757 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2758 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2759 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 2760 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */ |
| 2761 | {0xa0, 0xc2, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c2,cc */ |
| 2762 | {0xa0, 0xd6, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d6,cc */ |
| 2763 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */ |
| 2764 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 2765 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */ |
| 2766 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2767 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2768 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2769 | static const struct usb_action icm105a_NoFlikerScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2770 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2771 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2772 | {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */ |
| 2773 | {0xaa, 0x0e, 0x000d}, /* 00,0e,0d,aa */ |
| 2774 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2775 | {0xaa, 0x1c, 0x0000}, /* 00,1c,00,aa */ |
| 2776 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2777 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2778 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2779 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2780 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2781 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2782 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2783 | {0xa0, 0x00, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,00,cc */ |
| 2784 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2785 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2786 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */ |
| 2787 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2788 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2789 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 2790 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2791 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2792 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 2793 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 2794 | {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */ |
| 2795 | {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */ |
| 2796 | {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */ |
| 2797 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2798 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2799 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2800 | static const struct usb_action icm105a_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2801 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2802 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2803 | {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */ |
| 2804 | {0xaa, 0x0e, 0x0081}, /* 00,0e,81,aa */ |
| 2805 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2806 | {0xaa, 0x1c, 0x0080}, /* 00,1c,80,aa */ |
| 2807 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2808 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2809 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2810 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2811 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2812 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2813 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2814 | {0xa0, 0x80, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,80,cc */ |
| 2815 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2816 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2817 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */ |
| 2818 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2819 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2820 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 2821 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2822 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2823 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 2824 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 2825 | {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */ |
| 2826 | {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */ |
| 2827 | {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */ |
| 2828 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 2829 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */ |
| 2830 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2831 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2832 | }; |
| 2833 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2834 | static const struct usb_action mc501cb_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2835 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 2836 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc */ |
| 2837 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 2838 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 2839 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 2840 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 2841 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 2842 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 2843 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 2844 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 2845 | {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d8,cc */ |
| 2846 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 2847 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 2848 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 2849 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 2850 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
| 2851 | {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,de,cc */ |
| 2852 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 2853 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 2854 | {0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,33,cc */ |
| 2855 | {0xa0, 0x34, ZC3XX_R087_EXPTIMEMID}, /* 00,87,34,cc */ |
| 2856 | {0xa0, 0x35, ZC3XX_R088_EXPTIMELOW}, /* 00,88,35,cc */ |
| 2857 | {0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,b0,cc */ |
| 2858 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2859 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2860 | {0xaa, 0x01, 0x0003}, /* 00,01,03,aa */ |
| 2861 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2862 | {0xaa, 0x03, 0x0000}, /* 00,03,00,aa */ |
| 2863 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 2864 | {0xaa, 0x11, 0x0080}, /* 00,11,80,aa */ |
| 2865 | {0xaa, 0x12, 0x0000}, /* 00,12,00,aa */ |
| 2866 | {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */ |
| 2867 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 2868 | {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */ |
| 2869 | {0xaa, 0x16, 0x0000}, /* 00,16,00,aa */ |
| 2870 | {0xaa, 0x17, 0x0001}, /* 00,17,01,aa */ |
| 2871 | {0xaa, 0x18, 0x00de}, /* 00,18,de,aa */ |
| 2872 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 2873 | {0xaa, 0x1a, 0x0086}, /* 00,1a,86,aa */ |
| 2874 | {0xaa, 0x20, 0x00a8}, /* 00,20,a8,aa */ |
| 2875 | {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */ |
| 2876 | {0xaa, 0x23, 0x0000}, /* 00,23,00,aa */ |
| 2877 | {0xaa, 0x24, 0x0000}, /* 00,24,00,aa */ |
| 2878 | {0xaa, 0x40, 0x0033}, /* 00,40,33,aa */ |
| 2879 | {0xaa, 0x41, 0x0077}, /* 00,41,77,aa */ |
| 2880 | {0xaa, 0x42, 0x0053}, /* 00,42,53,aa */ |
| 2881 | {0xaa, 0x43, 0x00b0}, /* 00,43,b0,aa */ |
| 2882 | {0xaa, 0x4b, 0x0001}, /* 00,4b,01,aa */ |
| 2883 | {0xaa, 0x72, 0x0020}, /* 00,72,20,aa */ |
| 2884 | {0xaa, 0x73, 0x0000}, /* 00,73,00,aa */ |
| 2885 | {0xaa, 0x80, 0x0000}, /* 00,80,00,aa */ |
| 2886 | {0xaa, 0x85, 0x0050}, /* 00,85,50,aa */ |
| 2887 | {0xaa, 0x91, 0x0070}, /* 00,91,70,aa */ |
| 2888 | {0xaa, 0x92, 0x0072}, /* 00,92,72,aa */ |
| 2889 | {0xaa, 0x03, 0x0001}, /* 00,03,01,aa */ |
| 2890 | {0xaa, 0x10, 0x00a0}, /* 00,10,a0,aa */ |
| 2891 | {0xaa, 0x11, 0x0001}, /* 00,11,01,aa */ |
| 2892 | {0xaa, 0x30, 0x0000}, /* 00,30,00,aa */ |
| 2893 | {0xaa, 0x60, 0x0000}, /* 00,60,00,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2894 | {0xaa, 0xa0, ZC3XX_R01A_LASTFRAMESTATE}, /* 00,a0,1a,aa */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2895 | {0xaa, 0xa1, 0x0000}, /* 00,a1,00,aa */ |
| 2896 | {0xaa, 0xa2, 0x003f}, /* 00,a2,3f,aa */ |
| 2897 | {0xaa, 0xa3, 0x0028}, /* 00,a3,28,aa */ |
| 2898 | {0xaa, 0xa4, 0x0010}, /* 00,a4,10,aa */ |
| 2899 | {0xaa, 0xa5, 0x0020}, /* 00,a5,20,aa */ |
| 2900 | {0xaa, 0xb1, 0x0044}, /* 00,b1,44,aa */ |
| 2901 | {0xaa, 0xd0, 0x0001}, /* 00,d0,01,aa */ |
| 2902 | {0xaa, 0xd1, 0x0085}, /* 00,d1,85,aa */ |
| 2903 | {0xaa, 0xd2, 0x0080}, /* 00,d2,80,aa */ |
| 2904 | {0xaa, 0xd3, 0x0080}, /* 00,d3,80,aa */ |
| 2905 | {0xaa, 0xd4, 0x0080}, /* 00,d4,80,aa */ |
| 2906 | {0xaa, 0xd5, 0x0080}, /* 00,d5,80,aa */ |
| 2907 | {0xaa, 0xc0, 0x00c3}, /* 00,c0,c3,aa */ |
| 2908 | {0xaa, 0xc2, 0x0044}, /* 00,c2,44,aa */ |
| 2909 | {0xaa, 0xc4, 0x0040}, /* 00,c4,40,aa */ |
| 2910 | {0xaa, 0xc5, 0x0020}, /* 00,c5,20,aa */ |
| 2911 | {0xaa, 0xc6, 0x0008}, /* 00,c6,08,aa */ |
| 2912 | {0xaa, 0x03, 0x0004}, /* 00,03,04,aa */ |
| 2913 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 2914 | {0xaa, 0x40, 0x0030}, /* 00,40,30,aa */ |
| 2915 | {0xaa, 0x41, 0x0020}, /* 00,41,20,aa */ |
| 2916 | {0xaa, 0x42, 0x002d}, /* 00,42,2d,aa */ |
| 2917 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 2918 | {0xaa, 0x1c, 0x0050}, /* 00,1C,50,aa */ |
| 2919 | {0xaa, 0x11, 0x0081}, /* 00,11,81,aa */ |
| 2920 | {0xaa, 0x3b, 0x001d}, /* 00,3b,1D,aa */ |
| 2921 | {0xaa, 0x3c, 0x004c}, /* 00,3c,4C,aa */ |
| 2922 | {0xaa, 0x3d, 0x0018}, /* 00,3d,18,aa */ |
| 2923 | {0xaa, 0x3e, 0x006a}, /* 00,3e,6A,aa */ |
| 2924 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 2925 | {0xaa, 0x52, 0x00ff}, /* 00,52,FF,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2926 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 2927 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 2928 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
| 2929 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 2930 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 2931 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 2932 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 2933 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 2934 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2935 | {0xaa, 0x03, 0x0002}, /* 00,03,02,aa */ |
| 2936 | {0xaa, 0x51, 0x0027}, /* 00,51,27,aa */ |
| 2937 | {0xaa, 0x52, 0x0020}, /* 00,52,20,aa */ |
| 2938 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 2939 | {0xaa, 0x50, 0x0010}, /* 00,50,10,aa */ |
| 2940 | {0xaa, 0x51, 0x0010}, /* 00,51,10,aa */ |
| 2941 | {0xaa, 0x54, 0x0010}, /* 00,54,10,aa */ |
| 2942 | {0xaa, 0x55, 0x0010}, /* 00,55,10,aa */ |
| 2943 | {0xa0, 0xf0, 0x0199}, /* 01,99,F0,cc */ |
| 2944 | {0xa0, 0x80, 0x019a}, /* 01,9A,80,cc */ |
| 2945 | |
| 2946 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 2947 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 2948 | {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */ |
| 2949 | {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */ |
| 2950 | {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2951 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2952 | }; |
| 2953 | |
Jean-François Moine | 780e312 | 2010-10-19 04:29:10 -0300 | [diff] [blame] | 2954 | static const struct usb_action mc501cb_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2955 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 2956 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 2957 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 2958 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 2959 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 2960 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 2961 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 2962 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 2963 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 2964 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 2965 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ |
| 2966 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 2967 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 2968 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 2969 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 2970 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
| 2971 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d8,cc */ |
| 2972 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 2973 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 2974 | {0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,33,cc */ |
| 2975 | {0xa0, 0x34, ZC3XX_R087_EXPTIMEMID}, /* 00,87,34,cc */ |
| 2976 | {0xa0, 0x35, ZC3XX_R088_EXPTIMELOW}, /* 00,88,35,cc */ |
| 2977 | {0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,b0,cc */ |
| 2978 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2979 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2980 | {0xaa, 0x01, 0x0003}, /* 00,01,03,aa */ |
| 2981 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2982 | {0xaa, 0x03, 0x0000}, /* 00,03,00,aa */ |
| 2983 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 2984 | {0xaa, 0x11, 0x0080}, /* 00,11,80,aa */ |
| 2985 | {0xaa, 0x12, 0x0000}, /* 00,12,00,aa */ |
| 2986 | {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */ |
| 2987 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 2988 | {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */ |
| 2989 | {0xaa, 0x16, 0x0000}, /* 00,16,00,aa */ |
| 2990 | {0xaa, 0x17, 0x0001}, /* 00,17,01,aa */ |
| 2991 | {0xaa, 0x18, 0x00d8}, /* 00,18,d8,aa */ |
| 2992 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 2993 | {0xaa, 0x1a, 0x0088}, /* 00,1a,88,aa */ |
| 2994 | {0xaa, 0x20, 0x00a8}, /* 00,20,a8,aa */ |
| 2995 | {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */ |
| 2996 | {0xaa, 0x23, 0x0000}, /* 00,23,00,aa */ |
| 2997 | {0xaa, 0x24, 0x0000}, /* 00,24,00,aa */ |
| 2998 | {0xaa, 0x40, 0x0033}, /* 00,40,33,aa */ |
| 2999 | {0xaa, 0x41, 0x0077}, /* 00,41,77,aa */ |
| 3000 | {0xaa, 0x42, 0x0053}, /* 00,42,53,aa */ |
| 3001 | {0xaa, 0x43, 0x00b0}, /* 00,43,b0,aa */ |
| 3002 | {0xaa, 0x4b, 0x0001}, /* 00,4b,01,aa */ |
| 3003 | {0xaa, 0x72, 0x0020}, /* 00,72,20,aa */ |
| 3004 | {0xaa, 0x73, 0x0000}, /* 00,73,00,aa */ |
| 3005 | {0xaa, 0x80, 0x0000}, /* 00,80,00,aa */ |
| 3006 | {0xaa, 0x85, 0x0050}, /* 00,85,50,aa */ |
| 3007 | {0xaa, 0x91, 0x0070}, /* 00,91,70,aa */ |
| 3008 | {0xaa, 0x92, 0x0072}, /* 00,92,72,aa */ |
| 3009 | {0xaa, 0x03, 0x0001}, /* 00,03,01,aa */ |
| 3010 | {0xaa, 0x10, 0x00a0}, /* 00,10,a0,aa */ |
| 3011 | {0xaa, 0x11, 0x0001}, /* 00,11,01,aa */ |
| 3012 | {0xaa, 0x30, 0x0000}, /* 00,30,00,aa */ |
| 3013 | {0xaa, 0x60, 0x0000}, /* 00,60,00,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3014 | {0xaa, 0xa0, ZC3XX_R01A_LASTFRAMESTATE}, /* 00,a0,1a,aa */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3015 | {0xaa, 0xa1, 0x0000}, /* 00,a1,00,aa */ |
| 3016 | {0xaa, 0xa2, 0x003f}, /* 00,a2,3f,aa */ |
| 3017 | {0xaa, 0xa3, 0x0028}, /* 00,a3,28,aa */ |
| 3018 | {0xaa, 0xa4, 0x0010}, /* 00,a4,10,aa */ |
| 3019 | {0xaa, 0xa5, 0x0020}, /* 00,a5,20,aa */ |
| 3020 | {0xaa, 0xb1, 0x0044}, /* 00,b1,44,aa */ |
| 3021 | {0xaa, 0xd0, 0x0001}, /* 00,d0,01,aa */ |
| 3022 | {0xaa, 0xd1, 0x0085}, /* 00,d1,85,aa */ |
| 3023 | {0xaa, 0xd2, 0x0080}, /* 00,d2,80,aa */ |
| 3024 | {0xaa, 0xd3, 0x0080}, /* 00,d3,80,aa */ |
| 3025 | {0xaa, 0xd4, 0x0080}, /* 00,d4,80,aa */ |
| 3026 | {0xaa, 0xd5, 0x0080}, /* 00,d5,80,aa */ |
| 3027 | {0xaa, 0xc0, 0x00c3}, /* 00,c0,c3,aa */ |
| 3028 | {0xaa, 0xc2, 0x0044}, /* 00,c2,44,aa */ |
| 3029 | {0xaa, 0xc4, 0x0040}, /* 00,c4,40,aa */ |
| 3030 | {0xaa, 0xc5, 0x0020}, /* 00,c5,20,aa */ |
| 3031 | {0xaa, 0xc6, 0x0008}, /* 00,c6,08,aa */ |
| 3032 | {0xaa, 0x03, 0x0004}, /* 00,03,04,aa */ |
| 3033 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 3034 | {0xaa, 0x40, 0x0030}, /* 00,40,30,aa */ |
| 3035 | {0xaa, 0x41, 0x0020}, /* 00,41,20,aa */ |
| 3036 | {0xaa, 0x42, 0x002d}, /* 00,42,2d,aa */ |
| 3037 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3038 | {0xaa, 0x1c, 0x0050}, /* 00,1c,50,aa */ |
| 3039 | {0xaa, 0x11, 0x0081}, /* 00,11,81,aa */ |
| 3040 | {0xaa, 0x3b, 0x003a}, /* 00,3b,3A,aa */ |
| 3041 | {0xaa, 0x3c, 0x0098}, /* 00,3c,98,aa */ |
| 3042 | {0xaa, 0x3d, 0x0030}, /* 00,3d,30,aa */ |
| 3043 | {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */ |
| 3044 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 3045 | {0xaa, 0x52, 0x00ff}, /* 00,52,FF,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3046 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 3047 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 3048 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
| 3049 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 3050 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 3051 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 3052 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 3053 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 3054 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3055 | {0xaa, 0x03, 0x0002}, /* 00,03,02,aa */ |
| 3056 | {0xaa, 0x51, 0x004e}, /* 00,51,4E,aa */ |
| 3057 | {0xaa, 0x52, 0x0041}, /* 00,52,41,aa */ |
| 3058 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3059 | {0xaa, 0x50, 0x0010}, /* 00,50,10,aa */ |
| 3060 | {0xaa, 0x51, 0x0010}, /* 00,51,10,aa */ |
| 3061 | {0xaa, 0x54, 0x0010}, /* 00,54,10,aa */ |
| 3062 | {0xaa, 0x55, 0x0010}, /* 00,55,10,aa */ |
| 3063 | {0xa0, 0xf0, 0x0199}, /* 01,99,F0,cc */ |
| 3064 | {0xa0, 0x80, 0x019a}, /* 01,9A,80,cc */ |
| 3065 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3066 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3067 | {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */ |
| 3068 | {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */ |
| 3069 | {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3070 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3071 | }; |
| 3072 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3073 | static const struct usb_action mc501cb_50HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3074 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3075 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3076 | {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */ |
| 3077 | {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */ |
| 3078 | {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */ |
| 3079 | {0xaa, 0x3c, 0x004c}, /* 00,3C,4C,aa */ |
| 3080 | {0xaa, 0x3d, 0x001d}, /* 00,3D,1D,aa */ |
| 3081 | {0xaa, 0x3e, 0x004c}, /* 00,3E,4C,aa */ |
| 3082 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3083 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3084 | {0xaa, 0x36, 0x003a}, /* 00,36,3A,aa */ |
| 3085 | {0xaa, 0x37, 0x0098}, /* 00,37,98,aa */ |
| 3086 | {0xaa, 0x3b, 0x003a}, /* 00,3B,3A,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3087 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3088 | }; |
| 3089 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3090 | static const struct usb_action mc501cb_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3091 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3092 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3093 | {0xaa, 0x36, 0x003a}, /* 00,36,3A,aa */ |
| 3094 | {0xaa, 0x37, 0x0098}, /* 00,37,98,aa */ |
| 3095 | {0xaa, 0x3b, 0x003a}, /* 00,3B,3A,aa */ |
| 3096 | {0xaa, 0x3c, 0x0098}, /* 00,3C,98,aa */ |
| 3097 | {0xaa, 0x3d, 0x003a}, /* 00,3D,3A,aa */ |
| 3098 | {0xaa, 0x3e, 0x0098}, /* 00,3E,98,aa */ |
| 3099 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3100 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3101 | {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */ |
| 3102 | {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */ |
| 3103 | {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3104 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3105 | }; |
| 3106 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3107 | static const struct usb_action mc501cb_60HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3108 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3109 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3110 | {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */ |
| 3111 | {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */ |
| 3112 | {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */ |
| 3113 | {0xaa, 0x3e, 0x006a}, /* 00,3E,6A,aa */ |
| 3114 | {0xaa, 0x3b, 0x0018}, /* 00,3B,18,aa */ |
| 3115 | {0xaa, 0x3c, 0x006a}, /* 00,3C,6A,aa */ |
| 3116 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3117 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3118 | {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */ |
| 3119 | {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */ |
| 3120 | {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3121 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3122 | }; |
| 3123 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3124 | static const struct usb_action mc501cb_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3125 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3126 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3127 | {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */ |
| 3128 | {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */ |
| 3129 | {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */ |
| 3130 | {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */ |
| 3131 | {0xaa, 0x3b, 0x0030}, /* 00,3B,30,aa */ |
| 3132 | {0xaa, 0x3c, 0x00d4}, /* 00,3C,D4,aa */ |
| 3133 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3134 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3135 | {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */ |
| 3136 | {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */ |
| 3137 | {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3138 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3139 | }; |
| 3140 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3141 | static const struct usb_action mc501cb_NoFlikerScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3142 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3143 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3144 | {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */ |
| 3145 | {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */ |
| 3146 | {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */ |
| 3147 | {0xaa, 0x3e, 0x006a}, /* 00,3E,6A,aa */ |
| 3148 | {0xaa, 0x3b, 0x0018}, /* 00,3B,18,aa */ |
| 3149 | {0xaa, 0x3c, 0x006a}, /* 00,3C,6A,aa */ |
| 3150 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3151 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3152 | {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */ |
| 3153 | {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */ |
| 3154 | {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3155 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3156 | }; |
| 3157 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3158 | static const struct usb_action mc501cb_NoFliker[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3159 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3160 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3161 | {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */ |
| 3162 | {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */ |
| 3163 | {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */ |
| 3164 | {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */ |
| 3165 | {0xaa, 0x3b, 0x0030}, /* 00,3B,30,aa */ |
| 3166 | {0xaa, 0x3c, 0x00d4}, /* 00,3C,D4,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3167 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3168 | }; |
| 3169 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3170 | /* from zs211.inf */ |
| 3171 | static const struct usb_action ov7620_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3172 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 3173 | {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, /* 00,02,40,cc */ |
| 3174 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,00,cc */ |
| 3175 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 3176 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,06,cc */ |
| 3177 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, /* 00,83,02,cc */ |
| 3178 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, /* 00,85,01,cc */ |
| 3179 | {0xa0, 0x80, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,80,cc */ |
| 3180 | {0xa0, 0x81, ZC3XX_R087_EXPTIMEMID}, /* 00,87,81,cc */ |
| 3181 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, /* 00,88,10,cc */ |
| 3182 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,a1,cc */ |
| 3183 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 3184 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 3185 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 3186 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 3187 | {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d8,cc */ |
| 3188 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 3189 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 3190 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 3191 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 3192 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 3193 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 3194 | {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,de,cc */ |
| 3195 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3196 | {0xaa, 0x12, 0x0088}, /* 00,12,88,aa */ |
| 3197 | {0xaa, 0x12, 0x0048}, /* 00,12,48,aa */ |
| 3198 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3199 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3200 | {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */ |
| 3201 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 3202 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 3203 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
| 3204 | {0xaa, 0x17, 0x0018}, /* 00,17,18,aa */ |
| 3205 | {0xaa, 0x18, 0x00ba}, /* 00,18,ba,aa */ |
| 3206 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 3207 | {0xaa, 0x1a, 0x00f1}, /* 00,1a,f1,aa */ |
| 3208 | {0xaa, 0x20, 0x0040}, /* 00,20,40,aa */ |
| 3209 | {0xaa, 0x24, 0x0088}, /* 00,24,88,aa */ |
| 3210 | {0xaa, 0x25, 0x0078}, /* 00,25,78,aa */ |
| 3211 | {0xaa, 0x27, 0x00f6}, /* 00,27,f6,aa */ |
| 3212 | {0xaa, 0x28, 0x00a0}, /* 00,28,a0,aa */ |
| 3213 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 3214 | {0xaa, 0x2a, 0x0083}, /* 00,2a,83,aa */ |
| 3215 | {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */ |
| 3216 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
| 3217 | {0xaa, 0x74, 0x0020}, /* 00,74,20,aa */ |
| 3218 | {0xaa, 0x61, 0x0068}, /* 00,61,68,aa */ |
| 3219 | {0xaa, 0x64, 0x0088}, /* 00,64,88,aa */ |
| 3220 | {0xaa, 0x00, 0x0000}, /* 00,00,00,aa */ |
| 3221 | {0xaa, 0x06, 0x0080}, /* 00,06,80,aa */ |
| 3222 | {0xaa, 0x01, 0x0090}, /* 00,01,90,aa */ |
| 3223 | {0xaa, 0x02, 0x0030}, /* 00,02,30,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3224 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,77,cc */ |
| 3225 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 3226 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 3227 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3228 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3229 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 3230 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 3231 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 3232 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 3233 | {0xa0, 0x68, ZC3XX_R116_RGAIN}, /* 01,16,68,cc */ |
| 3234 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 3235 | {0xa0, 0x40, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,40,cc */ |
| 3236 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 3237 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,50,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3238 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3239 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3240 | static const struct usb_action ov7620_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3241 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 3242 | {0xa0, 0x50, ZC3XX_R002_CLOCKSELECT}, /* 00,02,50,cc */ |
| 3243 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,00,cc */ |
| 3244 | /* mx change? */ |
| 3245 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 3246 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,06,cc */ |
| 3247 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, /* 00,83,02,cc */ |
| 3248 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, /* 00,85,01,cc */ |
| 3249 | {0xa0, 0x80, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,80,cc */ |
| 3250 | {0xa0, 0x81, ZC3XX_R087_EXPTIMEMID}, /* 00,87,81,cc */ |
| 3251 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, /* 00,88,10,cc */ |
| 3252 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,a1,cc */ |
| 3253 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 3254 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 3255 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 3256 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 3257 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ |
| 3258 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 3259 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 3260 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 3261 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 3262 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 3263 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 3264 | {0xa0, 0xd6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d6,cc */ |
| 3265 | /* OV7648 00,9c,d8,cc */ |
| 3266 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3267 | {0xaa, 0x12, 0x0088}, /* 00,12,88,aa */ |
| 3268 | {0xaa, 0x12, 0x0048}, /* 00,12,48,aa */ |
| 3269 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3270 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3271 | {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */ |
| 3272 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 3273 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 3274 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
| 3275 | {0xaa, 0x24, 0x0088}, /* 00,24,88,aa */ |
| 3276 | {0xaa, 0x25, 0x0078}, /* 00,25,78,aa */ |
| 3277 | {0xaa, 0x17, 0x0018}, /* 00,17,18,aa */ |
| 3278 | {0xaa, 0x18, 0x00ba}, /* 00,18,ba,aa */ |
| 3279 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 3280 | {0xaa, 0x1a, 0x00f2}, /* 00,1a,f2,aa */ |
| 3281 | {0xaa, 0x20, 0x0040}, /* 00,20,40,aa */ |
| 3282 | {0xaa, 0x27, 0x00f6}, /* 00,27,f6,aa */ |
| 3283 | {0xaa, 0x28, 0x00a0}, /* 00,28,a0,aa */ |
| 3284 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 3285 | {0xaa, 0x2a, 0x0083}, /* 00,2a,83,aa */ |
| 3286 | {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */ |
| 3287 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
| 3288 | {0xaa, 0x74, 0x0020}, /* 00,74,20,aa */ |
| 3289 | {0xaa, 0x61, 0x0068}, /* 00,61,68,aa */ |
| 3290 | {0xaa, 0x64, 0x0088}, /* 00,64,88,aa */ |
| 3291 | {0xaa, 0x00, 0x0000}, /* 00,00,00,aa */ |
| 3292 | {0xaa, 0x06, 0x0080}, /* 00,06,80,aa */ |
| 3293 | {0xaa, 0x01, 0x0090}, /* 00,01,90,aa */ |
| 3294 | {0xaa, 0x02, 0x0030}, /* 00,02,30,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3295 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,77,cc */ |
| 3296 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 3297 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 3298 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 3299 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
| 3300 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 3301 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 3302 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 3303 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 3304 | {0xa0, 0x68, ZC3XX_R116_RGAIN}, /* 01,16,68,cc */ |
| 3305 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 3306 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,50,cc */ |
| 3307 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 3308 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,50,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3309 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3310 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3311 | static const struct usb_action ov7620_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3312 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3313 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 3314 | {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */ |
| 3315 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3316 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3317 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3318 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 3319 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 3320 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3321 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3322 | {0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,83,cc */ |
| 3323 | {0xaa, 0x10, 0x0082}, /* 00,10,82,aa */ |
| 3324 | {0xaa, 0x76, 0x0003}, /* 00,76,03,aa */ |
| 3325 | /* {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, * 00,02,40,cc |
| 3326 | if mode0 (640x480) */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3327 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3328 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3329 | static const struct usb_action ov7620_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3330 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3331 | /* (bug in zs211.inf) */ |
| 3332 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 3333 | {0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */ |
| 3334 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3335 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
| 3336 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3337 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 3338 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 3339 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3340 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3341 | {0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,83,cc */ |
| 3342 | {0xaa, 0x10, 0x0020}, /* 00,10,20,aa */ |
| 3343 | {0xaa, 0x76, 0x0003}, /* 00,76,03,aa */ |
| 3344 | /* {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, * 00,02,40,cc |
| 3345 | * if mode0 (640x480) */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3346 | /* ?? in gspca v1, it was |
| 3347 | {0xa0, 0x00, 0x0039}, * 00,00,00,dd * |
| 3348 | {0xa1, 0x01, 0x0037}, */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3349 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3350 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3351 | static const struct usb_action ov7620_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3352 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3353 | /* (bug in zs211.inf) */ |
| 3354 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 3355 | {0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */ |
| 3356 | {0xaa, 0x75, 0x008e}, /* 00,75,8e,aa */ |
| 3357 | {0xaa, 0x2d, 0x0001}, /* 00,2d,01,aa */ |
| 3358 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3359 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 3360 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 3361 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3362 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3363 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,01,cc */ |
| 3364 | /* {0xa0, 0x44, ZC3XX_R002_CLOCKSELECT}, * 00,02,44,cc |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 3365 | * if mode1 (320x240) */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3366 | /* ?? was |
| 3367 | {0xa0, 0x00, 0x0039}, * 00,00,00,dd * |
| 3368 | {0xa1, 0x01, 0x0037}, */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3369 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3370 | }; |
| 3371 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3372 | static const struct usb_action ov7630c_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3373 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 3374 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 3375 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 3376 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 3377 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3378 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 3379 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, |
| 3380 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 3381 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
| 3382 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3383 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3384 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3385 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 3386 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3387 | {0xaa, 0x12, 0x0080}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3388 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, |
| 3389 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, |
| 3390 | {0xa0, 0x90, ZC3XX_R086_EXPTIMEHIGH}, |
| 3391 | {0xa0, 0x91, ZC3XX_R087_EXPTIMEMID}, |
| 3392 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, |
| 3393 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 3394 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 3395 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3396 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 3397 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3398 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3399 | {0xaa, 0x12, 0x0069}, |
| 3400 | {0xaa, 0x04, 0x0020}, |
| 3401 | {0xaa, 0x06, 0x0050}, |
| 3402 | {0xaa, 0x13, 0x0083}, |
| 3403 | {0xaa, 0x14, 0x0000}, |
| 3404 | {0xaa, 0x15, 0x0024}, |
| 3405 | {0xaa, 0x17, 0x0018}, |
| 3406 | {0xaa, 0x18, 0x00ba}, |
| 3407 | {0xaa, 0x19, 0x0002}, |
| 3408 | {0xaa, 0x1a, 0x00f6}, |
| 3409 | {0xaa, 0x1b, 0x0002}, |
| 3410 | {0xaa, 0x20, 0x00c2}, |
| 3411 | {0xaa, 0x24, 0x0060}, |
| 3412 | {0xaa, 0x25, 0x0040}, |
| 3413 | {0xaa, 0x26, 0x0030}, |
| 3414 | {0xaa, 0x27, 0x00ea}, |
| 3415 | {0xaa, 0x28, 0x00a0}, |
| 3416 | {0xaa, 0x21, 0x0000}, |
| 3417 | {0xaa, 0x2a, 0x0081}, |
| 3418 | {0xaa, 0x2b, 0x0096}, |
| 3419 | {0xaa, 0x2d, 0x0094}, |
| 3420 | {0xaa, 0x2f, 0x003d}, |
| 3421 | {0xaa, 0x30, 0x0024}, |
| 3422 | {0xaa, 0x60, 0x0000}, |
| 3423 | {0xaa, 0x61, 0x0040}, |
| 3424 | {0xaa, 0x68, 0x007c}, |
| 3425 | {0xaa, 0x6f, 0x0015}, |
| 3426 | {0xaa, 0x75, 0x0088}, |
| 3427 | {0xaa, 0x77, 0x00b5}, |
| 3428 | {0xaa, 0x01, 0x0060}, |
| 3429 | {0xaa, 0x02, 0x0060}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3430 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3431 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 3432 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 3433 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 3434 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3435 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3436 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3437 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 3438 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 3439 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 3440 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 3441 | {0xa0, 0x46, ZC3XX_R118_BGAIN}, |
| 3442 | {0xa0, 0x04, ZC3XX_R113_RGB03}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3443 | /* 0x10, */ |
| 3444 | {0xa1, 0x01, 0x0002}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3445 | {0xa0, 0x50, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3446 | {0xa0, 0xf8, ZC3XX_R10B_RGB01}, |
| 3447 | {0xa0, 0xf8, ZC3XX_R10C_RGB02}, |
| 3448 | {0xa0, 0xf8, ZC3XX_R10D_RGB10}, |
| 3449 | {0xa0, 0x50, ZC3XX_R10E_RGB11}, |
| 3450 | {0xa0, 0xf8, ZC3XX_R10F_RGB12}, |
| 3451 | {0xa0, 0xf8, ZC3XX_R110_RGB20}, |
| 3452 | {0xa0, 0xf8, ZC3XX_R111_RGB21}, |
| 3453 | {0xa0, 0x50, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3454 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3455 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 3456 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3457 | {0xa1, 0x01, 0x01c8}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3458 | {0xa1, 0x01, 0x01c9}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3459 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3460 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 3461 | {0xa0, 0x01, ZC3XX_R120_GAMMA00}, /* gamma 2 ?*/ |
| 3462 | {0xa0, 0x0c, ZC3XX_R121_GAMMA01}, |
| 3463 | {0xa0, 0x1f, ZC3XX_R122_GAMMA02}, |
| 3464 | {0xa0, 0x3a, ZC3XX_R123_GAMMA03}, |
| 3465 | {0xa0, 0x53, ZC3XX_R124_GAMMA04}, |
| 3466 | {0xa0, 0x6d, ZC3XX_R125_GAMMA05}, |
| 3467 | {0xa0, 0x85, ZC3XX_R126_GAMMA06}, |
| 3468 | {0xa0, 0x9c, ZC3XX_R127_GAMMA07}, |
| 3469 | {0xa0, 0xb0, ZC3XX_R128_GAMMA08}, |
| 3470 | {0xa0, 0xc2, ZC3XX_R129_GAMMA09}, |
| 3471 | {0xa0, 0xd1, ZC3XX_R12A_GAMMA0A}, |
| 3472 | {0xa0, 0xde, ZC3XX_R12B_GAMMA0B}, |
| 3473 | {0xa0, 0xe9, ZC3XX_R12C_GAMMA0C}, |
| 3474 | {0xa0, 0xf2, ZC3XX_R12D_GAMMA0D}, |
| 3475 | {0xa0, 0xf9, ZC3XX_R12E_GAMMA0E}, |
| 3476 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 3477 | {0xa0, 0x05, ZC3XX_R130_GAMMA10}, |
| 3478 | {0xa0, 0x0f, ZC3XX_R131_GAMMA11}, |
| 3479 | {0xa0, 0x16, ZC3XX_R132_GAMMA12}, |
| 3480 | {0xa0, 0x1a, ZC3XX_R133_GAMMA13}, |
| 3481 | {0xa0, 0x19, ZC3XX_R134_GAMMA14}, |
| 3482 | {0xa0, 0x19, ZC3XX_R135_GAMMA15}, |
| 3483 | {0xa0, 0x17, ZC3XX_R136_GAMMA16}, |
| 3484 | {0xa0, 0x15, ZC3XX_R137_GAMMA17}, |
| 3485 | {0xa0, 0x12, ZC3XX_R138_GAMMA18}, |
| 3486 | {0xa0, 0x10, ZC3XX_R139_GAMMA19}, |
| 3487 | {0xa0, 0x0e, ZC3XX_R13A_GAMMA1A}, |
| 3488 | {0xa0, 0x0b, ZC3XX_R13B_GAMMA1B}, |
| 3489 | {0xa0, 0x09, ZC3XX_R13C_GAMMA1C}, |
| 3490 | {0xa0, 0x08, ZC3XX_R13D_GAMMA1D}, |
| 3491 | {0xa0, 0x06, ZC3XX_R13E_GAMMA1E}, |
| 3492 | {0xa0, 0x03, ZC3XX_R13F_GAMMA1F}, |
| 3493 | {0xa0, 0x50, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3494 | {0xa0, 0xf8, ZC3XX_R10B_RGB01}, |
| 3495 | {0xa0, 0xf8, ZC3XX_R10C_RGB02}, |
| 3496 | {0xa0, 0xf8, ZC3XX_R10D_RGB10}, |
| 3497 | {0xa0, 0x50, ZC3XX_R10E_RGB11}, |
| 3498 | {0xa0, 0xf8, ZC3XX_R10F_RGB12}, |
| 3499 | {0xa0, 0xf8, ZC3XX_R110_RGB20}, |
| 3500 | {0xa0, 0xf8, ZC3XX_R111_RGB21}, |
| 3501 | {0xa0, 0x50, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3502 | |
| 3503 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3504 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3505 | {0xaa, 0x10, 0x001b}, |
| 3506 | {0xaa, 0x76, 0x0002}, |
| 3507 | {0xaa, 0x2a, 0x0081}, |
| 3508 | {0xaa, 0x2b, 0x0000}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3509 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3510 | {0xa0, 0x01, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3511 | {0xa0, 0xb8, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 3512 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3513 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3514 | {0xa0, 0x37, ZC3XX_R197_ANTIFLICKERLOW}, |
| 3515 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 3516 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 3517 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3518 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3519 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
| 3520 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 3521 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3522 | {0xaa, 0x13, 0x0083}, /* 40 */ |
| 3523 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3524 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3525 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3526 | }; |
| 3527 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3528 | static const struct usb_action ov7630c_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3529 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 3530 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 3531 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3532 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 3533 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, |
| 3534 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 3535 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
| 3536 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3537 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3538 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3539 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 3540 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3541 | |
| 3542 | {0xaa, 0x12, 0x0080}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3543 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, |
| 3544 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, |
| 3545 | {0xa0, 0x90, ZC3XX_R086_EXPTIMEHIGH}, |
| 3546 | {0xa0, 0x91, ZC3XX_R087_EXPTIMEMID}, |
| 3547 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, |
| 3548 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 3549 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 3550 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3551 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 3552 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3553 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3554 | {0xaa, 0x12, 0x0069}, /* i2c */ |
| 3555 | {0xaa, 0x04, 0x0020}, |
| 3556 | {0xaa, 0x06, 0x0050}, |
| 3557 | {0xaa, 0x13, 0x00c3}, |
| 3558 | {0xaa, 0x14, 0x0000}, |
| 3559 | {0xaa, 0x15, 0x0024}, |
| 3560 | {0xaa, 0x19, 0x0003}, |
| 3561 | {0xaa, 0x1a, 0x00f6}, |
| 3562 | {0xaa, 0x1b, 0x0002}, |
| 3563 | {0xaa, 0x20, 0x00c2}, |
| 3564 | {0xaa, 0x24, 0x0060}, |
| 3565 | {0xaa, 0x25, 0x0040}, |
| 3566 | {0xaa, 0x26, 0x0030}, |
| 3567 | {0xaa, 0x27, 0x00ea}, |
| 3568 | {0xaa, 0x28, 0x00a0}, |
| 3569 | {0xaa, 0x21, 0x0000}, |
| 3570 | {0xaa, 0x2a, 0x0081}, |
| 3571 | {0xaa, 0x2b, 0x0096}, |
| 3572 | {0xaa, 0x2d, 0x0084}, |
| 3573 | {0xaa, 0x2f, 0x003d}, |
| 3574 | {0xaa, 0x30, 0x0024}, |
| 3575 | {0xaa, 0x60, 0x0000}, |
| 3576 | {0xaa, 0x61, 0x0040}, |
| 3577 | {0xaa, 0x68, 0x007c}, |
| 3578 | {0xaa, 0x6f, 0x0015}, |
| 3579 | {0xaa, 0x75, 0x0088}, |
| 3580 | {0xaa, 0x77, 0x00b5}, |
| 3581 | {0xaa, 0x01, 0x0060}, |
| 3582 | {0xaa, 0x02, 0x0060}, |
| 3583 | {0xaa, 0x17, 0x0018}, |
| 3584 | {0xaa, 0x18, 0x00ba}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3585 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3586 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 3587 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 3588 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 3589 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3590 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3591 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3592 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 3593 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 3594 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 3595 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 3596 | {0xa0, 0x46, ZC3XX_R118_BGAIN}, |
| 3597 | {0xa0, 0x04, ZC3XX_R113_RGB03}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3598 | |
| 3599 | {0xa1, 0x01, 0x0002}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3600 | {0xa0, 0x4e, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3601 | {0xa0, 0xfe, ZC3XX_R10B_RGB01}, |
| 3602 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3603 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 3604 | {0xa0, 0x4d, ZC3XX_R10E_RGB11}, |
| 3605 | {0xa0, 0xfc, ZC3XX_R10F_RGB12}, |
| 3606 | {0xa0, 0x00, ZC3XX_R110_RGB20}, |
| 3607 | {0xa0, 0xf6, ZC3XX_R111_RGB21}, |
| 3608 | {0xa0, 0x4a, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3609 | |
| 3610 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3611 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 3612 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3613 | {0xa1, 0x01, 0x01c8}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3614 | {0xa1, 0x01, 0x01c9}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3615 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3616 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 3617 | {0xa0, 0x16, ZC3XX_R120_GAMMA00}, /* gamma ~4 */ |
| 3618 | {0xa0, 0x3a, ZC3XX_R121_GAMMA01}, |
| 3619 | {0xa0, 0x5b, ZC3XX_R122_GAMMA02}, |
| 3620 | {0xa0, 0x7c, ZC3XX_R123_GAMMA03}, |
| 3621 | {0xa0, 0x94, ZC3XX_R124_GAMMA04}, |
| 3622 | {0xa0, 0xa9, ZC3XX_R125_GAMMA05}, |
| 3623 | {0xa0, 0xbb, ZC3XX_R126_GAMMA06}, |
| 3624 | {0xa0, 0xca, ZC3XX_R127_GAMMA07}, |
| 3625 | {0xa0, 0xd7, ZC3XX_R128_GAMMA08}, |
| 3626 | {0xa0, 0xe1, ZC3XX_R129_GAMMA09}, |
| 3627 | {0xa0, 0xea, ZC3XX_R12A_GAMMA0A}, |
| 3628 | {0xa0, 0xf1, ZC3XX_R12B_GAMMA0B}, |
| 3629 | {0xa0, 0xf7, ZC3XX_R12C_GAMMA0C}, |
| 3630 | {0xa0, 0xfc, ZC3XX_R12D_GAMMA0D}, |
| 3631 | {0xa0, 0xff, ZC3XX_R12E_GAMMA0E}, |
| 3632 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 3633 | {0xa0, 0x20, ZC3XX_R130_GAMMA10}, |
| 3634 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 3635 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 3636 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 3637 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 3638 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 3639 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 3640 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 3641 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 3642 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 3643 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 3644 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 3645 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 3646 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 3647 | {0xa0, 0x00, ZC3XX_R13E_GAMMA1E}, |
| 3648 | {0xa0, 0x01, ZC3XX_R13F_GAMMA1F}, |
| 3649 | {0xa0, 0x4e, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3650 | {0xa0, 0xfe, ZC3XX_R10B_RGB01}, |
| 3651 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3652 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 3653 | {0xa0, 0x4d, ZC3XX_R10E_RGB11}, |
| 3654 | {0xa0, 0xfc, ZC3XX_R10F_RGB12}, |
| 3655 | {0xa0, 0x00, ZC3XX_R110_RGB20}, |
| 3656 | {0xa0, 0xf6, ZC3XX_R111_RGB21}, |
| 3657 | {0xa0, 0x4a, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3658 | |
| 3659 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3660 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3661 | {0xaa, 0x10, 0x000d}, |
| 3662 | {0xaa, 0x76, 0x0002}, |
| 3663 | {0xaa, 0x2a, 0x0081}, |
| 3664 | {0xaa, 0x2b, 0x0000}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3665 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3666 | {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3667 | {0xa0, 0xd8, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 3668 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3669 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3670 | {0xa0, 0x1b, ZC3XX_R197_ANTIFLICKERLOW}, |
| 3671 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 3672 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 3673 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3674 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3675 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
| 3676 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 3677 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3678 | {0xaa, 0x13, 0x00c3}, |
| 3679 | |
| 3680 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3681 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3682 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3683 | }; |
| 3684 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3685 | static const struct usb_action pas106b_Initial_com[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3686 | /* Sream and Sensor specific */ |
| 3687 | {0xa1, 0x01, 0x0010}, /* CMOSSensorSelect */ |
| 3688 | /* System */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3689 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* SystemControl */ |
| 3690 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* SystemControl */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3691 | /* Picture size */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3692 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* ClockSelect */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3693 | {0xa0, 0x03, 0x003a}, |
| 3694 | {0xa0, 0x0c, 0x003b}, |
| 3695 | {0xa0, 0x04, 0x0038}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3696 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3697 | }; |
| 3698 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3699 | static const struct usb_action pas106b_InitialScale[] = { /* 176x144 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3700 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3701 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3702 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3703 | {0xa0, 0x0f, ZC3XX_R010_CMOSSENSORSELECT}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3704 | /* Picture size */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3705 | {0xa0, 0x00, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3706 | {0xa0, 0xb0, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3707 | {0xa0, 0x00, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3708 | {0xa0, 0x90, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3709 | /* System */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3710 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3711 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3712 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3713 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3714 | /* Sensor Interface */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3715 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3716 | /* Window inside sensor array */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3717 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, |
| 3718 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3719 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, |
| 3720 | {0xa0, 0x28, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3721 | {0xa0, 0x68, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3722 | /* Init the sensor */ |
| 3723 | {0xaa, 0x02, 0x0004}, |
| 3724 | {0xaa, 0x08, 0x0000}, |
| 3725 | {0xaa, 0x09, 0x0005}, |
| 3726 | {0xaa, 0x0a, 0x0002}, |
| 3727 | {0xaa, 0x0b, 0x0002}, |
| 3728 | {0xaa, 0x0c, 0x0005}, |
| 3729 | {0xaa, 0x0d, 0x0000}, |
| 3730 | {0xaa, 0x0e, 0x0002}, |
| 3731 | {0xaa, 0x14, 0x0081}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 3732 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3733 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3734 | /* Frame retreiving */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3735 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3736 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3737 | {0xa0, 0xa0, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3738 | /* Unknown */ |
| 3739 | {0xa0, 0x00, 0x01ad}, |
| 3740 | /* Sharpness */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3741 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3742 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 3743 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3744 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3745 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3746 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3747 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3748 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3749 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3750 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3751 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3752 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3753 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3754 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3755 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3756 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3757 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3758 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3759 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3760 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3761 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3762 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3763 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3764 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3765 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3766 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3767 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3768 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3769 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 3770 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3771 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 3772 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 3773 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 3774 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 3775 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 3776 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3777 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3778 | {0xa0, 0x03, ZC3XX_R181_WINXSTART}, |
| 3779 | {0xa0, 0x08, ZC3XX_R182_WINXWIDTH}, |
| 3780 | {0xa0, 0x16, ZC3XX_R183_WINXCENTER}, |
| 3781 | {0xa0, 0x03, ZC3XX_R184_WINYSTART}, |
| 3782 | {0xa0, 0x05, ZC3XX_R185_WINYWIDTH}, |
| 3783 | {0xa0, 0x14, ZC3XX_R186_WINYCENTER}, |
| 3784 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3785 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3786 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3787 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3788 | {0xa0, 0xb1, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 3789 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3790 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3791 | {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW}, |
| 3792 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 3793 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3794 | /* sensor on */ |
| 3795 | {0xaa, 0x07, 0x00b1}, |
| 3796 | {0xaa, 0x05, 0x0003}, |
| 3797 | {0xaa, 0x04, 0x0001}, |
| 3798 | {0xaa, 0x03, 0x003b}, |
| 3799 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3800 | {0xa0, 0x20, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3801 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3802 | {0xa0, 0xa0, ZC3XX_R11D_GLOBALGAIN}, |
| 3803 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3804 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3805 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3806 | {0xa1, 0x01, 0x0180}, /* AutoCorrectEnable */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3807 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3808 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3809 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 3810 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 3811 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3812 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3813 | }; |
| 3814 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3815 | static const struct usb_action pas106b_Initial[] = { /* 352x288 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3816 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3817 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3818 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3819 | {0xa0, 0x0f, ZC3XX_R010_CMOSSENSORSELECT}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3820 | /* Picture size */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3821 | {0xa0, 0x01, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3822 | {0xa0, 0x60, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3823 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3824 | {0xa0, 0x20, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3825 | /* System */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3826 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3827 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3828 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3829 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3830 | /* Sensor Interface */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3831 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3832 | /* Window inside sensor array */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3833 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, |
| 3834 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3835 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, |
| 3836 | {0xa0, 0x28, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3837 | {0xa0, 0x68, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3838 | /* Init the sensor */ |
| 3839 | {0xaa, 0x02, 0x0004}, |
| 3840 | {0xaa, 0x08, 0x0000}, |
| 3841 | {0xaa, 0x09, 0x0005}, |
| 3842 | {0xaa, 0x0a, 0x0002}, |
| 3843 | {0xaa, 0x0b, 0x0002}, |
| 3844 | {0xaa, 0x0c, 0x0005}, |
| 3845 | {0xaa, 0x0d, 0x0000}, |
| 3846 | {0xaa, 0x0e, 0x0002}, |
| 3847 | {0xaa, 0x14, 0x0081}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 3848 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3849 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3850 | /* Frame retreiving */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3851 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3852 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3853 | {0xa0, 0xa0, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3854 | /* Unknown */ |
| 3855 | {0xa0, 0x00, 0x01ad}, |
| 3856 | /* Sharpness */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3857 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3858 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 3859 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3860 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3861 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3862 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 3863 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3864 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3865 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3866 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3867 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3868 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3869 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3870 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3871 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3872 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3873 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3874 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3875 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3876 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3877 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3878 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3879 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3880 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3881 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3882 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3883 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3884 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3885 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3886 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 3887 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3888 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 3889 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 3890 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 3891 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 3892 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 3893 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3894 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3895 | {0xa0, 0x03, ZC3XX_R181_WINXSTART}, |
| 3896 | {0xa0, 0x08, ZC3XX_R182_WINXWIDTH}, |
| 3897 | {0xa0, 0x16, ZC3XX_R183_WINXCENTER}, |
| 3898 | {0xa0, 0x03, ZC3XX_R184_WINYSTART}, |
| 3899 | {0xa0, 0x05, ZC3XX_R185_WINYWIDTH}, |
| 3900 | {0xa0, 0x14, ZC3XX_R186_WINYCENTER}, |
| 3901 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3902 | |
| 3903 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3904 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3905 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3906 | {0xa0, 0xb1, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3907 | |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3908 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3909 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3910 | {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3911 | |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3912 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 3913 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3914 | /* sensor on */ |
| 3915 | {0xaa, 0x07, 0x00b1}, |
| 3916 | {0xaa, 0x05, 0x0003}, |
| 3917 | {0xaa, 0x04, 0x0001}, |
| 3918 | {0xaa, 0x03, 0x003b}, |
| 3919 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3920 | {0xa0, 0x20, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3921 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3922 | {0xa0, 0xa0, ZC3XX_R11D_GLOBALGAIN}, |
| 3923 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3924 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3925 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3926 | {0xa1, 0x01, 0x0180}, /* AutoCorrectEnable */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3927 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3928 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3929 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 3930 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 3931 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3932 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3933 | {0xa0, 0x00, 0x0007}, /* AutoCorrectEnable */ |
| 3934 | {0xa0, 0xff, ZC3XX_R018_FRAMELOST}, /* Frame adjust */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3935 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3936 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3937 | static const struct usb_action pas106b_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3938 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3939 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,06,cc */ |
| 3940 | {0xa0, 0x54, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,54,cc */ |
| 3941 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3942 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3943 | {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,87,cc */ |
| 3944 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 3945 | {0xa0, 0x30, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,30,cc */ |
| 3946 | {0xaa, 0x03, 0x0021}, /* 00,03,21,aa */ |
| 3947 | {0xaa, 0x04, 0x000c}, /* 00,04,0c,aa */ |
| 3948 | {0xaa, 0x05, 0x0002}, /* 00,05,02,aa */ |
| 3949 | {0xaa, 0x07, 0x001c}, /* 00,07,1c,aa */ |
| 3950 | {0xa0, 0x04, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,04,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3951 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3952 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3953 | static const struct usb_action pas106b_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3954 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3955 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,06,cc */ |
| 3956 | {0xa0, 0x2e, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,2e,cc */ |
| 3957 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3958 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3959 | {0xa0, 0x71, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,71,cc */ |
| 3960 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 3961 | {0xa0, 0x30, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,30,cc */ |
| 3962 | {0xaa, 0x03, 0x001c}, /* 00,03,1c,aa */ |
| 3963 | {0xaa, 0x04, 0x0004}, /* 00,04,04,aa */ |
| 3964 | {0xaa, 0x05, 0x0001}, /* 00,05,01,aa */ |
| 3965 | {0xaa, 0x07, 0x00c4}, /* 00,07,c4,aa */ |
| 3966 | {0xa0, 0x04, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,04,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3967 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3968 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3969 | static const struct usb_action pas106b_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3970 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3971 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,06,cc */ |
| 3972 | {0xa0, 0x50, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc */ |
| 3973 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3974 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3975 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 3976 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 3977 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 3978 | {0xaa, 0x03, 0x0013}, /* 00,03,13,aa */ |
| 3979 | {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */ |
| 3980 | {0xaa, 0x05, 0x0001}, /* 00,05,01,aa */ |
| 3981 | {0xaa, 0x07, 0x0030}, /* 00,07,30,aa */ |
| 3982 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3983 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3984 | }; |
| 3985 | |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 3986 | /* from lvWIMv.inf 046d:08a2/:08aa 2007/06/03 */ |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 3987 | static const struct usb_action pas202b_Initial[] = { /* 640x480 */ |
| 3988 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 3989 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 3990 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ |
| 3991 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc */ |
| 3992 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 3993 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 3994 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 3995 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 3996 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 3997 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 3998 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 3999 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 4000 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 4001 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,03,cc */ |
| 4002 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 4003 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,03,cc */ |
| 4004 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
| 4005 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc */ |
| 4006 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 4007 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 4008 | {0xaa, 0x02, 0x0002}, /* 00,02,04,aa --> 02 */ |
| 4009 | {0xaa, 0x07, 0x0006}, /* 00,07,06,aa */ |
| 4010 | {0xaa, 0x08, 0x0002}, /* 00,08,02,aa */ |
| 4011 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ |
| 4012 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ |
| 4013 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4014 | {0xaa, 0x0c, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4015 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ |
| 4016 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 4017 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ |
| 4018 | {0xaa, 0x13, 0x0063}, /* 00,13,63,aa */ |
| 4019 | {0xaa, 0x15, 0x0070}, /* 00,15,70,aa */ |
| 4020 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc */ |
| 4021 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 4022 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 4023 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
| 4024 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 4025 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 4026 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 4027 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 4028 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, /* 01,8d,70,cc */ |
| 4029 | {} |
| 4030 | }; |
| 4031 | static const struct usb_action pas202b_InitialScale[] = { /* 320x240 */ |
| 4032 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4033 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4034 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ |
| 4035 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 4036 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 4037 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 4038 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4039 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4040 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 4041 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 4042 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 4043 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 4044 | {0xa0, 0x08, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,08,cc */ |
| 4045 | {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,02,cc */ |
| 4046 | {0xa0, 0x08, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,08,cc */ |
| 4047 | {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,02,cc */ |
| 4048 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4049 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4050 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 4051 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 4052 | {0xaa, 0x02, 0x0002}, /* 00,02,02,aa */ |
| 4053 | {0xaa, 0x07, 0x0006}, /* 00,07,06,aa */ |
| 4054 | {0xaa, 0x08, 0x0002}, /* 00,08,02,aa */ |
| 4055 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ |
| 4056 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ |
| 4057 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4058 | {0xaa, 0x0c, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4059 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ |
| 4060 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 4061 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ |
| 4062 | {0xaa, 0x13, 0x0063}, /* 00,13,63,aa */ |
| 4063 | {0xaa, 0x15, 0x0070}, /* 00,15,70,aa */ |
| 4064 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
| 4065 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 4066 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 4067 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
| 4068 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 4069 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 4070 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 4071 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 4072 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, /* 01,8d,70,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4073 | {0xa0, 0xff, ZC3XX_R097_WINYSTARTHIGH}, |
| 4074 | {0xa0, 0xfe, ZC3XX_R098_WINYSTARTLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4075 | {} |
| 4076 | }; |
| 4077 | static const struct usb_action pas202b_50HZ[] = { |
| 4078 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4079 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4080 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
| 4081 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4082 | {0xaa, 0x21, 0x001b}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4083 | {0xaa, 0x03, 0x0044}, /* 00,03,44,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4084 | {0xaa, 0x04, 0x0008}, |
| 4085 | {0xaa, 0x05, 0x001b}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4086 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4087 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4088 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4089 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4090 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4091 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4092 | {0xa0, 0x1b, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4093 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4094 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4095 | {0xa0, 0x4d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,4d,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4096 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4097 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4098 | {0xa0, 0x44, ZC3XX_R01D_HSYNC_0}, /* 00,1d,44,cc */ |
| 4099 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
| 4100 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ |
| 4101 | {0xa0, 0xeb, ZC3XX_R020_HSYNC_3}, /* 00,20,eb,cc */ |
| 4102 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4103 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4104 | {} |
| 4105 | }; |
| 4106 | static const struct usb_action pas202b_50HZScale[] = { |
| 4107 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4108 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4109 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4110 | {0xaa, 0x20, 0x0004}, |
| 4111 | {0xaa, 0x21, 0x003d}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4112 | {0xaa, 0x03, 0x0041}, /* 00,03,41,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4113 | {0xaa, 0x04, 0x0010}, |
| 4114 | {0xaa, 0x05, 0x003d}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4115 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4116 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4117 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4118 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4119 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4120 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4121 | {0xa0, 0x3d, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4122 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4123 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4124 | {0xa0, 0x9b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,9b,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4125 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4126 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4127 | {0xa0, 0x41, ZC3XX_R01D_HSYNC_0}, /* 00,1d,41,cc */ |
| 4128 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
| 4129 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ |
| 4130 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4131 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4132 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4133 | {} |
| 4134 | }; |
| 4135 | static const struct usb_action pas202b_60HZ[] = { |
| 4136 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4137 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4138 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
| 4139 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
| 4140 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 4141 | {0xaa, 0x03, 0x0045}, /* 00,03,45,aa */ |
| 4142 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ |
| 4143 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 4144 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4145 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4146 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4147 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4148 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4149 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4150 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4151 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4152 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4153 | {0xa0, 0x40, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,40,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4154 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4155 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4156 | {0xa0, 0x45, ZC3XX_R01D_HSYNC_0}, /* 00,1d,45,cc */ |
| 4157 | {0xa0, 0x8e, ZC3XX_R01E_HSYNC_1}, /* 00,1e,8e,cc */ |
| 4158 | {0xa0, 0xc1, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c1,cc */ |
| 4159 | {0xa0, 0xf5, ZC3XX_R020_HSYNC_3}, /* 00,20,f5,cc */ |
| 4160 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4161 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4162 | {} |
| 4163 | }; |
| 4164 | static const struct usb_action pas202b_60HZScale[] = { |
| 4165 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4166 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4167 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4168 | {0xaa, 0x20, 0x0004}, |
| 4169 | {0xaa, 0x21, 0x0008}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4170 | {0xaa, 0x03, 0x0042}, /* 00,03,42,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4171 | {0xaa, 0x04, 0x0010}, |
| 4172 | {0xaa, 0x05, 0x0008}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4173 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4174 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4175 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4176 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4177 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4178 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4179 | {0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4180 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4181 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4182 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,81,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4183 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4184 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4185 | {0xa0, 0x42, ZC3XX_R01D_HSYNC_0}, /* 00,1d,42,cc */ |
| 4186 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
| 4187 | {0xa0, 0xaf, ZC3XX_R01F_HSYNC_2}, /* 00,1f,af,cc */ |
| 4188 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4189 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4190 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4191 | {} |
| 4192 | }; |
| 4193 | static const struct usb_action pas202b_NoFliker[] = { |
| 4194 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4195 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4196 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
| 4197 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4198 | {0xaa, 0x21, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4199 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ |
| 4200 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4201 | {0xaa, 0x05, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4202 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4203 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
| 4204 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4205 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4206 | {0xa0, 0x06, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4207 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4208 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4209 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4210 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 4211 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 4212 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4213 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4214 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ |
| 4215 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ |
| 4216 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ |
| 4217 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4218 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4219 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4220 | {} |
| 4221 | }; |
| 4222 | static const struct usb_action pas202b_NoFlikerScale[] = { |
| 4223 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4224 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4225 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4226 | {0xaa, 0x20, 0x0004}, |
| 4227 | {0xaa, 0x21, 0x000c}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4228 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4229 | {0xaa, 0x04, 0x0010}, |
| 4230 | {0xaa, 0x05, 0x000c}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4231 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4232 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
| 4233 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4234 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4235 | {0xa0, 0x0c, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4236 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4237 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4238 | {0xa0, 0x02, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,02,cc */ |
| 4239 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 4240 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 4241 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4242 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4243 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ |
| 4244 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ |
| 4245 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ |
| 4246 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4247 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4248 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4249 | {} |
| 4250 | }; |
| 4251 | |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4252 | /* mt9v111 (mi0360soc) and pb0330 from vm30x.inf 0ac8:301b 07/02/13 */ |
| 4253 | static const struct usb_action mt9v111_1_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4254 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4255 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4256 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4257 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 4258 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4259 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4260 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4261 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4262 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4263 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4264 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4265 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4266 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4267 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4268 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4269 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4270 | {0xdd, 0x00, 0x0200}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4271 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4272 | {0xaa, 0x01, 0x0001}, |
| 4273 | {0xaa, 0x06, 0x0000}, |
| 4274 | {0xaa, 0x08, 0x0483}, |
| 4275 | {0xaa, 0x01, 0x0004}, |
| 4276 | {0xaa, 0x08, 0x0006}, |
| 4277 | {0xaa, 0x02, 0x0011}, |
| 4278 | {0xaa, 0x03, 0x01e5}, /*jfm: was 01e7*/ |
| 4279 | {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/ |
| 4280 | {0xaa, 0x07, 0x3002}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4281 | {0xaa, 0x20, 0x5100}, |
| 4282 | {0xaa, 0x35, 0x507f}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4283 | {0xaa, 0x30, 0x0005}, |
| 4284 | {0xaa, 0x31, 0x0000}, |
| 4285 | {0xaa, 0x58, 0x0078}, |
| 4286 | {0xaa, 0x62, 0x0411}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4287 | {0xaa, 0x2b, 0x007f}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4288 | {0xaa, 0x2c, 0x007f}, /*jfm: was 0030*/ |
| 4289 | {0xaa, 0x2d, 0x007f}, /*jfm: was 0030*/ |
| 4290 | {0xaa, 0x2e, 0x007f}, /*jfm: was 0030*/ |
| 4291 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4292 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4293 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4294 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4295 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 4296 | {0xa0, 0x09, 0x01ad}, /*jfm: was 00*/ |
| 4297 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4298 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4299 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4300 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4301 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4302 | {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4303 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 4304 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
| 4305 | {} |
| 4306 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4307 | static const struct usb_action mt9v111_1_InitialScale[] = { /* 320x240 */ |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4308 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4309 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4310 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4311 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 4312 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4313 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4314 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4315 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4316 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4317 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4318 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4319 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4320 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4321 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4322 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4323 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4324 | {0xdd, 0x00, 0x0200}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4325 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4326 | {0xaa, 0x01, 0x0001}, |
| 4327 | {0xaa, 0x06, 0x0000}, |
| 4328 | {0xaa, 0x08, 0x0483}, |
| 4329 | {0xaa, 0x01, 0x0004}, |
| 4330 | {0xaa, 0x08, 0x0006}, |
| 4331 | {0xaa, 0x02, 0x0011}, |
| 4332 | {0xaa, 0x03, 0x01e7}, |
| 4333 | {0xaa, 0x04, 0x0287}, |
| 4334 | {0xaa, 0x07, 0x3002}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4335 | {0xaa, 0x20, 0x5100}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4336 | {0xaa, 0x35, 0x007f}, /*jfm: was 0050*/ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4337 | {0xaa, 0x30, 0x0005}, |
| 4338 | {0xaa, 0x31, 0x0000}, |
| 4339 | {0xaa, 0x58, 0x0078}, |
| 4340 | {0xaa, 0x62, 0x0411}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4341 | {0xaa, 0x2b, 0x007f}, /*jfm: was 28*/ |
| 4342 | {0xaa, 0x2c, 0x007f}, /*jfm: was 30*/ |
| 4343 | {0xaa, 0x2d, 0x007f}, /*jfm: was 30*/ |
| 4344 | {0xaa, 0x2e, 0x007f}, /*jfm: was 28*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4345 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4346 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4347 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4348 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4349 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4350 | {0xa0, 0x09, 0x01ad}, /*jfm: was 00*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4351 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4352 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4353 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4354 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4355 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4356 | {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4357 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 4358 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4359 | {} |
| 4360 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4361 | static const struct usb_action mt9v111_1_AE50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4362 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4363 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4364 | {0xbb, 0x00, 0x0562}, |
| 4365 | {0xbb, 0x01, 0x09aa}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4366 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4367 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4368 | {0xa0, 0x9b, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4369 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4370 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4371 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4372 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4373 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4374 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4375 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4376 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, |
| 4377 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, |
| 4378 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, |
| 4379 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4380 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4381 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4382 | {} |
| 4383 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4384 | static const struct usb_action mt9v111_1_AE50HZScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4385 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4386 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4387 | {0xbb, 0x00, 0x0509}, |
| 4388 | {0xbb, 0x01, 0x0934}, |
| 4389 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4390 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4391 | {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4392 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4393 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4394 | {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4395 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4396 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4397 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4398 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4399 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4400 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4401 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4402 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4403 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4404 | {} |
| 4405 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4406 | static const struct usb_action mt9v111_1_AE60HZ[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4407 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4408 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4409 | {0xaa, 0x05, 0x003d}, |
| 4410 | {0xaa, 0x09, 0x016e}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4411 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4412 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4413 | {0xa0, 0xdd, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4414 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4415 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4416 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4417 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4418 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4419 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4420 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4421 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, |
| 4422 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, |
| 4423 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, |
| 4424 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4425 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4426 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4427 | {} |
| 4428 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4429 | static const struct usb_action mt9v111_1_AE60HZScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4430 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4431 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4432 | {0xbb, 0x00, 0x0509}, |
| 4433 | {0xbb, 0x01, 0x0983}, |
| 4434 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4435 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4436 | {0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4437 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4438 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4439 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4440 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4441 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4442 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4443 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4444 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4445 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4446 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4447 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4448 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4449 | {} |
| 4450 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4451 | static const struct usb_action mt9v111_1_AENoFliker[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4452 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4453 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4454 | {0xbb, 0x00, 0x0509}, |
| 4455 | {0xbb, 0x01, 0x0960}, |
| 4456 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4457 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4458 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4459 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4460 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4461 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4462 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4463 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4464 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4465 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4466 | {0xa0, 0x09, ZC3XX_R01D_HSYNC_0}, |
| 4467 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 4468 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4469 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
| 4470 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4471 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4472 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4473 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4474 | static const struct usb_action mt9v111_1_AENoFlikerScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4475 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4476 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4477 | {0xbb, 0x00, 0x0534}, |
| 4478 | {0xbb, 0x02, 0x0960}, |
| 4479 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4480 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4481 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4482 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4483 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4484 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4485 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4486 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4487 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4488 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4489 | {0xa0, 0x34, ZC3XX_R01D_HSYNC_0}, |
| 4490 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, |
| 4491 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4492 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
| 4493 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4494 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4495 | {} |
| 4496 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4497 | /* from usbvm303.inf 0ac8:303b 07/03/25 (3 - tas5130c) */ |
| 4498 | static const struct usb_action mt9v111_3_Initial[] = { |
| 4499 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4500 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4501 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
Jean-François Moine | d581bcd | 2010-10-29 08:01:01 -0300 | [diff] [blame^] | 4502 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4503 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4504 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4505 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4506 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4507 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4508 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4509 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4510 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4511 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4512 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4513 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4514 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4515 | {0xdd, 0x00, 0x0200}, |
| 4516 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4517 | {0xaa, 0x01, 0x0001}, /* select IFP/SOC registers */ |
| 4518 | {0xaa, 0x06, 0x0000}, /* operating mode control */ |
| 4519 | {0xaa, 0x08, 0x0483}, /* output format control */ |
| 4520 | /* H red first, V red or blue first, |
| 4521 | * raw Bayer, auto flicker */ |
| 4522 | {0xaa, 0x01, 0x0004}, /* select sensor core registers */ |
| 4523 | {0xaa, 0x08, 0x0006}, /* row start */ |
| 4524 | {0xaa, 0x02, 0x0011}, /* column start */ |
| 4525 | {0xaa, 0x03, 0x01e5}, /* window height - 1 */ |
| 4526 | {0xaa, 0x04, 0x0285}, /* window width - 1 */ |
| 4527 | {0xaa, 0x07, 0x3002}, /* output control */ |
| 4528 | {0xaa, 0x20, 0x1100}, /* read mode: bits 8 & 12 (?) */ |
| 4529 | {0xaa, 0x35, 0x007f}, /* global gain */ |
| 4530 | {0xaa, 0x30, 0x0005}, |
| 4531 | {0xaa, 0x31, 0x0000}, |
| 4532 | {0xaa, 0x58, 0x0078}, |
| 4533 | {0xaa, 0x62, 0x0411}, |
| 4534 | {0xaa, 0x2b, 0x007f}, /* green1 gain */ |
| 4535 | {0xaa, 0x2c, 0x007f}, /* blue gain */ |
| 4536 | {0xaa, 0x2d, 0x007f}, /* red gain */ |
| 4537 | {0xaa, 0x2e, 0x007f}, /* green2 gain */ |
| 4538 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 4539 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 4540 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4541 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4542 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 4543 | {0xa0, 0x00, 0x01ad}, |
| 4544 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4545 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4546 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4547 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4548 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 4549 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, |
| 4550 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 4551 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
| 4552 | {} |
| 4553 | }; |
| 4554 | static const struct usb_action mt9v111_3_InitialScale[] = { |
| 4555 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4556 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4557 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4558 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 4559 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4560 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4561 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4562 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4563 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4564 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4565 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4566 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4567 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4568 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4569 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4570 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4571 | {0xdd, 0x00, 0x0200}, |
| 4572 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4573 | {0xaa, 0x01, 0x0001}, |
| 4574 | {0xaa, 0x06, 0x0000}, |
| 4575 | {0xaa, 0x08, 0x0483}, |
| 4576 | {0xaa, 0x01, 0x0004}, |
| 4577 | {0xaa, 0x08, 0x0006}, |
| 4578 | {0xaa, 0x02, 0x0011}, |
| 4579 | {0xaa, 0x03, 0x01e7}, |
| 4580 | {0xaa, 0x04, 0x0287}, |
| 4581 | {0xaa, 0x07, 0x3002}, |
| 4582 | {0xaa, 0x20, 0x1100}, |
| 4583 | {0xaa, 0x35, 0x007f}, |
| 4584 | {0xaa, 0x30, 0x0005}, |
| 4585 | {0xaa, 0x31, 0x0000}, |
| 4586 | {0xaa, 0x58, 0x0078}, |
| 4587 | {0xaa, 0x62, 0x0411}, |
| 4588 | {0xaa, 0x2b, 0x007f}, |
| 4589 | {0xaa, 0x2c, 0x007f}, |
| 4590 | {0xaa, 0x2d, 0x007f}, |
| 4591 | {0xaa, 0x2e, 0x007f}, |
| 4592 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 4593 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 4594 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4595 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4596 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 4597 | {0xa0, 0x00, 0x01ad}, |
| 4598 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4599 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4600 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4601 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4602 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 4603 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, |
| 4604 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 4605 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
| 4606 | {} |
| 4607 | }; |
| 4608 | static const struct usb_action mt9v111_3_AE50HZ[] = { |
| 4609 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4610 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4611 | {0xaa, 0x05, 0x0009}, /* horizontal blanking */ |
| 4612 | {0xaa, 0x09, 0x01ce}, /* shutter width */ |
| 4613 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4614 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4615 | {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4616 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4617 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4618 | {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4619 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4620 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4621 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4622 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4623 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4624 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4625 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4626 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4627 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4628 | {} |
| 4629 | }; |
| 4630 | static const struct usb_action mt9v111_3_AE50HZScale[] = { |
| 4631 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4632 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4633 | {0xaa, 0x05, 0x0009}, |
| 4634 | {0xaa, 0x09, 0x01ce}, |
| 4635 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4636 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4637 | {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4638 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4639 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4640 | {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4641 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4642 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4643 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4644 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4645 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4646 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4647 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4648 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4649 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4650 | {} |
| 4651 | }; |
| 4652 | static const struct usb_action mt9v111_3_AE60HZ[] = { |
| 4653 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4654 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4655 | {0xaa, 0x05, 0x0009}, |
| 4656 | {0xaa, 0x09, 0x0083}, |
| 4657 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4658 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4659 | {0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4660 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4661 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4662 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4663 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4664 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4665 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4666 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4667 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4668 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4669 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4670 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4671 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4672 | {} |
| 4673 | }; |
| 4674 | static const struct usb_action mt9v111_3_AE60HZScale[] = { |
| 4675 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4676 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4677 | {0xaa, 0x05, 0x0009}, |
| 4678 | {0xaa, 0x09, 0x0083}, |
| 4679 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4680 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4681 | {0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4682 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4683 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4684 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4685 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4686 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4687 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4688 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4689 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4690 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4691 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4692 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4693 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4694 | {} |
| 4695 | }; |
| 4696 | static const struct usb_action mt9v111_3_AENoFliker[] = { |
| 4697 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4698 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4699 | {0xaa, 0x05, 0x0034}, |
| 4700 | {0xaa, 0x09, 0x0260}, |
| 4701 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4702 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4703 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4704 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4705 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4706 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4707 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4708 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4709 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4710 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4711 | {0xa0, 0x34, ZC3XX_R01D_HSYNC_0}, |
| 4712 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, |
| 4713 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4714 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
| 4715 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4716 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4717 | {} |
| 4718 | }; |
| 4719 | static const struct usb_action mt9v111_3_AENoFlikerScale[] = { |
| 4720 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4721 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4722 | {0xaa, 0x05, 0x0034}, |
| 4723 | {0xaa, 0x09, 0x0260}, |
| 4724 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4725 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4726 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4727 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4728 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4729 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4730 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4731 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4732 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4733 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4734 | {0xa0, 0x34, ZC3XX_R01D_HSYNC_0}, |
| 4735 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, |
| 4736 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4737 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
| 4738 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4739 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4740 | {} |
| 4741 | }; |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4742 | |
| 4743 | static const struct usb_action pb0330_Initial[] = { /* 640x480 */ |
| 4744 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4745 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 4746 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4747 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 4748 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4749 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4750 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4751 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4752 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4753 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4754 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4755 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4756 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4757 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4758 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4759 | {0xdd, 0x00, 0x0200}, |
| 4760 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4761 | {0xaa, 0x01, 0x0006}, |
| 4762 | {0xaa, 0x02, 0x0011}, |
| 4763 | {0xaa, 0x03, 0x01e5}, /*jfm: was 1e7*/ |
| 4764 | {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/ |
| 4765 | {0xaa, 0x06, 0x0003}, |
| 4766 | {0xaa, 0x07, 0x3002}, |
| 4767 | {0xaa, 0x20, 0x1100}, |
| 4768 | {0xaa, 0x2f, 0xf7b0}, |
| 4769 | {0xaa, 0x30, 0x0005}, |
| 4770 | {0xaa, 0x31, 0x0000}, |
| 4771 | {0xaa, 0x34, 0x0100}, |
| 4772 | {0xaa, 0x35, 0x0060}, |
| 4773 | {0xaa, 0x3d, 0x068f}, |
| 4774 | {0xaa, 0x40, 0x01e0}, |
| 4775 | {0xaa, 0x58, 0x0078}, |
| 4776 | {0xaa, 0x62, 0x0411}, |
| 4777 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 4778 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 4779 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4780 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4781 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 4782 | {0xa0, 0x09, 0x01ad}, /*jfm: was 00 */ |
| 4783 | {0xa0, 0x15, 0x01ae}, |
| 4784 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4785 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4786 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4787 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4788 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 4789 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /*jfm: was 6c*/ |
| 4790 | {} |
| 4791 | }; |
| 4792 | static const struct usb_action pb0330_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4793 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4794 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 4795 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4796 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 4797 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4798 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4799 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4800 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4801 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4802 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4803 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4804 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4805 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4806 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4807 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4808 | {0xdd, 0x00, 0x0200}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4809 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4810 | {0xaa, 0x01, 0x0006}, |
| 4811 | {0xaa, 0x02, 0x0011}, |
| 4812 | {0xaa, 0x03, 0x01e7}, |
| 4813 | {0xaa, 0x04, 0x0287}, |
| 4814 | {0xaa, 0x06, 0x0003}, |
| 4815 | {0xaa, 0x07, 0x3002}, |
| 4816 | {0xaa, 0x20, 0x1100}, |
| 4817 | {0xaa, 0x2f, 0xf7b0}, |
| 4818 | {0xaa, 0x30, 0x0005}, |
| 4819 | {0xaa, 0x31, 0x0000}, |
| 4820 | {0xaa, 0x34, 0x0100}, |
| 4821 | {0xaa, 0x35, 0x0060}, |
| 4822 | {0xaa, 0x3d, 0x068f}, |
| 4823 | {0xaa, 0x40, 0x01e0}, |
| 4824 | {0xaa, 0x58, 0x0078}, |
| 4825 | {0xaa, 0x62, 0x0411}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4826 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 4827 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 4828 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4829 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4830 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4831 | {0xa0, 0x09, 0x01ad}, |
| 4832 | {0xa0, 0x15, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4833 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4834 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4835 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4836 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4837 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4838 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /*jfm: was 6c*/ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4839 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4840 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4841 | static const struct usb_action pb0330_50HZ[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4842 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4843 | {0xbb, 0x00, 0x055c}, |
| 4844 | {0xbb, 0x01, 0x09aa}, |
| 4845 | {0xbb, 0x00, 0x1001}, |
| 4846 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4847 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4848 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4849 | {0xa0, 0xc4, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4850 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4851 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4852 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4853 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4854 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4855 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4856 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4857 | {0xa0, 0x5c, ZC3XX_R01D_HSYNC_0}, |
| 4858 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, |
| 4859 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, |
| 4860 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4861 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4862 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4863 | static const struct usb_action pb0330_50HZScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4864 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4865 | {0xbb, 0x00, 0x0566}, |
| 4866 | {0xbb, 0x02, 0x09b2}, |
| 4867 | {0xbb, 0x00, 0x1002}, |
| 4868 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4869 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4870 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4871 | {0xa0, 0x8c, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4872 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4873 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4874 | {0xa0, 0x8a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4875 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4876 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4877 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4878 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4879 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4880 | {0xa0, 0xf0, ZC3XX_R01E_HSYNC_1}, |
| 4881 | {0xa0, 0xf8, ZC3XX_R01F_HSYNC_2}, |
| 4882 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4883 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4884 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4885 | static const struct usb_action pb0330_60HZ[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4886 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4887 | {0xbb, 0x00, 0x0535}, |
| 4888 | {0xbb, 0x01, 0x0974}, |
| 4889 | {0xbb, 0x00, 0x1001}, |
| 4890 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4891 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4892 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4893 | {0xa0, 0xfe, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4894 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4895 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4896 | {0xa0, 0x3e, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4897 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4898 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4899 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4900 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4901 | {0xa0, 0x35, ZC3XX_R01D_HSYNC_0}, |
| 4902 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, |
| 4903 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4904 | {0xa0, 0xd0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4905 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4906 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4907 | static const struct usb_action pb0330_60HZScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4908 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4909 | {0xbb, 0x00, 0x0535}, |
| 4910 | {0xbb, 0x02, 0x096c}, |
| 4911 | {0xbb, 0x00, 0x1002}, |
| 4912 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4913 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4914 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4915 | {0xa0, 0xc0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4916 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4917 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4918 | {0xa0, 0x7c, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4919 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4920 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4921 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4922 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4923 | {0xa0, 0x35, ZC3XX_R01D_HSYNC_0}, |
| 4924 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, |
| 4925 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4926 | {0xa0, 0xd0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4927 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4928 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4929 | static const struct usb_action pb0330_NoFliker[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4930 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4931 | {0xbb, 0x00, 0x0509}, |
| 4932 | {0xbb, 0x02, 0x0940}, |
| 4933 | {0xbb, 0x00, 0x1002}, |
| 4934 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4935 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4936 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4937 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4938 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4939 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4940 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4941 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 4942 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 4943 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4944 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4945 | {0xa0, 0x09, ZC3XX_R01D_HSYNC_0}, |
| 4946 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 4947 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4948 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4949 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4950 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4951 | static const struct usb_action pb0330_NoFlikerScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4952 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4953 | {0xbb, 0x00, 0x0535}, |
| 4954 | {0xbb, 0x01, 0x0980}, |
| 4955 | {0xbb, 0x00, 0x1001}, |
| 4956 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4957 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4958 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4959 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4960 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4961 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4962 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4963 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 4964 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 4965 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4966 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4967 | {0xa0, 0x35, ZC3XX_R01D_HSYNC_0}, |
| 4968 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, |
| 4969 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4970 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4971 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4972 | }; |
| 4973 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 4974 | /* from oem9.inf */ |
| 4975 | static const struct usb_action po2030_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4976 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 4977 | {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT}, /* 00,02,04,cc */ |
| 4978 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 4979 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 4980 | {0xa0, 0x04, ZC3XX_R080_HBLANKHIGH}, /* 00,80,04,cc */ |
| 4981 | {0xa0, 0x05, ZC3XX_R081_HBLANKLOW}, /* 00,81,05,cc */ |
| 4982 | {0xa0, 0x16, ZC3XX_R083_RGAINADDR}, /* 00,83,16,cc */ |
| 4983 | {0xa0, 0x18, ZC3XX_R085_BGAINADDR}, /* 00,85,18,cc */ |
| 4984 | {0xa0, 0x1a, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,1a,cc */ |
| 4985 | {0xa0, 0x1b, ZC3XX_R087_EXPTIMEMID}, /* 00,87,1b,cc */ |
| 4986 | {0xa0, 0x1c, ZC3XX_R088_EXPTIMELOW}, /* 00,88,1c,cc */ |
| 4987 | {0xa0, 0xee, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,ee,cc */ |
| 4988 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 4989 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 4990 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 4991 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 4992 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 4993 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 4994 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 4995 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 4996 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 4997 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 4998 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 4999 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 5000 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 5001 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc */ |
| 5002 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5003 | {0xaa, 0x09, 0x00ce}, /* 00,09,ce,aa */ |
| 5004 | {0xaa, 0x0b, 0x0005}, /* 00,0b,05,aa */ |
| 5005 | {0xaa, 0x0d, 0x0054}, /* 00,0d,54,aa */ |
| 5006 | {0xaa, 0x0f, 0x00eb}, /* 00,0f,eb,aa */ |
| 5007 | {0xaa, 0x87, 0x0000}, /* 00,87,00,aa */ |
| 5008 | {0xaa, 0x88, 0x0004}, /* 00,88,04,aa */ |
| 5009 | {0xaa, 0x89, 0x0000}, /* 00,89,00,aa */ |
| 5010 | {0xaa, 0x8a, 0x0005}, /* 00,8a,05,aa */ |
| 5011 | {0xaa, 0x13, 0x0003}, /* 00,13,03,aa */ |
| 5012 | {0xaa, 0x16, 0x0040}, /* 00,16,40,aa */ |
| 5013 | {0xaa, 0x18, 0x0040}, /* 00,18,40,aa */ |
| 5014 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 5015 | {0xaa, 0x29, 0x00e8}, /* 00,29,e8,aa */ |
| 5016 | {0xaa, 0x45, 0x0045}, /* 00,45,45,aa */ |
| 5017 | {0xaa, 0x50, 0x00ed}, /* 00,50,ed,aa */ |
| 5018 | {0xaa, 0x51, 0x0025}, /* 00,51,25,aa */ |
| 5019 | {0xaa, 0x52, 0x0042}, /* 00,52,42,aa */ |
| 5020 | {0xaa, 0x53, 0x002f}, /* 00,53,2f,aa */ |
| 5021 | {0xaa, 0x79, 0x0025}, /* 00,79,25,aa */ |
| 5022 | {0xaa, 0x7b, 0x0000}, /* 00,7b,00,aa */ |
| 5023 | {0xaa, 0x7e, 0x0025}, /* 00,7e,25,aa */ |
| 5024 | {0xaa, 0x7f, 0x0025}, /* 00,7f,25,aa */ |
| 5025 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 5026 | {0xaa, 0x33, 0x0036}, /* 00,33,36,aa */ |
| 5027 | {0xaa, 0x36, 0x0060}, /* 00,36,60,aa */ |
| 5028 | {0xaa, 0x37, 0x0008}, /* 00,37,08,aa */ |
| 5029 | {0xaa, 0x3b, 0x0031}, /* 00,3b,31,aa */ |
| 5030 | {0xaa, 0x44, 0x000f}, /* 00,44,0f,aa */ |
| 5031 | {0xaa, 0x58, 0x0002}, /* 00,58,02,aa */ |
| 5032 | {0xaa, 0x66, 0x00c0}, /* 00,66,c0,aa */ |
| 5033 | {0xaa, 0x67, 0x0044}, /* 00,67,44,aa */ |
| 5034 | {0xaa, 0x6b, 0x00a0}, /* 00,6b,a0,aa */ |
| 5035 | {0xaa, 0x6c, 0x0054}, /* 00,6c,54,aa */ |
| 5036 | {0xaa, 0xd6, 0x0007}, /* 00,d6,07,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5037 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,f7,cc */ |
| 5038 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 5039 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 5040 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5041 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5042 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 5043 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 5044 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 5045 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 5046 | {0xa0, 0x7a, ZC3XX_R116_RGAIN}, /* 01,16,7a,cc */ |
| 5047 | {0xa0, 0x4a, ZC3XX_R118_BGAIN}, /* 01,18,4a,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5048 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5049 | }; |
| 5050 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5051 | /* from oem9.inf */ |
| 5052 | static const struct usb_action po2030_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5053 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 5054 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 5055 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 5056 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 5057 | {0xa0, 0x04, ZC3XX_R080_HBLANKHIGH}, /* 00,80,04,cc */ |
| 5058 | {0xa0, 0x05, ZC3XX_R081_HBLANKLOW}, /* 00,81,05,cc */ |
| 5059 | {0xa0, 0x16, ZC3XX_R083_RGAINADDR}, /* 00,83,16,cc */ |
| 5060 | {0xa0, 0x18, ZC3XX_R085_BGAINADDR}, /* 00,85,18,cc */ |
| 5061 | {0xa0, 0x1a, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,1a,cc */ |
| 5062 | {0xa0, 0x1b, ZC3XX_R087_EXPTIMEMID}, /* 00,87,1b,cc */ |
| 5063 | {0xa0, 0x1c, ZC3XX_R088_EXPTIMELOW}, /* 00,88,1c,cc */ |
| 5064 | {0xa0, 0xee, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,ee,cc */ |
| 5065 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 5066 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 5067 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 5068 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 5069 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 5070 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 5071 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 5072 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 5073 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 5074 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 5075 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 5076 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 5077 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 5078 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e8,cc */ |
| 5079 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5080 | {0xaa, 0x09, 0x00cc}, /* 00,09,cc,aa */ |
| 5081 | {0xaa, 0x0b, 0x0005}, /* 00,0b,05,aa */ |
| 5082 | {0xaa, 0x0d, 0x0058}, /* 00,0d,58,aa */ |
| 5083 | {0xaa, 0x0f, 0x00ed}, /* 00,0f,ed,aa */ |
| 5084 | {0xaa, 0x87, 0x0000}, /* 00,87,00,aa */ |
| 5085 | {0xaa, 0x88, 0x0004}, /* 00,88,04,aa */ |
| 5086 | {0xaa, 0x89, 0x0000}, /* 00,89,00,aa */ |
| 5087 | {0xaa, 0x8a, 0x0005}, /* 00,8a,05,aa */ |
| 5088 | {0xaa, 0x13, 0x0003}, /* 00,13,03,aa */ |
| 5089 | {0xaa, 0x16, 0x0040}, /* 00,16,40,aa */ |
| 5090 | {0xaa, 0x18, 0x0040}, /* 00,18,40,aa */ |
| 5091 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 5092 | {0xaa, 0x29, 0x00e8}, /* 00,29,e8,aa */ |
| 5093 | {0xaa, 0x45, 0x0045}, /* 00,45,45,aa */ |
| 5094 | {0xaa, 0x50, 0x00ed}, /* 00,50,ed,aa */ |
| 5095 | {0xaa, 0x51, 0x0025}, /* 00,51,25,aa */ |
| 5096 | {0xaa, 0x52, 0x0042}, /* 00,52,42,aa */ |
| 5097 | {0xaa, 0x53, 0x002f}, /* 00,53,2f,aa */ |
| 5098 | {0xaa, 0x79, 0x0025}, /* 00,79,25,aa */ |
| 5099 | {0xaa, 0x7b, 0x0000}, /* 00,7b,00,aa */ |
| 5100 | {0xaa, 0x7e, 0x0025}, /* 00,7e,25,aa */ |
| 5101 | {0xaa, 0x7f, 0x0025}, /* 00,7f,25,aa */ |
| 5102 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 5103 | {0xaa, 0x33, 0x0036}, /* 00,33,36,aa */ |
| 5104 | {0xaa, 0x36, 0x0060}, /* 00,36,60,aa */ |
| 5105 | {0xaa, 0x37, 0x0008}, /* 00,37,08,aa */ |
| 5106 | {0xaa, 0x3b, 0x0031}, /* 00,3b,31,aa */ |
| 5107 | {0xaa, 0x44, 0x000f}, /* 00,44,0f,aa */ |
| 5108 | {0xaa, 0x58, 0x0002}, /* 00,58,02,aa */ |
| 5109 | {0xaa, 0x66, 0x00c0}, /* 00,66,c0,aa */ |
| 5110 | {0xaa, 0x67, 0x0044}, /* 00,67,44,aa */ |
| 5111 | {0xaa, 0x6b, 0x00a0}, /* 00,6b,a0,aa */ |
| 5112 | {0xaa, 0x6c, 0x0054}, /* 00,6c,54,aa */ |
| 5113 | {0xaa, 0xd6, 0x0007}, /* 00,d6,07,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5114 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,f7,cc */ |
| 5115 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 5116 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 5117 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5118 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5119 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 5120 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 5121 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 5122 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 5123 | {0xa0, 0x7a, ZC3XX_R116_RGAIN}, /* 01,16,7a,cc */ |
| 5124 | {0xa0, 0x4a, ZC3XX_R118_BGAIN}, /* 01,18,4a,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5125 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5126 | }; |
| 5127 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5128 | static const struct usb_action po2030_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5129 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 5130 | {0xaa, 0x1a, 0x0001}, /* 00,1a,01,aa */ |
| 5131 | {0xaa, 0x1b, 0x000a}, /* 00,1b,0a,aa */ |
| 5132 | {0xaa, 0x1c, 0x00b0}, /* 00,1c,b0,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5133 | {0xa0, 0x05, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,05,cc */ |
| 5134 | {0xa0, 0x35, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,35,cc */ |
| 5135 | {0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,70,cc */ |
| 5136 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5137 | {0xa0, 0x85, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,85,cc */ |
| 5138 | {0xa0, 0x58, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,58,cc */ |
| 5139 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 5140 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
| 5141 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
| 5142 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 5143 | {0xa0, 0x22, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,22,cc */ |
| 5144 | {0xa0, 0x88, ZC3XX_R18D_YTARGET}, /* 01,8d,88,cc */ |
| 5145 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc */ |
| 5146 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5147 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5148 | }; |
| 5149 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5150 | static const struct usb_action po2030_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5151 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 5152 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 5153 | {0xaa, 0x1b, 0x00de}, /* 00,1b,de,aa */ |
| 5154 | {0xaa, 0x1c, 0x0040}, /* 00,1c,40,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5155 | {0xa0, 0x08, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,08,cc */ |
| 5156 | {0xa0, 0xae, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,ae,cc */ |
| 5157 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,80,cc */ |
| 5158 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5159 | {0xa0, 0x6f, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,6f,cc */ |
| 5160 | {0xa0, 0x20, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,20,cc */ |
| 5161 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 5162 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
| 5163 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
| 5164 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 5165 | {0xa0, 0x22, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,22,cc */ |
| 5166 | {0xa0, 0x88, ZC3XX_R18D_YTARGET}, /* 01,8d,88,cc */ |
| 5167 | /* win: 01,8d,80 */ |
| 5168 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc */ |
| 5169 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5170 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5171 | }; |
| 5172 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5173 | static const struct usb_action po2030_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5174 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5175 | {0xaa, 0x8d, 0x000d}, /* 00,8d,0d,aa */ |
| 5176 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 5177 | {0xaa, 0x1b, 0x0002}, /* 00,1b,02,aa */ |
| 5178 | {0xaa, 0x1c, 0x0078}, /* 00,1c,78,aa */ |
| 5179 | {0xaa, 0x46, 0x0000}, /* 00,46,00,aa */ |
| 5180 | {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5181 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5182 | }; |
| 5183 | |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5184 | static const struct usb_action tas5130c_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5185 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 5186 | {0xa0, 0x50, ZC3XX_R002_CLOCKSELECT}, |
| 5187 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 5188 | {0xa0, 0x02, ZC3XX_R010_CMOSSENSORSELECT}, |
| 5189 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5190 | {0xa0, 0x00, ZC3XX_R001_SYSTEMOPERATING}, |
| 5191 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 5192 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5193 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5194 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 5195 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 5196 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 5197 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5198 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5199 | {0xa0, 0x04, ZC3XX_R098_WINYSTARTLOW}, |
| 5200 | {0xa0, 0x0f, ZC3XX_R09A_WINXSTARTLOW}, |
| 5201 | {0xa0, 0x04, ZC3XX_R11A_FIRSTYLOW}, |
| 5202 | {0xa0, 0x0f, ZC3XX_R11C_FIRSTXLOW}, |
| 5203 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 5204 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 5205 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 5206 | {0xa0, 0x06, ZC3XX_R08D_COMPABILITYMODE}, |
| 5207 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, |
| 5208 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 5209 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5210 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5211 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5212 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5213 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 5214 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 5215 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 5216 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5217 | {0xa0, 0x07, ZC3XX_R0A5_EXPOSUREGAIN}, |
| 5218 | {0xa0, 0x02, ZC3XX_R0A6_EXPOSUREBLACKLVL}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5219 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5220 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5221 | static const struct usb_action tas5130c_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5222 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 5223 | {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5224 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5225 | {0xa0, 0x02, ZC3XX_R010_CMOSSENSORSELECT}, |
| 5226 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5227 | {0xa0, 0x00, ZC3XX_R001_SYSTEMOPERATING}, |
| 5228 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 5229 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5230 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5231 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 5232 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 5233 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 5234 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 5235 | {0xa0, 0x05, ZC3XX_R098_WINYSTARTLOW}, |
| 5236 | {0xa0, 0x0f, ZC3XX_R09A_WINXSTARTLOW}, |
| 5237 | {0xa0, 0x05, ZC3XX_R11A_FIRSTYLOW}, |
| 5238 | {0xa0, 0x0f, ZC3XX_R11C_FIRSTXLOW}, |
| 5239 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
| 5240 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 5241 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
| 5242 | {0xa0, 0x06, ZC3XX_R08D_COMPABILITYMODE}, |
| 5243 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 5244 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 5245 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5246 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5247 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5248 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5249 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 5250 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 5251 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 5252 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5253 | {0xa0, 0x07, ZC3XX_R0A5_EXPOSUREGAIN}, |
| 5254 | {0xa0, 0x02, ZC3XX_R0A6_EXPOSUREBLACKLVL}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5255 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5256 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5257 | static const struct usb_action tas5130c_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5258 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5259 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5260 | {0xaa, 0xa4, 0x0063}, /* 00,a4,63,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5261 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5262 | {0xa0, 0x63, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,63,cc */ |
| 5263 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5264 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5265 | {0xa0, 0xfe, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5266 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5267 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5268 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,47,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5269 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5270 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5271 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5272 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5273 | {0xa0, 0xd3, ZC3XX_R01D_HSYNC_0}, /* 00,1d,d3,cc */ |
| 5274 | {0xa0, 0xda, ZC3XX_R01E_HSYNC_1}, /* 00,1e,da,cc */ |
| 5275 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */ |
| 5276 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5277 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5278 | {0xa0, 0x4c, ZC3XX_R0A0_MAXXLOW}, |
| 5279 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5280 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5281 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5282 | static const struct usb_action tas5130c_50HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5283 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5284 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5285 | {0xaa, 0xa4, 0x0077}, /* 00,a4,77,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5286 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5287 | {0xa0, 0x77, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,77,cc */ |
| 5288 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5289 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5290 | {0xa0, 0xd0, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5291 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5292 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5293 | {0xa0, 0x7d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,7d,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5294 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5295 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5296 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5297 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5298 | {0xa0, 0xf0, ZC3XX_R01D_HSYNC_0}, /* 00,1d,f0,cc */ |
| 5299 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,f4,cc */ |
| 5300 | {0xa0, 0xf8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,f8,cc */ |
| 5301 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5302 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5303 | {0xa0, 0xc0, ZC3XX_R0A0_MAXXLOW}, |
| 5304 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5305 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5306 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5307 | static const struct usb_action tas5130c_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5308 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5309 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5310 | {0xaa, 0xa4, 0x0036}, /* 00,a4,36,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5311 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5312 | {0xa0, 0x36, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,36,cc */ |
| 5313 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5314 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5315 | {0xa0, 0x54, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5316 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5317 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5318 | {0xa0, 0x3e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,3e,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5319 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5320 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5321 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5322 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5323 | {0xa0, 0xca, ZC3XX_R01D_HSYNC_0}, /* 00,1d,ca,cc */ |
| 5324 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5325 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5326 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5327 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5328 | {0xa0, 0x28, ZC3XX_R0A0_MAXXLOW}, |
| 5329 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5330 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5331 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5332 | static const struct usb_action tas5130c_60HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5333 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5334 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5335 | {0xaa, 0xa4, 0x0077}, /* 00,a4,77,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5336 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5337 | {0xa0, 0x77, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,77,cc */ |
| 5338 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5339 | {0xa0, 0x09, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5340 | {0xa0, 0x47, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5341 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5342 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5343 | {0xa0, 0x7d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,7d,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5344 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5345 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5346 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5347 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5348 | {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c8,cc */ |
| 5349 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5350 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5351 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5352 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5353 | {0xa0, 0x20, ZC3XX_R0A0_MAXXLOW}, |
| 5354 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5355 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5356 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5357 | static const struct usb_action tas5130c_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5358 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5359 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5360 | {0xaa, 0xa4, 0x0040}, /* 00,a4,40,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5361 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5362 | {0xa0, 0x40, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,40,cc */ |
| 5363 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5364 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5365 | {0xa0, 0xa0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 5366 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 5367 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 5368 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 5369 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5370 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5371 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 5372 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 5373 | {0xa0, 0xbc, ZC3XX_R01D_HSYNC_0}, /* 00,1d,bc,cc */ |
| 5374 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5375 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5376 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5377 | {0xa0, 0x02, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,02,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5378 | {0xa0, 0xf0, ZC3XX_R0A0_MAXXLOW}, |
| 5379 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5380 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5381 | }; |
| 5382 | |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5383 | static const struct usb_action tas5130c_NoFlikerScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5384 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5385 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5386 | {0xaa, 0xa4, 0x0090}, /* 00,a4,90,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5387 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5388 | {0xa0, 0x90, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,90,cc */ |
| 5389 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5390 | {0xa0, 0x0a, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5391 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 5392 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 5393 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 5394 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 5395 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5396 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5397 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 5398 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 5399 | {0xa0, 0xbc, ZC3XX_R01D_HSYNC_0}, /* 00,1d,bc,cc */ |
| 5400 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5401 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5402 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5403 | {0xa0, 0x02, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,02,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5404 | {0xa0, 0xf0, ZC3XX_R0A0_MAXXLOW}, |
| 5405 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5406 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5407 | }; |
| 5408 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5409 | static const struct usb_action tas5130c_vf0250_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5410 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc, */ |
| 5411 | {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, /* 00,08,02,cc, */ |
| 5412 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc, */ |
| 5413 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc, |
| 5414 | * 0<->10 */ |
| 5415 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc, */ |
| 5416 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc, */ |
| 5417 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc, */ |
| 5418 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc, */ |
| 5419 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
| 5420 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc, */ |
| 5421 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc, */ |
| 5422 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc, */ |
| 5423 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc, */ |
| 5424 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc, */ |
| 5425 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc, */ |
| 5426 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc, */ |
| 5427 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc, |
| 5428 | * 6<->8 */ |
| 5429 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc, |
| 5430 | * 6<->8 */ |
| 5431 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, /* 00,87,10,cc, */ |
| 5432 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5433 | {0xaa, 0x1b, 0x0024}, /* 00,1b,24,aa, */ |
| 5434 | {0xdd, 0x00, 0x0080}, /* 00,00,80,dd, */ |
| 5435 | {0xaa, 0x1b, 0x0000}, /* 00,1b,00,aa, */ |
| 5436 | {0xaa, 0x13, 0x0002}, /* 00,13,02,aa, */ |
| 5437 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5438 | /*?? {0xaa, 0x01, 0x0000}, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5439 | {0xaa, 0x01, 0x0000}, |
| 5440 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */ |
| 5441 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5442 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc, */ |
| 5443 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc, */ |
| 5444 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5445 | {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */ |
| 5446 | {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa, */ |
| 5447 | {0xaa, 0x0b, 0x00a0}, /* 00,0b,a0,aa, */ |
| 5448 | {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa, */ |
| 5449 | {0xaa, 0x0d, 0x00a0}, /* 00,0d,a0,aa, */ |
| 5450 | {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa, */ |
| 5451 | {0xaa, 0x0f, 0x00a0}, /* 00,0f,a0,aa, */ |
| 5452 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa, */ |
| 5453 | {0xaa, 0x11, 0x00a0}, /* 00,11,a0,aa, */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5454 | /*?? {0xa0, 0x00, 0x0039}, |
| 5455 | {0xa1, 0x01, 0x0037}, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5456 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */ |
| 5457 | {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa, (e6 -> e8) */ |
| 5458 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */ |
| 5459 | {0xaa, 0x19, 0x0088}, /* 00,19,86,aa, */ |
| 5460 | {0xaa, 0x20, 0x0020}, /* 00,20,20,aa, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5461 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc, */ |
| 5462 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc, */ |
| 5463 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc, */ |
| 5464 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc, */ |
| 5465 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc, */ |
| 5466 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc, */ |
| 5467 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc, */ |
| 5468 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc, */ |
| 5469 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc, */ |
| 5470 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc, */ |
| 5471 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, /* 01,16,61,cc, */ |
| 5472 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, /* 01,18,65,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5473 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5474 | }; |
| 5475 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5476 | static const struct usb_action tas5130c_vf0250_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5477 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc, */ |
| 5478 | {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, /* 00,08,02,cc, */ |
| 5479 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc, */ |
| 5480 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc, */ |
| 5481 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc, */ |
| 5482 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc, */ |
| 5483 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc, */ |
| 5484 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc, */ |
| 5485 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
| 5486 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc, */ |
| 5487 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc, */ |
| 5488 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc, */ |
| 5489 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc, */ |
| 5490 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc, */ |
| 5491 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc, */ |
| 5492 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc, */ |
| 5493 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e8,cc, |
| 5494 | * 8<->6 */ |
| 5495 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc, |
| 5496 | * 8<->6 */ |
| 5497 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, /* 00,87,10,cc, */ |
| 5498 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5499 | {0xaa, 0x1b, 0x0024}, /* 00,1b,24,aa, */ |
| 5500 | {0xdd, 0x00, 0x0080}, /* 00,00,80,dd, */ |
| 5501 | {0xaa, 0x1b, 0x0000}, /* 00,1b,00,aa, */ |
| 5502 | {0xaa, 0x13, 0x0002}, /* 00,13,02,aa, */ |
| 5503 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
Jean-Francois Moine | 2ed9f81 | 2008-11-28 15:31:43 -0300 | [diff] [blame] | 5504 | /*?? {0xaa, 0x01, 0x0000}, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5505 | {0xaa, 0x01, 0x0000}, |
| 5506 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */ |
| 5507 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5508 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc, */ |
| 5509 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc, */ |
| 5510 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5511 | {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */ |
| 5512 | {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa, */ |
| 5513 | {0xaa, 0x0b, 0x00a0}, /* 00,0b,a0,aa, */ |
| 5514 | {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa, */ |
| 5515 | {0xaa, 0x0d, 0x00a0}, /* 00,0d,a0,aa, */ |
| 5516 | {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa, */ |
| 5517 | {0xaa, 0x0f, 0x00a0}, /* 00,0f,a0,aa, */ |
| 5518 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa, */ |
| 5519 | {0xaa, 0x11, 0x00a0}, /* 00,11,a0,aa, */ |
Jean-Francois Moine | 2ed9f81 | 2008-11-28 15:31:43 -0300 | [diff] [blame] | 5520 | /*?? {0xa0, 0x00, 0x0039}, |
| 5521 | {0xa1, 0x01, 0x0037}, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5522 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */ |
| 5523 | {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa (e6 -> e8) */ |
| 5524 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */ |
| 5525 | {0xaa, 0x19, 0x0088}, /* 00,19,88,aa, */ |
| 5526 | {0xaa, 0x20, 0x0020}, /* 00,20,20,aa, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5527 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc, */ |
| 5528 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc, */ |
| 5529 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc, */ |
| 5530 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc, */ |
| 5531 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc, */ |
| 5532 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc, */ |
| 5533 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc, */ |
| 5534 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc, */ |
| 5535 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc, */ |
| 5536 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc, */ |
| 5537 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, /* 01,16,61,cc, */ |
| 5538 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, /* 01,18,65,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5539 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5540 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5541 | static const struct usb_action tas5130c_vf0250_50HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5542 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5543 | {0xaa, 0x83, 0x0001}, /* 00,83,01,aa */ |
| 5544 | {0xaa, 0x84, 0x00aa}, /* 00,84,aa,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5545 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5546 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0d,cc, */ |
| 5547 | {0xa0, 0xa8, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc, */ |
| 5548 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5549 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5550 | {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,47,cc, */ |
| 5551 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5552 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5553 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ |
| 5554 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */ |
| 5555 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5556 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5557 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5558 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5559 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5560 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
| 5561 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,8d,78,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5562 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5563 | }; |
| 5564 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5565 | static const struct usb_action tas5130c_vf0250_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5566 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5567 | {0xaa, 0x83, 0x0003}, /* 00,83,03,aa */ |
| 5568 | {0xaa, 0x84, 0x0054}, /* 00,84,54,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5569 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5570 | {0xa0, 0x0d, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0d,cc, */ |
| 5571 | {0xa0, 0x50, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc, */ |
| 5572 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5573 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5574 | {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,8e,cc, */ |
| 5575 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5576 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5577 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ |
| 5578 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */ |
| 5579 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5580 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5581 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5582 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5583 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5584 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
| 5585 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,8d,78,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5586 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5587 | }; |
| 5588 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5589 | static const struct usb_action tas5130c_vf0250_60HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5590 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5591 | {0xaa, 0x83, 0x0001}, /* 00,83,01,aa */ |
| 5592 | {0xaa, 0x84, 0x0062}, /* 00,84,62,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5593 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5594 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,05,cc, */ |
| 5595 | {0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,88,cc, */ |
| 5596 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5597 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5598 | {0xa0, 0x3b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,3b,cc, */ |
| 5599 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5600 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5601 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ |
| 5602 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */ |
| 5603 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5604 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5605 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5606 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5607 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5608 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
| 5609 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,8d,78,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5610 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5611 | }; |
| 5612 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5613 | static const struct usb_action tas5130c_vf0250_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5614 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5615 | {0xaa, 0x83, 0x0002}, /* 00,83,02,aa */ |
| 5616 | {0xaa, 0x84, 0x00c4}, /* 00,84,c4,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5617 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5618 | {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,1,0b,cc, */ |
| 5619 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,2,10,cc, */ |
| 5620 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,5,00,cc, */ |
| 5621 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,6,00,cc, */ |
| 5622 | {0xa0, 0x76, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,7,76,cc, */ |
| 5623 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,c,0e,cc, */ |
| 5624 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,f,15,cc, */ |
| 5625 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,9,10,cc, */ |
| 5626 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,a,24,cc, */ |
| 5627 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,d,62,cc, */ |
| 5628 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,e,90,cc, */ |
| 5629 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,f,c8,cc, */ |
| 5630 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,0,ff,cc, */ |
| 5631 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,d,58,cc, */ |
| 5632 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
| 5633 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,d,78,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5634 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5635 | }; |
| 5636 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5637 | static const struct usb_action tas5130c_vf0250_NoFlikerScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5638 | {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5639 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5640 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 5641 | {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5642 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,0,00,cc, */ |
| 5643 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,05,cc, */ |
| 5644 | {0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,88,cc, */ |
| 5645 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5646 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5647 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc, */ |
| 5648 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5649 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5650 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5651 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5652 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5653 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5654 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5655 | {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5656 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5657 | }; |
| 5658 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5659 | static const struct usb_action tas5130c_vf0250_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5660 | {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5661 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5662 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 5663 | {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5664 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5665 | {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0b,cc, */ |
| 5666 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,10,cc, */ |
| 5667 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5668 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5669 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc, */ |
| 5670 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5671 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5672 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5673 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5674 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5675 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5676 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5677 | {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5678 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5679 | }; |
| 5680 | |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 5681 | static u8 reg_r_i(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5682 | u16 index) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5683 | { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5684 | int ret; |
| 5685 | |
| 5686 | if (gspca_dev->usb_err < 0) |
| 5687 | return 0; |
| 5688 | ret = usb_control_msg(gspca_dev->dev, |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5689 | usb_rcvctrlpipe(gspca_dev->dev, 0), |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5690 | 0xa1, |
| 5691 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
| 5692 | 0x01, /* value */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5693 | index, gspca_dev->usb_buf, 1, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5694 | 500); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5695 | if (ret < 0) { |
Jean-François Moine | 0b65632 | 2010-09-13 05:19:58 -0300 | [diff] [blame] | 5696 | err("reg_r_i err %d", ret); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5697 | gspca_dev->usb_err = ret; |
| 5698 | return 0; |
| 5699 | } |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5700 | return gspca_dev->usb_buf[0]; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5701 | } |
| 5702 | |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 5703 | static u8 reg_r(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5704 | u16 index) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5705 | { |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 5706 | u8 ret; |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5707 | |
| 5708 | ret = reg_r_i(gspca_dev, index); |
| 5709 | PDEBUG(D_USBI, "reg r [%04x] -> %02x", index, ret); |
| 5710 | return ret; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5711 | } |
| 5712 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5713 | static void reg_w_i(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5714 | u8 value, |
| 5715 | u16 index) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5716 | { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5717 | int ret; |
| 5718 | |
| 5719 | if (gspca_dev->usb_err < 0) |
| 5720 | return; |
| 5721 | ret = usb_control_msg(gspca_dev->dev, |
| 5722 | usb_sndctrlpipe(gspca_dev->dev, 0), |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5723 | 0xa0, |
| 5724 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
| 5725 | value, index, NULL, 0, |
| 5726 | 500); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5727 | if (ret < 0) { |
Jean-François Moine | 0b65632 | 2010-09-13 05:19:58 -0300 | [diff] [blame] | 5728 | err("reg_w_i err %d", ret); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5729 | gspca_dev->usb_err = ret; |
| 5730 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5731 | } |
| 5732 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5733 | static void reg_w(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5734 | u8 value, |
| 5735 | u16 index) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5736 | { |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5737 | PDEBUG(D_USBO, "reg w [%04x] = %02x", index, value); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5738 | reg_w_i(gspca_dev, value, index); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5739 | } |
| 5740 | |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5741 | static u16 i2c_read(struct gspca_dev *gspca_dev, |
| 5742 | u8 reg) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5743 | { |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5744 | u8 retbyte; |
| 5745 | u16 retval; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5746 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5747 | if (gspca_dev->usb_err < 0) |
| 5748 | return 0; |
| 5749 | reg_w_i(gspca_dev, reg, 0x0092); |
| 5750 | reg_w_i(gspca_dev, 0x02, 0x0090); /* <- read command */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5751 | msleep(20); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5752 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5753 | if (retbyte != 0x00) |
| 5754 | err("i2c_r status error %02x", retbyte); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5755 | retval = reg_r_i(gspca_dev, 0x0095); /* read Lowbyte */ |
| 5756 | retval |= reg_r_i(gspca_dev, 0x0096) << 8; /* read Hightbyte */ |
Jean-Francois Moine | 0b119b7 | 2009-04-07 05:30:31 -0300 | [diff] [blame] | 5757 | PDEBUG(D_USBI, "i2c r [%02x] -> %04x (%02x)", |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5758 | reg, retval, retbyte); |
| 5759 | return retval; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5760 | } |
| 5761 | |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5762 | static u8 i2c_write(struct gspca_dev *gspca_dev, |
| 5763 | u8 reg, |
| 5764 | u8 valL, |
| 5765 | u8 valH) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5766 | { |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5767 | u8 retbyte; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5768 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5769 | if (gspca_dev->usb_err < 0) |
| 5770 | return 0; |
| 5771 | reg_w_i(gspca_dev, reg, 0x92); |
| 5772 | reg_w_i(gspca_dev, valL, 0x93); |
| 5773 | reg_w_i(gspca_dev, valH, 0x94); |
| 5774 | reg_w_i(gspca_dev, 0x01, 0x90); /* <- write command */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5775 | msleep(1); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5776 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5777 | if (retbyte != 0x00) |
| 5778 | err("i2c_w status error %02x", retbyte); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5779 | PDEBUG(D_USBO, "i2c w [%02x] = %02x%02x (%02x)", |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5780 | reg, valH, valL, retbyte); |
| 5781 | return retbyte; |
| 5782 | } |
| 5783 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5784 | static void usb_exchange(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5785 | const struct usb_action *action) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5786 | { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5787 | while (action->req) { |
| 5788 | switch (action->req) { |
| 5789 | case 0xa0: /* write register */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5790 | reg_w(gspca_dev, action->val, action->idx); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5791 | break; |
| 5792 | case 0xa1: /* read status */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5793 | reg_r(gspca_dev, action->idx); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5794 | break; |
| 5795 | case 0xaa: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5796 | i2c_write(gspca_dev, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5797 | action->val, /* reg */ |
| 5798 | action->idx & 0xff, /* valL */ |
| 5799 | action->idx >> 8); /* valH */ |
| 5800 | break; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 5801 | case 0xbb: |
| 5802 | i2c_write(gspca_dev, |
| 5803 | action->idx >> 8, /* reg */ |
| 5804 | action->idx & 0xff, /* valL */ |
| 5805 | action->val); /* valH */ |
| 5806 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5807 | default: |
| 5808 | /* case 0xdd: * delay */ |
| 5809 | msleep(action->val / 64 + 10); |
| 5810 | break; |
| 5811 | } |
| 5812 | action++; |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5813 | msleep(1); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5814 | } |
| 5815 | } |
| 5816 | |
| 5817 | static void setmatrix(struct gspca_dev *gspca_dev) |
| 5818 | { |
| 5819 | struct sd *sd = (struct sd *) gspca_dev; |
| 5820 | int i; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5821 | const u8 *matrix; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 5822 | static const u8 adcm2700_matrix[9] = |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 5823 | /* {0x66, 0xed, 0xed, 0xed, 0x66, 0xed, 0xed, 0xed, 0x66}; */ |
| 5824 | /*ms-win*/ |
| 5825 | {0x74, 0xed, 0xed, 0xed, 0x74, 0xed, 0xed, 0xed, 0x74}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5826 | static const u8 gc0305_matrix[9] = |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5827 | {0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5828 | static const u8 ov7620_matrix[9] = |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5829 | {0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5830 | static const u8 pas202b_matrix[9] = |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 5831 | {0x4c, 0xf5, 0xff, 0xf9, 0x51, 0xf5, 0xfb, 0xed, 0x5f}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5832 | static const u8 po2030_matrix[9] = |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5833 | {0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60}; |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5834 | static const u8 tas5130c_matrix[9] = |
| 5835 | {0x68, 0xec, 0xec, 0xec, 0x68, 0xec, 0xec, 0xec, 0x68}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5836 | static const u8 vf0250_matrix[9] = |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5837 | {0x7b, 0xea, 0xea, 0xea, 0x7b, 0xea, 0xea, 0xea, 0x7b}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5838 | static const u8 *matrix_tb[SENSOR_MAX] = { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5839 | [SENSOR_ADCM2700] = adcm2700_matrix, |
| 5840 | [SENSOR_CS2102] = ov7620_matrix, |
| 5841 | [SENSOR_CS2102K] = NULL, |
| 5842 | [SENSOR_GC0305] = gc0305_matrix, |
| 5843 | [SENSOR_HDCS2020b] = NULL, |
| 5844 | [SENSOR_HV7131B] = NULL, |
| 5845 | [SENSOR_HV7131R] = NULL, |
| 5846 | [SENSOR_ICM105A] = po2030_matrix, |
| 5847 | [SENSOR_MC501CB] = NULL, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 5848 | [SENSOR_MT9V111_1] = gc0305_matrix, |
| 5849 | [SENSOR_MT9V111_3] = gc0305_matrix, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5850 | [SENSOR_OV7620] = ov7620_matrix, |
| 5851 | [SENSOR_OV7630C] = NULL, |
| 5852 | [SENSOR_PAS106] = NULL, |
| 5853 | [SENSOR_PAS202B] = pas202b_matrix, |
| 5854 | [SENSOR_PB0330] = gc0305_matrix, |
| 5855 | [SENSOR_PO2030] = po2030_matrix, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5856 | [SENSOR_TAS5130C] = tas5130c_matrix, |
| 5857 | [SENSOR_TAS5130C_VF0250] = vf0250_matrix, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 5858 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5859 | |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 5860 | matrix = matrix_tb[sd->sensor]; |
| 5861 | if (matrix == NULL) |
| 5862 | return; /* matrix already loaded */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5863 | for (i = 0; i < ARRAY_SIZE(ov7620_matrix); i++) |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5864 | reg_w(gspca_dev, matrix[i], 0x010a + i); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5865 | } |
| 5866 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5867 | static void setsharpness(struct gspca_dev *gspca_dev) |
| 5868 | { |
| 5869 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5870 | int sharpness; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5871 | static const u8 sharpness_tb[][2] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5872 | {0x02, 0x03}, |
| 5873 | {0x04, 0x07}, |
| 5874 | {0x08, 0x0f}, |
| 5875 | {0x10, 0x1e} |
| 5876 | }; |
| 5877 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5878 | sharpness = sd->sharpness; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5879 | reg_w(gspca_dev, sharpness_tb[sharpness][0], 0x01c6); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5880 | reg_r(gspca_dev, 0x01c8); |
| 5881 | reg_r(gspca_dev, 0x01c9); |
| 5882 | reg_r(gspca_dev, 0x01ca); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5883 | reg_w(gspca_dev, sharpness_tb[sharpness][1], 0x01cb); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5884 | } |
| 5885 | |
| 5886 | static void setcontrast(struct gspca_dev *gspca_dev) |
| 5887 | { |
| 5888 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5889 | const u8 *Tgamma; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5890 | int g, i, brightness, contrast, adj, gp1, gp2; |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5891 | u8 gr[16]; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5892 | static const u8 delta_b[16] = /* delta for brightness */ |
| 5893 | {0x50, 0x38, 0x2d, 0x28, 0x24, 0x21, 0x1e, 0x1d, |
| 5894 | 0x1d, 0x1b, 0x1b, 0x1b, 0x19, 0x18, 0x18, 0x18}; |
| 5895 | static const u8 delta_c[16] = /* delta for contrast */ |
Jean-François Moine | a856753 | 2010-04-25 15:25:42 -0300 | [diff] [blame] | 5896 | {0x2c, 0x1a, 0x12, 0x0c, 0x0a, 0x06, 0x06, 0x06, |
| 5897 | 0x04, 0x06, 0x04, 0x04, 0x03, 0x03, 0x02, 0x02}; |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5898 | static const u8 gamma_tb[6][16] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5899 | {0x00, 0x00, 0x03, 0x0d, 0x1b, 0x2e, 0x45, 0x5f, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5900 | 0x79, 0x93, 0xab, 0xc1, 0xd4, 0xe5, 0xf3, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5901 | {0x01, 0x0c, 0x1f, 0x3a, 0x53, 0x6d, 0x85, 0x9c, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5902 | 0xb0, 0xc2, 0xd1, 0xde, 0xe9, 0xf2, 0xf9, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5903 | {0x04, 0x16, 0x30, 0x4e, 0x68, 0x81, 0x98, 0xac, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5904 | 0xbe, 0xcd, 0xda, 0xe4, 0xed, 0xf5, 0xfb, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5905 | {0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5906 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5907 | {0x20, 0x4b, 0x6e, 0x8d, 0xa3, 0xb5, 0xc5, 0xd2, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5908 | 0xdc, 0xe5, 0xec, 0xf2, 0xf6, 0xfa, 0xfd, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5909 | {0x24, 0x44, 0x64, 0x84, 0x9d, 0xb2, 0xc4, 0xd3, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5910 | 0xe0, 0xeb, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5911 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5912 | |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5913 | Tgamma = gamma_tb[sd->gamma - 1]; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5914 | |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5915 | contrast = ((int) sd->contrast - 128); /* -128 / 127 */ |
| 5916 | brightness = ((int) sd->brightness - 128); /* -128 / 92 */ |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5917 | adj = 0; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5918 | gp1 = gp2 = 0; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5919 | for (i = 0; i < 16; i++) { |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5920 | g = Tgamma[i] + delta_b[i] * brightness / 256 |
| 5921 | - delta_c[i] * contrast / 256 - adj / 2; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5922 | if (g > 0xff) |
| 5923 | g = 0xff; |
Jean-François Moine | a856753 | 2010-04-25 15:25:42 -0300 | [diff] [blame] | 5924 | else if (g < 0) |
| 5925 | g = 0; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5926 | reg_w(gspca_dev, g, 0x0120 + i); /* gamma */ |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5927 | if (contrast > 0) |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5928 | adj--; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5929 | else if (contrast < 0) |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5930 | adj++; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5931 | if (i > 1) |
| 5932 | gr[i - 1] = (g - gp2) / 2; |
| 5933 | else if (i != 0) |
| 5934 | gr[0] = gp1 == 0 ? 0 : (g - gp1); |
| 5935 | gp2 = gp1; |
| 5936 | gp1 = g; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5937 | } |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5938 | gr[15] = (0xff - gp2) / 2; |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5939 | for (i = 0; i < 16; i++) |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5940 | reg_w(gspca_dev, gr[i], 0x0130 + i); /* gradient */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5941 | } |
| 5942 | |
| 5943 | static void setquality(struct gspca_dev *gspca_dev) |
| 5944 | { |
| 5945 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5946 | u8 frxt; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5947 | |
| 5948 | switch (sd->sensor) { |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 5949 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5950 | case SENSOR_GC0305: |
Jean-Francois Moine | c9ff1b6 | 2008-11-06 15:29:47 -0300 | [diff] [blame] | 5951 | case SENSOR_HV7131B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5952 | case SENSOR_OV7620: |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 5953 | case SENSOR_PAS202B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5954 | case SENSOR_PO2030: |
| 5955 | return; |
| 5956 | } |
| 5957 | /*fixme: is it really 0008 0007 0018 for all other sensors? */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5958 | reg_w(gspca_dev, QUANT_VAL, 0x0008); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5959 | frxt = 0x30; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5960 | reg_w(gspca_dev, frxt, 0x0007); |
Jean-Francois Moine | 36e819d | 2009-01-07 16:49:57 -0300 | [diff] [blame] | 5961 | #if QUANT_VAL == 0 || QUANT_VAL == 1 || QUANT_VAL == 2 |
| 5962 | frxt = 0xff; |
| 5963 | #elif QUANT_VAL == 3 |
| 5964 | frxt = 0xf0; |
| 5965 | #elif QUANT_VAL == 4 |
| 5966 | frxt = 0xe0; |
| 5967 | #else |
| 5968 | frxt = 0x20; |
| 5969 | #endif |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5970 | reg_w(gspca_dev, frxt, 0x0018); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5971 | } |
| 5972 | |
| 5973 | /* Matches the sensor's internal frame rate to the lighting frequency. |
| 5974 | * Valid frequencies are: |
| 5975 | * 50Hz, for European and Asian lighting (default) |
| 5976 | * 60Hz, for American lighting |
| 5977 | * 0 = No Fliker (for outdoore usage) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5978 | */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5979 | static void setlightfreq(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5980 | { |
| 5981 | struct sd *sd = (struct sd *) gspca_dev; |
| 5982 | int i, mode; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5983 | const struct usb_action *zc3_freq; |
| 5984 | static const struct usb_action *freq_tb[SENSOR_MAX][6] = { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5985 | [SENSOR_ADCM2700] = |
Jean-Francois Moine | c314b53 | 2009-01-20 10:02:35 -0300 | [diff] [blame] | 5986 | {adcm2700_NoFliker, adcm2700_NoFliker, |
| 5987 | adcm2700_50HZ, adcm2700_50HZ, |
| 5988 | adcm2700_60HZ, adcm2700_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5989 | [SENSOR_CS2102] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5990 | {cs2102_NoFliker, cs2102_NoFlikerScale, |
| 5991 | cs2102_50HZ, cs2102_50HZScale, |
| 5992 | cs2102_60HZ, cs2102_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5993 | [SENSOR_CS2102K] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5994 | {cs2102_NoFliker, cs2102_NoFlikerScale, |
Costantino Leandro | 5be8b73e | 2008-09-09 04:32:46 -0300 | [diff] [blame] | 5995 | NULL, NULL, /* currently disabled */ |
| 5996 | NULL, NULL}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5997 | [SENSOR_GC0305] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5998 | {gc0305_NoFliker, gc0305_NoFliker, |
| 5999 | gc0305_50HZ, gc0305_50HZ, |
| 6000 | gc0305_60HZ, gc0305_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6001 | [SENSOR_HDCS2020b] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6002 | {hdcs2020b_NoFliker, hdcs2020b_NoFliker, |
| 6003 | hdcs2020b_50HZ, hdcs2020b_50HZ, |
| 6004 | hdcs2020b_60HZ, hdcs2020b_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6005 | [SENSOR_HV7131B] = |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 6006 | {hv7131b_NoFliker, hv7131b_NoFlikerScale, |
| 6007 | hv7131b_50HZ, hv7131b_50HZScale, |
| 6008 | hv7131b_60HZ, hv7131b_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6009 | [SENSOR_HV7131R] = |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 6010 | {hv7131r_NoFliker, hv7131r_NoFlikerScale, |
| 6011 | hv7131r_50HZ, hv7131r_50HZScale, |
| 6012 | hv7131r_60HZ, hv7131r_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6013 | [SENSOR_ICM105A] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6014 | {icm105a_NoFliker, icm105a_NoFlikerScale, |
| 6015 | icm105a_50HZ, icm105a_50HZScale, |
| 6016 | icm105a_60HZ, icm105a_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6017 | [SENSOR_MC501CB] = |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 6018 | {mc501cb_NoFliker, mc501cb_NoFlikerScale, |
| 6019 | mc501cb_50HZ, mc501cb_50HZScale, |
| 6020 | mc501cb_60HZ, mc501cb_60HZScale}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6021 | [SENSOR_MT9V111_1] = |
| 6022 | {mt9v111_1_AENoFliker, mt9v111_1_AENoFlikerScale, |
| 6023 | mt9v111_1_AE50HZ, mt9v111_1_AE50HZScale, |
| 6024 | mt9v111_1_AE60HZ, mt9v111_1_AE60HZScale}, |
| 6025 | [SENSOR_MT9V111_3] = |
| 6026 | {mt9v111_3_AENoFliker, mt9v111_3_AENoFlikerScale, |
| 6027 | mt9v111_3_AE50HZ, mt9v111_3_AE50HZScale, |
| 6028 | mt9v111_3_AE60HZ, mt9v111_3_AE60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6029 | [SENSOR_OV7620] = |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 6030 | {ov7620_NoFliker, ov7620_NoFliker, |
| 6031 | ov7620_50HZ, ov7620_50HZ, |
| 6032 | ov7620_60HZ, ov7620_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6033 | [SENSOR_OV7630C] = |
Harvey Harrison | efab821 | 2008-07-05 06:12:47 -0300 | [diff] [blame] | 6034 | {NULL, NULL, |
| 6035 | NULL, NULL, |
| 6036 | NULL, NULL}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6037 | [SENSOR_PAS106] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6038 | {pas106b_NoFliker, pas106b_NoFliker, |
| 6039 | pas106b_50HZ, pas106b_50HZ, |
| 6040 | pas106b_60HZ, pas106b_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6041 | [SENSOR_PAS202B] = |
Jean-François Moine | a6a86f0d | 2010-04-25 14:57:10 -0300 | [diff] [blame] | 6042 | {pas202b_NoFliker, pas202b_NoFlikerScale, |
| 6043 | pas202b_50HZ, pas202b_50HZScale, |
| 6044 | pas202b_60HZ, pas202b_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6045 | [SENSOR_PB0330] = |
Jean-François Moine | a6a86f0d | 2010-04-25 14:57:10 -0300 | [diff] [blame] | 6046 | {pb0330_NoFliker, pb0330_NoFlikerScale, |
| 6047 | pb0330_50HZ, pb0330_50HZScale, |
| 6048 | pb0330_60HZ, pb0330_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6049 | [SENSOR_PO2030] = |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 6050 | {po2030_NoFliker, po2030_NoFliker, |
| 6051 | po2030_50HZ, po2030_50HZ, |
| 6052 | po2030_60HZ, po2030_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6053 | [SENSOR_TAS5130C] = |
| 6054 | {tas5130c_NoFliker, tas5130c_NoFlikerScale, |
| 6055 | tas5130c_50HZ, tas5130c_50HZScale, |
| 6056 | tas5130c_60HZ, tas5130c_60HZScale}, |
| 6057 | [SENSOR_TAS5130C_VF0250] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6058 | {tas5130c_vf0250_NoFliker, tas5130c_vf0250_NoFlikerScale, |
| 6059 | tas5130c_vf0250_50HZ, tas5130c_vf0250_50HZScale, |
| 6060 | tas5130c_vf0250_60HZ, tas5130c_vf0250_60HZScale}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6061 | }; |
| 6062 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6063 | i = sd->lightfreq * 2; |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 6064 | mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 6065 | if (mode) |
| 6066 | i++; /* 320x240 */ |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6067 | zc3_freq = freq_tb[sd->sensor][i]; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6068 | if (zc3_freq == NULL) |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6069 | return; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6070 | usb_exchange(gspca_dev, zc3_freq); |
| 6071 | switch (sd->sensor) { |
| 6072 | case SENSOR_GC0305: |
| 6073 | if (mode /* if 320x240 */ |
| 6074 | && sd->lightfreq == 1) /* and 50Hz */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6075 | reg_w(gspca_dev, 0x85, 0x018d); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6076 | /* win: 0x80, 0x018d */ |
| 6077 | break; |
| 6078 | case SENSOR_OV7620: |
| 6079 | if (!mode) { /* if 640x480 */ |
| 6080 | if (sd->lightfreq != 0) /* and 50 or 60 Hz */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6081 | reg_w(gspca_dev, 0x40, 0x0002); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6082 | else |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6083 | reg_w(gspca_dev, 0x44, 0x0002); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6084 | } |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6085 | break; |
| 6086 | case SENSOR_PAS202B: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6087 | reg_w(gspca_dev, 0x00, 0x01a7); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6088 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6089 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6090 | } |
| 6091 | |
| 6092 | static void setautogain(struct gspca_dev *gspca_dev) |
| 6093 | { |
| 6094 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6095 | u8 autoval; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6096 | |
| 6097 | if (sd->autogain) |
| 6098 | autoval = 0x42; |
| 6099 | else |
| 6100 | autoval = 0x02; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6101 | reg_w(gspca_dev, autoval, 0x0180); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6102 | } |
| 6103 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6104 | static void send_unknown(struct gspca_dev *gspca_dev, int sensor) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6105 | { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6106 | reg_w(gspca_dev, 0x01, 0x0000); /* led off */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6107 | switch (sensor) { |
| 6108 | case SENSOR_PAS106: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6109 | reg_w(gspca_dev, 0x03, 0x003a); |
| 6110 | reg_w(gspca_dev, 0x0c, 0x003b); |
| 6111 | reg_w(gspca_dev, 0x08, 0x0038); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6112 | break; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6113 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6114 | case SENSOR_GC0305: |
| 6115 | case SENSOR_OV7620: |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6116 | case SENSOR_MT9V111_1: |
| 6117 | case SENSOR_MT9V111_3: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6118 | case SENSOR_PB0330: |
| 6119 | case SENSOR_PO2030: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6120 | reg_w(gspca_dev, 0x0d, 0x003a); |
| 6121 | reg_w(gspca_dev, 0x02, 0x003b); |
| 6122 | reg_w(gspca_dev, 0x00, 0x0038); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6123 | break; |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6124 | case SENSOR_PAS202B: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6125 | reg_w(gspca_dev, 0x03, 0x003b); |
| 6126 | reg_w(gspca_dev, 0x0c, 0x003a); |
| 6127 | reg_w(gspca_dev, 0x0b, 0x0039); |
| 6128 | reg_w(gspca_dev, 0x0b, 0x0038); |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6129 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6130 | } |
| 6131 | } |
| 6132 | |
| 6133 | /* start probe 2 wires */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6134 | static void start_2wr_probe(struct gspca_dev *gspca_dev, int sensor) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6135 | { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6136 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6137 | reg_w(gspca_dev, sensor, 0x0010); |
| 6138 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6139 | reg_w(gspca_dev, 0x03, 0x0012); |
| 6140 | reg_w(gspca_dev, 0x01, 0x0012); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6141 | /* msleep(2); */ |
| 6142 | } |
| 6143 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6144 | static int sif_probe(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6145 | { |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6146 | u16 checkword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6147 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6148 | start_2wr_probe(gspca_dev, 0x0f); /* PAS106 */ |
| 6149 | reg_w(gspca_dev, 0x08, 0x008d); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6150 | msleep(150); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6151 | checkword = ((i2c_read(gspca_dev, 0x00) & 0x0f) << 4) |
| 6152 | | ((i2c_read(gspca_dev, 0x01) & 0xf0) >> 4); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6153 | PDEBUG(D_PROBE, "probe sif 0x%04x", checkword); |
| 6154 | if (checkword == 0x0007) { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6155 | send_unknown(gspca_dev, SENSOR_PAS106); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6156 | return 0x0f; /* PAS106 */ |
| 6157 | } |
| 6158 | return -1; |
| 6159 | } |
| 6160 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6161 | static int vga_2wr_probe(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6162 | { |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6163 | u16 retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6164 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6165 | start_2wr_probe(gspca_dev, 0x00); /* HV7131B */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6166 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6167 | retword = i2c_read(gspca_dev, 0x01); |
| 6168 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6169 | return 0x00; /* HV7131B */ |
| 6170 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6171 | start_2wr_probe(gspca_dev, 0x04); /* CS2102 */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6172 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6173 | retword = i2c_read(gspca_dev, 0x01); |
| 6174 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6175 | return 0x04; /* CS2102 */ |
| 6176 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6177 | start_2wr_probe(gspca_dev, 0x06); /* OmniVision */ |
| 6178 | reg_w(gspca_dev, 0x08, 0x008d); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6179 | i2c_write(gspca_dev, 0x11, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6180 | retword = i2c_read(gspca_dev, 0x11); |
| 6181 | if (retword != 0) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6182 | /* (should have returned 0xaa) --> Omnivision? */ |
| 6183 | /* reg_r 0x10 -> 0x06 --> */ |
| 6184 | goto ov_check; |
| 6185 | } |
| 6186 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6187 | start_2wr_probe(gspca_dev, 0x08); /* HDCS2020 */ |
Jean-Francois Moine | 1eed40a | 2010-01-08 08:01:43 -0300 | [diff] [blame] | 6188 | i2c_write(gspca_dev, 0x1c, 0x00, 0x00); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6189 | i2c_write(gspca_dev, 0x15, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6190 | retword = i2c_read(gspca_dev, 0x15); |
| 6191 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6192 | return 0x08; /* HDCS2020 */ |
| 6193 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6194 | start_2wr_probe(gspca_dev, 0x0a); /* PB0330 */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6195 | i2c_write(gspca_dev, 0x07, 0xaa, 0xaa); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6196 | retword = i2c_read(gspca_dev, 0x07); |
| 6197 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6198 | return 0x0a; /* PB0330 */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6199 | retword = i2c_read(gspca_dev, 0x03); |
| 6200 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6201 | return 0x0a; /* PB0330 ?? */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6202 | retword = i2c_read(gspca_dev, 0x04); |
| 6203 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6204 | return 0x0a; /* PB0330 ?? */ |
| 6205 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6206 | start_2wr_probe(gspca_dev, 0x0c); /* ICM105A */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6207 | i2c_write(gspca_dev, 0x01, 0x11, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6208 | retword = i2c_read(gspca_dev, 0x01); |
| 6209 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6210 | return 0x0c; /* ICM105A */ |
| 6211 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6212 | start_2wr_probe(gspca_dev, 0x0e); /* PAS202BCB */ |
| 6213 | reg_w(gspca_dev, 0x08, 0x008d); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6214 | i2c_write(gspca_dev, 0x03, 0xaa, 0x00); |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 6215 | msleep(50); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6216 | retword = i2c_read(gspca_dev, 0x03); |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6217 | if (retword != 0) { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6218 | send_unknown(gspca_dev, SENSOR_PAS202B); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6219 | return 0x0e; /* PAS202BCB */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6220 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6221 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6222 | start_2wr_probe(gspca_dev, 0x02); /* TAS5130C */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6223 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6224 | retword = i2c_read(gspca_dev, 0x01); |
| 6225 | if (retword != 0) |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6226 | return 0x02; /* TAS5130C */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6227 | ov_check: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6228 | reg_r(gspca_dev, 0x0010); /* ?? */ |
| 6229 | reg_r(gspca_dev, 0x0010); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6230 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6231 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6232 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6233 | reg_w(gspca_dev, 0x06, 0x0010); /* OmniVision */ |
| 6234 | reg_w(gspca_dev, 0xa1, 0x008b); |
| 6235 | reg_w(gspca_dev, 0x08, 0x008d); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6236 | msleep(500); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6237 | reg_w(gspca_dev, 0x01, 0x0012); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6238 | i2c_write(gspca_dev, 0x12, 0x80, 0x00); /* sensor reset */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6239 | retword = i2c_read(gspca_dev, 0x0a) << 8; |
| 6240 | retword |= i2c_read(gspca_dev, 0x0b); |
| 6241 | PDEBUG(D_PROBE, "probe 2wr ov vga 0x%04x", retword); |
| 6242 | switch (retword) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6243 | case 0x7631: /* OV7630C */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6244 | reg_w(gspca_dev, 0x06, 0x0010); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6245 | break; |
| 6246 | case 0x7620: /* OV7620 */ |
| 6247 | case 0x7648: /* OV7648 */ |
| 6248 | break; |
| 6249 | default: |
| 6250 | return -1; /* not OmniVision */ |
| 6251 | } |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6252 | return retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6253 | } |
| 6254 | |
| 6255 | struct sensor_by_chipset_revision { |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6256 | u16 revision; |
| 6257 | u8 internal_sensor_id; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6258 | }; |
| 6259 | static const struct sensor_by_chipset_revision chipset_revision_sensor[] = { |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 6260 | {0xc000, 0x12}, /* TAS5130C */ |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6261 | {0xc001, 0x13}, /* MT9V111 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6262 | {0xe001, 0x13}, |
| 6263 | {0x8001, 0x13}, |
| 6264 | {0x8000, 0x14}, /* CS2102K */ |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6265 | {0x8400, 0x15}, /* MT9V111 */ |
Luis Maia | 658604e | 2009-12-15 13:40:44 -0300 | [diff] [blame] | 6266 | {0xe400, 0x15}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6267 | }; |
| 6268 | |
| 6269 | static int vga_3wr_probe(struct gspca_dev *gspca_dev) |
| 6270 | { |
| 6271 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6272 | int i; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6273 | u8 retbyte; |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6274 | u16 retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6275 | |
| 6276 | /*fixme: lack of 8b=b3 (11,12)-> 10, 8b=e0 (14,15,16)-> 12 found in gspcav1*/ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6277 | reg_w(gspca_dev, 0x02, 0x0010); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6278 | reg_r(gspca_dev, 0x0010); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6279 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6280 | reg_w(gspca_dev, 0x00, 0x0010); |
| 6281 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6282 | reg_w(gspca_dev, 0x91, 0x008b); |
| 6283 | reg_w(gspca_dev, 0x03, 0x0012); |
| 6284 | reg_w(gspca_dev, 0x01, 0x0012); |
| 6285 | reg_w(gspca_dev, 0x05, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6286 | retword = i2c_read(gspca_dev, 0x14); |
| 6287 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6288 | return 0x11; /* HV7131R */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6289 | retword = i2c_read(gspca_dev, 0x15); |
| 6290 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6291 | return 0x11; /* HV7131R */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6292 | retword = i2c_read(gspca_dev, 0x16); |
| 6293 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6294 | return 0x11; /* HV7131R */ |
| 6295 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6296 | reg_w(gspca_dev, 0x02, 0x0010); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6297 | retword = reg_r(gspca_dev, 0x000b) << 8; |
| 6298 | retword |= reg_r(gspca_dev, 0x000a); |
| 6299 | PDEBUG(D_PROBE, "probe 3wr vga 1 0x%04x", retword); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6300 | reg_r(gspca_dev, 0x0010); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6301 | if ((retword & 0xff00) == 0x6400) |
| 6302 | return 0x02; /* TAS5130C */ |
| 6303 | for (i = 0; i < ARRAY_SIZE(chipset_revision_sensor); i++) { |
| 6304 | if (chipset_revision_sensor[i].revision == retword) { |
| 6305 | sd->chip_revision = retword; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6306 | send_unknown(gspca_dev, SENSOR_PB0330); |
Jean-François Moine | 780e312 | 2010-10-19 04:29:10 -0300 | [diff] [blame] | 6307 | return chipset_revision_sensor[i].internal_sensor_id; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6308 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6309 | } |
| 6310 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6311 | reg_w(gspca_dev, 0x01, 0x0000); /* check PB0330 */ |
| 6312 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6313 | reg_w(gspca_dev, 0xdd, 0x008b); |
| 6314 | reg_w(gspca_dev, 0x0a, 0x0010); |
| 6315 | reg_w(gspca_dev, 0x03, 0x0012); |
| 6316 | reg_w(gspca_dev, 0x01, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6317 | retword = i2c_read(gspca_dev, 0x00); |
| 6318 | if (retword != 0) { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6319 | PDEBUG(D_PROBE, "probe 3wr vga type 0a"); |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6320 | return 0x0a; /* PB0330 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6321 | } |
| 6322 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6323 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6324 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6325 | reg_w(gspca_dev, 0x98, 0x008b); |
| 6326 | reg_w(gspca_dev, 0x01, 0x0010); |
| 6327 | reg_w(gspca_dev, 0x03, 0x0012); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6328 | msleep(2); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6329 | reg_w(gspca_dev, 0x01, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6330 | retword = i2c_read(gspca_dev, 0x00); |
| 6331 | if (retword != 0) { |
| 6332 | PDEBUG(D_PROBE, "probe 3wr vga type %02x", retword); |
| 6333 | if (retword == 0x0011) /* VF0250 */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6334 | return 0x0250; |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6335 | if (retword == 0x0029) /* gc0305 */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6336 | send_unknown(gspca_dev, SENSOR_GC0305); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6337 | return retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6338 | } |
| 6339 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6340 | reg_w(gspca_dev, 0x01, 0x0000); /* check OmniVision */ |
| 6341 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6342 | reg_w(gspca_dev, 0xa1, 0x008b); |
| 6343 | reg_w(gspca_dev, 0x08, 0x008d); |
| 6344 | reg_w(gspca_dev, 0x06, 0x0010); |
| 6345 | reg_w(gspca_dev, 0x01, 0x0012); |
| 6346 | reg_w(gspca_dev, 0x05, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6347 | if (i2c_read(gspca_dev, 0x1c) == 0x007f /* OV7610 - manufacturer ID */ |
| 6348 | && i2c_read(gspca_dev, 0x1d) == 0x00a2) { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6349 | send_unknown(gspca_dev, SENSOR_OV7620); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6350 | return 0x06; /* OmniVision confirm ? */ |
| 6351 | } |
| 6352 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6353 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6354 | reg_w(gspca_dev, 0x00, 0x0002); |
| 6355 | reg_w(gspca_dev, 0x01, 0x0010); |
| 6356 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6357 | reg_w(gspca_dev, 0xee, 0x008b); |
| 6358 | reg_w(gspca_dev, 0x03, 0x0012); |
| 6359 | reg_w(gspca_dev, 0x01, 0x0012); |
| 6360 | reg_w(gspca_dev, 0x05, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6361 | retword = i2c_read(gspca_dev, 0x00) << 8; /* ID 0 */ |
| 6362 | retword |= i2c_read(gspca_dev, 0x01); /* ID 1 */ |
| 6363 | PDEBUG(D_PROBE, "probe 3wr vga 2 0x%04x", retword); |
| 6364 | if (retword == 0x2030) { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6365 | retbyte = i2c_read(gspca_dev, 0x02); /* revision number */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6366 | PDEBUG(D_PROBE, "sensor PO2030 rev 0x%02x", retbyte); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6367 | send_unknown(gspca_dev, SENSOR_PO2030); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6368 | return retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6369 | } |
| 6370 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6371 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6372 | reg_w(gspca_dev, 0x0a, 0x0010); |
| 6373 | reg_w(gspca_dev, 0xd3, 0x008b); |
| 6374 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6375 | reg_w(gspca_dev, 0x03, 0x0012); |
| 6376 | reg_w(gspca_dev, 0x01, 0x0012); |
| 6377 | reg_w(gspca_dev, 0x05, 0x0012); |
| 6378 | reg_w(gspca_dev, 0xd3, 0x008b); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6379 | retword = i2c_read(gspca_dev, 0x01); |
| 6380 | if (retword != 0) { |
| 6381 | PDEBUG(D_PROBE, "probe 3wr vga type 0a ? ret: %04x", retword); |
Jean-Francois Moine | 881cd41 | 2009-04-05 04:01:13 -0300 | [diff] [blame] | 6382 | return 0x16; /* adcm2700 (6100/6200) */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6383 | } |
| 6384 | return -1; |
| 6385 | } |
| 6386 | |
| 6387 | static int zcxx_probeSensor(struct gspca_dev *gspca_dev) |
| 6388 | { |
| 6389 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 603538a | 2009-02-19 15:38:31 -0300 | [diff] [blame] | 6390 | int sensor; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6391 | |
| 6392 | switch (sd->sensor) { |
| 6393 | case SENSOR_MC501CB: |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6394 | return -1; /* don't probe */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6395 | case SENSOR_TAS5130C_VF0250: |
Hans de Goede | 34662342 | 2008-09-03 16:47:28 -0300 | [diff] [blame] | 6396 | /* may probe but with no write in reg 0x0010 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6397 | return -1; /* don't probe */ |
Hans de Goede | 34662342 | 2008-09-03 16:47:28 -0300 | [diff] [blame] | 6398 | case SENSOR_PAS106: |
| 6399 | sensor = sif_probe(gspca_dev); |
| 6400 | if (sensor >= 0) |
| 6401 | return sensor; |
| 6402 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6403 | } |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6404 | sensor = vga_2wr_probe(gspca_dev); |
Jean-Francois Moine | 603538a | 2009-02-19 15:38:31 -0300 | [diff] [blame] | 6405 | if (sensor >= 0) |
Hans de Goede | 34662342 | 2008-09-03 16:47:28 -0300 | [diff] [blame] | 6406 | return sensor; |
Jean-Francois Moine | 603538a | 2009-02-19 15:38:31 -0300 | [diff] [blame] | 6407 | return vga_3wr_probe(gspca_dev); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6408 | } |
| 6409 | |
| 6410 | /* this function is called at probe time */ |
| 6411 | static int sd_config(struct gspca_dev *gspca_dev, |
| 6412 | const struct usb_device_id *id) |
| 6413 | { |
| 6414 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-François Moine | c39da6a | 2010-08-04 06:07:23 -0300 | [diff] [blame] | 6415 | |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6416 | if (id->idProduct == 0x301b) |
| 6417 | sd->bridge = BRIDGE_ZC301; |
| 6418 | else |
| 6419 | sd->bridge = BRIDGE_ZC303; |
| 6420 | |
Jean-François Moine | c39da6a | 2010-08-04 06:07:23 -0300 | [diff] [blame] | 6421 | /* define some sensors from the vendor/product */ |
| 6422 | sd->sensor = id->driver_info; |
| 6423 | |
| 6424 | sd->sharpness = SHARPNESS_DEF; |
| 6425 | sd->brightness = BRIGHTNESS_DEF; |
| 6426 | sd->contrast = CONTRAST_DEF; |
| 6427 | sd->autogain = AUTOGAIN_DEF; |
| 6428 | sd->lightfreq = FREQ_DEF; |
| 6429 | sd->quality = QUALITY_DEF; |
| 6430 | |
| 6431 | return 0; |
| 6432 | } |
| 6433 | |
| 6434 | /* this function is called at probe and resume time */ |
| 6435 | static int sd_init(struct gspca_dev *gspca_dev) |
| 6436 | { |
| 6437 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6438 | struct cam *cam; |
| 6439 | int sensor; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6440 | static const u8 gamma[SENSOR_MAX] = { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6441 | [SENSOR_ADCM2700] = 4, |
| 6442 | [SENSOR_CS2102] = 4, |
| 6443 | [SENSOR_CS2102K] = 5, |
| 6444 | [SENSOR_GC0305] = 4, |
| 6445 | [SENSOR_HDCS2020b] = 4, |
| 6446 | [SENSOR_HV7131B] = 4, |
| 6447 | [SENSOR_HV7131R] = 4, |
| 6448 | [SENSOR_ICM105A] = 4, |
| 6449 | [SENSOR_MC501CB] = 4, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6450 | [SENSOR_MT9V111_1] = 4, |
| 6451 | [SENSOR_MT9V111_3] = 4, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6452 | [SENSOR_OV7620] = 3, |
| 6453 | [SENSOR_OV7630C] = 4, |
| 6454 | [SENSOR_PAS106] = 4, |
| 6455 | [SENSOR_PAS202B] = 4, |
| 6456 | [SENSOR_PB0330] = 4, |
| 6457 | [SENSOR_PO2030] = 4, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6458 | [SENSOR_TAS5130C] = 3, |
| 6459 | [SENSOR_TAS5130C_VF0250] = 3, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6460 | }; |
Hans de Goede | 9919fe8 | 2010-01-13 07:12:28 -0300 | [diff] [blame] | 6461 | static const u8 mode_tb[SENSOR_MAX] = { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6462 | [SENSOR_ADCM2700] = 2, |
| 6463 | [SENSOR_CS2102] = 1, |
| 6464 | [SENSOR_CS2102K] = 1, |
| 6465 | [SENSOR_GC0305] = 1, |
| 6466 | [SENSOR_HDCS2020b] = 1, |
| 6467 | [SENSOR_HV7131B] = 1, |
| 6468 | [SENSOR_HV7131R] = 1, |
| 6469 | [SENSOR_ICM105A] = 1, |
| 6470 | [SENSOR_MC501CB] = 2, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6471 | [SENSOR_MT9V111_1] = 1, |
| 6472 | [SENSOR_MT9V111_3] = 1, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6473 | [SENSOR_OV7620] = 2, |
| 6474 | [SENSOR_OV7630C] = 1, |
| 6475 | [SENSOR_PAS106] = 0, |
| 6476 | [SENSOR_PAS202B] = 1, |
| 6477 | [SENSOR_PB0330] = 1, |
| 6478 | [SENSOR_PO2030] = 1, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6479 | [SENSOR_TAS5130C] = 1, |
| 6480 | [SENSOR_TAS5130C_VF0250] = 1, |
Hans de Goede | 9919fe8 | 2010-01-13 07:12:28 -0300 | [diff] [blame] | 6481 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6482 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6483 | sensor = zcxx_probeSensor(gspca_dev); |
| 6484 | if (sensor >= 0) |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6485 | PDEBUG(D_PROBE, "probe sensor -> %04x", sensor); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6486 | if ((unsigned) force_sensor < SENSOR_MAX) { |
| 6487 | sd->sensor = force_sensor; |
| 6488 | PDEBUG(D_PROBE, "sensor forced to %d", force_sensor); |
| 6489 | } else { |
| 6490 | switch (sensor) { |
| 6491 | case -1: |
| 6492 | switch (sd->sensor) { |
| 6493 | case SENSOR_MC501CB: |
| 6494 | PDEBUG(D_PROBE, "Sensor MC501CB"); |
| 6495 | break; |
| 6496 | case SENSOR_TAS5130C_VF0250: |
| 6497 | PDEBUG(D_PROBE, "Sensor Tas5130 (VF0250)"); |
| 6498 | break; |
| 6499 | default: |
Jean-François Moine | 0b65632 | 2010-09-13 05:19:58 -0300 | [diff] [blame] | 6500 | warn("Unknown sensor - set to TAS5130C"); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6501 | sd->sensor = SENSOR_TAS5130C; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6502 | } |
| 6503 | break; |
| 6504 | case 0: |
Jean-Francois Moine | d754a6c | 2009-12-20 05:07:10 -0300 | [diff] [blame] | 6505 | /* check the sensor type */ |
| 6506 | sensor = i2c_read(gspca_dev, 0x00); |
| 6507 | PDEBUG(D_PROBE, "Sensor hv7131 type %d", sensor); |
| 6508 | switch (sensor) { |
| 6509 | case 0: /* hv7131b */ |
| 6510 | case 1: /* hv7131e */ |
| 6511 | PDEBUG(D_PROBE, "Find Sensor HV7131B"); |
| 6512 | sd->sensor = SENSOR_HV7131B; |
| 6513 | break; |
| 6514 | default: |
| 6515 | /* case 2: * hv7131r */ |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6516 | PDEBUG(D_PROBE, "Find Sensor HV7131R"); |
| 6517 | sd->sensor = SENSOR_HV7131R; |
Jean-Francois Moine | d754a6c | 2009-12-20 05:07:10 -0300 | [diff] [blame] | 6518 | break; |
| 6519 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6520 | break; |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6521 | case 0x02: |
| 6522 | PDEBUG(D_PROBE, "Sensor TAS5130C"); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6523 | sd->sensor = SENSOR_TAS5130C; |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6524 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6525 | case 0x04: |
| 6526 | PDEBUG(D_PROBE, "Find Sensor CS2102"); |
| 6527 | sd->sensor = SENSOR_CS2102; |
| 6528 | break; |
| 6529 | case 0x08: |
| 6530 | PDEBUG(D_PROBE, "Find Sensor HDCS2020(b)"); |
| 6531 | sd->sensor = SENSOR_HDCS2020b; |
| 6532 | break; |
| 6533 | case 0x0a: |
| 6534 | PDEBUG(D_PROBE, |
| 6535 | "Find Sensor PB0330. Chip revision %x", |
| 6536 | sd->chip_revision); |
| 6537 | sd->sensor = SENSOR_PB0330; |
| 6538 | break; |
| 6539 | case 0x0c: |
| 6540 | PDEBUG(D_PROBE, "Find Sensor ICM105A"); |
| 6541 | sd->sensor = SENSOR_ICM105A; |
| 6542 | break; |
| 6543 | case 0x0e: |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6544 | PDEBUG(D_PROBE, "Find Sensor PAS202B"); |
| 6545 | sd->sensor = SENSOR_PAS202B; |
Jean-Francois Moine | 56af5ef | 2010-01-08 08:02:42 -0300 | [diff] [blame] | 6546 | /* sd->sharpness = 1; */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6547 | break; |
| 6548 | case 0x0f: |
| 6549 | PDEBUG(D_PROBE, "Find Sensor PAS106"); |
| 6550 | sd->sensor = SENSOR_PAS106; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6551 | break; |
| 6552 | case 0x10: |
| 6553 | case 0x12: |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 6554 | PDEBUG(D_PROBE, "Find Sensor TAS5130C"); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6555 | sd->sensor = SENSOR_TAS5130C; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6556 | break; |
| 6557 | case 0x11: |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6558 | PDEBUG(D_PROBE, "Find Sensor HV7131R"); |
| 6559 | sd->sensor = SENSOR_HV7131R; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6560 | break; |
| 6561 | case 0x13: |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6562 | case 0x15: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6563 | PDEBUG(D_PROBE, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6564 | "Sensor MT9V111. Chip revision %04x", |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6565 | sd->chip_revision); |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6566 | sd->sensor = sd->bridge == BRIDGE_ZC301 |
| 6567 | ? SENSOR_MT9V111_1 |
| 6568 | : SENSOR_MT9V111_3; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6569 | break; |
| 6570 | case 0x14: |
| 6571 | PDEBUG(D_PROBE, |
| 6572 | "Find Sensor CS2102K?. Chip revision %x", |
| 6573 | sd->chip_revision); |
| 6574 | sd->sensor = SENSOR_CS2102K; |
| 6575 | break; |
Jean-Francois Moine | 5be2b09 | 2009-01-20 05:12:34 -0300 | [diff] [blame] | 6576 | case 0x16: |
| 6577 | PDEBUG(D_PROBE, "Find Sensor ADCM2700"); |
| 6578 | sd->sensor = SENSOR_ADCM2700; |
| 6579 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6580 | case 0x29: |
| 6581 | PDEBUG(D_PROBE, "Find Sensor GC0305"); |
| 6582 | sd->sensor = SENSOR_GC0305; |
| 6583 | break; |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6584 | case 0x0250: |
| 6585 | PDEBUG(D_PROBE, "Sensor Tas5130 (VF0250)"); |
| 6586 | sd->sensor = SENSOR_TAS5130C_VF0250; |
| 6587 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6588 | case 0x2030: |
| 6589 | PDEBUG(D_PROBE, "Find Sensor PO2030"); |
| 6590 | sd->sensor = SENSOR_PO2030; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6591 | sd->sharpness = 0; /* from win traces */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6592 | break; |
| 6593 | case 0x7620: |
| 6594 | PDEBUG(D_PROBE, "Find Sensor OV7620"); |
| 6595 | sd->sensor = SENSOR_OV7620; |
| 6596 | break; |
Jean-Francois Moine | e2d750f | 2009-02-19 15:41:28 -0300 | [diff] [blame] | 6597 | case 0x7631: |
| 6598 | PDEBUG(D_PROBE, "Find Sensor OV7630C"); |
| 6599 | sd->sensor = SENSOR_OV7630C; |
| 6600 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6601 | case 0x7648: |
| 6602 | PDEBUG(D_PROBE, "Find Sensor OV7648"); |
| 6603 | sd->sensor = SENSOR_OV7620; /* same sensor (?) */ |
| 6604 | break; |
| 6605 | default: |
Jean-François Moine | 0b65632 | 2010-09-13 05:19:58 -0300 | [diff] [blame] | 6606 | err("Unknown sensor %04x", sensor); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6607 | return -EINVAL; |
| 6608 | } |
| 6609 | } |
| 6610 | if (sensor < 0x20) { |
| 6611 | if (sensor == -1 || sensor == 0x10 || sensor == 0x12) |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6612 | reg_w(gspca_dev, 0x02, 0x0010); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6613 | reg_r(gspca_dev, 0x0010); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6614 | } |
| 6615 | |
| 6616 | cam = &gspca_dev->cam; |
Hans de Goede | 9919fe8 | 2010-01-13 07:12:28 -0300 | [diff] [blame] | 6617 | switch (mode_tb[sd->sensor]) { |
| 6618 | case 0: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6619 | cam->cam_mode = sif_mode; |
Jean-Francois Moine | c41492c | 2008-07-07 08:31:16 -0300 | [diff] [blame] | 6620 | cam->nmodes = ARRAY_SIZE(sif_mode); |
Hans de Goede | 9919fe8 | 2010-01-13 07:12:28 -0300 | [diff] [blame] | 6621 | break; |
| 6622 | case 1: |
| 6623 | cam->cam_mode = vga_mode; |
| 6624 | cam->nmodes = ARRAY_SIZE(vga_mode); |
| 6625 | break; |
| 6626 | default: |
| 6627 | /* case 2: */ |
| 6628 | cam->cam_mode = broken_vga_mode; |
| 6629 | cam->nmodes = ARRAY_SIZE(broken_vga_mode); |
| 6630 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6631 | } |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6632 | sd->gamma = gamma[sd->sensor]; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6633 | |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 6634 | switch (sd->sensor) { |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 6635 | case SENSOR_OV7630C: |
| 6636 | gspca_dev->ctrl_dis = (1 << LIGHTFREQ_IDX); |
| 6637 | break; |
| 6638 | } |
| 6639 | |
Jean-Francois Moine | 77880ba3 | 2010-01-08 08:04:21 -0300 | [diff] [blame] | 6640 | /* switch off the led */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6641 | reg_w(gspca_dev, 0x01, 0x0000); |
Jean-François Moine | c39da6a | 2010-08-04 06:07:23 -0300 | [diff] [blame] | 6642 | return gspca_dev->usb_err; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6643 | } |
| 6644 | |
Jean-Francois Moine | 72ab97c | 2008-09-20 06:39:08 -0300 | [diff] [blame] | 6645 | static int sd_start(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6646 | { |
| 6647 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6648 | int mode; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 6649 | static const struct usb_action *init_tb[SENSOR_MAX][2] = { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6650 | [SENSOR_ADCM2700] = |
| 6651 | {adcm2700_Initial, adcm2700_InitialScale}, |
| 6652 | [SENSOR_CS2102] = |
| 6653 | {cs2102_Initial, cs2102_InitialScale}, |
| 6654 | [SENSOR_CS2102K] = |
| 6655 | {cs2102K_Initial, cs2102K_InitialScale}, |
| 6656 | [SENSOR_GC0305] = |
| 6657 | {gc0305_Initial, gc0305_InitialScale}, |
| 6658 | [SENSOR_HDCS2020b] = |
| 6659 | {hdcs2020b_Initial, hdcs2020b_InitialScale}, |
| 6660 | [SENSOR_HV7131B] = |
| 6661 | {hv7131b_Initial, hv7131b_InitialScale}, |
| 6662 | [SENSOR_HV7131R] = |
| 6663 | {hv7131r_Initial, hv7131r_InitialScale}, |
| 6664 | [SENSOR_ICM105A] = |
| 6665 | {icm105a_Initial, icm105a_InitialScale}, |
| 6666 | [SENSOR_MC501CB] = |
| 6667 | {mc501cb_Initial, mc501cb_InitialScale}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6668 | [SENSOR_MT9V111_1] = |
| 6669 | {mt9v111_1_Initial, mt9v111_1_InitialScale}, |
| 6670 | [SENSOR_MT9V111_3] = |
| 6671 | {mt9v111_3_Initial, mt9v111_3_InitialScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6672 | [SENSOR_OV7620] = |
| 6673 | {ov7620_Initial, ov7620_InitialScale}, |
| 6674 | [SENSOR_OV7630C] = |
| 6675 | {ov7630c_Initial, ov7630c_InitialScale}, |
| 6676 | [SENSOR_PAS106] = |
| 6677 | {pas106b_Initial, pas106b_InitialScale}, |
| 6678 | [SENSOR_PAS202B] = |
| 6679 | {pas202b_Initial, pas202b_InitialScale}, |
| 6680 | [SENSOR_PB0330] = |
| 6681 | {pb0330_Initial, pb0330_InitialScale}, |
| 6682 | [SENSOR_PO2030] = |
| 6683 | {po2030_Initial, po2030_InitialScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6684 | [SENSOR_TAS5130C] = |
| 6685 | {tas5130c_Initial, tas5130c_InitialScale}, |
| 6686 | [SENSOR_TAS5130C_VF0250] = |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 6687 | {tas5130c_vf0250_Initial, tas5130c_vf0250_InitialScale}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6688 | }; |
| 6689 | |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6690 | /* create the JPEG header */ |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6691 | jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, |
| 6692 | 0x21); /* JPEG 422 */ |
| 6693 | jpeg_set_qual(sd->jpeg_hdr, sd->quality); |
| 6694 | |
Jean-Francois Moine | 5092451 | 2010-01-08 08:08:12 -0300 | [diff] [blame] | 6695 | mode = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6696 | switch (sd->sensor) { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6697 | case SENSOR_HV7131R: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6698 | zcxx_probeSensor(gspca_dev); |
| 6699 | break; |
| 6700 | case SENSOR_PAS106: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6701 | usb_exchange(gspca_dev, pas106b_Initial_com); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6702 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6703 | } |
Jean-Francois Moine | 5092451 | 2010-01-08 08:08:12 -0300 | [diff] [blame] | 6704 | usb_exchange(gspca_dev, init_tb[sd->sensor][mode]); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6705 | |
| 6706 | switch (sd->sensor) { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6707 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6708 | case SENSOR_GC0305: |
| 6709 | case SENSOR_OV7620: |
| 6710 | case SENSOR_PO2030: |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6711 | case SENSOR_TAS5130C: |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6712 | case SENSOR_TAS5130C_VF0250: |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6713 | /* msleep(100); * ?? */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6714 | reg_r(gspca_dev, 0x0002); /* --> 0x40 */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6715 | reg_w(gspca_dev, 0x09, 0x01ad); /* (from win traces) */ |
| 6716 | reg_w(gspca_dev, 0x15, 0x01ae); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6717 | if (sd->sensor == SENSOR_TAS5130C) |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6718 | break; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6719 | reg_w(gspca_dev, 0x0d, 0x003a); |
| 6720 | reg_w(gspca_dev, 0x02, 0x003b); |
| 6721 | reg_w(gspca_dev, 0x00, 0x0038); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6722 | break; |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6723 | case SENSOR_PAS202B: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6724 | reg_w(gspca_dev, 0x03, 0x003b); |
| 6725 | reg_w(gspca_dev, 0x0c, 0x003a); |
| 6726 | reg_w(gspca_dev, 0x0b, 0x0039); |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6727 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6728 | } |
| 6729 | |
| 6730 | setmatrix(gspca_dev); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6731 | switch (sd->sensor) { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6732 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6733 | case SENSOR_OV7620: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6734 | reg_r(gspca_dev, 0x0008); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6735 | reg_w(gspca_dev, 0x00, 0x0008); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6736 | break; |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6737 | case SENSOR_PAS202B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6738 | case SENSOR_GC0305: |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6739 | case SENSOR_TAS5130C: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6740 | reg_r(gspca_dev, 0x0008); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6741 | /* fall thru */ |
| 6742 | case SENSOR_PO2030: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6743 | reg_w(gspca_dev, 0x03, 0x0008); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6744 | break; |
| 6745 | } |
| 6746 | setsharpness(gspca_dev); |
| 6747 | |
| 6748 | /* set the gamma tables when not set */ |
| 6749 | switch (sd->sensor) { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 6750 | case SENSOR_CS2102K: /* gamma set in xxx_Initial */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6751 | case SENSOR_HDCS2020b: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6752 | case SENSOR_OV7630C: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6753 | break; |
| 6754 | default: |
| 6755 | setcontrast(gspca_dev); |
| 6756 | break; |
| 6757 | } |
| 6758 | setmatrix(gspca_dev); /* one more time? */ |
| 6759 | switch (sd->sensor) { |
| 6760 | case SENSOR_OV7620: |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6761 | case SENSOR_PAS202B: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6762 | reg_r(gspca_dev, 0x0180); /* from win */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6763 | reg_w(gspca_dev, 0x00, 0x0180); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6764 | break; |
| 6765 | default: |
| 6766 | setquality(gspca_dev); |
| 6767 | break; |
| 6768 | } |
| 6769 | setlightfreq(gspca_dev); |
| 6770 | |
| 6771 | switch (sd->sensor) { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6772 | case SENSOR_ADCM2700: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6773 | reg_w(gspca_dev, 0x09, 0x01ad); /* (from win traces) */ |
| 6774 | reg_w(gspca_dev, 0x15, 0x01ae); |
| 6775 | reg_w(gspca_dev, 0x02, 0x0180); |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6776 | /* ms-win + */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6777 | reg_w(gspca_dev, 0x40, 0x0117); |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6778 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6779 | case SENSOR_GC0305: |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6780 | case SENSOR_TAS5130C: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6781 | reg_w(gspca_dev, 0x09, 0x01ad); /* (from win traces) */ |
| 6782 | reg_w(gspca_dev, 0x15, 0x01ae); |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6783 | /* fall thru */ |
| 6784 | case SENSOR_PAS202B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6785 | case SENSOR_PO2030: |
Jean-François Moine | 780e312 | 2010-10-19 04:29:10 -0300 | [diff] [blame] | 6786 | /* reg_w(gspca_dev, 0x40, ZC3XX_R117_GGAIN); in win traces */ |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6787 | reg_r(gspca_dev, 0x0180); |
| 6788 | break; |
| 6789 | case SENSOR_OV7620: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6790 | reg_w(gspca_dev, 0x09, 0x01ad); |
| 6791 | reg_w(gspca_dev, 0x15, 0x01ae); |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6792 | i2c_read(gspca_dev, 0x13); /*fixme: returns 0xa3 */ |
| 6793 | i2c_write(gspca_dev, 0x13, 0xa3, 0x00); |
Jean-François Moine | 780e312 | 2010-10-19 04:29:10 -0300 | [diff] [blame] | 6794 | /*fixme: returned value to send? */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6795 | reg_w(gspca_dev, 0x40, 0x0117); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6796 | reg_r(gspca_dev, 0x0180); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6797 | break; |
| 6798 | } |
| 6799 | |
| 6800 | setautogain(gspca_dev); |
| 6801 | switch (sd->sensor) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6802 | case SENSOR_PO2030: |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 6803 | msleep(50); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6804 | reg_w(gspca_dev, 0x00, 0x0007); /* (from win traces) */ |
| 6805 | reg_w(gspca_dev, 0x02, ZC3XX_R008_CLOCKSETTING); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6806 | break; |
| 6807 | } |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6808 | return gspca_dev->usb_err; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6809 | } |
| 6810 | |
Jean-Francois Moine | 98522a7 | 2008-11-18 06:33:08 -0300 | [diff] [blame] | 6811 | /* called on streamoff with alt 0 and on disconnect */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6812 | static void sd_stop0(struct gspca_dev *gspca_dev) |
| 6813 | { |
| 6814 | struct sd *sd = (struct sd *) gspca_dev; |
| 6815 | |
Jean-Francois Moine | 98522a7 | 2008-11-18 06:33:08 -0300 | [diff] [blame] | 6816 | if (!gspca_dev->present) |
| 6817 | return; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6818 | send_unknown(gspca_dev, sd->sensor); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6819 | } |
| 6820 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6821 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6822 | u8 *data, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6823 | int len) |
| 6824 | { |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6825 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6826 | |
| 6827 | if (data[0] == 0xff && data[1] == 0xd8) { /* start of frame */ |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6828 | gspca_frame_add(gspca_dev, LAST_PACKET, |
| 6829 | NULL, 0); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6830 | /* put the JPEG header in the new frame */ |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6831 | gspca_frame_add(gspca_dev, FIRST_PACKET, |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6832 | sd->jpeg_hdr, JPEG_HDR_SZ); |
| 6833 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6834 | /* remove the webcam's header: |
| 6835 | * ff d8 ff fe 00 0e 00 00 ss ss 00 01 ww ww hh hh pp pp |
| 6836 | * - 'ss ss' is the frame sequence number (BE) |
Jean-François Moine | 780e312 | 2010-10-19 04:29:10 -0300 | [diff] [blame] | 6837 | * - 'ww ww' and 'hh hh' are the window dimensions (BE) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6838 | * - 'pp pp' is the packet sequence number (BE) |
| 6839 | */ |
| 6840 | data += 18; |
| 6841 | len -= 18; |
| 6842 | } |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6843 | gspca_frame_add(gspca_dev, INTER_PACKET, data, len); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6844 | } |
| 6845 | |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 6846 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) |
| 6847 | { |
| 6848 | struct sd *sd = (struct sd *) gspca_dev; |
| 6849 | |
| 6850 | sd->brightness = val; |
| 6851 | if (gspca_dev->streaming) |
| 6852 | setcontrast(gspca_dev); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6853 | return gspca_dev->usb_err; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 6854 | } |
| 6855 | |
| 6856 | static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val) |
| 6857 | { |
| 6858 | struct sd *sd = (struct sd *) gspca_dev; |
| 6859 | |
| 6860 | *val = sd->brightness; |
| 6861 | return 0; |
| 6862 | } |
| 6863 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6864 | static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val) |
| 6865 | { |
| 6866 | struct sd *sd = (struct sd *) gspca_dev; |
| 6867 | |
| 6868 | sd->contrast = val; |
| 6869 | if (gspca_dev->streaming) |
| 6870 | setcontrast(gspca_dev); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6871 | return gspca_dev->usb_err; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6872 | } |
| 6873 | |
| 6874 | static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val) |
| 6875 | { |
| 6876 | struct sd *sd = (struct sd *) gspca_dev; |
| 6877 | |
| 6878 | *val = sd->contrast; |
| 6879 | return 0; |
| 6880 | } |
| 6881 | |
| 6882 | static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val) |
| 6883 | { |
| 6884 | struct sd *sd = (struct sd *) gspca_dev; |
| 6885 | |
| 6886 | sd->autogain = val; |
| 6887 | if (gspca_dev->streaming) |
| 6888 | setautogain(gspca_dev); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6889 | return gspca_dev->usb_err; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6890 | } |
| 6891 | |
| 6892 | static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val) |
| 6893 | { |
| 6894 | struct sd *sd = (struct sd *) gspca_dev; |
| 6895 | |
| 6896 | *val = sd->autogain; |
| 6897 | return 0; |
| 6898 | } |
| 6899 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6900 | static int sd_setgamma(struct gspca_dev *gspca_dev, __s32 val) |
| 6901 | { |
| 6902 | struct sd *sd = (struct sd *) gspca_dev; |
| 6903 | |
| 6904 | sd->gamma = val; |
| 6905 | if (gspca_dev->streaming) |
| 6906 | setcontrast(gspca_dev); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6907 | return gspca_dev->usb_err; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6908 | } |
| 6909 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6910 | static int sd_getgamma(struct gspca_dev *gspca_dev, __s32 *val) |
| 6911 | { |
| 6912 | struct sd *sd = (struct sd *) gspca_dev; |
| 6913 | |
| 6914 | *val = sd->gamma; |
| 6915 | return 0; |
| 6916 | } |
| 6917 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6918 | static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val) |
| 6919 | { |
| 6920 | struct sd *sd = (struct sd *) gspca_dev; |
| 6921 | |
| 6922 | sd->lightfreq = val; |
| 6923 | if (gspca_dev->streaming) |
| 6924 | setlightfreq(gspca_dev); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6925 | return gspca_dev->usb_err; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6926 | } |
| 6927 | |
| 6928 | static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val) |
| 6929 | { |
| 6930 | struct sd *sd = (struct sd *) gspca_dev; |
| 6931 | |
| 6932 | *val = sd->lightfreq; |
| 6933 | return 0; |
| 6934 | } |
| 6935 | |
| 6936 | static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val) |
| 6937 | { |
| 6938 | struct sd *sd = (struct sd *) gspca_dev; |
| 6939 | |
| 6940 | sd->sharpness = val; |
| 6941 | if (gspca_dev->streaming) |
| 6942 | setsharpness(gspca_dev); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6943 | return gspca_dev->usb_err; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6944 | } |
| 6945 | |
| 6946 | static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val) |
| 6947 | { |
| 6948 | struct sd *sd = (struct sd *) gspca_dev; |
| 6949 | |
| 6950 | *val = sd->sharpness; |
| 6951 | return 0; |
| 6952 | } |
| 6953 | |
| 6954 | static int sd_querymenu(struct gspca_dev *gspca_dev, |
| 6955 | struct v4l2_querymenu *menu) |
| 6956 | { |
| 6957 | switch (menu->id) { |
| 6958 | case V4L2_CID_POWER_LINE_FREQUENCY: |
| 6959 | switch (menu->index) { |
| 6960 | case 0: /* V4L2_CID_POWER_LINE_FREQUENCY_DISABLED */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 6961 | strcpy((char *) menu->name, "NoFliker"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6962 | return 0; |
| 6963 | case 1: /* V4L2_CID_POWER_LINE_FREQUENCY_50HZ */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 6964 | strcpy((char *) menu->name, "50 Hz"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6965 | return 0; |
| 6966 | case 2: /* V4L2_CID_POWER_LINE_FREQUENCY_60HZ */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 6967 | strcpy((char *) menu->name, "60 Hz"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6968 | return 0; |
| 6969 | } |
| 6970 | break; |
| 6971 | } |
| 6972 | return -EINVAL; |
| 6973 | } |
| 6974 | |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 6975 | static int sd_set_jcomp(struct gspca_dev *gspca_dev, |
| 6976 | struct v4l2_jpegcompression *jcomp) |
| 6977 | { |
| 6978 | struct sd *sd = (struct sd *) gspca_dev; |
| 6979 | |
| 6980 | if (jcomp->quality < QUALITY_MIN) |
| 6981 | sd->quality = QUALITY_MIN; |
| 6982 | else if (jcomp->quality > QUALITY_MAX) |
| 6983 | sd->quality = QUALITY_MAX; |
| 6984 | else |
| 6985 | sd->quality = jcomp->quality; |
| 6986 | if (gspca_dev->streaming) |
| 6987 | jpeg_set_qual(sd->jpeg_hdr, sd->quality); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6988 | return gspca_dev->usb_err; |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 6989 | } |
| 6990 | |
| 6991 | static int sd_get_jcomp(struct gspca_dev *gspca_dev, |
| 6992 | struct v4l2_jpegcompression *jcomp) |
| 6993 | { |
| 6994 | struct sd *sd = (struct sd *) gspca_dev; |
| 6995 | |
| 6996 | memset(jcomp, 0, sizeof *jcomp); |
| 6997 | jcomp->quality = sd->quality; |
| 6998 | jcomp->jpeg_markers = V4L2_JPEG_MARKER_DHT |
| 6999 | | V4L2_JPEG_MARKER_DQT; |
| 7000 | return 0; |
| 7001 | } |
| 7002 | |
Jean-François Moine | 2856643 | 2010-10-01 07:33:26 -0300 | [diff] [blame] | 7003 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
Hans de Goede | 1a35102 | 2010-01-29 11:05:25 -0300 | [diff] [blame] | 7004 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, |
| 7005 | u8 *data, /* interrupt packet data */ |
| 7006 | int len) /* interrput packet length */ |
| 7007 | { |
| 7008 | if (len == 8 && data[4] == 1) { |
| 7009 | input_report_key(gspca_dev->input_dev, KEY_CAMERA, 1); |
| 7010 | input_sync(gspca_dev->input_dev); |
| 7011 | input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0); |
| 7012 | input_sync(gspca_dev->input_dev); |
| 7013 | } |
| 7014 | |
| 7015 | return 0; |
| 7016 | } |
| 7017 | #endif |
| 7018 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7019 | static const struct sd_desc sd_desc = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7020 | .name = MODULE_NAME, |
| 7021 | .ctrls = sd_ctrls, |
Mauro Carvalho Chehab | d6f76b9 | 2009-07-22 00:02:29 -0300 | [diff] [blame] | 7022 | .nctrls = ARRAY_SIZE(sd_ctrls), |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7023 | .config = sd_config, |
Jean-Francois Moine | 012d6b0 | 2008-09-03 17:12:16 -0300 | [diff] [blame] | 7024 | .init = sd_init, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7025 | .start = sd_start, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7026 | .stop0 = sd_stop0, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7027 | .pkt_scan = sd_pkt_scan, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7028 | .querymenu = sd_querymenu, |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 7029 | .get_jcomp = sd_get_jcomp, |
| 7030 | .set_jcomp = sd_set_jcomp, |
Jean-François Moine | 2856643 | 2010-10-01 07:33:26 -0300 | [diff] [blame] | 7031 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
Hans de Goede | 1a35102 | 2010-01-29 11:05:25 -0300 | [diff] [blame] | 7032 | .int_pkt_scan = sd_int_pkt_scan, |
| 7033 | #endif |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7034 | }; |
| 7035 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7036 | static const __devinitdata struct usb_device_id device_table[] = { |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7037 | {USB_DEVICE(0x041e, 0x041e)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7038 | {USB_DEVICE(0x041e, 0x4017)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7039 | {USB_DEVICE(0x041e, 0x401c), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7040 | {USB_DEVICE(0x041e, 0x401e)}, |
| 7041 | {USB_DEVICE(0x041e, 0x401f)}, |
Hans de Goede | 222a07f | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 7042 | {USB_DEVICE(0x041e, 0x4022)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7043 | {USB_DEVICE(0x041e, 0x4029)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7044 | {USB_DEVICE(0x041e, 0x4034), .driver_info = SENSOR_PAS106}, |
| 7045 | {USB_DEVICE(0x041e, 0x4035), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7046 | {USB_DEVICE(0x041e, 0x4036)}, |
| 7047 | {USB_DEVICE(0x041e, 0x403a)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7048 | {USB_DEVICE(0x041e, 0x4051), .driver_info = SENSOR_TAS5130C_VF0250}, |
| 7049 | {USB_DEVICE(0x041e, 0x4053), .driver_info = SENSOR_TAS5130C_VF0250}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7050 | {USB_DEVICE(0x0458, 0x7007)}, |
| 7051 | {USB_DEVICE(0x0458, 0x700c)}, |
| 7052 | {USB_DEVICE(0x0458, 0x700f)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7053 | {USB_DEVICE(0x0461, 0x0a00)}, |
Fabio Rossi | 88a40cf | 2008-12-26 14:41:48 -0300 | [diff] [blame] | 7054 | {USB_DEVICE(0x046d, 0x089d), .driver_info = SENSOR_MC501CB}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7055 | {USB_DEVICE(0x046d, 0x08a0)}, |
| 7056 | {USB_DEVICE(0x046d, 0x08a1)}, |
| 7057 | {USB_DEVICE(0x046d, 0x08a2)}, |
| 7058 | {USB_DEVICE(0x046d, 0x08a3)}, |
| 7059 | {USB_DEVICE(0x046d, 0x08a6)}, |
| 7060 | {USB_DEVICE(0x046d, 0x08a7)}, |
| 7061 | {USB_DEVICE(0x046d, 0x08a9)}, |
| 7062 | {USB_DEVICE(0x046d, 0x08aa)}, |
| 7063 | {USB_DEVICE(0x046d, 0x08ac)}, |
| 7064 | {USB_DEVICE(0x046d, 0x08ad)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7065 | {USB_DEVICE(0x046d, 0x08ae)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7066 | {USB_DEVICE(0x046d, 0x08af)}, |
| 7067 | {USB_DEVICE(0x046d, 0x08b9)}, |
| 7068 | {USB_DEVICE(0x046d, 0x08d7)}, |
| 7069 | {USB_DEVICE(0x046d, 0x08d9)}, |
| 7070 | {USB_DEVICE(0x046d, 0x08d8)}, |
| 7071 | {USB_DEVICE(0x046d, 0x08da)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7072 | {USB_DEVICE(0x046d, 0x08dd), .driver_info = SENSOR_MC501CB}, |
| 7073 | {USB_DEVICE(0x0471, 0x0325), .driver_info = SENSOR_PAS106}, |
| 7074 | {USB_DEVICE(0x0471, 0x0326), .driver_info = SENSOR_PAS106}, |
| 7075 | {USB_DEVICE(0x0471, 0x032d), .driver_info = SENSOR_PAS106}, |
| 7076 | {USB_DEVICE(0x0471, 0x032e), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7077 | {USB_DEVICE(0x055f, 0xc005)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7078 | {USB_DEVICE(0x055f, 0xd003)}, |
| 7079 | {USB_DEVICE(0x055f, 0xd004)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7080 | {USB_DEVICE(0x0698, 0x2003)}, |
Hans de Goede | 222a07f | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 7081 | {USB_DEVICE(0x0ac8, 0x0301), .driver_info = SENSOR_PAS106}, |
Douglas Schilling Landgraf | d99819d | 2009-03-26 05:10:55 -0300 | [diff] [blame] | 7082 | {USB_DEVICE(0x0ac8, 0x0302), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7083 | {USB_DEVICE(0x0ac8, 0x301b)}, |
| 7084 | {USB_DEVICE(0x0ac8, 0x303b)}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 7085 | {USB_DEVICE(0x0ac8, 0x305b)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7086 | {USB_DEVICE(0x0ac8, 0x307b)}, |
| 7087 | {USB_DEVICE(0x10fd, 0x0128)}, |
Hans de Goede | 222a07f | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 7088 | {USB_DEVICE(0x10fd, 0x804d)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7089 | {USB_DEVICE(0x10fd, 0x8050)}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7090 | {} /* end of entry */ |
| 7091 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7092 | MODULE_DEVICE_TABLE(usb, device_table); |
| 7093 | |
| 7094 | /* -- device connect -- */ |
| 7095 | static int sd_probe(struct usb_interface *intf, |
| 7096 | const struct usb_device_id *id) |
| 7097 | { |
| 7098 | return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd), |
| 7099 | THIS_MODULE); |
| 7100 | } |
| 7101 | |
| 7102 | /* USB driver */ |
| 7103 | static struct usb_driver sd_driver = { |
| 7104 | .name = MODULE_NAME, |
| 7105 | .id_table = device_table, |
| 7106 | .probe = sd_probe, |
| 7107 | .disconnect = gspca_disconnect, |
Jean-Francois Moine | 6a70974 | 2008-09-03 16:48:10 -0300 | [diff] [blame] | 7108 | #ifdef CONFIG_PM |
| 7109 | .suspend = gspca_suspend, |
| 7110 | .resume = gspca_resume, |
| 7111 | #endif |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7112 | }; |
| 7113 | |
| 7114 | static int __init sd_mod_init(void) |
| 7115 | { |
Jean-François Moine | 5482643 | 2010-09-13 04:53:03 -0300 | [diff] [blame] | 7116 | return usb_register(&sd_driver); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7117 | } |
| 7118 | |
| 7119 | static void __exit sd_mod_exit(void) |
| 7120 | { |
| 7121 | usb_deregister(&sd_driver); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7122 | } |
| 7123 | |
| 7124 | module_init(sd_mod_init); |
| 7125 | module_exit(sd_mod_exit); |
| 7126 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7127 | module_param(force_sensor, int, 0644); |
| 7128 | MODULE_PARM_DESC(force_sensor, |
| 7129 | "Force sensor. Only for experts!!!"); |