Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1 | /* |
| 2 | * Z-Star/Vimicro zc301/zc302p/vc30x library |
| 3 | * Copyright (C) 2004 2005 2006 Michel Xhaard |
| 4 | * mxhaard@magic.fr |
| 5 | * |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6 | * V4L2 by Jean-Francois Moine <http://moinejf.free.fr> |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 21 | */ |
| 22 | |
| 23 | #define MODULE_NAME "zc3xx" |
| 24 | |
| 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 | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 28 | MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>, " |
| 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-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 42 | __u8 brightness; |
| 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-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 49 | #define QUALITY_MIN 40 |
| 50 | #define QUALITY_MAX 60 |
| 51 | #define QUALITY_DEF 50 |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 52 | |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 53 | signed char sensor; /* Type of image sensor chip */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 54 | /* !! values used in different tables */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 55 | #define SENSOR_ADCM2700 0 |
| 56 | #define SENSOR_CS2102 1 |
| 57 | #define SENSOR_CS2102K 2 |
| 58 | #define SENSOR_GC0305 3 |
| 59 | #define SENSOR_HDCS2020b 4 |
| 60 | #define SENSOR_HV7131B 5 |
| 61 | #define SENSOR_HV7131C 6 |
| 62 | #define SENSOR_ICM105A 7 |
| 63 | #define SENSOR_MC501CB 8 |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 64 | #define SENSOR_MI0360SOC 9 |
| 65 | #define SENSOR_OV7620 10 |
| 66 | /*#define SENSOR_OV7648 10 - same values */ |
| 67 | #define SENSOR_OV7630C 11 |
| 68 | #define SENSOR_PAS106 12 |
| 69 | #define SENSOR_PAS202B 13 |
| 70 | #define SENSOR_PB0330 14 /* (MI0360) */ |
| 71 | #define SENSOR_PO2030 15 |
| 72 | #define SENSOR_TAS5130CK 16 |
| 73 | #define SENSOR_TAS5130CXX 17 |
| 74 | #define SENSOR_TAS5130C_VF0250 18 |
| 75 | #define SENSOR_MAX 19 |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 76 | unsigned short chip_revision; |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 77 | |
| 78 | u8 *jpeg_hdr; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 79 | }; |
| 80 | |
| 81 | /* V4L2 controls supported by the driver */ |
| 82 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val); |
| 83 | static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val); |
| 84 | static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val); |
| 85 | static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val); |
| 86 | static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val); |
| 87 | static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 88 | static int sd_setgamma(struct gspca_dev *gspca_dev, __s32 val); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 89 | static int sd_getgamma(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 90 | static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val); |
| 91 | static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val); |
| 92 | static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val); |
| 93 | static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 94 | |
| 95 | static struct ctrl sd_ctrls[] = { |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 96 | #define BRIGHTNESS_IDX 0 |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 97 | #define SD_BRIGHTNESS 0 |
| 98 | { |
| 99 | { |
| 100 | .id = V4L2_CID_BRIGHTNESS, |
| 101 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 102 | .name = "Brightness", |
| 103 | .minimum = 0, |
| 104 | .maximum = 255, |
| 105 | .step = 1, |
| 106 | .default_value = 128, |
| 107 | }, |
| 108 | .set = sd_setbrightness, |
| 109 | .get = sd_getbrightness, |
| 110 | }, |
| 111 | #define SD_CONTRAST 1 |
| 112 | { |
| 113 | { |
| 114 | .id = V4L2_CID_CONTRAST, |
| 115 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 116 | .name = "Contrast", |
| 117 | .minimum = 0, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 118 | .maximum = 255, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 119 | .step = 1, |
| 120 | .default_value = 128, |
| 121 | }, |
| 122 | .set = sd_setcontrast, |
| 123 | .get = sd_getcontrast, |
| 124 | }, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 125 | #define SD_GAMMA 2 |
| 126 | { |
| 127 | { |
| 128 | .id = V4L2_CID_GAMMA, |
| 129 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 130 | .name = "Gamma", |
| 131 | .minimum = 1, |
| 132 | .maximum = 6, |
| 133 | .step = 1, |
| 134 | .default_value = 4, |
| 135 | }, |
| 136 | .set = sd_setgamma, |
| 137 | .get = sd_getgamma, |
| 138 | }, |
| 139 | #define SD_AUTOGAIN 3 |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 140 | { |
| 141 | { |
| 142 | .id = V4L2_CID_AUTOGAIN, |
| 143 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
| 144 | .name = "Auto Gain", |
| 145 | .minimum = 0, |
| 146 | .maximum = 1, |
| 147 | .step = 1, |
| 148 | .default_value = 1, |
| 149 | }, |
| 150 | .set = sd_setautogain, |
| 151 | .get = sd_getautogain, |
| 152 | }, |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 153 | #define LIGHTFREQ_IDX 4 |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 154 | #define SD_FREQ 4 |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 155 | { |
| 156 | { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 157 | .id = V4L2_CID_POWER_LINE_FREQUENCY, |
| 158 | .type = V4L2_CTRL_TYPE_MENU, |
| 159 | .name = "Light frequency filter", |
| 160 | .minimum = 0, |
| 161 | .maximum = 2, /* 0: 0, 1: 50Hz, 2:60Hz */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 162 | .step = 1, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 163 | .default_value = 1, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 164 | }, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 165 | .set = sd_setfreq, |
| 166 | .get = sd_getfreq, |
| 167 | }, |
| 168 | #define SD_SHARPNESS 5 |
| 169 | { |
| 170 | { |
| 171 | .id = V4L2_CID_SHARPNESS, |
| 172 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 173 | .name = "Sharpness", |
| 174 | .minimum = 0, |
| 175 | .maximum = 3, |
| 176 | .step = 1, |
| 177 | .default_value = 2, |
| 178 | }, |
| 179 | .set = sd_setsharpness, |
| 180 | .get = sd_getsharpness, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 181 | }, |
| 182 | }; |
| 183 | |
Jean-Francois Moine | cc611b8 | 2008-12-29 07:49:41 -0300 | [diff] [blame] | 184 | static const struct v4l2_pix_format vga_mode[] = { |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 185 | {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 186 | .bytesperline = 320, |
| 187 | .sizeimage = 320 * 240 * 3 / 8 + 590, |
| 188 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 189 | .priv = 1}, |
| 190 | {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 191 | .bytesperline = 640, |
| 192 | .sizeimage = 640 * 480 * 3 / 8 + 590, |
| 193 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 194 | .priv = 0}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 195 | }; |
| 196 | |
Jean-Francois Moine | cc611b8 | 2008-12-29 07:49:41 -0300 | [diff] [blame] | 197 | static const struct v4l2_pix_format sif_mode[] = { |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 198 | {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 199 | .bytesperline = 176, |
| 200 | .sizeimage = 176 * 144 * 3 / 8 + 590, |
| 201 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 202 | .priv = 1}, |
| 203 | {352, 288, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 204 | .bytesperline = 352, |
| 205 | .sizeimage = 352 * 288 * 3 / 8 + 590, |
| 206 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 207 | .priv = 0}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 208 | }; |
| 209 | |
| 210 | /* usb exchanges */ |
| 211 | struct usb_action { |
| 212 | __u8 req; |
| 213 | __u8 val; |
| 214 | __u16 idx; |
| 215 | }; |
| 216 | |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 217 | static const struct usb_action adcm2700_Initial[] = { |
| 218 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 219 | {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT}, /* 00,02,04,cc */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 220 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 221 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 222 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 223 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 224 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 225 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 226 | {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d8,cc */ |
| 227 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 228 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 229 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 230 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 231 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 232 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 233 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 234 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 235 | {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,de,cc */ |
| 236 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 237 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 238 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 239 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 240 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 241 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 242 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 243 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 244 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 245 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 246 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 247 | {0xa0, 0x58, ZC3XX_R116_RGAIN}, /* 01,16,58,cc */ |
| 248 | {0xa0, 0x5a, ZC3XX_R118_BGAIN}, /* 01,18,5a,cc */ |
| 249 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 250 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 251 | {0xbb, 0x00, 0x0408}, /* 04,00,08,bb */ |
| 252 | {0xdd, 0x00, 0x0200}, /* 00,02,00,dd */ |
| 253 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 254 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 255 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
| 256 | {0xbb, 0xe0, 0x0c2e}, /* 0c,e0,2e,bb */ |
| 257 | {0xbb, 0x01, 0x2000}, /* 20,01,00,bb */ |
| 258 | {0xbb, 0x96, 0x2400}, /* 24,96,00,bb */ |
| 259 | {0xbb, 0x06, 0x1006}, /* 10,06,06,bb */ |
| 260 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 261 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 262 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 263 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 264 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 265 | {0xbb, 0x5f, 0x2090}, /* 20,5f,90,bb */ |
| 266 | {0xbb, 0x01, 0x8000}, /* 80,01,00,bb */ |
| 267 | {0xbb, 0x09, 0x8400}, /* 84,09,00,bb */ |
| 268 | {0xbb, 0x86, 0x0002}, /* 00,86,02,bb */ |
| 269 | {0xbb, 0xe6, 0x0401}, /* 04,e6,01,bb */ |
| 270 | {0xbb, 0x86, 0x0802}, /* 08,86,02,bb */ |
| 271 | {0xbb, 0xe6, 0x0c01}, /* 0c,e6,01,bb */ |
| 272 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 273 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 274 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 275 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 276 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 277 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 278 | {0xaa, 0xfe, 0x0020}, /* 00,fe,20,aa */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 279 | /*mswin+*/ |
| 280 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, |
| 281 | {0xaa, 0xfe, 0x0002}, |
| 282 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 283 | {0xaa, 0xb4, 0xcd37}, |
| 284 | {0xaa, 0xa4, 0x0004}, |
| 285 | {0xaa, 0xa8, 0x0007}, |
| 286 | {0xaa, 0xac, 0x0004}, |
| 287 | /*mswin-*/ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 288 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 289 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 290 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 291 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 292 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 293 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 294 | {0xbb, 0x04, 0x0400}, /* 04,04,00,bb */ |
| 295 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 296 | {0xbb, 0x01, 0x0400}, /* 04,01,00,bb */ |
| 297 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 298 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 299 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 300 | {0xbb, 0x41, 0x2803}, /* 28,41,03,bb */ |
| 301 | {0xbb, 0x40, 0x2c03}, /* 2c,40,03,bb */ |
| 302 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 303 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 304 | {} |
| 305 | }; |
| 306 | static const struct usb_action adcm2700_InitialScale[] = { |
| 307 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 308 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 309 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 310 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 311 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 312 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 313 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 314 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 315 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ |
| 316 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 317 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 318 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 319 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 320 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 321 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 322 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 323 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 324 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d8,cc */ |
| 325 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 326 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 327 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 328 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 329 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 330 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 331 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 332 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 333 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 334 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 335 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 336 | {0xa0, 0x58, ZC3XX_R116_RGAIN}, /* 01,16,58,cc */ |
| 337 | {0xa0, 0x5a, ZC3XX_R118_BGAIN}, /* 01,18,5a,cc */ |
| 338 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 339 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 340 | {0xbb, 0x00, 0x0408}, /* 04,00,08,bb */ |
| 341 | {0xdd, 0x00, 0x0200}, /* 00,02,00,dd */ |
| 342 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 343 | {0xdd, 0x00, 0x0050}, /* 00,00,50,dd */ |
| 344 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
| 345 | {0xbb, 0xe0, 0x0c2e}, /* 0c,e0,2e,bb */ |
| 346 | {0xbb, 0x01, 0x2000}, /* 20,01,00,bb */ |
| 347 | {0xbb, 0x96, 0x2400}, /* 24,96,00,bb */ |
| 348 | {0xbb, 0x06, 0x1006}, /* 10,06,06,bb */ |
| 349 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 350 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 351 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 352 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 353 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 354 | {0xbb, 0x5f, 0x2090}, /* 20,5f,90,bb */ |
| 355 | {0xbb, 0x01, 0x8000}, /* 80,01,00,bb */ |
| 356 | {0xbb, 0x09, 0x8400}, /* 84,09,00,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 357 | {0xbb, 0x86, 0x0002}, /* 00,88,02,bb */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 358 | {0xbb, 0xe6, 0x0401}, /* 04,e6,01,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 359 | {0xbb, 0x86, 0x0802}, /* 08,88,02,bb */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 360 | {0xbb, 0xe6, 0x0c01}, /* 0c,e6,01,bb */ |
| 361 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 362 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 363 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 364 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 365 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 366 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 367 | {0xaa, 0xfe, 0x0020}, /* 00,fe,20,aa */ |
| 368 | /*******/ |
| 369 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 370 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 371 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 372 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 373 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 374 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 375 | {0xbb, 0x04, 0x0400}, /* 04,04,00,bb */ |
| 376 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 377 | {0xbb, 0x01, 0x0400}, /* 04,01,00,bb */ |
| 378 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 379 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 380 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 381 | {0xbb, 0x41, 0x2803}, /* 28,41,03,bb */ |
| 382 | {0xbb, 0x40, 0x2c03}, /* 2c,40,03,bb */ |
| 383 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 384 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 385 | {} |
| 386 | }; |
| 387 | static const struct usb_action adcm2700_50HZ[] = { |
| 388 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 389 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 390 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 391 | {0xbb, 0x05, 0x8400}, /* 84,05,00,bb */ |
| 392 | {0xbb, 0xd0, 0xb007}, /* b0,d0,07,bb */ |
| 393 | {0xbb, 0xa0, 0xb80f}, /* b8,a0,0f,bb */ |
| 394 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 395 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 396 | {0xaa, 0x26, 0x00d0}, /* 00,26,d0,aa */ |
| 397 | {0xaa, 0x28, 0x0002}, /* 00,28,02,aa */ |
| 398 | {} |
| 399 | }; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 400 | static const struct usb_action adcm2700_60HZ[] = { |
| 401 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 402 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 403 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 404 | {0xbb, 0x07, 0x8400}, /* 84,07,00,bb */ |
| 405 | {0xbb, 0x82, 0xb006}, /* b0,82,06,bb */ |
| 406 | {0xbb, 0x04, 0xb80d}, /* b8,04,0d,bb */ |
| 407 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 408 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 409 | {0xaa, 0x26, 0x0057}, /* 00,26,57,aa */ |
| 410 | {0xaa, 0x28, 0x0002}, /* 00,28,02,aa */ |
| 411 | {} |
| 412 | }; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 413 | static const struct usb_action adcm2700_NoFliker[] = { |
| 414 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 415 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 416 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 417 | {0xbb, 0x07, 0x8400}, /* 84,07,00,bb */ |
| 418 | {0xbb, 0x05, 0xb000}, /* b0,05,00,bb */ |
| 419 | {0xbb, 0xa0, 0xb801}, /* b8,a0,01,bb */ |
| 420 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 421 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 422 | {} |
| 423 | }; |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 424 | static const struct usb_action cs2102_Initial[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 425 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 426 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 427 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 428 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 429 | {0xa0, 0x20, ZC3XX_R080_HBLANKHIGH}, |
| 430 | {0xa0, 0x21, ZC3XX_R081_HBLANKLOW}, |
| 431 | {0xa0, 0x30, ZC3XX_R083_RGAINADDR}, |
| 432 | {0xa0, 0x31, ZC3XX_R084_GGAINADDR}, |
| 433 | {0xa0, 0x32, ZC3XX_R085_BGAINADDR}, |
| 434 | {0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH}, |
| 435 | {0xa0, 0x24, ZC3XX_R087_EXPTIMEMID}, |
| 436 | {0xa0, 0x25, ZC3XX_R088_EXPTIMELOW}, |
| 437 | {0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR}, |
| 438 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 439 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 440 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 441 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 442 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 443 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 444 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 445 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 446 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 447 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 448 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 449 | {0xaa, 0x02, 0x0008}, |
| 450 | {0xaa, 0x03, 0x0000}, |
| 451 | {0xaa, 0x11, 0x0000}, |
| 452 | {0xaa, 0x12, 0x0089}, |
| 453 | {0xaa, 0x13, 0x0000}, |
| 454 | {0xaa, 0x14, 0x00e9}, |
| 455 | {0xaa, 0x20, 0x0000}, |
| 456 | {0xaa, 0x22, 0x0000}, |
| 457 | {0xaa, 0x0b, 0x0004}, |
| 458 | {0xaa, 0x30, 0x0030}, |
| 459 | {0xaa, 0x31, 0x0030}, |
| 460 | {0xaa, 0x32, 0x0030}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 461 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 462 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 463 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 464 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 465 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 466 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 467 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 468 | {0xa0, 0x10, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 469 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 470 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 471 | {0xa0, 0x68, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 472 | {0xa0, 0x00, 0x01ad}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 473 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 474 | }; |
| 475 | |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 476 | static const struct usb_action cs2102_InitialScale[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 477 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 478 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 479 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 480 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 481 | {0xa0, 0x20, ZC3XX_R080_HBLANKHIGH}, |
| 482 | {0xa0, 0x21, ZC3XX_R081_HBLANKLOW}, |
| 483 | {0xa0, 0x30, ZC3XX_R083_RGAINADDR}, |
| 484 | {0xa0, 0x31, ZC3XX_R084_GGAINADDR}, |
| 485 | {0xa0, 0x32, ZC3XX_R085_BGAINADDR}, |
| 486 | {0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH}, |
| 487 | {0xa0, 0x24, ZC3XX_R087_EXPTIMEMID}, |
| 488 | {0xa0, 0x25, ZC3XX_R088_EXPTIMELOW}, |
| 489 | {0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR}, |
| 490 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 491 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 492 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 493 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 494 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 495 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 496 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 497 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 498 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 499 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 500 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 501 | {0xaa, 0x02, 0x0008}, |
| 502 | {0xaa, 0x03, 0x0000}, |
| 503 | {0xaa, 0x11, 0x0001}, |
| 504 | {0xaa, 0x12, 0x0087}, |
| 505 | {0xaa, 0x13, 0x0001}, |
| 506 | {0xaa, 0x14, 0x00e7}, |
| 507 | {0xaa, 0x20, 0x0000}, |
| 508 | {0xaa, 0x22, 0x0000}, |
| 509 | {0xaa, 0x0b, 0x0004}, |
| 510 | {0xaa, 0x30, 0x0030}, |
| 511 | {0xaa, 0x31, 0x0030}, |
| 512 | {0xaa, 0x32, 0x0030}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 513 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 514 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 515 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 516 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 517 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 518 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 519 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 520 | {0xa0, 0x15, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 521 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 522 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 523 | {0xa0, 0x68, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 524 | {0xa0, 0x00, 0x01ad}, |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 525 | {} |
| 526 | }; |
| 527 | static const struct usb_action cs2102_50HZ[] = { |
| 528 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 529 | {0xaa, 0x23, 0x0001}, |
| 530 | {0xaa, 0x24, 0x005f}, |
| 531 | {0xaa, 0x25, 0x0090}, |
| 532 | {0xaa, 0x21, 0x00dd}, |
| 533 | {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 534 | {0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID}, |
| 535 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 536 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 537 | {0xa0, 0x3a, ZC3XX_R196_ANTIFLICKERMID}, |
| 538 | {0xa0, 0x98, ZC3XX_R197_ANTIFLICKERLOW}, |
| 539 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 540 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 541 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 542 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 543 | {0xa0, 0xdd, ZC3XX_R01D_HSYNC_0}, |
| 544 | {0xa0, 0xe4, ZC3XX_R01E_HSYNC_1}, |
| 545 | {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2}, |
| 546 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 547 | {} |
| 548 | }; |
| 549 | static const struct usb_action cs2102_50HZScale[] = { |
| 550 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 551 | {0xaa, 0x23, 0x0000}, |
| 552 | {0xaa, 0x24, 0x00af}, |
| 553 | {0xaa, 0x25, 0x00c8}, |
| 554 | {0xaa, 0x21, 0x0068}, |
| 555 | {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 556 | {0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID}, |
| 557 | {0xa0, 0x90, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 558 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 559 | {0xa0, 0x1d, ZC3XX_R196_ANTIFLICKERMID}, |
| 560 | {0xa0, 0x4c, ZC3XX_R197_ANTIFLICKERLOW}, |
| 561 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 562 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 563 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 564 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 565 | {0xa0, 0x68, ZC3XX_R01D_HSYNC_0}, |
| 566 | {0xa0, 0xe3, ZC3XX_R01E_HSYNC_1}, |
| 567 | {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2}, |
| 568 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 569 | {} |
| 570 | }; |
| 571 | static const struct usb_action cs2102_60HZ[] = { |
| 572 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 573 | {0xaa, 0x23, 0x0001}, |
| 574 | {0xaa, 0x24, 0x0055}, |
| 575 | {0xaa, 0x25, 0x00cc}, |
| 576 | {0xaa, 0x21, 0x003f}, |
| 577 | {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 578 | {0xa0, 0xab, ZC3XX_R191_EXPOSURELIMITMID}, |
| 579 | {0xa0, 0x98, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 580 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 581 | {0xa0, 0x30, ZC3XX_R196_ANTIFLICKERMID}, |
| 582 | {0xa0, 0xd4, ZC3XX_R197_ANTIFLICKERLOW}, |
| 583 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 584 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 585 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 586 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 587 | {0xa0, 0x39, ZC3XX_R01D_HSYNC_0}, |
| 588 | {0xa0, 0x70, ZC3XX_R01E_HSYNC_1}, |
| 589 | {0xa0, 0xb0, ZC3XX_R01F_HSYNC_2}, |
| 590 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 591 | {} |
| 592 | }; |
| 593 | static const struct usb_action cs2102_60HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 594 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 595 | {0xaa, 0x23, 0x0000}, |
| 596 | {0xaa, 0x24, 0x00aa}, |
| 597 | {0xaa, 0x25, 0x00e6}, |
| 598 | {0xaa, 0x21, 0x003f}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 599 | {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 600 | {0xa0, 0x55, ZC3XX_R191_EXPOSURELIMITMID}, |
| 601 | {0xa0, 0xcc, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 602 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 603 | {0xa0, 0x18, ZC3XX_R196_ANTIFLICKERMID}, |
| 604 | {0xa0, 0x6a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 605 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 606 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 607 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 608 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 609 | {0xa0, 0x3f, ZC3XX_R01D_HSYNC_0}, |
| 610 | {0xa0, 0xa5, ZC3XX_R01E_HSYNC_1}, |
| 611 | {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2}, |
| 612 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 613 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 614 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 615 | static const struct usb_action cs2102_NoFliker[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 616 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 617 | {0xaa, 0x23, 0x0001}, |
| 618 | {0xaa, 0x24, 0x005f}, |
| 619 | {0xaa, 0x25, 0x0000}, |
| 620 | {0xaa, 0x21, 0x0001}, |
| 621 | {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 622 | {0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID}, |
| 623 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 624 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 625 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 626 | {0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW}, |
| 627 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 628 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 629 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 630 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 631 | {0xa0, 0x01, ZC3XX_R01D_HSYNC_0}, |
| 632 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 633 | {0xa0, 0xa0, ZC3XX_R01F_HSYNC_2}, |
| 634 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 635 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 636 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 637 | static const struct usb_action cs2102_NoFlikerScale[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 638 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 639 | {0xaa, 0x23, 0x0000}, |
| 640 | {0xaa, 0x24, 0x00af}, |
| 641 | {0xaa, 0x25, 0x0080}, |
| 642 | {0xaa, 0x21, 0x0001}, |
| 643 | {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 644 | {0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID}, |
| 645 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 646 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 647 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 648 | {0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW}, |
| 649 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 650 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 651 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 652 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 653 | {0xa0, 0x01, ZC3XX_R01D_HSYNC_0}, |
| 654 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 655 | {0xa0, 0xa0, ZC3XX_R01F_HSYNC_2}, |
| 656 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 657 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 658 | }; |
| 659 | |
| 660 | /* CS2102_KOCOM */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 661 | static const struct usb_action cs2102K_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 662 | {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT}, |
| 663 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 664 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 665 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 666 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 667 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 668 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 669 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 670 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 671 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 672 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 673 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 674 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 675 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 676 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 677 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 678 | {0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR}, |
| 679 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 680 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 681 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 682 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 683 | {0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT}, |
| 684 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 685 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 686 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 687 | {0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT}, |
| 688 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 689 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 690 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 691 | {0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT}, |
| 692 | {0xa0, 0x7c, ZC3XX_R093_I2CSETVALUE}, |
| 693 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 694 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 695 | {0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT}, |
| 696 | {0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE}, |
| 697 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 698 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 699 | {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT}, |
| 700 | {0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE}, |
| 701 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 702 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 703 | {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT}, |
| 704 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 705 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 706 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 707 | {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT}, |
| 708 | {0xa0, 0x03, ZC3XX_R093_I2CSETVALUE}, |
| 709 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 710 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 711 | {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT}, |
| 712 | {0xa0, 0x08, ZC3XX_R093_I2CSETVALUE}, |
| 713 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 714 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 715 | {0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT}, |
| 716 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 717 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 718 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 719 | {0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT}, |
| 720 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 721 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 722 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 723 | {0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT}, |
| 724 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 725 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 726 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 727 | {0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT}, |
| 728 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 729 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 730 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 731 | {0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT}, |
| 732 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 733 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 734 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 735 | {0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT}, |
| 736 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 737 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 738 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 739 | {0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT}, |
| 740 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 741 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 742 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 743 | {0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT}, |
| 744 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 745 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 746 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 747 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 748 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 749 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 750 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 751 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
| 752 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 753 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
| 754 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 755 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 756 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 757 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 758 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, |
| 759 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, |
| 760 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 761 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 762 | {0xa0, 0x00, 0x01ad}, |
| 763 | {0xa0, 0x01, 0x01b1}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 764 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 765 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 766 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 767 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
| 768 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 769 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
| 770 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 771 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 772 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 773 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 774 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 775 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 776 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 777 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 778 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 779 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 780 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 781 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 782 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 783 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 784 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 785 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 786 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 787 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 788 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 789 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 790 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 791 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 792 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 793 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 794 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 795 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 796 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 797 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 798 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 799 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 800 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 801 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 802 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
| 803 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 804 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 805 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 806 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 807 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 808 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 809 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 810 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 811 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
| 812 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 813 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 814 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 815 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 816 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 817 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 818 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 819 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 820 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 821 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 822 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 823 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 824 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 825 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 826 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 827 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 828 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 829 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 830 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 831 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 832 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 833 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 834 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 835 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 836 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 837 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 838 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 839 | {0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 840 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 841 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 842 | {0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 843 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 844 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 845 | {0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 846 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 847 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 848 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 849 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 850 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 851 | {0xa0, 0x0f, ZC3XX_R01E_HSYNC_1}, |
| 852 | {0xa0, 0x19, ZC3XX_R01F_HSYNC_2}, |
| 853 | {0xa0, 0x1f, ZC3XX_R020_HSYNC_3}, |
| 854 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 855 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 856 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 857 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 858 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 859 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 860 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
| 861 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 862 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 863 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 864 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 865 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 866 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 867 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 868 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 869 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 870 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 871 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 872 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 873 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 874 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 875 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 876 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 877 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 878 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 879 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 880 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 881 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 882 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 883 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 884 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 885 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 886 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 887 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 888 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 889 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 890 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 891 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 892 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 893 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 894 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 895 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 896 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 897 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 898 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 899 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 900 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 901 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 902 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 903 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 904 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 905 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 906 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 907 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 908 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 909 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 910 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 911 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 912 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 913 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 914 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 915 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 916 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 917 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 918 | }; |
| 919 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 920 | static const struct usb_action cs2102K_InitialScale[] = { |
Jean-Francois Moine | f1ee8e8 | 2009-01-20 08:14:17 -0300 | [diff] [blame] | 921 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 922 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 923 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 924 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 925 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 926 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 927 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 928 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 929 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 930 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 931 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 932 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 933 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 934 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 935 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 936 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 937 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | f1ee8e8 | 2009-01-20 08:14:17 -0300 | [diff] [blame] | 938 | /*fixme: next sequence = i2c exchanges*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 939 | {0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR}, |
| 940 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 941 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 942 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 943 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 944 | {0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT}, |
| 945 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 946 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 947 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 948 | {0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT}, |
| 949 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 950 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 951 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 952 | {0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT}, |
| 953 | {0xa0, 0x7b, ZC3XX_R093_I2CSETVALUE}, |
| 954 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 955 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 956 | {0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT}, |
| 957 | {0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE}, |
| 958 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 959 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 960 | {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT}, |
| 961 | {0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE}, |
| 962 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 963 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 964 | {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT}, |
| 965 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 966 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 967 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 968 | {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT}, |
| 969 | {0xa0, 0x03, ZC3XX_R093_I2CSETVALUE}, |
| 970 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 971 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 972 | {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT}, |
| 973 | {0xa0, 0x08, ZC3XX_R093_I2CSETVALUE}, |
| 974 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 975 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 976 | {0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT}, |
| 977 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 978 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 979 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 980 | {0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT}, |
| 981 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 982 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 983 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 984 | {0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT}, |
| 985 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 986 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 987 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 988 | {0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT}, |
| 989 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 990 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 991 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 992 | {0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT}, |
| 993 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 994 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 995 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 996 | {0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT}, |
| 997 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 998 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 999 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1000 | {0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1001 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 1002 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1003 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1004 | {0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1005 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 1006 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1007 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1008 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1009 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1010 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1011 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1012 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, |
| 1013 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1014 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
| 1015 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1016 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1017 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1018 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1019 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, |
| 1020 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, |
| 1021 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1022 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1023 | {0xa0, 0x00, 0x01ad}, |
| 1024 | {0xa0, 0x01, 0x01b1}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1025 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1026 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 1027 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1028 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
| 1029 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 1030 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
| 1031 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 1032 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 1033 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 1034 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 1035 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 1036 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 1037 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 1038 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 1039 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 1040 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 1041 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 1042 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 1043 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 1044 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 1045 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 1046 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 1047 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 1048 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 1049 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 1050 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 1051 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 1052 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 1053 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 1054 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 1055 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 1056 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 1057 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 1058 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 1059 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 1060 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 1061 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 1062 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 1063 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
| 1064 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 1065 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 1066 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 1067 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 1068 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 1069 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 1070 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 1071 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 1072 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
| 1073 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1074 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 1075 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1076 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1077 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1078 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1079 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1080 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 1081 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1082 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1083 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1084 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1085 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1086 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1087 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1088 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1089 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1090 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1091 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1092 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 1093 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1094 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1095 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1096 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1097 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1098 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1099 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 1100 | {0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 1101 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 1102 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 1103 | {0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 1104 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 1105 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 1106 | {0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 1107 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 1108 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 1109 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 1110 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 1111 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 1112 | {0xa0, 0x0f, ZC3XX_R01E_HSYNC_1}, |
| 1113 | {0xa0, 0x19, ZC3XX_R01F_HSYNC_2}, |
| 1114 | {0xa0, 0x1f, ZC3XX_R020_HSYNC_3}, |
| 1115 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1116 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1117 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1118 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1119 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 1120 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1121 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1122 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1123 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1124 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1125 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1126 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1127 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1128 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 1129 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1130 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1131 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1132 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1133 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1134 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1135 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1136 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 1137 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1138 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1139 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1140 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1141 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1142 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1143 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1144 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1145 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1146 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1147 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1148 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1149 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1150 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1151 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1152 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1153 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1154 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1155 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1156 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 1157 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1158 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1159 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1160 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1161 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1162 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1163 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1164 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 1165 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1166 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1167 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1168 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1169 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1170 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1171 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1172 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1173 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1174 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1175 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1176 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1177 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | f1ee8e8 | 2009-01-20 08:14:17 -0300 | [diff] [blame] | 1178 | /*fixme:what does the next sequence?*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1179 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1180 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1181 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1182 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1183 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1184 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1185 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1186 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1187 | {0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE}, |
| 1188 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1189 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1190 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1191 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1192 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1193 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1194 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1195 | {0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE}, |
| 1196 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1197 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1198 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1199 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1200 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1201 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1202 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1203 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1204 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1205 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1206 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1207 | {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, |
| 1208 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1209 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1210 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1211 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1212 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1213 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1214 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1215 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1216 | {0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE}, |
| 1217 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1218 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1219 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1220 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1221 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1222 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1223 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1224 | {0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE}, |
| 1225 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1226 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1227 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1228 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1229 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1230 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1231 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1232 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1233 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1234 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1235 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1236 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1237 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1238 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1239 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1240 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1241 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1242 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1243 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1244 | {0xa0, 0x44, ZC3XX_R093_I2CSETVALUE}, |
| 1245 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1246 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1247 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1248 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1249 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1250 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1251 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1252 | {0xa0, 0x44, ZC3XX_R093_I2CSETVALUE}, |
| 1253 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1254 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1255 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1256 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1257 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1258 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1259 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1260 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1261 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1262 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1263 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1264 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1265 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1266 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1267 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1268 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1269 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1270 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1271 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1272 | {0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE}, |
| 1273 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1274 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1275 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1276 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1277 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1278 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1279 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1280 | {0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE}, |
| 1281 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1282 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1283 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1284 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1285 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1286 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1287 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1288 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1289 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1290 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1291 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1292 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1293 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1294 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1295 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1296 | }; |
| 1297 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1298 | static const struct usb_action gc0305_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1299 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 1300 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 1301 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 1302 | {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT}, /* 00,02,04,cc */ |
| 1303 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 1304 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 1305 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 1306 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 1307 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 1308 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 1309 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 1310 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 1311 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 1312 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 1313 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 1314 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc */ |
| 1315 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 1316 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1317 | {0xaa, 0x13, 0x0002}, /* 00,13,02,aa */ |
| 1318 | {0xaa, 0x15, 0x0003}, /* 00,15,03,aa */ |
| 1319 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 1320 | {0xaa, 0x02, 0x0000}, /* 00,02,00,aa */ |
| 1321 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 1322 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa */ |
| 1323 | {0xaa, 0x1d, 0x0080}, /* 00,1d,80,aa */ |
| 1324 | {0xaa, 0x1f, 0x0008}, /* 00,1f,08,aa */ |
| 1325 | {0xaa, 0x21, 0x0012}, /* 00,21,12,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1326 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc */ |
| 1327 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc */ |
| 1328 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1329 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 1330 | {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa */ |
| 1331 | {0xaa, 0x0b, 0x00b0}, /* 00,0b,b0,aa */ |
| 1332 | {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa */ |
| 1333 | {0xaa, 0x0d, 0x00b0}, /* 00,0d,b0,aa */ |
| 1334 | {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa */ |
| 1335 | {0xaa, 0x0f, 0x00b0}, /* 00,0f,b0,aa */ |
| 1336 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 1337 | {0xaa, 0x11, 0x00b0}, /* 00,11,b0,aa */ |
| 1338 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa */ |
| 1339 | {0xaa, 0x17, 0x00e6}, /* 00,17,e6,aa */ |
| 1340 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa */ |
| 1341 | {0xaa, 0x19, 0x0086}, /* 00,19,86,aa */ |
| 1342 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1343 | {0xaa, 0x1b, 0x0020}, /* 00,1b,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1344 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc */ |
| 1345 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 1346 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 1347 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1348 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1349 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 1350 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 1351 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 1352 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 1353 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
| 1354 | {0xa0, 0x85, ZC3XX_R18D_YTARGET}, /* 01,8d,85,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1355 | {0xa0, 0x00, 0x011e}, /* 01,1e,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1356 | {0xa0, 0x52, ZC3XX_R116_RGAIN}, /* 01,16,52,cc */ |
| 1357 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, /* 01,17,40,cc */ |
| 1358 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 1359 | {0xa0, 0x03, ZC3XX_R113_RGB03}, /* 01,13,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1360 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1361 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1362 | static const struct usb_action gc0305_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1363 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 1364 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 1365 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 1366 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 1367 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 1368 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 1369 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 1370 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 1371 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 1372 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 1373 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 1374 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 1375 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 1376 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 1377 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 1378 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e8,cc */ |
| 1379 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 1380 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1381 | {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */ |
| 1382 | {0xaa, 0x15, 0x0001}, /* 00,15,01,aa */ |
| 1383 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 1384 | {0xaa, 0x02, 0x0000}, /* 00,02,00,aa */ |
| 1385 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 1386 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa */ |
| 1387 | {0xaa, 0x1d, 0x0080}, /* 00,1d,80,aa */ |
| 1388 | {0xaa, 0x1f, 0x0008}, /* 00,1f,08,aa */ |
| 1389 | {0xaa, 0x21, 0x0012}, /* 00,21,12,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1390 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc */ |
| 1391 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc */ |
| 1392 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1393 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 1394 | {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa */ |
| 1395 | {0xaa, 0x0b, 0x00b0}, /* 00,0b,b0,aa */ |
| 1396 | {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa */ |
| 1397 | {0xaa, 0x0d, 0x00b0}, /* 00,0d,b0,aa */ |
| 1398 | {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa */ |
| 1399 | {0xaa, 0x0f, 0x00b0}, /* 00,0f,b0,aa */ |
| 1400 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 1401 | {0xaa, 0x11, 0x00b0}, /* 00,11,b0,aa */ |
| 1402 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa */ |
| 1403 | {0xaa, 0x17, 0x00e8}, /* 00,17,e8,aa */ |
| 1404 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa */ |
| 1405 | {0xaa, 0x19, 0x0088}, /* 00,19,88,aa */ |
| 1406 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1407 | {0xaa, 0x1b, 0x0020}, /* 00,1b,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1408 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc */ |
| 1409 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 1410 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 1411 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1412 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1413 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 1414 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 1415 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 1416 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 1417 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1418 | {0xa0, 0x00, 0x011e}, /* 01,1e,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1419 | {0xa0, 0x52, ZC3XX_R116_RGAIN}, /* 01,16,52,cc */ |
| 1420 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, /* 01,17,40,cc */ |
| 1421 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 1422 | {0xa0, 0x03, ZC3XX_R113_RGB03}, /* 01,13,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1423 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1424 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1425 | static const struct usb_action gc0305_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1426 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 1427 | {0xaa, 0x83, 0x0002}, /* 00,83,02,aa */ |
| 1428 | {0xaa, 0x84, 0x0038}, /* 00,84,38,aa */ /* win: 00,84,ec */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1429 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1430 | {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0b,cc */ |
| 1431 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 1432 | /* win: 01,92,10 */ |
| 1433 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1434 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1435 | {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,8e,cc */ |
| 1436 | /* win: 01,97,ec */ |
| 1437 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc */ |
| 1438 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc */ |
| 1439 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 1440 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1441 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc */ |
| 1442 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc */ |
| 1443 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc */ |
| 1444 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 1445 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,60,cc */ |
| 1446 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 1447 | /* {0xa0, 0x85, ZC3XX_R18D_YTARGET}, * 01,8d,85,cc * |
| 1448 | * if 640x480 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1449 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1450 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1451 | static const struct usb_action gc0305_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1452 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 1453 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 1454 | {0xaa, 0x84, 0x00ec}, /* 00,84,ec,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1455 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1456 | {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0b,cc */ |
| 1457 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,10,cc */ |
| 1458 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1459 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1460 | {0xa0, 0xec, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,ec,cc */ |
| 1461 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc */ |
| 1462 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc */ |
| 1463 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 1464 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1465 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc */ |
| 1466 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc */ |
| 1467 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc */ |
| 1468 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 1469 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,60,cc */ |
| 1470 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 1471 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, /* 01,8d,80,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1472 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1473 | }; |
| 1474 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1475 | static const struct usb_action gc0305_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1476 | {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1477 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 1478 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 1479 | {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1480 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1481 | {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,00,cc */ |
| 1482 | {0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,48,cc */ |
| 1483 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1484 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1485 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 1486 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc */ |
| 1487 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc */ |
| 1488 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc */ |
| 1489 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc */ |
| 1490 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc */ |
| 1491 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 1492 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,60,cc */ |
| 1493 | {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,03,cc */ |
| 1494 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, /* 01,8d,80,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1495 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1496 | }; |
| 1497 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1498 | static const struct usb_action hdcs2020xb_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1499 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1500 | {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT}, |
| 1501 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* qtable 0x05 */ |
| 1502 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1503 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1504 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1505 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1506 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1507 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1508 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1509 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1510 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1511 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1512 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1513 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 1514 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 1515 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1516 | {0xaa, 0x1c, 0x0000}, |
| 1517 | {0xaa, 0x0a, 0x0001}, |
| 1518 | {0xaa, 0x0b, 0x0006}, |
| 1519 | {0xaa, 0x0c, 0x007b}, |
| 1520 | {0xaa, 0x0d, 0x00a7}, |
| 1521 | {0xaa, 0x03, 0x00fb}, |
| 1522 | {0xaa, 0x05, 0x0000}, |
| 1523 | {0xaa, 0x06, 0x0003}, |
| 1524 | {0xaa, 0x09, 0x0008}, |
| 1525 | |
| 1526 | {0xaa, 0x0f, 0x0018}, /* set sensor gain */ |
| 1527 | {0xaa, 0x10, 0x0018}, |
| 1528 | {0xaa, 0x11, 0x0018}, |
| 1529 | {0xaa, 0x12, 0x0018}, |
| 1530 | |
| 1531 | {0xaa, 0x15, 0x004e}, |
| 1532 | {0xaa, 0x1c, 0x0004}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1533 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
| 1534 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1535 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
| 1536 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1537 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1538 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1539 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1540 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1541 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1542 | {0xa1, 0x01, 0x0002}, |
| 1543 | {0xa1, 0x01, 0x0008}, |
| 1544 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1545 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1546 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1547 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1548 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1549 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1550 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 1551 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1552 | {0xa1, 0x01, 0x01c8}, |
| 1553 | {0xa1, 0x01, 0x01c9}, |
| 1554 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1555 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 1556 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 1557 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 1558 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 1559 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 1560 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 1561 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 1562 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 1563 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 1564 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 1565 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 1566 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 1567 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 1568 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 1569 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 1570 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 1571 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 1572 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 1573 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 1574 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 1575 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 1576 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 1577 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 1578 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 1579 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 1580 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 1581 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 1582 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 1583 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 1584 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 1585 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 1586 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 1587 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1588 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1589 | {0xa0, 0x66, ZC3XX_R10A_RGB00}, /* matrix */ |
| 1590 | {0xa0, 0xed, ZC3XX_R10B_RGB01}, |
| 1591 | {0xa0, 0xed, ZC3XX_R10C_RGB02}, |
| 1592 | {0xa0, 0xed, ZC3XX_R10D_RGB10}, |
| 1593 | {0xa0, 0x66, ZC3XX_R10E_RGB11}, |
| 1594 | {0xa0, 0xed, ZC3XX_R10F_RGB12}, |
| 1595 | {0xa0, 0xed, ZC3XX_R110_RGB20}, |
| 1596 | {0xa0, 0xed, ZC3XX_R111_RGB21}, |
| 1597 | {0xa0, 0x66, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1598 | |
| 1599 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1600 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1601 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1602 | {0xaa, 0x13, 0x0031}, |
| 1603 | {0xaa, 0x14, 0x0001}, |
| 1604 | {0xaa, 0x0e, 0x0004}, |
| 1605 | {0xaa, 0x19, 0x00cd}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1606 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 1607 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 1608 | {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 1609 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 1610 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 1611 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, |
| 1612 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 1613 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1614 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1615 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 0x14 */ |
| 1616 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 1617 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 1618 | {0xa0, 0x18, ZC3XX_R01E_HSYNC_1}, |
| 1619 | {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2}, |
| 1620 | {0xa0, 0x41, ZC3XX_R020_HSYNC_3}, |
| 1621 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1622 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1623 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1624 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1625 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1626 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1627 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1628 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1629 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1630 | static const struct usb_action hdcs2020xb_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1631 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1632 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 1633 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 1634 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1635 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1636 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1637 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1638 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1639 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1640 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1641 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1642 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1643 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1644 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1645 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 1646 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 1647 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1648 | {0xaa, 0x1c, 0x0000}, |
| 1649 | {0xaa, 0x0a, 0x0001}, |
| 1650 | {0xaa, 0x0b, 0x0006}, |
| 1651 | {0xaa, 0x0c, 0x007a}, |
| 1652 | {0xaa, 0x0d, 0x00a7}, |
| 1653 | {0xaa, 0x03, 0x00fb}, |
| 1654 | {0xaa, 0x05, 0x0000}, |
| 1655 | {0xaa, 0x06, 0x0003}, |
| 1656 | {0xaa, 0x09, 0x0008}, |
| 1657 | {0xaa, 0x0f, 0x0018}, /* original setting */ |
| 1658 | {0xaa, 0x10, 0x0018}, |
| 1659 | {0xaa, 0x11, 0x0018}, |
| 1660 | {0xaa, 0x12, 0x0018}, |
| 1661 | {0xaa, 0x15, 0x004e}, |
| 1662 | {0xaa, 0x1c, 0x0004}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1663 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, |
| 1664 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1665 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
| 1666 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1667 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1668 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1669 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1670 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1671 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1672 | {0xa1, 0x01, 0x0002}, |
| 1673 | {0xa1, 0x01, 0x0008}, |
| 1674 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1675 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1676 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1677 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1678 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1679 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1680 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 1681 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1682 | {0xa1, 0x01, 0x01c8}, |
| 1683 | {0xa1, 0x01, 0x01c9}, |
| 1684 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1685 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 1686 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 1687 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 1688 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 1689 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 1690 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 1691 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 1692 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 1693 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 1694 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 1695 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 1696 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 1697 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 1698 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 1699 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 1700 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 1701 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 1702 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 1703 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 1704 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 1705 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 1706 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 1707 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 1708 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 1709 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 1710 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 1711 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 1712 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 1713 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 1714 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 1715 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 1716 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 1717 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
| 1718 | {0xa0, 0x66, ZC3XX_R10A_RGB00}, /* matrix */ |
| 1719 | {0xa0, 0xed, ZC3XX_R10B_RGB01}, |
| 1720 | {0xa0, 0xed, ZC3XX_R10C_RGB02}, |
| 1721 | {0xa0, 0xed, ZC3XX_R10D_RGB10}, |
| 1722 | {0xa0, 0x66, ZC3XX_R10E_RGB11}, |
| 1723 | {0xa0, 0xed, ZC3XX_R10F_RGB12}, |
| 1724 | {0xa0, 0xed, ZC3XX_R110_RGB20}, |
| 1725 | {0xa0, 0xed, ZC3XX_R111_RGB21}, |
| 1726 | {0xa0, 0x66, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1727 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1728 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1729 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1730 | /**** set exposure ***/ |
| 1731 | {0xaa, 0x13, 0x0031}, |
| 1732 | {0xaa, 0x14, 0x0001}, |
| 1733 | {0xaa, 0x0e, 0x0004}, |
| 1734 | {0xaa, 0x19, 0x00cd}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1735 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 1736 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 1737 | {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 1738 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 1739 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 1740 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, |
| 1741 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 1742 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 1743 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 1744 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 1745 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 1746 | {0xa0, 0x18, ZC3XX_R01E_HSYNC_1}, |
| 1747 | {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2}, |
| 1748 | {0xa0, 0x41, ZC3XX_R020_HSYNC_3}, |
| 1749 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1750 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1751 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1752 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1753 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1754 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1755 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1756 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1757 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1758 | static const struct usb_action hdcs2020b_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1759 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 1760 | {0xaa, 0x13, 0x0018}, /* 00,13,18,aa */ |
| 1761 | {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */ |
| 1762 | {0xaa, 0x0e, 0x0005}, /* 00,0e,05,aa */ |
| 1763 | {0xaa, 0x19, 0x001f}, /* 00,19,1f,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1764 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1765 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */ |
| 1766 | {0xa0, 0x76, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,76,cc */ |
| 1767 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1768 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1769 | {0xa0, 0x46, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,46,cc */ |
| 1770 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 1771 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 1772 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,0c,cc */ |
| 1773 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,28,cc */ |
| 1774 | {0xa0, 0x05, ZC3XX_R01D_HSYNC_0}, /* 00,1d,05,cc */ |
| 1775 | {0xa0, 0x1a, ZC3XX_R01E_HSYNC_1}, /* 00,1e,1a,cc */ |
| 1776 | {0xa0, 0x2f, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2f,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1777 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1778 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1779 | static const struct usb_action hdcs2020b_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1780 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 1781 | {0xaa, 0x13, 0x0031}, /* 00,13,31,aa */ |
| 1782 | {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */ |
| 1783 | {0xaa, 0x0e, 0x0004}, /* 00,0e,04,aa */ |
| 1784 | {0xaa, 0x19, 0x00cd}, /* 00,19,cd,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1785 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1786 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */ |
| 1787 | {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,62,cc */ |
| 1788 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1789 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1790 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,3d,cc */ |
| 1791 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 1792 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 1793 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,0c,cc */ |
| 1794 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,28,cc */ |
| 1795 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, /* 00,1d,04,cc */ |
| 1796 | {0xa0, 0x18, ZC3XX_R01E_HSYNC_1}, /* 00,1e,18,cc */ |
| 1797 | {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2c,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1798 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1799 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1800 | static const struct usb_action hdcs2020b_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1801 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 1802 | {0xaa, 0x13, 0x0010}, /* 00,13,10,aa */ |
| 1803 | {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */ |
| 1804 | {0xaa, 0x0e, 0x0004}, /* 00,0e,04,aa */ |
| 1805 | {0xaa, 0x19, 0x0000}, /* 00,19,00,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1806 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1807 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */ |
| 1808 | {0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,70,cc */ |
| 1809 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1810 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1811 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 1812 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 1813 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 1814 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 1815 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 1816 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, /* 00,1d,04,cc */ |
| 1817 | {0xa0, 0x17, ZC3XX_R01E_HSYNC_1}, /* 00,1e,17,cc */ |
| 1818 | {0xa0, 0x2a, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2a,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1819 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1820 | }; |
| 1821 | |
Jean-Francois Moine | 03bf7565 | 2008-11-06 14:47:13 -0300 | [diff] [blame] | 1822 | static const struct usb_action hv7131bxx_Initial[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1823 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1824 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 1825 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1826 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1827 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 1828 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 1829 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1830 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1831 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1832 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1833 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1834 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1835 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1836 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1837 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1838 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1839 | {0xaa, 0x30, 0x002d}, |
| 1840 | {0xaa, 0x01, 0x0005}, |
| 1841 | {0xaa, 0x11, 0x0000}, |
| 1842 | {0xaa, 0x13, 0x0001}, /* {0xaa, 0x13, 0x0000}, */ |
| 1843 | {0xaa, 0x14, 0x0001}, |
| 1844 | {0xaa, 0x15, 0x00e8}, |
| 1845 | {0xaa, 0x16, 0x0002}, |
Jean-Francois Moine | c9ff1b6 | 2008-11-06 15:29:47 -0300 | [diff] [blame] | 1846 | {0xaa, 0x17, 0x0086}, /* 00,17,88,aa */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1847 | {0xaa, 0x31, 0x0038}, |
| 1848 | {0xaa, 0x32, 0x0038}, |
| 1849 | {0xaa, 0x33, 0x0038}, |
| 1850 | {0xaa, 0x5b, 0x0001}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1851 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 1852 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1853 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1854 | {0xa0, 0x68, ZC3XX_R18D_YTARGET}, |
| 1855 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1856 | {0xa0, 0x00, 0x01ad}, |
| 1857 | {0xa0, 0xc0, 0x019b}, |
| 1858 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1859 | {0xa0, 0x02, ZC3XX_R188_MINGAIN}, |
| 1860 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1861 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1862 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1863 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1864 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | c9ff1b6 | 2008-11-06 15:29:47 -0300 | [diff] [blame] | 1865 | {0xaa, 0x02, 0x0090}, /* 00,02,80,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1866 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1867 | }; |
| 1868 | |
Jean-Francois Moine | 03bf7565 | 2008-11-06 14:47:13 -0300 | [diff] [blame] | 1869 | static const struct usb_action hv7131bxx_InitialScale[] = { /* 640x480*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1870 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1871 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 1872 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1873 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1874 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 1875 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 1876 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1877 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1878 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1879 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1880 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1881 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1882 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1883 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1884 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1885 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1886 | {0xaa, 0x30, 0x002d}, |
| 1887 | {0xaa, 0x01, 0x0005}, |
| 1888 | {0xaa, 0x11, 0x0001}, |
| 1889 | {0xaa, 0x13, 0x0000}, /* {0xaa, 0x13, 0x0001}; */ |
| 1890 | {0xaa, 0x14, 0x0001}, |
| 1891 | {0xaa, 0x15, 0x00e6}, |
| 1892 | {0xaa, 0x16, 0x0002}, |
| 1893 | {0xaa, 0x17, 0x0086}, |
| 1894 | {0xaa, 0x31, 0x0038}, |
| 1895 | {0xaa, 0x32, 0x0038}, |
| 1896 | {0xaa, 0x33, 0x0038}, |
| 1897 | {0xaa, 0x5b, 0x0001}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1898 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 1899 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1900 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1901 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
| 1902 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1903 | {0xa0, 0x00, 0x01ad}, |
| 1904 | {0xa0, 0xc0, 0x019b}, |
| 1905 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1906 | {0xa0, 0x02, ZC3XX_R188_MINGAIN}, |
| 1907 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1908 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1909 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1910 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1911 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1912 | {0xaa, 0x02, 0x0090}, /* {0xaa, 0x02, 0x0080}, */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1913 | {} |
| 1914 | }; |
| 1915 | static const struct usb_action hv7131b_50HZ[] = { /* 640x480*/ |
| 1916 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 1917 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
| 1918 | {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */ |
| 1919 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
| 1920 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1921 | {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */ |
| 1922 | {0xaa, 0x22, 0x001b}, /* 00,22,1b,aa */ |
| 1923 | {0xaa, 0x23, 0x00fc}, /* 00,23,fc,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 1924 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 1925 | {0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,9b,cc */ |
| 1926 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,80,cc */ |
| 1927 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1928 | {0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,ea,cc */ |
| 1929 | {0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,60,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1930 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 1931 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
| 1932 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
| 1933 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1934 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 1935 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, /* 00,1e,50,cc */ |
| 1936 | {0xa0, 0x1b, ZC3XX_R01F_HSYNC_2}, /* 00,1f,1b,cc */ |
| 1937 | {0xa0, 0xfc, ZC3XX_R020_HSYNC_3}, /* 00,20,fc,cc */ |
| 1938 | {} |
| 1939 | }; |
| 1940 | static const struct usb_action hv7131b_50HZScale[] = { /* 320x240 */ |
| 1941 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 1942 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
| 1943 | {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */ |
| 1944 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
| 1945 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1946 | {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */ |
| 1947 | {0xaa, 0x22, 0x0012}, /* 00,22,12,aa */ |
| 1948 | {0xaa, 0x23, 0x0080}, /* 00,23,80,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 1949 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 1950 | {0xa0, 0x9b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,9b,cc */ |
| 1951 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,80,cc */ |
| 1952 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,01,cc */ |
| 1953 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,d4,cc */ |
| 1954 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,c0,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1955 | {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, /* 01,8c,07,cc */ |
| 1956 | {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,0f,cc */ |
| 1957 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
| 1958 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1959 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 1960 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, /* 00,1e,50,cc */ |
| 1961 | {0xa0, 0x12, ZC3XX_R01F_HSYNC_2}, /* 00,1f,12,cc */ |
| 1962 | {0xa0, 0x80, ZC3XX_R020_HSYNC_3}, /* 00,20,80,cc */ |
| 1963 | {} |
| 1964 | }; |
| 1965 | static const struct usb_action hv7131b_60HZ[] = { /* 640x480*/ |
| 1966 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 1967 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
| 1968 | {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */ |
| 1969 | {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */ |
| 1970 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1971 | {0xaa, 0x21, 0x0040}, /* 00,21,40,aa */ |
| 1972 | {0xaa, 0x22, 0x0013}, /* 00,22,13,aa */ |
| 1973 | {0xaa, 0x23, 0x004c}, /* 00,23,4c,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 1974 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 1975 | {0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,4d,cc */ |
| 1976 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,60,cc */ |
| 1977 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1978 | {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,c3,cc */ |
| 1979 | {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,50,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1980 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 1981 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
| 1982 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
| 1983 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1984 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 1985 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, /* 00,1e,40,cc */ |
| 1986 | {0xa0, 0x13, ZC3XX_R01F_HSYNC_2}, /* 00,1f,13,cc */ |
| 1987 | {0xa0, 0x4c, ZC3XX_R020_HSYNC_3}, /* 00,20,4c,cc */ |
| 1988 | {} |
| 1989 | }; |
| 1990 | static const struct usb_action hv7131b_60HZScale[] = { /* 320x240 */ |
| 1991 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 1992 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
| 1993 | {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */ |
| 1994 | {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */ |
| 1995 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1996 | {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */ |
| 1997 | {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */ |
| 1998 | {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 1999 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 2000 | {0xa0, 0x4d, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,4d,cc */ |
| 2001 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,60,cc */ |
| 2002 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,01,cc */ |
| 2003 | {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,86,cc */ |
| 2004 | {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,a0,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 2005 | {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, /* 01,8c,07,cc */ |
| 2006 | {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,0f,cc */ |
| 2007 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
| 2008 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 2009 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 2010 | {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,a0,cc */ |
| 2011 | {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, /* 00,1f,16,cc */ |
| 2012 | {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, /* 00,20,40,cc */ |
| 2013 | {} |
| 2014 | }; |
| 2015 | static const struct usb_action hv7131b_NoFliker[] = { /* 640x480*/ |
| 2016 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 2017 | {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */ |
| 2018 | {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */ |
| 2019 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
| 2020 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 2021 | {0xaa, 0x21, 0x0010}, /* 00,21,10,aa */ |
| 2022 | {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */ |
| 2023 | {0xaa, 0x23, 0x0003}, /* 00,23,03,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 2024 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 2025 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,f8,cc */ |
| 2026 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,00,cc */ |
| 2027 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2028 | {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,02,cc */ |
| 2029 | {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,00,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 2030 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2031 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2032 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 2033 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 2034 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 2035 | {0xa0, 0x10, ZC3XX_R01E_HSYNC_1}, /* 00,1e,10,cc */ |
| 2036 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, /* 00,1f,00,cc */ |
| 2037 | {0xa0, 0x03, ZC3XX_R020_HSYNC_3}, /* 00,20,03,cc */ |
| 2038 | {} |
| 2039 | }; |
| 2040 | static const struct usb_action hv7131b_NoFlikerScale[] = { /* 320x240 */ |
| 2041 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 2042 | {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */ |
| 2043 | {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */ |
| 2044 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
| 2045 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 2046 | {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */ |
| 2047 | {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */ |
| 2048 | {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 2049 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 2050 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,f8,cc */ |
| 2051 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,00,cc */ |
| 2052 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2053 | {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,02,cc */ |
| 2054 | {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,00,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 2055 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2056 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2057 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 2058 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 2059 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 2060 | {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,a0,cc */ |
| 2061 | {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, /* 00,1f,16,cc */ |
| 2062 | {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, /* 00,20,40,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2063 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2064 | }; |
| 2065 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2066 | static const struct usb_action hv7131cxx_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2067 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 2068 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 2069 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2070 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2071 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 2072 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 2073 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2074 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2075 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2076 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2077 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 2078 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 2079 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 2080 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 2081 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
| 2082 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 2083 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 2084 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 2085 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 2086 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 2087 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2088 | {0xaa, 0x01, 0x000c}, |
| 2089 | {0xaa, 0x11, 0x0000}, |
| 2090 | {0xaa, 0x13, 0x0000}, |
| 2091 | {0xaa, 0x14, 0x0001}, |
| 2092 | {0xaa, 0x15, 0x00e8}, |
| 2093 | {0xaa, 0x16, 0x0002}, |
| 2094 | {0xaa, 0x17, 0x0088}, |
| 2095 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2096 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2097 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 2098 | {0xa0, 0x89, ZC3XX_R18D_YTARGET}, |
| 2099 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2100 | {0xa0, 0x00, 0x01ad}, |
| 2101 | {0xa0, 0xc0, 0x019b}, |
| 2102 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2103 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2104 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2105 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 2106 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2107 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2108 | {0xa1, 0x01, 0x0002}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2109 | {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT}, |
| 2110 | {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2111 | {0xa1, 0x01, 0x0091}, |
| 2112 | {0xa1, 0x01, 0x0095}, |
| 2113 | {0xa1, 0x01, 0x0096}, |
| 2114 | |
| 2115 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2116 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 2117 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2118 | {0xa1, 0x01, 0x01c8}, |
| 2119 | {0xa1, 0x01, 0x01c9}, |
| 2120 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2121 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2122 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2123 | {0xa0, 0x60, ZC3XX_R10A_RGB00}, /* matrix */ |
| 2124 | {0xa0, 0xf0, ZC3XX_R10B_RGB01}, |
| 2125 | {0xa0, 0xf0, ZC3XX_R10C_RGB02}, |
| 2126 | {0xa0, 0xf0, ZC3XX_R10D_RGB10}, |
| 2127 | {0xa0, 0x60, ZC3XX_R10E_RGB11}, |
| 2128 | {0xa0, 0xf0, ZC3XX_R10F_RGB12}, |
| 2129 | {0xa0, 0xf0, ZC3XX_R110_RGB20}, |
| 2130 | {0xa0, 0xf0, ZC3XX_R111_RGB21}, |
| 2131 | {0xa0, 0x60, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2132 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2133 | {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2134 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2135 | {0xaa, 0x25, 0x0007}, |
| 2136 | {0xaa, 0x26, 0x0053}, |
| 2137 | {0xaa, 0x27, 0x0000}, |
| 2138 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2139 | {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 2f */ |
| 2140 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 9b */ |
| 2141 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 80 */ |
| 2142 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2143 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, |
| 2144 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2145 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 2146 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2147 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 2148 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2149 | {0xa0, 0x13, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2150 | {0xa1, 0x01, 0x001d}, |
| 2151 | {0xa1, 0x01, 0x001e}, |
| 2152 | {0xa1, 0x01, 0x001f}, |
| 2153 | {0xa1, 0x01, 0x0020}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2154 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2155 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2156 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2157 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2158 | }; |
| 2159 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2160 | static const struct usb_action hv7131cxx_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2161 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2162 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2163 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* diff */ |
| 2164 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2165 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2166 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 2167 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2168 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2169 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2170 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2171 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2172 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2173 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2174 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 2175 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 1e0 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2176 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2177 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 2178 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 2179 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
| 2180 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 2181 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 2182 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 2183 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 2184 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 2185 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2186 | {0xaa, 0x01, 0x000c}, |
| 2187 | {0xaa, 0x11, 0x0000}, |
| 2188 | {0xaa, 0x13, 0x0000}, |
| 2189 | {0xaa, 0x14, 0x0001}, |
| 2190 | {0xaa, 0x15, 0x00e8}, |
| 2191 | {0xaa, 0x16, 0x0002}, |
| 2192 | {0xaa, 0x17, 0x0088}, |
| 2193 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2194 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2195 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2196 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 2197 | {0xa0, 0x89, ZC3XX_R18D_YTARGET}, |
| 2198 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2199 | {0xa0, 0x00, 0x01ad}, |
| 2200 | {0xa0, 0xc0, 0x019b}, |
| 2201 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2202 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2203 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2204 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 2205 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2206 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2207 | {0xa1, 0x01, 0x0002}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2208 | {0xa0, 0x00, ZC3XX_R092_I2CADDRESSSELECT}, |
| 2209 | /* read the i2c chips ident */ |
| 2210 | {0xa0, 0x02, ZC3XX_R090_I2CCOMMAND}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2211 | {0xa1, 0x01, 0x0091}, |
| 2212 | {0xa1, 0x01, 0x0095}, |
| 2213 | {0xa1, 0x01, 0x0096}, |
| 2214 | |
| 2215 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2216 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 2217 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2218 | {0xa1, 0x01, 0x01c8}, |
| 2219 | {0xa1, 0x01, 0x01c9}, |
| 2220 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2221 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2222 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2223 | {0xa0, 0x60, ZC3XX_R10A_RGB00}, /* matrix */ |
| 2224 | {0xa0, 0xf0, ZC3XX_R10B_RGB01}, |
| 2225 | {0xa0, 0xf0, ZC3XX_R10C_RGB02}, |
| 2226 | {0xa0, 0xf0, ZC3XX_R10D_RGB10}, |
| 2227 | {0xa0, 0x60, ZC3XX_R10E_RGB11}, |
| 2228 | {0xa0, 0xf0, ZC3XX_R10F_RGB12}, |
| 2229 | {0xa0, 0xf0, ZC3XX_R110_RGB20}, |
| 2230 | {0xa0, 0xf0, ZC3XX_R111_RGB21}, |
| 2231 | {0xa0, 0x60, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2232 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2233 | {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2234 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2235 | {0xaa, 0x25, 0x0007}, |
| 2236 | {0xaa, 0x26, 0x0053}, |
| 2237 | {0xaa, 0x27, 0x0000}, |
| 2238 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2239 | {0xa0, 0x10, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 2f */ |
| 2240 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 9b */ |
| 2241 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 80 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2242 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2243 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2244 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, |
| 2245 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2246 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2247 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 2248 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2249 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 2250 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2251 | {0xa0, 0x13, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2252 | {0xa1, 0x01, 0x001d}, |
| 2253 | {0xa1, 0x01, 0x001e}, |
| 2254 | {0xa1, 0x01, 0x001f}, |
| 2255 | {0xa1, 0x01, 0x0020}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2256 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2257 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2258 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2259 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2260 | }; |
| 2261 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2262 | static const struct usb_action icm105axx_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2263 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 2264 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 2265 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 2266 | {0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2267 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2268 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2269 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 2270 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 2271 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2272 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2273 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2274 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 2275 | {0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH}, |
| 2276 | {0xa0, 0x01, ZC3XX_R098_WINYSTARTLOW}, |
| 2277 | {0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH}, |
| 2278 | {0xa0, 0x01, ZC3XX_R09A_WINXSTARTLOW}, |
| 2279 | {0xa0, 0x01, ZC3XX_R11A_FIRSTYLOW}, |
| 2280 | {0xa0, 0x01, ZC3XX_R11C_FIRSTXLOW}, |
| 2281 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
| 2282 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 2283 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 2284 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 2285 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 2286 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 2287 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2288 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2289 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2290 | {0xaa, 0x01, 0x0010}, |
| 2291 | {0xaa, 0x03, 0x0000}, |
| 2292 | {0xaa, 0x04, 0x0001}, |
| 2293 | {0xaa, 0x05, 0x0020}, |
| 2294 | {0xaa, 0x06, 0x0001}, |
| 2295 | {0xaa, 0x08, 0x0000}, |
| 2296 | {0xaa, 0x03, 0x0001}, |
| 2297 | {0xaa, 0x04, 0x0011}, |
| 2298 | {0xaa, 0x05, 0x00a0}, |
| 2299 | {0xaa, 0x06, 0x0001}, |
| 2300 | {0xaa, 0x08, 0x0000}, |
| 2301 | {0xaa, 0x03, 0x0002}, |
| 2302 | {0xaa, 0x04, 0x0013}, |
| 2303 | {0xaa, 0x05, 0x0020}, |
| 2304 | {0xaa, 0x06, 0x0001}, |
| 2305 | {0xaa, 0x08, 0x0000}, |
| 2306 | {0xaa, 0x03, 0x0003}, |
| 2307 | {0xaa, 0x04, 0x0015}, |
| 2308 | {0xaa, 0x05, 0x0020}, |
| 2309 | {0xaa, 0x06, 0x0005}, |
| 2310 | {0xaa, 0x08, 0x0000}, |
| 2311 | {0xaa, 0x03, 0x0004}, |
| 2312 | {0xaa, 0x04, 0x0017}, |
| 2313 | {0xaa, 0x05, 0x0020}, |
| 2314 | {0xaa, 0x06, 0x000d}, |
| 2315 | {0xaa, 0x08, 0x0000}, |
| 2316 | {0xaa, 0x03, 0x0005}, |
| 2317 | {0xaa, 0x04, 0x0019}, |
| 2318 | {0xaa, 0x05, 0x0020}, |
| 2319 | {0xaa, 0x06, 0x0005}, |
| 2320 | {0xaa, 0x08, 0x0000}, |
| 2321 | {0xaa, 0x03, 0x0006}, |
| 2322 | {0xaa, 0x04, 0x0017}, |
| 2323 | {0xaa, 0x05, 0x0026}, |
| 2324 | {0xaa, 0x06, 0x0005}, |
| 2325 | {0xaa, 0x08, 0x0000}, |
| 2326 | {0xaa, 0x03, 0x0007}, |
| 2327 | {0xaa, 0x04, 0x0019}, |
| 2328 | {0xaa, 0x05, 0x0022}, |
| 2329 | {0xaa, 0x06, 0x0005}, |
| 2330 | {0xaa, 0x08, 0x0000}, |
| 2331 | {0xaa, 0x03, 0x0008}, |
| 2332 | {0xaa, 0x04, 0x0021}, |
| 2333 | {0xaa, 0x05, 0x00aa}, |
| 2334 | {0xaa, 0x06, 0x0005}, |
| 2335 | {0xaa, 0x08, 0x0000}, |
| 2336 | {0xaa, 0x03, 0x0009}, |
| 2337 | {0xaa, 0x04, 0x0023}, |
| 2338 | {0xaa, 0x05, 0x00aa}, |
| 2339 | {0xaa, 0x06, 0x000d}, |
| 2340 | {0xaa, 0x08, 0x0000}, |
| 2341 | {0xaa, 0x03, 0x000a}, |
| 2342 | {0xaa, 0x04, 0x0025}, |
| 2343 | {0xaa, 0x05, 0x00aa}, |
| 2344 | {0xaa, 0x06, 0x0005}, |
| 2345 | {0xaa, 0x08, 0x0000}, |
| 2346 | {0xaa, 0x03, 0x000b}, |
| 2347 | {0xaa, 0x04, 0x00ec}, |
| 2348 | {0xaa, 0x05, 0x002e}, |
| 2349 | {0xaa, 0x06, 0x0005}, |
| 2350 | {0xaa, 0x08, 0x0000}, |
| 2351 | {0xaa, 0x03, 0x000c}, |
| 2352 | {0xaa, 0x04, 0x00fa}, |
| 2353 | {0xaa, 0x05, 0x002a}, |
| 2354 | {0xaa, 0x06, 0x0005}, |
| 2355 | {0xaa, 0x08, 0x0000}, |
| 2356 | {0xaa, 0x07, 0x000d}, |
| 2357 | {0xaa, 0x01, 0x0005}, |
| 2358 | {0xaa, 0x94, 0x0002}, |
| 2359 | {0xaa, 0x90, 0x0000}, |
| 2360 | {0xaa, 0x91, 0x001f}, |
| 2361 | {0xaa, 0x10, 0x0064}, |
| 2362 | {0xaa, 0x9b, 0x00f0}, |
| 2363 | {0xaa, 0x9c, 0x0002}, |
| 2364 | {0xaa, 0x14, 0x001a}, |
| 2365 | {0xaa, 0x20, 0x0080}, |
| 2366 | {0xaa, 0x22, 0x0080}, |
| 2367 | {0xaa, 0x24, 0x0080}, |
| 2368 | {0xaa, 0x26, 0x0080}, |
| 2369 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2370 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2371 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2372 | {0xaa, 0xa8, 0x00c0}, |
| 2373 | {0xa1, 0x01, 0x0002}, |
| 2374 | {0xa1, 0x01, 0x0008}, |
| 2375 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2376 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2377 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2378 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2379 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2380 | {0xa1, 0x01, 0x0008}, |
| 2381 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2382 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 2383 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2384 | {0xa1, 0x01, 0x01c8}, |
| 2385 | {0xa1, 0x01, 0x01c9}, |
| 2386 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2387 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 2388 | {0xa0, 0x52, ZC3XX_R10A_RGB00}, /* matrix */ |
| 2389 | {0xa0, 0xf7, ZC3XX_R10B_RGB01}, |
| 2390 | {0xa0, 0xf7, ZC3XX_R10C_RGB02}, |
| 2391 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 2392 | {0xa0, 0x52, ZC3XX_R10E_RGB11}, |
| 2393 | {0xa0, 0xf7, ZC3XX_R10F_RGB12}, |
| 2394 | {0xa0, 0xf7, ZC3XX_R110_RGB20}, |
| 2395 | {0xa0, 0xf7, ZC3XX_R111_RGB21}, |
| 2396 | {0xa0, 0x52, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2397 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2398 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2399 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2400 | {0xaa, 0x0d, 0x0003}, |
| 2401 | {0xaa, 0x0c, 0x008c}, |
| 2402 | {0xaa, 0x0e, 0x0095}, |
| 2403 | {0xaa, 0x0f, 0x0002}, |
| 2404 | {0xaa, 0x1c, 0x0094}, |
| 2405 | {0xaa, 0x1d, 0x0002}, |
| 2406 | {0xaa, 0x20, 0x0080}, |
| 2407 | {0xaa, 0x22, 0x0080}, |
| 2408 | {0xaa, 0x24, 0x0080}, |
| 2409 | {0xaa, 0x26, 0x0080}, |
| 2410 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2411 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 2412 | {0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 2413 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2414 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2415 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2416 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2417 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 2418 | {0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2419 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 2420 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2421 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2422 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2423 | {0xa0, 0xe3, ZC3XX_R01D_HSYNC_0}, |
| 2424 | {0xa0, 0xec, ZC3XX_R01E_HSYNC_1}, |
| 2425 | {0xa0, 0xf5, ZC3XX_R01F_HSYNC_2}, |
| 2426 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 2427 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 2428 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, |
| 2429 | {0xa0, 0xc0, ZC3XX_R11D_GLOBALGAIN}, |
| 2430 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2431 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2432 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2433 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2434 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2435 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2436 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2437 | }; |
| 2438 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2439 | static const struct usb_action icm105axx_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2440 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 2441 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 2442 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 2443 | {0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2444 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2445 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2446 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 2447 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 2448 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2449 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2450 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2451 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 2452 | {0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH}, |
| 2453 | {0xa0, 0x02, ZC3XX_R098_WINYSTARTLOW}, |
| 2454 | {0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH}, |
| 2455 | {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW}, |
| 2456 | {0xa0, 0x02, ZC3XX_R11A_FIRSTYLOW}, |
| 2457 | {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW}, |
| 2458 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
| 2459 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
| 2460 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 2461 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
| 2462 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 2463 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 2464 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2465 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2466 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2467 | {0xaa, 0x01, 0x0010}, |
| 2468 | {0xaa, 0x03, 0x0000}, |
| 2469 | {0xaa, 0x04, 0x0001}, |
| 2470 | {0xaa, 0x05, 0x0020}, |
| 2471 | {0xaa, 0x06, 0x0001}, |
| 2472 | {0xaa, 0x08, 0x0000}, |
| 2473 | {0xaa, 0x03, 0x0001}, |
| 2474 | {0xaa, 0x04, 0x0011}, |
| 2475 | {0xaa, 0x05, 0x00a0}, |
| 2476 | {0xaa, 0x06, 0x0001}, |
| 2477 | {0xaa, 0x08, 0x0000}, |
| 2478 | {0xaa, 0x03, 0x0002}, |
| 2479 | {0xaa, 0x04, 0x0013}, |
| 2480 | {0xaa, 0x05, 0x0020}, |
| 2481 | {0xaa, 0x06, 0x0001}, |
| 2482 | {0xaa, 0x08, 0x0000}, |
| 2483 | {0xaa, 0x03, 0x0003}, |
| 2484 | {0xaa, 0x04, 0x0015}, |
| 2485 | {0xaa, 0x05, 0x0020}, |
| 2486 | {0xaa, 0x06, 0x0005}, |
| 2487 | {0xaa, 0x08, 0x0000}, |
| 2488 | {0xaa, 0x03, 0x0004}, |
| 2489 | {0xaa, 0x04, 0x0017}, |
| 2490 | {0xaa, 0x05, 0x0020}, |
| 2491 | {0xaa, 0x06, 0x000d}, |
| 2492 | {0xaa, 0x08, 0x0000}, |
| 2493 | {0xaa, 0x03, 0x0005}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2494 | {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT}, |
| 2495 | {0xa0, 0x19, ZC3XX_R093_I2CSETVALUE}, |
| 2496 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2497 | {0xa1, 0x01, 0x0091}, |
| 2498 | {0xaa, 0x05, 0x0020}, |
| 2499 | {0xaa, 0x06, 0x0005}, |
| 2500 | {0xaa, 0x08, 0x0000}, |
| 2501 | {0xaa, 0x03, 0x0006}, |
| 2502 | {0xaa, 0x04, 0x0017}, |
| 2503 | {0xaa, 0x05, 0x0026}, |
| 2504 | {0xaa, 0x06, 0x0005}, |
| 2505 | {0xaa, 0x08, 0x0000}, |
| 2506 | {0xaa, 0x03, 0x0007}, |
| 2507 | {0xaa, 0x04, 0x0019}, |
| 2508 | {0xaa, 0x05, 0x0022}, |
| 2509 | {0xaa, 0x06, 0x0005}, |
| 2510 | {0xaa, 0x08, 0x0000}, |
| 2511 | {0xaa, 0x03, 0x0008}, |
| 2512 | {0xaa, 0x04, 0x0021}, |
| 2513 | {0xaa, 0x05, 0x00aa}, |
| 2514 | {0xaa, 0x06, 0x0005}, |
| 2515 | {0xaa, 0x08, 0x0000}, |
| 2516 | {0xaa, 0x03, 0x0009}, |
| 2517 | {0xaa, 0x04, 0x0023}, |
| 2518 | {0xaa, 0x05, 0x00aa}, |
| 2519 | {0xaa, 0x06, 0x000d}, |
| 2520 | {0xaa, 0x08, 0x0000}, |
| 2521 | {0xaa, 0x03, 0x000a}, |
| 2522 | {0xaa, 0x04, 0x0025}, |
| 2523 | {0xaa, 0x05, 0x00aa}, |
| 2524 | {0xaa, 0x06, 0x0005}, |
| 2525 | {0xaa, 0x08, 0x0000}, |
| 2526 | {0xaa, 0x03, 0x000b}, |
| 2527 | {0xaa, 0x04, 0x00ec}, |
| 2528 | {0xaa, 0x05, 0x002e}, |
| 2529 | {0xaa, 0x06, 0x0005}, |
| 2530 | {0xaa, 0x08, 0x0000}, |
| 2531 | {0xaa, 0x03, 0x000c}, |
| 2532 | {0xaa, 0x04, 0x00fa}, |
| 2533 | {0xaa, 0x05, 0x002a}, |
| 2534 | {0xaa, 0x06, 0x0005}, |
| 2535 | {0xaa, 0x08, 0x0000}, |
| 2536 | {0xaa, 0x07, 0x000d}, |
| 2537 | {0xaa, 0x01, 0x0005}, |
| 2538 | {0xaa, 0x94, 0x0002}, |
| 2539 | {0xaa, 0x90, 0x0000}, |
| 2540 | {0xaa, 0x91, 0x0010}, |
| 2541 | {0xaa, 0x10, 0x0064}, |
| 2542 | {0xaa, 0x9b, 0x00f0}, |
| 2543 | {0xaa, 0x9c, 0x0002}, |
| 2544 | {0xaa, 0x14, 0x001a}, |
| 2545 | {0xaa, 0x20, 0x0080}, |
| 2546 | {0xaa, 0x22, 0x0080}, |
| 2547 | {0xaa, 0x24, 0x0080}, |
| 2548 | {0xaa, 0x26, 0x0080}, |
| 2549 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2550 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2551 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2552 | {0xaa, 0xa8, 0x0080}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2553 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2554 | {0xa1, 0x01, 0x0002}, |
| 2555 | {0xa1, 0x01, 0x0008}, |
| 2556 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2557 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2558 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2559 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2560 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2561 | {0xa1, 0x01, 0x0008}, |
| 2562 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2563 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 2564 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2565 | {0xa1, 0x01, 0x01c8}, |
| 2566 | {0xa1, 0x01, 0x01c9}, |
| 2567 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2568 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2569 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2570 | {0xa0, 0x52, ZC3XX_R10A_RGB00}, /* matrix */ |
| 2571 | {0xa0, 0xf7, ZC3XX_R10B_RGB01}, |
| 2572 | {0xa0, 0xf7, ZC3XX_R10C_RGB02}, |
| 2573 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 2574 | {0xa0, 0x52, ZC3XX_R10E_RGB11}, |
| 2575 | {0xa0, 0xf7, ZC3XX_R10F_RGB12}, |
| 2576 | {0xa0, 0xf7, ZC3XX_R110_RGB20}, |
| 2577 | {0xa0, 0xf7, ZC3XX_R111_RGB21}, |
| 2578 | {0xa0, 0x52, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2579 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2580 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2581 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2582 | {0xaa, 0x0d, 0x0003}, |
| 2583 | {0xaa, 0x0c, 0x0020}, |
| 2584 | {0xaa, 0x0e, 0x000e}, |
| 2585 | {0xaa, 0x0f, 0x0002}, |
| 2586 | {0xaa, 0x1c, 0x000d}, |
| 2587 | {0xaa, 0x1d, 0x0002}, |
| 2588 | {0xaa, 0x20, 0x0080}, |
| 2589 | {0xaa, 0x22, 0x0080}, |
| 2590 | {0xaa, 0x24, 0x0080}, |
| 2591 | {0xaa, 0x26, 0x0080}, |
| 2592 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2593 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 2594 | {0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 2595 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2596 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2597 | {0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2598 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2599 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 2600 | {0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2601 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 2602 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2603 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2604 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2605 | {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0}, |
| 2606 | {0xa0, 0xd8, ZC3XX_R01E_HSYNC_1}, |
| 2607 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, |
| 2608 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 2609 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 2610 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2611 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2612 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2613 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2614 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2615 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2616 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2617 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2618 | static const struct usb_action icm105a_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2619 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2620 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2621 | {0xaa, 0x0c, 0x0020}, /* 00,0c,20,aa */ |
| 2622 | {0xaa, 0x0e, 0x000e}, /* 00,0e,0e,aa */ |
| 2623 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2624 | {0xaa, 0x1c, 0x000d}, /* 00,1c,0d,aa */ |
| 2625 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2626 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2627 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2628 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2629 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2630 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2631 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2632 | {0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,0d,cc */ |
| 2633 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2634 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2635 | {0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,1a,cc */ |
| 2636 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2637 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2638 | {0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,4b,cc */ |
| 2639 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2640 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2641 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 2642 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */ |
| 2643 | {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c8,cc */ |
| 2644 | {0xa0, 0xd8, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d8,cc */ |
| 2645 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */ |
| 2646 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2647 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2648 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2649 | static const struct usb_action icm105a_50HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2650 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2651 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2652 | {0xaa, 0x0c, 0x008c}, /* 00,0c,8c,aa */ |
| 2653 | {0xaa, 0x0e, 0x0095}, /* 00,0e,95,aa */ |
| 2654 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2655 | {0xaa, 0x1c, 0x0094}, /* 00,1c,94,aa */ |
| 2656 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2657 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2658 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2659 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2660 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2661 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2662 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2663 | {0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,94,cc */ |
| 2664 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2665 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2666 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */ |
| 2667 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2668 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2669 | {0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,84,cc */ |
| 2670 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2671 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2672 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 2673 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */ |
| 2674 | {0xa0, 0xe3, ZC3XX_R01D_HSYNC_0}, /* 00,1d,e3,cc */ |
| 2675 | {0xa0, 0xec, ZC3XX_R01E_HSYNC_1}, /* 00,1e,ec,cc */ |
| 2676 | {0xa0, 0xf5, ZC3XX_R01F_HSYNC_2}, /* 00,1f,f5,cc */ |
| 2677 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 2678 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */ |
| 2679 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2680 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2681 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2682 | static const struct usb_action icm105a_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2683 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2684 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2685 | {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */ |
| 2686 | {0xaa, 0x0e, 0x000d}, /* 00,0e,0d,aa */ |
| 2687 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2688 | {0xaa, 0x1c, 0x0008}, /* 00,1c,08,aa */ |
| 2689 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2690 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2691 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2692 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2693 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2694 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2695 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2696 | {0xa0, 0x08, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,08,cc */ |
| 2697 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2698 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2699 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,10,cc */ |
| 2700 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2701 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2702 | {0xa0, 0x41, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,41,cc */ |
| 2703 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2704 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2705 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 2706 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */ |
| 2707 | {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */ |
| 2708 | {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */ |
| 2709 | {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */ |
| 2710 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2711 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2712 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2713 | static const struct usb_action icm105a_60HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2714 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2715 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2716 | {0xaa, 0x0c, 0x0008}, /* 00,0c,08,aa */ |
| 2717 | {0xaa, 0x0e, 0x0086}, /* 00,0e,86,aa */ |
| 2718 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2719 | {0xaa, 0x1c, 0x0085}, /* 00,1c,85,aa */ |
| 2720 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2721 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2722 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2723 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2724 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2725 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2726 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2727 | {0xa0, 0x85, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,85,cc */ |
| 2728 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2729 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2730 | {0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,08,cc */ |
| 2731 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2732 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2733 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,81,cc */ |
| 2734 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2735 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2736 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 2737 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */ |
| 2738 | {0xa0, 0xc2, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c2,cc */ |
| 2739 | {0xa0, 0xd6, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d6,cc */ |
| 2740 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */ |
| 2741 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 2742 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */ |
| 2743 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2744 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2745 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2746 | static const struct usb_action icm105a_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2747 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2748 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2749 | {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */ |
| 2750 | {0xaa, 0x0e, 0x000d}, /* 00,0e,0d,aa */ |
| 2751 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2752 | {0xaa, 0x1c, 0x0000}, /* 00,1c,00,aa */ |
| 2753 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2754 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2755 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2756 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2757 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2758 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2759 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2760 | {0xa0, 0x00, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,00,cc */ |
| 2761 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2762 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2763 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */ |
| 2764 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2765 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2766 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 2767 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2768 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2769 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 2770 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 2771 | {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */ |
| 2772 | {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */ |
| 2773 | {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */ |
| 2774 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2775 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2776 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2777 | static const struct usb_action icm105a_NoFlikerScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2778 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2779 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2780 | {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */ |
| 2781 | {0xaa, 0x0e, 0x0081}, /* 00,0e,81,aa */ |
| 2782 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2783 | {0xaa, 0x1c, 0x0080}, /* 00,1c,80,aa */ |
| 2784 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2785 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2786 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2787 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2788 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2789 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2790 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2791 | {0xa0, 0x80, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,80,cc */ |
| 2792 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2793 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2794 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */ |
| 2795 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2796 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2797 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 2798 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2799 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2800 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 2801 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 2802 | {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */ |
| 2803 | {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */ |
| 2804 | {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */ |
| 2805 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 2806 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */ |
| 2807 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2808 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2809 | }; |
| 2810 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2811 | static const struct usb_action MC501CB_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2812 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 2813 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc */ |
| 2814 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 2815 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 2816 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 2817 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 2818 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 2819 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 2820 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 2821 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 2822 | {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d8,cc */ |
| 2823 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 2824 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 2825 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 2826 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 2827 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
| 2828 | {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,de,cc */ |
| 2829 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 2830 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 2831 | {0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,33,cc */ |
| 2832 | {0xa0, 0x34, ZC3XX_R087_EXPTIMEMID}, /* 00,87,34,cc */ |
| 2833 | {0xa0, 0x35, ZC3XX_R088_EXPTIMELOW}, /* 00,88,35,cc */ |
| 2834 | {0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,b0,cc */ |
| 2835 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2836 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2837 | {0xaa, 0x01, 0x0003}, /* 00,01,03,aa */ |
| 2838 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2839 | {0xaa, 0x03, 0x0000}, /* 00,03,00,aa */ |
| 2840 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 2841 | {0xaa, 0x11, 0x0080}, /* 00,11,80,aa */ |
| 2842 | {0xaa, 0x12, 0x0000}, /* 00,12,00,aa */ |
| 2843 | {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */ |
| 2844 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 2845 | {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */ |
| 2846 | {0xaa, 0x16, 0x0000}, /* 00,16,00,aa */ |
| 2847 | {0xaa, 0x17, 0x0001}, /* 00,17,01,aa */ |
| 2848 | {0xaa, 0x18, 0x00de}, /* 00,18,de,aa */ |
| 2849 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 2850 | {0xaa, 0x1a, 0x0086}, /* 00,1a,86,aa */ |
| 2851 | {0xaa, 0x20, 0x00a8}, /* 00,20,a8,aa */ |
| 2852 | {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */ |
| 2853 | {0xaa, 0x23, 0x0000}, /* 00,23,00,aa */ |
| 2854 | {0xaa, 0x24, 0x0000}, /* 00,24,00,aa */ |
| 2855 | {0xaa, 0x40, 0x0033}, /* 00,40,33,aa */ |
| 2856 | {0xaa, 0x41, 0x0077}, /* 00,41,77,aa */ |
| 2857 | {0xaa, 0x42, 0x0053}, /* 00,42,53,aa */ |
| 2858 | {0xaa, 0x43, 0x00b0}, /* 00,43,b0,aa */ |
| 2859 | {0xaa, 0x4b, 0x0001}, /* 00,4b,01,aa */ |
| 2860 | {0xaa, 0x72, 0x0020}, /* 00,72,20,aa */ |
| 2861 | {0xaa, 0x73, 0x0000}, /* 00,73,00,aa */ |
| 2862 | {0xaa, 0x80, 0x0000}, /* 00,80,00,aa */ |
| 2863 | {0xaa, 0x85, 0x0050}, /* 00,85,50,aa */ |
| 2864 | {0xaa, 0x91, 0x0070}, /* 00,91,70,aa */ |
| 2865 | {0xaa, 0x92, 0x0072}, /* 00,92,72,aa */ |
| 2866 | {0xaa, 0x03, 0x0001}, /* 00,03,01,aa */ |
| 2867 | {0xaa, 0x10, 0x00a0}, /* 00,10,a0,aa */ |
| 2868 | {0xaa, 0x11, 0x0001}, /* 00,11,01,aa */ |
| 2869 | {0xaa, 0x30, 0x0000}, /* 00,30,00,aa */ |
| 2870 | {0xaa, 0x60, 0x0000}, /* 00,60,00,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2871 | {0xaa, 0xa0, ZC3XX_R01A_LASTFRAMESTATE}, /* 00,a0,1a,aa */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2872 | {0xaa, 0xa1, 0x0000}, /* 00,a1,00,aa */ |
| 2873 | {0xaa, 0xa2, 0x003f}, /* 00,a2,3f,aa */ |
| 2874 | {0xaa, 0xa3, 0x0028}, /* 00,a3,28,aa */ |
| 2875 | {0xaa, 0xa4, 0x0010}, /* 00,a4,10,aa */ |
| 2876 | {0xaa, 0xa5, 0x0020}, /* 00,a5,20,aa */ |
| 2877 | {0xaa, 0xb1, 0x0044}, /* 00,b1,44,aa */ |
| 2878 | {0xaa, 0xd0, 0x0001}, /* 00,d0,01,aa */ |
| 2879 | {0xaa, 0xd1, 0x0085}, /* 00,d1,85,aa */ |
| 2880 | {0xaa, 0xd2, 0x0080}, /* 00,d2,80,aa */ |
| 2881 | {0xaa, 0xd3, 0x0080}, /* 00,d3,80,aa */ |
| 2882 | {0xaa, 0xd4, 0x0080}, /* 00,d4,80,aa */ |
| 2883 | {0xaa, 0xd5, 0x0080}, /* 00,d5,80,aa */ |
| 2884 | {0xaa, 0xc0, 0x00c3}, /* 00,c0,c3,aa */ |
| 2885 | {0xaa, 0xc2, 0x0044}, /* 00,c2,44,aa */ |
| 2886 | {0xaa, 0xc4, 0x0040}, /* 00,c4,40,aa */ |
| 2887 | {0xaa, 0xc5, 0x0020}, /* 00,c5,20,aa */ |
| 2888 | {0xaa, 0xc6, 0x0008}, /* 00,c6,08,aa */ |
| 2889 | {0xaa, 0x03, 0x0004}, /* 00,03,04,aa */ |
| 2890 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 2891 | {0xaa, 0x40, 0x0030}, /* 00,40,30,aa */ |
| 2892 | {0xaa, 0x41, 0x0020}, /* 00,41,20,aa */ |
| 2893 | {0xaa, 0x42, 0x002d}, /* 00,42,2d,aa */ |
| 2894 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 2895 | {0xaa, 0x1c, 0x0050}, /* 00,1C,50,aa */ |
| 2896 | {0xaa, 0x11, 0x0081}, /* 00,11,81,aa */ |
| 2897 | {0xaa, 0x3b, 0x001d}, /* 00,3b,1D,aa */ |
| 2898 | {0xaa, 0x3c, 0x004c}, /* 00,3c,4C,aa */ |
| 2899 | {0xaa, 0x3d, 0x0018}, /* 00,3d,18,aa */ |
| 2900 | {0xaa, 0x3e, 0x006a}, /* 00,3e,6A,aa */ |
| 2901 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 2902 | {0xaa, 0x52, 0x00ff}, /* 00,52,FF,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2903 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 2904 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 2905 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
| 2906 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 2907 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 2908 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 2909 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 2910 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 2911 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2912 | {0xaa, 0x03, 0x0002}, /* 00,03,02,aa */ |
| 2913 | {0xaa, 0x51, 0x0027}, /* 00,51,27,aa */ |
| 2914 | {0xaa, 0x52, 0x0020}, /* 00,52,20,aa */ |
| 2915 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 2916 | {0xaa, 0x50, 0x0010}, /* 00,50,10,aa */ |
| 2917 | {0xaa, 0x51, 0x0010}, /* 00,51,10,aa */ |
| 2918 | {0xaa, 0x54, 0x0010}, /* 00,54,10,aa */ |
| 2919 | {0xaa, 0x55, 0x0010}, /* 00,55,10,aa */ |
| 2920 | {0xa0, 0xf0, 0x0199}, /* 01,99,F0,cc */ |
| 2921 | {0xa0, 0x80, 0x019a}, /* 01,9A,80,cc */ |
| 2922 | |
| 2923 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 2924 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 2925 | {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */ |
| 2926 | {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */ |
| 2927 | {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2928 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2929 | }; |
| 2930 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 2931 | static const struct usb_action MC501CB_Initial[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2932 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 2933 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 2934 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 2935 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 2936 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 2937 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 2938 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 2939 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 2940 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 2941 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 2942 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ |
| 2943 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 2944 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 2945 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 2946 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 2947 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
| 2948 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d8,cc */ |
| 2949 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 2950 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 2951 | {0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,33,cc */ |
| 2952 | {0xa0, 0x34, ZC3XX_R087_EXPTIMEMID}, /* 00,87,34,cc */ |
| 2953 | {0xa0, 0x35, ZC3XX_R088_EXPTIMELOW}, /* 00,88,35,cc */ |
| 2954 | {0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,b0,cc */ |
| 2955 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2956 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2957 | {0xaa, 0x01, 0x0003}, /* 00,01,03,aa */ |
| 2958 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2959 | {0xaa, 0x03, 0x0000}, /* 00,03,00,aa */ |
| 2960 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 2961 | {0xaa, 0x11, 0x0080}, /* 00,11,80,aa */ |
| 2962 | {0xaa, 0x12, 0x0000}, /* 00,12,00,aa */ |
| 2963 | {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */ |
| 2964 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 2965 | {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */ |
| 2966 | {0xaa, 0x16, 0x0000}, /* 00,16,00,aa */ |
| 2967 | {0xaa, 0x17, 0x0001}, /* 00,17,01,aa */ |
| 2968 | {0xaa, 0x18, 0x00d8}, /* 00,18,d8,aa */ |
| 2969 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 2970 | {0xaa, 0x1a, 0x0088}, /* 00,1a,88,aa */ |
| 2971 | {0xaa, 0x20, 0x00a8}, /* 00,20,a8,aa */ |
| 2972 | {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */ |
| 2973 | {0xaa, 0x23, 0x0000}, /* 00,23,00,aa */ |
| 2974 | {0xaa, 0x24, 0x0000}, /* 00,24,00,aa */ |
| 2975 | {0xaa, 0x40, 0x0033}, /* 00,40,33,aa */ |
| 2976 | {0xaa, 0x41, 0x0077}, /* 00,41,77,aa */ |
| 2977 | {0xaa, 0x42, 0x0053}, /* 00,42,53,aa */ |
| 2978 | {0xaa, 0x43, 0x00b0}, /* 00,43,b0,aa */ |
| 2979 | {0xaa, 0x4b, 0x0001}, /* 00,4b,01,aa */ |
| 2980 | {0xaa, 0x72, 0x0020}, /* 00,72,20,aa */ |
| 2981 | {0xaa, 0x73, 0x0000}, /* 00,73,00,aa */ |
| 2982 | {0xaa, 0x80, 0x0000}, /* 00,80,00,aa */ |
| 2983 | {0xaa, 0x85, 0x0050}, /* 00,85,50,aa */ |
| 2984 | {0xaa, 0x91, 0x0070}, /* 00,91,70,aa */ |
| 2985 | {0xaa, 0x92, 0x0072}, /* 00,92,72,aa */ |
| 2986 | {0xaa, 0x03, 0x0001}, /* 00,03,01,aa */ |
| 2987 | {0xaa, 0x10, 0x00a0}, /* 00,10,a0,aa */ |
| 2988 | {0xaa, 0x11, 0x0001}, /* 00,11,01,aa */ |
| 2989 | {0xaa, 0x30, 0x0000}, /* 00,30,00,aa */ |
| 2990 | {0xaa, 0x60, 0x0000}, /* 00,60,00,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2991 | {0xaa, 0xa0, ZC3XX_R01A_LASTFRAMESTATE}, /* 00,a0,1a,aa */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2992 | {0xaa, 0xa1, 0x0000}, /* 00,a1,00,aa */ |
| 2993 | {0xaa, 0xa2, 0x003f}, /* 00,a2,3f,aa */ |
| 2994 | {0xaa, 0xa3, 0x0028}, /* 00,a3,28,aa */ |
| 2995 | {0xaa, 0xa4, 0x0010}, /* 00,a4,10,aa */ |
| 2996 | {0xaa, 0xa5, 0x0020}, /* 00,a5,20,aa */ |
| 2997 | {0xaa, 0xb1, 0x0044}, /* 00,b1,44,aa */ |
| 2998 | {0xaa, 0xd0, 0x0001}, /* 00,d0,01,aa */ |
| 2999 | {0xaa, 0xd1, 0x0085}, /* 00,d1,85,aa */ |
| 3000 | {0xaa, 0xd2, 0x0080}, /* 00,d2,80,aa */ |
| 3001 | {0xaa, 0xd3, 0x0080}, /* 00,d3,80,aa */ |
| 3002 | {0xaa, 0xd4, 0x0080}, /* 00,d4,80,aa */ |
| 3003 | {0xaa, 0xd5, 0x0080}, /* 00,d5,80,aa */ |
| 3004 | {0xaa, 0xc0, 0x00c3}, /* 00,c0,c3,aa */ |
| 3005 | {0xaa, 0xc2, 0x0044}, /* 00,c2,44,aa */ |
| 3006 | {0xaa, 0xc4, 0x0040}, /* 00,c4,40,aa */ |
| 3007 | {0xaa, 0xc5, 0x0020}, /* 00,c5,20,aa */ |
| 3008 | {0xaa, 0xc6, 0x0008}, /* 00,c6,08,aa */ |
| 3009 | {0xaa, 0x03, 0x0004}, /* 00,03,04,aa */ |
| 3010 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 3011 | {0xaa, 0x40, 0x0030}, /* 00,40,30,aa */ |
| 3012 | {0xaa, 0x41, 0x0020}, /* 00,41,20,aa */ |
| 3013 | {0xaa, 0x42, 0x002d}, /* 00,42,2d,aa */ |
| 3014 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3015 | {0xaa, 0x1c, 0x0050}, /* 00,1c,50,aa */ |
| 3016 | {0xaa, 0x11, 0x0081}, /* 00,11,81,aa */ |
| 3017 | {0xaa, 0x3b, 0x003a}, /* 00,3b,3A,aa */ |
| 3018 | {0xaa, 0x3c, 0x0098}, /* 00,3c,98,aa */ |
| 3019 | {0xaa, 0x3d, 0x0030}, /* 00,3d,30,aa */ |
| 3020 | {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */ |
| 3021 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 3022 | {0xaa, 0x52, 0x00ff}, /* 00,52,FF,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3023 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 3024 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 3025 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
| 3026 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 3027 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 3028 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 3029 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 3030 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 3031 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3032 | {0xaa, 0x03, 0x0002}, /* 00,03,02,aa */ |
| 3033 | {0xaa, 0x51, 0x004e}, /* 00,51,4E,aa */ |
| 3034 | {0xaa, 0x52, 0x0041}, /* 00,52,41,aa */ |
| 3035 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3036 | {0xaa, 0x50, 0x0010}, /* 00,50,10,aa */ |
| 3037 | {0xaa, 0x51, 0x0010}, /* 00,51,10,aa */ |
| 3038 | {0xaa, 0x54, 0x0010}, /* 00,54,10,aa */ |
| 3039 | {0xaa, 0x55, 0x0010}, /* 00,55,10,aa */ |
| 3040 | {0xa0, 0xf0, 0x0199}, /* 01,99,F0,cc */ |
| 3041 | {0xa0, 0x80, 0x019a}, /* 01,9A,80,cc */ |
| 3042 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3043 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3044 | {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */ |
| 3045 | {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */ |
| 3046 | {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3047 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3048 | }; |
| 3049 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3050 | static const struct usb_action MC501CB_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3051 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3052 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3053 | {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */ |
| 3054 | {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */ |
| 3055 | {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */ |
| 3056 | {0xaa, 0x3c, 0x004c}, /* 00,3C,4C,aa */ |
| 3057 | {0xaa, 0x3d, 0x001d}, /* 00,3D,1D,aa */ |
| 3058 | {0xaa, 0x3e, 0x004c}, /* 00,3E,4C,aa */ |
| 3059 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3060 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3061 | {0xaa, 0x36, 0x003a}, /* 00,36,3A,aa */ |
| 3062 | {0xaa, 0x37, 0x0098}, /* 00,37,98,aa */ |
| 3063 | {0xaa, 0x3b, 0x003a}, /* 00,3B,3A,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3064 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3065 | }; |
| 3066 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3067 | static const struct usb_action MC501CB_50HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3068 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3069 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3070 | {0xaa, 0x36, 0x003a}, /* 00,36,3A,aa */ |
| 3071 | {0xaa, 0x37, 0x0098}, /* 00,37,98,aa */ |
| 3072 | {0xaa, 0x3b, 0x003a}, /* 00,3B,3A,aa */ |
| 3073 | {0xaa, 0x3c, 0x0098}, /* 00,3C,98,aa */ |
| 3074 | {0xaa, 0x3d, 0x003a}, /* 00,3D,3A,aa */ |
| 3075 | {0xaa, 0x3e, 0x0098}, /* 00,3E,98,aa */ |
| 3076 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3077 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3078 | {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */ |
| 3079 | {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */ |
| 3080 | {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3081 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3082 | }; |
| 3083 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3084 | static const struct usb_action MC501CB_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3085 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3086 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3087 | {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */ |
| 3088 | {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */ |
| 3089 | {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */ |
| 3090 | {0xaa, 0x3e, 0x006a}, /* 00,3E,6A,aa */ |
| 3091 | {0xaa, 0x3b, 0x0018}, /* 00,3B,18,aa */ |
| 3092 | {0xaa, 0x3c, 0x006a}, /* 00,3C,6A,aa */ |
| 3093 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3094 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3095 | {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */ |
| 3096 | {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */ |
| 3097 | {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3098 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3099 | }; |
| 3100 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3101 | static const struct usb_action MC501CB_60HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3102 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3103 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3104 | {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */ |
| 3105 | {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */ |
| 3106 | {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */ |
| 3107 | {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */ |
| 3108 | {0xaa, 0x3b, 0x0030}, /* 00,3B,30,aa */ |
| 3109 | {0xaa, 0x3c, 0x00d4}, /* 00,3C,D4,aa */ |
| 3110 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3111 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3112 | {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */ |
| 3113 | {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */ |
| 3114 | {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3115 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3116 | }; |
| 3117 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3118 | static const struct usb_action MC501CB_NoFliker[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3119 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3120 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3121 | {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */ |
| 3122 | {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */ |
| 3123 | {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */ |
| 3124 | {0xaa, 0x3e, 0x006a}, /* 00,3E,6A,aa */ |
| 3125 | {0xaa, 0x3b, 0x0018}, /* 00,3B,18,aa */ |
| 3126 | {0xaa, 0x3c, 0x006a}, /* 00,3C,6A,aa */ |
| 3127 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3128 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3129 | {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */ |
| 3130 | {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */ |
| 3131 | {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3132 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3133 | }; |
| 3134 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3135 | static const struct usb_action MC501CB_NoFlikerScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3136 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3137 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3138 | {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */ |
| 3139 | {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */ |
| 3140 | {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */ |
| 3141 | {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */ |
| 3142 | {0xaa, 0x3b, 0x0030}, /* 00,3B,30,aa */ |
| 3143 | {0xaa, 0x3c, 0x00d4}, /* 00,3C,D4,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3144 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3145 | }; |
| 3146 | |
| 3147 | /* from zs211.inf - HKR,%OV7620%,Initial - 640x480 */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3148 | static const struct usb_action OV7620_mode0[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3149 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 3150 | {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, /* 00,02,40,cc */ |
| 3151 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,00,cc */ |
| 3152 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 3153 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,06,cc */ |
| 3154 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, /* 00,83,02,cc */ |
| 3155 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, /* 00,85,01,cc */ |
| 3156 | {0xa0, 0x80, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,80,cc */ |
| 3157 | {0xa0, 0x81, ZC3XX_R087_EXPTIMEMID}, /* 00,87,81,cc */ |
| 3158 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, /* 00,88,10,cc */ |
| 3159 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,a1,cc */ |
| 3160 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 3161 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 3162 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 3163 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 3164 | {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d8,cc */ |
| 3165 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 3166 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 3167 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 3168 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 3169 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 3170 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 3171 | {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,de,cc */ |
| 3172 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3173 | {0xaa, 0x12, 0x0088}, /* 00,12,88,aa */ |
| 3174 | {0xaa, 0x12, 0x0048}, /* 00,12,48,aa */ |
| 3175 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3176 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3177 | {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */ |
| 3178 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 3179 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 3180 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
| 3181 | {0xaa, 0x17, 0x0018}, /* 00,17,18,aa */ |
| 3182 | {0xaa, 0x18, 0x00ba}, /* 00,18,ba,aa */ |
| 3183 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 3184 | {0xaa, 0x1a, 0x00f1}, /* 00,1a,f1,aa */ |
| 3185 | {0xaa, 0x20, 0x0040}, /* 00,20,40,aa */ |
| 3186 | {0xaa, 0x24, 0x0088}, /* 00,24,88,aa */ |
| 3187 | {0xaa, 0x25, 0x0078}, /* 00,25,78,aa */ |
| 3188 | {0xaa, 0x27, 0x00f6}, /* 00,27,f6,aa */ |
| 3189 | {0xaa, 0x28, 0x00a0}, /* 00,28,a0,aa */ |
| 3190 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 3191 | {0xaa, 0x2a, 0x0083}, /* 00,2a,83,aa */ |
| 3192 | {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */ |
| 3193 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
| 3194 | {0xaa, 0x74, 0x0020}, /* 00,74,20,aa */ |
| 3195 | {0xaa, 0x61, 0x0068}, /* 00,61,68,aa */ |
| 3196 | {0xaa, 0x64, 0x0088}, /* 00,64,88,aa */ |
| 3197 | {0xaa, 0x00, 0x0000}, /* 00,00,00,aa */ |
| 3198 | {0xaa, 0x06, 0x0080}, /* 00,06,80,aa */ |
| 3199 | {0xaa, 0x01, 0x0090}, /* 00,01,90,aa */ |
| 3200 | {0xaa, 0x02, 0x0030}, /* 00,02,30,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3201 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,77,cc */ |
| 3202 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 3203 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 3204 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3205 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3206 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 3207 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 3208 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 3209 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 3210 | {0xa0, 0x68, ZC3XX_R116_RGAIN}, /* 01,16,68,cc */ |
| 3211 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 3212 | {0xa0, 0x40, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,40,cc */ |
| 3213 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 3214 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,50,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3215 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3216 | }; |
| 3217 | |
| 3218 | /* from zs211.inf - HKR,%OV7620%,InitialScale - 320x240 */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3219 | static const struct usb_action OV7620_mode1[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3220 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 3221 | {0xa0, 0x50, ZC3XX_R002_CLOCKSELECT}, /* 00,02,50,cc */ |
| 3222 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,00,cc */ |
| 3223 | /* mx change? */ |
| 3224 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 3225 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,06,cc */ |
| 3226 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, /* 00,83,02,cc */ |
| 3227 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, /* 00,85,01,cc */ |
| 3228 | {0xa0, 0x80, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,80,cc */ |
| 3229 | {0xa0, 0x81, ZC3XX_R087_EXPTIMEMID}, /* 00,87,81,cc */ |
| 3230 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, /* 00,88,10,cc */ |
| 3231 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,a1,cc */ |
| 3232 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 3233 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 3234 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 3235 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 3236 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ |
| 3237 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 3238 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 3239 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 3240 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 3241 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 3242 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 3243 | {0xa0, 0xd6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d6,cc */ |
| 3244 | /* OV7648 00,9c,d8,cc */ |
| 3245 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3246 | {0xaa, 0x12, 0x0088}, /* 00,12,88,aa */ |
| 3247 | {0xaa, 0x12, 0x0048}, /* 00,12,48,aa */ |
| 3248 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3249 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3250 | {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */ |
| 3251 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 3252 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 3253 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
| 3254 | {0xaa, 0x24, 0x0088}, /* 00,24,88,aa */ |
| 3255 | {0xaa, 0x25, 0x0078}, /* 00,25,78,aa */ |
| 3256 | {0xaa, 0x17, 0x0018}, /* 00,17,18,aa */ |
| 3257 | {0xaa, 0x18, 0x00ba}, /* 00,18,ba,aa */ |
| 3258 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 3259 | {0xaa, 0x1a, 0x00f2}, /* 00,1a,f2,aa */ |
| 3260 | {0xaa, 0x20, 0x0040}, /* 00,20,40,aa */ |
| 3261 | {0xaa, 0x27, 0x00f6}, /* 00,27,f6,aa */ |
| 3262 | {0xaa, 0x28, 0x00a0}, /* 00,28,a0,aa */ |
| 3263 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 3264 | {0xaa, 0x2a, 0x0083}, /* 00,2a,83,aa */ |
| 3265 | {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */ |
| 3266 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
| 3267 | {0xaa, 0x74, 0x0020}, /* 00,74,20,aa */ |
| 3268 | {0xaa, 0x61, 0x0068}, /* 00,61,68,aa */ |
| 3269 | {0xaa, 0x64, 0x0088}, /* 00,64,88,aa */ |
| 3270 | {0xaa, 0x00, 0x0000}, /* 00,00,00,aa */ |
| 3271 | {0xaa, 0x06, 0x0080}, /* 00,06,80,aa */ |
| 3272 | {0xaa, 0x01, 0x0090}, /* 00,01,90,aa */ |
| 3273 | {0xaa, 0x02, 0x0030}, /* 00,02,30,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3274 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,77,cc */ |
| 3275 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 3276 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 3277 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 3278 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
| 3279 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 3280 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 3281 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 3282 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 3283 | {0xa0, 0x68, ZC3XX_R116_RGAIN}, /* 01,16,68,cc */ |
| 3284 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 3285 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,50,cc */ |
| 3286 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 3287 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,50,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3288 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3289 | }; |
| 3290 | |
| 3291 | /* from zs211.inf - HKR,%OV7620%\AE,50HZ */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3292 | static const struct usb_action OV7620_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3293 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3294 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 3295 | {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */ |
| 3296 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3297 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3298 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3299 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 3300 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 3301 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3302 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3303 | {0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,83,cc */ |
| 3304 | {0xaa, 0x10, 0x0082}, /* 00,10,82,aa */ |
| 3305 | {0xaa, 0x76, 0x0003}, /* 00,76,03,aa */ |
| 3306 | /* {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, * 00,02,40,cc |
| 3307 | if mode0 (640x480) */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3308 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3309 | }; |
| 3310 | |
| 3311 | /* from zs211.inf - HKR,%OV7620%\AE,60HZ */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3312 | static const struct usb_action OV7620_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3313 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3314 | /* (bug in zs211.inf) */ |
| 3315 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 3316 | {0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */ |
| 3317 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3318 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
| 3319 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3320 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 3321 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 3322 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3323 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3324 | {0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,83,cc */ |
| 3325 | {0xaa, 0x10, 0x0020}, /* 00,10,20,aa */ |
| 3326 | {0xaa, 0x76, 0x0003}, /* 00,76,03,aa */ |
| 3327 | /* {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, * 00,02,40,cc |
| 3328 | * if mode0 (640x480) */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3329 | /* ?? in gspca v1, it was |
| 3330 | {0xa0, 0x00, 0x0039}, * 00,00,00,dd * |
| 3331 | {0xa1, 0x01, 0x0037}, */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3332 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3333 | }; |
| 3334 | |
| 3335 | /* from zs211.inf - HKR,%OV7620%\AE,NoFliker */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3336 | static const struct usb_action OV7620_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3337 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3338 | /* (bug in zs211.inf) */ |
| 3339 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 3340 | {0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */ |
| 3341 | {0xaa, 0x75, 0x008e}, /* 00,75,8e,aa */ |
| 3342 | {0xaa, 0x2d, 0x0001}, /* 00,2d,01,aa */ |
| 3343 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3344 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 3345 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 3346 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3347 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3348 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,01,cc */ |
| 3349 | /* {0xa0, 0x44, ZC3XX_R002_CLOCKSELECT}, * 00,02,44,cc |
| 3350 | - if mode1 (320x240) */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3351 | /* ?? was |
| 3352 | {0xa0, 0x00, 0x0039}, * 00,00,00,dd * |
| 3353 | {0xa1, 0x01, 0x0037}, */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3354 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3355 | }; |
| 3356 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3357 | static const struct usb_action ov7630c_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3358 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 3359 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 3360 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 3361 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 3362 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3363 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 3364 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, |
| 3365 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 3366 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
| 3367 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3368 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3369 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3370 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 3371 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3372 | {0xaa, 0x12, 0x0080}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3373 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, |
| 3374 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, |
| 3375 | {0xa0, 0x90, ZC3XX_R086_EXPTIMEHIGH}, |
| 3376 | {0xa0, 0x91, ZC3XX_R087_EXPTIMEMID}, |
| 3377 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, |
| 3378 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 3379 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 3380 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3381 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 3382 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3383 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3384 | {0xaa, 0x12, 0x0069}, |
| 3385 | {0xaa, 0x04, 0x0020}, |
| 3386 | {0xaa, 0x06, 0x0050}, |
| 3387 | {0xaa, 0x13, 0x0083}, |
| 3388 | {0xaa, 0x14, 0x0000}, |
| 3389 | {0xaa, 0x15, 0x0024}, |
| 3390 | {0xaa, 0x17, 0x0018}, |
| 3391 | {0xaa, 0x18, 0x00ba}, |
| 3392 | {0xaa, 0x19, 0x0002}, |
| 3393 | {0xaa, 0x1a, 0x00f6}, |
| 3394 | {0xaa, 0x1b, 0x0002}, |
| 3395 | {0xaa, 0x20, 0x00c2}, |
| 3396 | {0xaa, 0x24, 0x0060}, |
| 3397 | {0xaa, 0x25, 0x0040}, |
| 3398 | {0xaa, 0x26, 0x0030}, |
| 3399 | {0xaa, 0x27, 0x00ea}, |
| 3400 | {0xaa, 0x28, 0x00a0}, |
| 3401 | {0xaa, 0x21, 0x0000}, |
| 3402 | {0xaa, 0x2a, 0x0081}, |
| 3403 | {0xaa, 0x2b, 0x0096}, |
| 3404 | {0xaa, 0x2d, 0x0094}, |
| 3405 | {0xaa, 0x2f, 0x003d}, |
| 3406 | {0xaa, 0x30, 0x0024}, |
| 3407 | {0xaa, 0x60, 0x0000}, |
| 3408 | {0xaa, 0x61, 0x0040}, |
| 3409 | {0xaa, 0x68, 0x007c}, |
| 3410 | {0xaa, 0x6f, 0x0015}, |
| 3411 | {0xaa, 0x75, 0x0088}, |
| 3412 | {0xaa, 0x77, 0x00b5}, |
| 3413 | {0xaa, 0x01, 0x0060}, |
| 3414 | {0xaa, 0x02, 0x0060}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3415 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3416 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 3417 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 3418 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 3419 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3420 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3421 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3422 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 3423 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 3424 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 3425 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 3426 | {0xa0, 0x46, ZC3XX_R118_BGAIN}, |
| 3427 | {0xa0, 0x04, ZC3XX_R113_RGB03}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3428 | /* 0x10, */ |
| 3429 | {0xa1, 0x01, 0x0002}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3430 | {0xa0, 0x50, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3431 | {0xa0, 0xf8, ZC3XX_R10B_RGB01}, |
| 3432 | {0xa0, 0xf8, ZC3XX_R10C_RGB02}, |
| 3433 | {0xa0, 0xf8, ZC3XX_R10D_RGB10}, |
| 3434 | {0xa0, 0x50, ZC3XX_R10E_RGB11}, |
| 3435 | {0xa0, 0xf8, ZC3XX_R10F_RGB12}, |
| 3436 | {0xa0, 0xf8, ZC3XX_R110_RGB20}, |
| 3437 | {0xa0, 0xf8, ZC3XX_R111_RGB21}, |
| 3438 | {0xa0, 0x50, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3439 | /* 0x03, */ |
| 3440 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3441 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 3442 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3443 | {0xa1, 0x01, 0x01c8}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3444 | {0xa1, 0x01, 0x01c9}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3445 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3446 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 3447 | {0xa0, 0x01, ZC3XX_R120_GAMMA00}, /* gamma 2 ?*/ |
| 3448 | {0xa0, 0x0c, ZC3XX_R121_GAMMA01}, |
| 3449 | {0xa0, 0x1f, ZC3XX_R122_GAMMA02}, |
| 3450 | {0xa0, 0x3a, ZC3XX_R123_GAMMA03}, |
| 3451 | {0xa0, 0x53, ZC3XX_R124_GAMMA04}, |
| 3452 | {0xa0, 0x6d, ZC3XX_R125_GAMMA05}, |
| 3453 | {0xa0, 0x85, ZC3XX_R126_GAMMA06}, |
| 3454 | {0xa0, 0x9c, ZC3XX_R127_GAMMA07}, |
| 3455 | {0xa0, 0xb0, ZC3XX_R128_GAMMA08}, |
| 3456 | {0xa0, 0xc2, ZC3XX_R129_GAMMA09}, |
| 3457 | {0xa0, 0xd1, ZC3XX_R12A_GAMMA0A}, |
| 3458 | {0xa0, 0xde, ZC3XX_R12B_GAMMA0B}, |
| 3459 | {0xa0, 0xe9, ZC3XX_R12C_GAMMA0C}, |
| 3460 | {0xa0, 0xf2, ZC3XX_R12D_GAMMA0D}, |
| 3461 | {0xa0, 0xf9, ZC3XX_R12E_GAMMA0E}, |
| 3462 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 3463 | {0xa0, 0x05, ZC3XX_R130_GAMMA10}, |
| 3464 | {0xa0, 0x0f, ZC3XX_R131_GAMMA11}, |
| 3465 | {0xa0, 0x16, ZC3XX_R132_GAMMA12}, |
| 3466 | {0xa0, 0x1a, ZC3XX_R133_GAMMA13}, |
| 3467 | {0xa0, 0x19, ZC3XX_R134_GAMMA14}, |
| 3468 | {0xa0, 0x19, ZC3XX_R135_GAMMA15}, |
| 3469 | {0xa0, 0x17, ZC3XX_R136_GAMMA16}, |
| 3470 | {0xa0, 0x15, ZC3XX_R137_GAMMA17}, |
| 3471 | {0xa0, 0x12, ZC3XX_R138_GAMMA18}, |
| 3472 | {0xa0, 0x10, ZC3XX_R139_GAMMA19}, |
| 3473 | {0xa0, 0x0e, ZC3XX_R13A_GAMMA1A}, |
| 3474 | {0xa0, 0x0b, ZC3XX_R13B_GAMMA1B}, |
| 3475 | {0xa0, 0x09, ZC3XX_R13C_GAMMA1C}, |
| 3476 | {0xa0, 0x08, ZC3XX_R13D_GAMMA1D}, |
| 3477 | {0xa0, 0x06, ZC3XX_R13E_GAMMA1E}, |
| 3478 | {0xa0, 0x03, ZC3XX_R13F_GAMMA1F}, |
| 3479 | {0xa0, 0x50, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3480 | {0xa0, 0xf8, ZC3XX_R10B_RGB01}, |
| 3481 | {0xa0, 0xf8, ZC3XX_R10C_RGB02}, |
| 3482 | {0xa0, 0xf8, ZC3XX_R10D_RGB10}, |
| 3483 | {0xa0, 0x50, ZC3XX_R10E_RGB11}, |
| 3484 | {0xa0, 0xf8, ZC3XX_R10F_RGB12}, |
| 3485 | {0xa0, 0xf8, ZC3XX_R110_RGB20}, |
| 3486 | {0xa0, 0xf8, ZC3XX_R111_RGB21}, |
| 3487 | {0xa0, 0x50, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3488 | |
| 3489 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3490 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3491 | {0xaa, 0x10, 0x001b}, |
| 3492 | {0xaa, 0x76, 0x0002}, |
| 3493 | {0xaa, 0x2a, 0x0081}, |
| 3494 | {0xaa, 0x2b, 0x0000}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3495 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3496 | {0xa0, 0x01, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3497 | {0xa0, 0xb8, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 3498 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3499 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3500 | {0xa0, 0x37, ZC3XX_R197_ANTIFLICKERLOW}, |
| 3501 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 3502 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 3503 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3504 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3505 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
| 3506 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 3507 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3508 | {0xaa, 0x13, 0x0083}, /* 40 */ |
| 3509 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3510 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3511 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3512 | }; |
| 3513 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3514 | static const struct usb_action ov7630c_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3515 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 3516 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 3517 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3518 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 3519 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, |
| 3520 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 3521 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
| 3522 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3523 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3524 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3525 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 3526 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3527 | |
| 3528 | {0xaa, 0x12, 0x0080}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3529 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, |
| 3530 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, |
| 3531 | {0xa0, 0x90, ZC3XX_R086_EXPTIMEHIGH}, |
| 3532 | {0xa0, 0x91, ZC3XX_R087_EXPTIMEMID}, |
| 3533 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, |
| 3534 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 3535 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 3536 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3537 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 3538 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3539 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3540 | {0xaa, 0x12, 0x0069}, /* i2c */ |
| 3541 | {0xaa, 0x04, 0x0020}, |
| 3542 | {0xaa, 0x06, 0x0050}, |
| 3543 | {0xaa, 0x13, 0x00c3}, |
| 3544 | {0xaa, 0x14, 0x0000}, |
| 3545 | {0xaa, 0x15, 0x0024}, |
| 3546 | {0xaa, 0x19, 0x0003}, |
| 3547 | {0xaa, 0x1a, 0x00f6}, |
| 3548 | {0xaa, 0x1b, 0x0002}, |
| 3549 | {0xaa, 0x20, 0x00c2}, |
| 3550 | {0xaa, 0x24, 0x0060}, |
| 3551 | {0xaa, 0x25, 0x0040}, |
| 3552 | {0xaa, 0x26, 0x0030}, |
| 3553 | {0xaa, 0x27, 0x00ea}, |
| 3554 | {0xaa, 0x28, 0x00a0}, |
| 3555 | {0xaa, 0x21, 0x0000}, |
| 3556 | {0xaa, 0x2a, 0x0081}, |
| 3557 | {0xaa, 0x2b, 0x0096}, |
| 3558 | {0xaa, 0x2d, 0x0084}, |
| 3559 | {0xaa, 0x2f, 0x003d}, |
| 3560 | {0xaa, 0x30, 0x0024}, |
| 3561 | {0xaa, 0x60, 0x0000}, |
| 3562 | {0xaa, 0x61, 0x0040}, |
| 3563 | {0xaa, 0x68, 0x007c}, |
| 3564 | {0xaa, 0x6f, 0x0015}, |
| 3565 | {0xaa, 0x75, 0x0088}, |
| 3566 | {0xaa, 0x77, 0x00b5}, |
| 3567 | {0xaa, 0x01, 0x0060}, |
| 3568 | {0xaa, 0x02, 0x0060}, |
| 3569 | {0xaa, 0x17, 0x0018}, |
| 3570 | {0xaa, 0x18, 0x00ba}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3571 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3572 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 3573 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 3574 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 3575 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3576 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3577 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3578 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 3579 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 3580 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 3581 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 3582 | {0xa0, 0x46, ZC3XX_R118_BGAIN}, |
| 3583 | {0xa0, 0x04, ZC3XX_R113_RGB03}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3584 | |
| 3585 | {0xa1, 0x01, 0x0002}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3586 | {0xa0, 0x4e, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3587 | {0xa0, 0xfe, ZC3XX_R10B_RGB01}, |
| 3588 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3589 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 3590 | {0xa0, 0x4d, ZC3XX_R10E_RGB11}, |
| 3591 | {0xa0, 0xfc, ZC3XX_R10F_RGB12}, |
| 3592 | {0xa0, 0x00, ZC3XX_R110_RGB20}, |
| 3593 | {0xa0, 0xf6, ZC3XX_R111_RGB21}, |
| 3594 | {0xa0, 0x4a, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3595 | |
| 3596 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3597 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 3598 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3599 | {0xa1, 0x01, 0x01c8}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3600 | {0xa1, 0x01, 0x01c9}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3601 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3602 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 3603 | {0xa0, 0x16, ZC3XX_R120_GAMMA00}, /* gamma ~4 */ |
| 3604 | {0xa0, 0x3a, ZC3XX_R121_GAMMA01}, |
| 3605 | {0xa0, 0x5b, ZC3XX_R122_GAMMA02}, |
| 3606 | {0xa0, 0x7c, ZC3XX_R123_GAMMA03}, |
| 3607 | {0xa0, 0x94, ZC3XX_R124_GAMMA04}, |
| 3608 | {0xa0, 0xa9, ZC3XX_R125_GAMMA05}, |
| 3609 | {0xa0, 0xbb, ZC3XX_R126_GAMMA06}, |
| 3610 | {0xa0, 0xca, ZC3XX_R127_GAMMA07}, |
| 3611 | {0xa0, 0xd7, ZC3XX_R128_GAMMA08}, |
| 3612 | {0xa0, 0xe1, ZC3XX_R129_GAMMA09}, |
| 3613 | {0xa0, 0xea, ZC3XX_R12A_GAMMA0A}, |
| 3614 | {0xa0, 0xf1, ZC3XX_R12B_GAMMA0B}, |
| 3615 | {0xa0, 0xf7, ZC3XX_R12C_GAMMA0C}, |
| 3616 | {0xa0, 0xfc, ZC3XX_R12D_GAMMA0D}, |
| 3617 | {0xa0, 0xff, ZC3XX_R12E_GAMMA0E}, |
| 3618 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 3619 | {0xa0, 0x20, ZC3XX_R130_GAMMA10}, |
| 3620 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 3621 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 3622 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 3623 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 3624 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 3625 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 3626 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 3627 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 3628 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 3629 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 3630 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 3631 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 3632 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 3633 | {0xa0, 0x00, ZC3XX_R13E_GAMMA1E}, |
| 3634 | {0xa0, 0x01, ZC3XX_R13F_GAMMA1F}, |
| 3635 | {0xa0, 0x4e, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3636 | {0xa0, 0xfe, ZC3XX_R10B_RGB01}, |
| 3637 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3638 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 3639 | {0xa0, 0x4d, ZC3XX_R10E_RGB11}, |
| 3640 | {0xa0, 0xfc, ZC3XX_R10F_RGB12}, |
| 3641 | {0xa0, 0x00, ZC3XX_R110_RGB20}, |
| 3642 | {0xa0, 0xf6, ZC3XX_R111_RGB21}, |
| 3643 | {0xa0, 0x4a, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3644 | |
| 3645 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3646 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3647 | {0xaa, 0x10, 0x000d}, |
| 3648 | {0xaa, 0x76, 0x0002}, |
| 3649 | {0xaa, 0x2a, 0x0081}, |
| 3650 | {0xaa, 0x2b, 0x0000}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3651 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3652 | {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3653 | {0xa0, 0xd8, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 3654 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3655 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3656 | {0xa0, 0x1b, ZC3XX_R197_ANTIFLICKERLOW}, |
| 3657 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 3658 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 3659 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3660 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3661 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
| 3662 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 3663 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3664 | {0xaa, 0x13, 0x00c3}, |
| 3665 | |
| 3666 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3667 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3668 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3669 | }; |
| 3670 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3671 | static const struct usb_action pas106b_Initial_com[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3672 | /* Sream and Sensor specific */ |
| 3673 | {0xa1, 0x01, 0x0010}, /* CMOSSensorSelect */ |
| 3674 | /* System */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3675 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* SystemControl */ |
| 3676 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* SystemControl */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3677 | /* Picture size */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3678 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* ClockSelect */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3679 | {0xa0, 0x03, 0x003a}, |
| 3680 | {0xa0, 0x0c, 0x003b}, |
| 3681 | {0xa0, 0x04, 0x0038}, |
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[] = { /* 176x144 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3686 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3687 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3688 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3689 | {0xa0, 0x0f, ZC3XX_R010_CMOSSENSORSELECT}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3690 | /* Picture size */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3691 | {0xa0, 0x00, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3692 | {0xa0, 0xb0, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3693 | {0xa0, 0x00, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3694 | {0xa0, 0x90, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3695 | /* System */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3696 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3697 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3698 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3699 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3700 | /* Sensor Interface */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3701 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3702 | /* Window inside sensor array */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3703 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, |
| 3704 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3705 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, |
| 3706 | {0xa0, 0x28, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3707 | {0xa0, 0x68, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3708 | /* Init the sensor */ |
| 3709 | {0xaa, 0x02, 0x0004}, |
| 3710 | {0xaa, 0x08, 0x0000}, |
| 3711 | {0xaa, 0x09, 0x0005}, |
| 3712 | {0xaa, 0x0a, 0x0002}, |
| 3713 | {0xaa, 0x0b, 0x0002}, |
| 3714 | {0xaa, 0x0c, 0x0005}, |
| 3715 | {0xaa, 0x0d, 0x0000}, |
| 3716 | {0xaa, 0x0e, 0x0002}, |
| 3717 | {0xaa, 0x14, 0x0081}, |
| 3718 | |
| 3719 | /* Other registors */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3720 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3721 | /* Frame retreiving */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3722 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3723 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3724 | {0xa0, 0xa0, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3725 | /* Unknown */ |
| 3726 | {0xa0, 0x00, 0x01ad}, |
| 3727 | /* Sharpness */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3728 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3729 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3730 | /* Other registors */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3731 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3732 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3733 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3734 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3735 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3736 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3737 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3738 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3739 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3740 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3741 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3742 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3743 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3744 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3745 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3746 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3747 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3748 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3749 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3750 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3751 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3752 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3753 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3754 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3755 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3756 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 3757 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3758 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 3759 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 3760 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 3761 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 3762 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 3763 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3764 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3765 | {0xa0, 0x03, ZC3XX_R181_WINXSTART}, |
| 3766 | {0xa0, 0x08, ZC3XX_R182_WINXWIDTH}, |
| 3767 | {0xa0, 0x16, ZC3XX_R183_WINXCENTER}, |
| 3768 | {0xa0, 0x03, ZC3XX_R184_WINYSTART}, |
| 3769 | {0xa0, 0x05, ZC3XX_R185_WINYWIDTH}, |
| 3770 | {0xa0, 0x14, ZC3XX_R186_WINYCENTER}, |
| 3771 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3772 | |
| 3773 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3774 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3775 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3776 | {0xa0, 0xb1, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 3777 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3778 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3779 | {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW}, |
| 3780 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 3781 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3782 | /* sensor on */ |
| 3783 | {0xaa, 0x07, 0x00b1}, |
| 3784 | {0xaa, 0x05, 0x0003}, |
| 3785 | {0xaa, 0x04, 0x0001}, |
| 3786 | {0xaa, 0x03, 0x003b}, |
| 3787 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3788 | {0xa0, 0x20, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3789 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3790 | {0xa0, 0xa0, ZC3XX_R11D_GLOBALGAIN}, |
| 3791 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3792 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3793 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3794 | {0xa1, 0x01, 0x0180}, /* AutoCorrectEnable */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3795 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3796 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3797 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 3798 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 3799 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3800 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3801 | }; |
| 3802 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3803 | static const struct usb_action pas106b_InitialScale[] = { /* 352x288 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3804 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3805 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3806 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3807 | {0xa0, 0x0f, ZC3XX_R010_CMOSSENSORSELECT}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3808 | /* Picture size */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3809 | {0xa0, 0x01, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3810 | {0xa0, 0x60, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3811 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3812 | {0xa0, 0x20, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3813 | /* System */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3814 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3815 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3816 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3817 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3818 | /* Sensor Interface */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3819 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3820 | /* Window inside sensor array */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3821 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, |
| 3822 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3823 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, |
| 3824 | {0xa0, 0x28, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3825 | {0xa0, 0x68, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3826 | /* Init the sensor */ |
| 3827 | {0xaa, 0x02, 0x0004}, |
| 3828 | {0xaa, 0x08, 0x0000}, |
| 3829 | {0xaa, 0x09, 0x0005}, |
| 3830 | {0xaa, 0x0a, 0x0002}, |
| 3831 | {0xaa, 0x0b, 0x0002}, |
| 3832 | {0xaa, 0x0c, 0x0005}, |
| 3833 | {0xaa, 0x0d, 0x0000}, |
| 3834 | {0xaa, 0x0e, 0x0002}, |
| 3835 | {0xaa, 0x14, 0x0081}, |
| 3836 | |
| 3837 | /* Other registors */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3838 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3839 | /* Frame retreiving */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3840 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3841 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3842 | {0xa0, 0xa0, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3843 | /* Unknown */ |
| 3844 | {0xa0, 0x00, 0x01ad}, |
| 3845 | /* Sharpness */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3846 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3847 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3848 | /* Other registors */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3849 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3850 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3851 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 3852 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3853 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3854 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3855 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3856 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3857 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3858 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3859 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3860 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3861 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3862 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3863 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3864 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3865 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3866 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3867 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3868 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3869 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3870 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3871 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3872 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3873 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3874 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3875 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 3876 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3877 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 3878 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 3879 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 3880 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 3881 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 3882 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3883 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3884 | {0xa0, 0x03, ZC3XX_R181_WINXSTART}, |
| 3885 | {0xa0, 0x08, ZC3XX_R182_WINXWIDTH}, |
| 3886 | {0xa0, 0x16, ZC3XX_R183_WINXCENTER}, |
| 3887 | {0xa0, 0x03, ZC3XX_R184_WINYSTART}, |
| 3888 | {0xa0, 0x05, ZC3XX_R185_WINYWIDTH}, |
| 3889 | {0xa0, 0x14, ZC3XX_R186_WINYCENTER}, |
| 3890 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3891 | |
| 3892 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3893 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3894 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3895 | {0xa0, 0xb1, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3896 | |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3897 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3898 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3899 | {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3900 | |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3901 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 3902 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3903 | /* sensor on */ |
| 3904 | {0xaa, 0x07, 0x00b1}, |
| 3905 | {0xaa, 0x05, 0x0003}, |
| 3906 | {0xaa, 0x04, 0x0001}, |
| 3907 | {0xaa, 0x03, 0x003b}, |
| 3908 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3909 | {0xa0, 0x20, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3910 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3911 | {0xa0, 0xa0, ZC3XX_R11D_GLOBALGAIN}, |
| 3912 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3913 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3914 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3915 | {0xa1, 0x01, 0x0180}, /* AutoCorrectEnable */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3916 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3917 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3918 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 3919 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 3920 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3921 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3922 | {0xa0, 0x00, 0x0007}, /* AutoCorrectEnable */ |
| 3923 | {0xa0, 0xff, ZC3XX_R018_FRAMELOST}, /* Frame adjust */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3924 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3925 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3926 | static const struct usb_action pas106b_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3927 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3928 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,06,cc */ |
| 3929 | {0xa0, 0x54, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,54,cc */ |
| 3930 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3931 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3932 | {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,87,cc */ |
| 3933 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 3934 | {0xa0, 0x30, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,30,cc */ |
| 3935 | {0xaa, 0x03, 0x0021}, /* 00,03,21,aa */ |
| 3936 | {0xaa, 0x04, 0x000c}, /* 00,04,0c,aa */ |
| 3937 | {0xaa, 0x05, 0x0002}, /* 00,05,02,aa */ |
| 3938 | {0xaa, 0x07, 0x001c}, /* 00,07,1c,aa */ |
| 3939 | {0xa0, 0x04, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,04,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3940 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3941 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3942 | static const struct usb_action pas106b_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3943 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3944 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,06,cc */ |
| 3945 | {0xa0, 0x2e, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,2e,cc */ |
| 3946 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3947 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3948 | {0xa0, 0x71, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,71,cc */ |
| 3949 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 3950 | {0xa0, 0x30, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,30,cc */ |
| 3951 | {0xaa, 0x03, 0x001c}, /* 00,03,1c,aa */ |
| 3952 | {0xaa, 0x04, 0x0004}, /* 00,04,04,aa */ |
| 3953 | {0xaa, 0x05, 0x0001}, /* 00,05,01,aa */ |
| 3954 | {0xaa, 0x07, 0x00c4}, /* 00,07,c4,aa */ |
| 3955 | {0xa0, 0x04, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,04,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3956 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3957 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3958 | static const struct usb_action pas106b_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3959 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3960 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,06,cc */ |
| 3961 | {0xa0, 0x50, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc */ |
| 3962 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3963 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3964 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 3965 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 3966 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 3967 | {0xaa, 0x03, 0x0013}, /* 00,03,13,aa */ |
| 3968 | {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */ |
| 3969 | {0xaa, 0x05, 0x0001}, /* 00,05,01,aa */ |
| 3970 | {0xaa, 0x07, 0x0030}, /* 00,07,30,aa */ |
| 3971 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3972 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3973 | }; |
| 3974 | |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 3975 | /* from lvWIMv.inf 046d:08a2/:08aa 2007/06/03 */ |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 3976 | static const struct usb_action pas202b_Initial[] = { /* 640x480 */ |
| 3977 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 3978 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 3979 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ |
| 3980 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc */ |
| 3981 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 3982 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 3983 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 3984 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 3985 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 3986 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 3987 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 3988 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 3989 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 3990 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,03,cc */ |
| 3991 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 3992 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,03,cc */ |
| 3993 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
| 3994 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc */ |
| 3995 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 3996 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 3997 | {0xaa, 0x02, 0x0002}, /* 00,02,04,aa --> 02 */ |
| 3998 | {0xaa, 0x07, 0x0006}, /* 00,07,06,aa */ |
| 3999 | {0xaa, 0x08, 0x0002}, /* 00,08,02,aa */ |
| 4000 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ |
| 4001 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ |
| 4002 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4003 | {0xaa, 0x0c, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4004 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ |
| 4005 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 4006 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ |
| 4007 | {0xaa, 0x13, 0x0063}, /* 00,13,63,aa */ |
| 4008 | {0xaa, 0x15, 0x0070}, /* 00,15,70,aa */ |
| 4009 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc */ |
| 4010 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 4011 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 4012 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
| 4013 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 4014 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 4015 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 4016 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 4017 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, /* 01,8d,70,cc */ |
| 4018 | {} |
| 4019 | }; |
| 4020 | static const struct usb_action pas202b_InitialScale[] = { /* 320x240 */ |
| 4021 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4022 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4023 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ |
| 4024 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 4025 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 4026 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 4027 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4028 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4029 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 4030 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 4031 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 4032 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 4033 | {0xa0, 0x08, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,08,cc */ |
| 4034 | {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,02,cc */ |
| 4035 | {0xa0, 0x08, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,08,cc */ |
| 4036 | {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,02,cc */ |
| 4037 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4038 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4039 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 4040 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 4041 | {0xaa, 0x02, 0x0002}, /* 00,02,02,aa */ |
| 4042 | {0xaa, 0x07, 0x0006}, /* 00,07,06,aa */ |
| 4043 | {0xaa, 0x08, 0x0002}, /* 00,08,02,aa */ |
| 4044 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ |
| 4045 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ |
| 4046 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4047 | {0xaa, 0x0c, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4048 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ |
| 4049 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 4050 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ |
| 4051 | {0xaa, 0x13, 0x0063}, /* 00,13,63,aa */ |
| 4052 | {0xaa, 0x15, 0x0070}, /* 00,15,70,aa */ |
| 4053 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
| 4054 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 4055 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 4056 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
| 4057 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 4058 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 4059 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 4060 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 4061 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, /* 01,8d,70,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4062 | {0xa0, 0xff, ZC3XX_R097_WINYSTARTHIGH}, |
| 4063 | {0xa0, 0xfe, ZC3XX_R098_WINYSTARTLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4064 | {} |
| 4065 | }; |
| 4066 | static const struct usb_action pas202b_50HZ[] = { |
| 4067 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4068 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4069 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
| 4070 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4071 | {0xaa, 0x21, 0x001b}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4072 | {0xaa, 0x03, 0x0044}, /* 00,03,44,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4073 | {0xaa, 0x04, 0x0008}, |
| 4074 | {0xaa, 0x05, 0x001b}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4075 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4076 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4077 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4078 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4079 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4080 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4081 | {0xa0, 0x1b, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4082 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4083 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4084 | {0xa0, 0x4d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,4d,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4085 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4086 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4087 | {0xa0, 0x44, ZC3XX_R01D_HSYNC_0}, /* 00,1d,44,cc */ |
| 4088 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
| 4089 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ |
| 4090 | {0xa0, 0xeb, ZC3XX_R020_HSYNC_3}, /* 00,20,eb,cc */ |
| 4091 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4092 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4093 | {} |
| 4094 | }; |
| 4095 | static const struct usb_action pas202b_50HZScale[] = { |
| 4096 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4097 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4098 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4099 | {0xaa, 0x20, 0x0004}, |
| 4100 | {0xaa, 0x21, 0x003d}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4101 | {0xaa, 0x03, 0x0041}, /* 00,03,41,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4102 | {0xaa, 0x04, 0x0010}, |
| 4103 | {0xaa, 0x05, 0x003d}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4104 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4105 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4106 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4107 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4108 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4109 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4110 | {0xa0, 0x3d, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4111 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4112 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4113 | {0xa0, 0x9b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,9b,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4114 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4115 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4116 | {0xa0, 0x41, ZC3XX_R01D_HSYNC_0}, /* 00,1d,41,cc */ |
| 4117 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
| 4118 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ |
| 4119 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4120 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4121 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4122 | {} |
| 4123 | }; |
| 4124 | static const struct usb_action pas202b_60HZ[] = { |
| 4125 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4126 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4127 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
| 4128 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
| 4129 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 4130 | {0xaa, 0x03, 0x0045}, /* 00,03,45,aa */ |
| 4131 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ |
| 4132 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 4133 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4134 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4135 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4136 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4137 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4138 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4139 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4140 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4141 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4142 | {0xa0, 0x40, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,40,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4143 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4144 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4145 | {0xa0, 0x45, ZC3XX_R01D_HSYNC_0}, /* 00,1d,45,cc */ |
| 4146 | {0xa0, 0x8e, ZC3XX_R01E_HSYNC_1}, /* 00,1e,8e,cc */ |
| 4147 | {0xa0, 0xc1, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c1,cc */ |
| 4148 | {0xa0, 0xf5, ZC3XX_R020_HSYNC_3}, /* 00,20,f5,cc */ |
| 4149 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4150 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4151 | {} |
| 4152 | }; |
| 4153 | static const struct usb_action pas202b_60HZScale[] = { |
| 4154 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4155 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4156 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4157 | {0xaa, 0x20, 0x0004}, |
| 4158 | {0xaa, 0x21, 0x0008}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4159 | {0xaa, 0x03, 0x0042}, /* 00,03,42,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4160 | {0xaa, 0x04, 0x0010}, |
| 4161 | {0xaa, 0x05, 0x0008}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4162 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4163 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4164 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4165 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4166 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4167 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4168 | {0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4169 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4170 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4171 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,81,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4172 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4173 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4174 | {0xa0, 0x42, ZC3XX_R01D_HSYNC_0}, /* 00,1d,42,cc */ |
| 4175 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
| 4176 | {0xa0, 0xaf, ZC3XX_R01F_HSYNC_2}, /* 00,1f,af,cc */ |
| 4177 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4178 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4179 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4180 | {} |
| 4181 | }; |
| 4182 | static const struct usb_action pas202b_NoFliker[] = { |
| 4183 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4184 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4185 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
| 4186 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4187 | {0xaa, 0x21, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4188 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ |
| 4189 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4190 | {0xaa, 0x05, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4191 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4192 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
| 4193 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4194 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4195 | {0xa0, 0x06, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4196 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4197 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4198 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4199 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 4200 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 4201 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4202 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4203 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ |
| 4204 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ |
| 4205 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ |
| 4206 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4207 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4208 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4209 | {} |
| 4210 | }; |
| 4211 | static const struct usb_action pas202b_NoFlikerScale[] = { |
| 4212 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4213 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4214 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4215 | {0xaa, 0x20, 0x0004}, |
| 4216 | {0xaa, 0x21, 0x000c}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4217 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4218 | {0xaa, 0x04, 0x0010}, |
| 4219 | {0xaa, 0x05, 0x000c}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4220 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4221 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
| 4222 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4223 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4224 | {0xa0, 0x0c, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4225 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4226 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4227 | {0xa0, 0x02, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,02,cc */ |
| 4228 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 4229 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 4230 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 4231 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4232 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ |
| 4233 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ |
| 4234 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ |
| 4235 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4236 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4237 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4238 | {} |
| 4239 | }; |
| 4240 | |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4241 | /* mi0360soc and pb0330 from vm30x.inf for 0ac8:301b and 0ac8:303b 07/02/13 */ |
| 4242 | static const struct usb_action mi0360soc_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4243 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4244 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4245 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4246 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 4247 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4248 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4249 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4250 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4251 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4252 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4253 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, /*jfm: was 03*/ |
| 4254 | /* {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4255 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4256 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4257 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4258 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4259 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4260 | {0xdd, 0x00, 0x0200}, |
| 4261 | {0xaa, 0x01, 0x0001}, |
| 4262 | {0xaa, 0x06, 0x0000}, |
| 4263 | {0xaa, 0x08, 0x0483}, |
| 4264 | {0xaa, 0x01, 0x0004}, |
| 4265 | {0xaa, 0x08, 0x0006}, |
| 4266 | {0xaa, 0x02, 0x0011}, |
| 4267 | {0xaa, 0x03, 0x01e5}, /*jfm: was 01e7*/ |
| 4268 | {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/ |
| 4269 | {0xaa, 0x07, 0x3002}, |
| 4270 | {0xaa, 0x20, 0x5100}, /*jfm: was 1100*/ |
| 4271 | {0xaa, 0x35, 0x507f}, /*jfm: was 0050*/ |
| 4272 | {0xaa, 0x30, 0x0005}, |
| 4273 | {0xaa, 0x31, 0x0000}, |
| 4274 | {0xaa, 0x58, 0x0078}, |
| 4275 | {0xaa, 0x62, 0x0411}, |
| 4276 | {0xaa, 0x2b, 0x0028}, |
| 4277 | {0xaa, 0x2c, 0x007f}, /*jfm: was 0030*/ |
| 4278 | {0xaa, 0x2d, 0x007f}, /*jfm: was 0030*/ |
| 4279 | {0xaa, 0x2e, 0x007f}, /*jfm: was 0030*/ |
| 4280 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 4281 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /*jfm: was 37*/ |
| 4282 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4283 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4284 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 4285 | {0xa0, 0x09, 0x01ad}, /*jfm: was 00*/ |
| 4286 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4287 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4288 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4289 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4290 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 4291 | {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, /* jfm: was 78 */ |
| 4292 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 4293 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
| 4294 | {} |
| 4295 | }; |
| 4296 | static const struct usb_action mi0360soc_InitialScale[] = { /* 320x240 */ |
| 4297 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4298 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4299 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4300 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 4301 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4302 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4303 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4304 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4305 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4306 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4307 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, /*jfm: was 03*/ |
| 4308 | /* {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, */ |
| 4309 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4310 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4311 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4312 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4313 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4314 | {0xdd, 0x00, 0x0200}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4315 | {0xaa, 0x01, 0x0001}, |
| 4316 | {0xaa, 0x06, 0x0000}, |
| 4317 | {0xaa, 0x08, 0x0483}, |
| 4318 | {0xaa, 0x01, 0x0004}, |
| 4319 | {0xaa, 0x08, 0x0006}, |
| 4320 | {0xaa, 0x02, 0x0011}, |
| 4321 | {0xaa, 0x03, 0x01e7}, |
| 4322 | {0xaa, 0x04, 0x0287}, |
| 4323 | {0xaa, 0x07, 0x3002}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4324 | {0xaa, 0x20, 0x5100}, /*jfm: was 1100*/ |
| 4325 | {0xaa, 0x35, 0x007f}, /*jfm: was 0050*/ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4326 | {0xaa, 0x30, 0x0005}, |
| 4327 | {0xaa, 0x31, 0x0000}, |
| 4328 | {0xaa, 0x58, 0x0078}, |
| 4329 | {0xaa, 0x62, 0x0411}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4330 | {0xaa, 0x2b, 0x007f}, /*jfm: was 28*/ |
| 4331 | {0xaa, 0x2c, 0x007f}, /*jfm: was 30*/ |
| 4332 | {0xaa, 0x2d, 0x007f}, /*jfm: was 30*/ |
| 4333 | {0xaa, 0x2e, 0x007f}, /*jfm: was 28*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4334 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4335 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /*jfm: was 37*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4336 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4337 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4338 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4339 | {0xa0, 0x09, 0x01ad}, /*jfm: was 00*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4340 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4341 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4342 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4343 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4344 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4345 | {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, /*jfm: was 78*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4346 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 4347 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4348 | {} |
| 4349 | }; |
| 4350 | static const struct usb_action mi360soc_AE50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4351 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4352 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4353 | {0xbb, 0x00, 0x0562}, |
| 4354 | {0xbb, 0x01, 0x09aa}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4355 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4356 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4357 | {0xa0, 0x9b, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4358 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4359 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4360 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4361 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4362 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4363 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4364 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4365 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, |
| 4366 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, |
| 4367 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, |
| 4368 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4369 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4370 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4371 | {} |
| 4372 | }; |
| 4373 | static const struct usb_action mi360soc_AE50HZScale[] = { |
| 4374 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4375 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4376 | {0xbb, 0x00, 0x0509}, |
| 4377 | {0xbb, 0x01, 0x0934}, |
| 4378 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4379 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4380 | {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4381 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4382 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4383 | {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4384 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4385 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4386 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4387 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4388 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4389 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4390 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4391 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4392 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4393 | {} |
| 4394 | }; |
| 4395 | static const struct usb_action mi360soc_AE60HZ[] = { |
| 4396 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4397 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4398 | {0xbb, 0x00, 0x053d}, |
| 4399 | {0xbb, 0x01, 0x096e}, |
| 4400 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4401 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4402 | {0xa0, 0xdd, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4403 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4404 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4405 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4406 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4407 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4408 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4409 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4410 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, |
| 4411 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, |
| 4412 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, |
| 4413 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4414 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4415 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4416 | {} |
| 4417 | }; |
| 4418 | static const struct usb_action mi360soc_AE60HZScale[] = { |
| 4419 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4420 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4421 | {0xbb, 0x00, 0x0509}, |
| 4422 | {0xbb, 0x01, 0x0983}, |
| 4423 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4424 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4425 | {0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4426 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4427 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4428 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4429 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4430 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4431 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4432 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4433 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4434 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4435 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4436 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4437 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4438 | {} |
| 4439 | }; |
| 4440 | static const struct usb_action mi360soc_AENoFliker[] = { |
| 4441 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4442 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4443 | {0xbb, 0x00, 0x0509}, |
| 4444 | {0xbb, 0x01, 0x0960}, |
| 4445 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4446 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4447 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4448 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4449 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4450 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4451 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4452 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4453 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4454 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4455 | {0xa0, 0x09, ZC3XX_R01D_HSYNC_0}, |
| 4456 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 4457 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4458 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
| 4459 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4460 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4461 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4462 | }; |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4463 | static const struct usb_action mi360soc_AENoFlikerScale[] = { |
| 4464 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4465 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4466 | {0xbb, 0x00, 0x0534}, |
| 4467 | {0xbb, 0x02, 0x0960}, |
| 4468 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4469 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4470 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4471 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4472 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4473 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4474 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4475 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4476 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4477 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4478 | {0xa0, 0x34, ZC3XX_R01D_HSYNC_0}, |
| 4479 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, |
| 4480 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4481 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
| 4482 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4483 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4484 | {} |
| 4485 | }; |
| 4486 | |
| 4487 | static const struct usb_action pb0330_Initial[] = { /* 640x480 */ |
| 4488 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4489 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 4490 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4491 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 4492 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4493 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4494 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4495 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4496 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4497 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4498 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4499 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4500 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4501 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4502 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4503 | {0xdd, 0x00, 0x0200}, |
| 4504 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4505 | {0xaa, 0x01, 0x0006}, |
| 4506 | {0xaa, 0x02, 0x0011}, |
| 4507 | {0xaa, 0x03, 0x01e5}, /*jfm: was 1e7*/ |
| 4508 | {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/ |
| 4509 | {0xaa, 0x06, 0x0003}, |
| 4510 | {0xaa, 0x07, 0x3002}, |
| 4511 | {0xaa, 0x20, 0x1100}, |
| 4512 | {0xaa, 0x2f, 0xf7b0}, |
| 4513 | {0xaa, 0x30, 0x0005}, |
| 4514 | {0xaa, 0x31, 0x0000}, |
| 4515 | {0xaa, 0x34, 0x0100}, |
| 4516 | {0xaa, 0x35, 0x0060}, |
| 4517 | {0xaa, 0x3d, 0x068f}, |
| 4518 | {0xaa, 0x40, 0x01e0}, |
| 4519 | {0xaa, 0x58, 0x0078}, |
| 4520 | {0xaa, 0x62, 0x0411}, |
| 4521 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 4522 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 4523 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4524 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4525 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 4526 | {0xa0, 0x09, 0x01ad}, /*jfm: was 00 */ |
| 4527 | {0xa0, 0x15, 0x01ae}, |
| 4528 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4529 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4530 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4531 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4532 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 4533 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /*jfm: was 6c*/ |
| 4534 | {} |
| 4535 | }; |
| 4536 | static const struct usb_action pb0330_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4537 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4538 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 4539 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4540 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 4541 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4542 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4543 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4544 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4545 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4546 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4547 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4548 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4549 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4550 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4551 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4552 | {0xdd, 0x00, 0x0200}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4553 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4554 | {0xaa, 0x01, 0x0006}, |
| 4555 | {0xaa, 0x02, 0x0011}, |
| 4556 | {0xaa, 0x03, 0x01e7}, |
| 4557 | {0xaa, 0x04, 0x0287}, |
| 4558 | {0xaa, 0x06, 0x0003}, |
| 4559 | {0xaa, 0x07, 0x3002}, |
| 4560 | {0xaa, 0x20, 0x1100}, |
| 4561 | {0xaa, 0x2f, 0xf7b0}, |
| 4562 | {0xaa, 0x30, 0x0005}, |
| 4563 | {0xaa, 0x31, 0x0000}, |
| 4564 | {0xaa, 0x34, 0x0100}, |
| 4565 | {0xaa, 0x35, 0x0060}, |
| 4566 | {0xaa, 0x3d, 0x068f}, |
| 4567 | {0xaa, 0x40, 0x01e0}, |
| 4568 | {0xaa, 0x58, 0x0078}, |
| 4569 | {0xaa, 0x62, 0x0411}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4570 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 4571 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 4572 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4573 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4574 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4575 | {0xa0, 0x09, 0x01ad}, |
| 4576 | {0xa0, 0x15, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4577 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4578 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4579 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4580 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4581 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4582 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /*jfm: was 6c*/ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4583 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4584 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4585 | static const struct usb_action pb0330_50HZ[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4586 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4587 | {0xbb, 0x00, 0x055c}, |
| 4588 | {0xbb, 0x01, 0x09aa}, |
| 4589 | {0xbb, 0x00, 0x1001}, |
| 4590 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4591 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4592 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4593 | {0xa0, 0xc4, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4594 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4595 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4596 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4597 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4598 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4599 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4600 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4601 | {0xa0, 0x5c, ZC3XX_R01D_HSYNC_0}, |
| 4602 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, |
| 4603 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, |
| 4604 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4605 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4606 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4607 | static const struct usb_action pb0330_50HZScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4608 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4609 | {0xbb, 0x00, 0x0566}, |
| 4610 | {0xbb, 0x02, 0x09b2}, |
| 4611 | {0xbb, 0x00, 0x1002}, |
| 4612 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4613 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4614 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4615 | {0xa0, 0x8c, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4616 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4617 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4618 | {0xa0, 0x8a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4619 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4620 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4621 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4622 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4623 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4624 | {0xa0, 0xf0, ZC3XX_R01E_HSYNC_1}, |
| 4625 | {0xa0, 0xf8, ZC3XX_R01F_HSYNC_2}, |
| 4626 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4627 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4628 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4629 | static const struct usb_action pb0330_60HZ[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4630 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4631 | {0xbb, 0x00, 0x0535}, |
| 4632 | {0xbb, 0x01, 0x0974}, |
| 4633 | {0xbb, 0x00, 0x1001}, |
| 4634 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4635 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4636 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4637 | {0xa0, 0xfe, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4638 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4639 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4640 | {0xa0, 0x3e, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4641 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4642 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4643 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4644 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4645 | {0xa0, 0x35, ZC3XX_R01D_HSYNC_0}, |
| 4646 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, |
| 4647 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4648 | {0xa0, 0xd0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4649 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4650 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4651 | static const struct usb_action pb0330_60HZScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4652 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4653 | {0xbb, 0x00, 0x0535}, |
| 4654 | {0xbb, 0x02, 0x096c}, |
| 4655 | {0xbb, 0x00, 0x1002}, |
| 4656 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4657 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4658 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4659 | {0xa0, 0xc0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4660 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4661 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4662 | {0xa0, 0x7c, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4663 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4664 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4665 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4666 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4667 | {0xa0, 0x35, ZC3XX_R01D_HSYNC_0}, |
| 4668 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, |
| 4669 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4670 | {0xa0, 0xd0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4671 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4672 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4673 | static const struct usb_action pb0330_NoFliker[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4674 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4675 | {0xbb, 0x00, 0x0509}, |
| 4676 | {0xbb, 0x02, 0x0940}, |
| 4677 | {0xbb, 0x00, 0x1002}, |
| 4678 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4679 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4680 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4681 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4682 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4683 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4684 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4685 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 4686 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 4687 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4688 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4689 | {0xa0, 0x09, ZC3XX_R01D_HSYNC_0}, |
| 4690 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 4691 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4692 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4693 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4694 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4695 | static const struct usb_action pb0330_NoFlikerScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4696 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4697 | {0xbb, 0x00, 0x0535}, |
| 4698 | {0xbb, 0x01, 0x0980}, |
| 4699 | {0xbb, 0x00, 0x1001}, |
| 4700 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 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, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4707 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 4708 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 4709 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4710 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4711 | {0xa0, 0x35, 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}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4715 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4716 | }; |
| 4717 | |
| 4718 | /* from oem9.inf - HKR,%PO2030%,Initial - 640x480 - (close to CS2102) */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4719 | static const struct usb_action PO2030_mode0[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4720 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 4721 | {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT}, /* 00,02,04,cc */ |
| 4722 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 4723 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 4724 | {0xa0, 0x04, ZC3XX_R080_HBLANKHIGH}, /* 00,80,04,cc */ |
| 4725 | {0xa0, 0x05, ZC3XX_R081_HBLANKLOW}, /* 00,81,05,cc */ |
| 4726 | {0xa0, 0x16, ZC3XX_R083_RGAINADDR}, /* 00,83,16,cc */ |
| 4727 | {0xa0, 0x18, ZC3XX_R085_BGAINADDR}, /* 00,85,18,cc */ |
| 4728 | {0xa0, 0x1a, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,1a,cc */ |
| 4729 | {0xa0, 0x1b, ZC3XX_R087_EXPTIMEMID}, /* 00,87,1b,cc */ |
| 4730 | {0xa0, 0x1c, ZC3XX_R088_EXPTIMELOW}, /* 00,88,1c,cc */ |
| 4731 | {0xa0, 0xee, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,ee,cc */ |
| 4732 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 4733 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 4734 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 4735 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 4736 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 4737 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 4738 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 4739 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 4740 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 4741 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 4742 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 4743 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 4744 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 4745 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc */ |
| 4746 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4747 | {0xaa, 0x09, 0x00ce}, /* 00,09,ce,aa */ |
| 4748 | {0xaa, 0x0b, 0x0005}, /* 00,0b,05,aa */ |
| 4749 | {0xaa, 0x0d, 0x0054}, /* 00,0d,54,aa */ |
| 4750 | {0xaa, 0x0f, 0x00eb}, /* 00,0f,eb,aa */ |
| 4751 | {0xaa, 0x87, 0x0000}, /* 00,87,00,aa */ |
| 4752 | {0xaa, 0x88, 0x0004}, /* 00,88,04,aa */ |
| 4753 | {0xaa, 0x89, 0x0000}, /* 00,89,00,aa */ |
| 4754 | {0xaa, 0x8a, 0x0005}, /* 00,8a,05,aa */ |
| 4755 | {0xaa, 0x13, 0x0003}, /* 00,13,03,aa */ |
| 4756 | {0xaa, 0x16, 0x0040}, /* 00,16,40,aa */ |
| 4757 | {0xaa, 0x18, 0x0040}, /* 00,18,40,aa */ |
| 4758 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 4759 | {0xaa, 0x29, 0x00e8}, /* 00,29,e8,aa */ |
| 4760 | {0xaa, 0x45, 0x0045}, /* 00,45,45,aa */ |
| 4761 | {0xaa, 0x50, 0x00ed}, /* 00,50,ed,aa */ |
| 4762 | {0xaa, 0x51, 0x0025}, /* 00,51,25,aa */ |
| 4763 | {0xaa, 0x52, 0x0042}, /* 00,52,42,aa */ |
| 4764 | {0xaa, 0x53, 0x002f}, /* 00,53,2f,aa */ |
| 4765 | {0xaa, 0x79, 0x0025}, /* 00,79,25,aa */ |
| 4766 | {0xaa, 0x7b, 0x0000}, /* 00,7b,00,aa */ |
| 4767 | {0xaa, 0x7e, 0x0025}, /* 00,7e,25,aa */ |
| 4768 | {0xaa, 0x7f, 0x0025}, /* 00,7f,25,aa */ |
| 4769 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 4770 | {0xaa, 0x33, 0x0036}, /* 00,33,36,aa */ |
| 4771 | {0xaa, 0x36, 0x0060}, /* 00,36,60,aa */ |
| 4772 | {0xaa, 0x37, 0x0008}, /* 00,37,08,aa */ |
| 4773 | {0xaa, 0x3b, 0x0031}, /* 00,3b,31,aa */ |
| 4774 | {0xaa, 0x44, 0x000f}, /* 00,44,0f,aa */ |
| 4775 | {0xaa, 0x58, 0x0002}, /* 00,58,02,aa */ |
| 4776 | {0xaa, 0x66, 0x00c0}, /* 00,66,c0,aa */ |
| 4777 | {0xaa, 0x67, 0x0044}, /* 00,67,44,aa */ |
| 4778 | {0xaa, 0x6b, 0x00a0}, /* 00,6b,a0,aa */ |
| 4779 | {0xaa, 0x6c, 0x0054}, /* 00,6c,54,aa */ |
| 4780 | {0xaa, 0xd6, 0x0007}, /* 00,d6,07,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4781 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,f7,cc */ |
| 4782 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 4783 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 4784 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4785 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4786 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 4787 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 4788 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 4789 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 4790 | {0xa0, 0x7a, ZC3XX_R116_RGAIN}, /* 01,16,7a,cc */ |
| 4791 | {0xa0, 0x4a, ZC3XX_R118_BGAIN}, /* 01,18,4a,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4792 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4793 | }; |
| 4794 | |
| 4795 | /* from oem9.inf - HKR,%PO2030%,InitialScale - 320x240 */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4796 | static const struct usb_action PO2030_mode1[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4797 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 4798 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 4799 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 4800 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 4801 | {0xa0, 0x04, ZC3XX_R080_HBLANKHIGH}, /* 00,80,04,cc */ |
| 4802 | {0xa0, 0x05, ZC3XX_R081_HBLANKLOW}, /* 00,81,05,cc */ |
| 4803 | {0xa0, 0x16, ZC3XX_R083_RGAINADDR}, /* 00,83,16,cc */ |
| 4804 | {0xa0, 0x18, ZC3XX_R085_BGAINADDR}, /* 00,85,18,cc */ |
| 4805 | {0xa0, 0x1a, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,1a,cc */ |
| 4806 | {0xa0, 0x1b, ZC3XX_R087_EXPTIMEMID}, /* 00,87,1b,cc */ |
| 4807 | {0xa0, 0x1c, ZC3XX_R088_EXPTIMELOW}, /* 00,88,1c,cc */ |
| 4808 | {0xa0, 0xee, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,ee,cc */ |
| 4809 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 4810 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 4811 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 4812 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 4813 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 4814 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 4815 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 4816 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 4817 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 4818 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 4819 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 4820 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 4821 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 4822 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e8,cc */ |
| 4823 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4824 | {0xaa, 0x09, 0x00cc}, /* 00,09,cc,aa */ |
| 4825 | {0xaa, 0x0b, 0x0005}, /* 00,0b,05,aa */ |
| 4826 | {0xaa, 0x0d, 0x0058}, /* 00,0d,58,aa */ |
| 4827 | {0xaa, 0x0f, 0x00ed}, /* 00,0f,ed,aa */ |
| 4828 | {0xaa, 0x87, 0x0000}, /* 00,87,00,aa */ |
| 4829 | {0xaa, 0x88, 0x0004}, /* 00,88,04,aa */ |
| 4830 | {0xaa, 0x89, 0x0000}, /* 00,89,00,aa */ |
| 4831 | {0xaa, 0x8a, 0x0005}, /* 00,8a,05,aa */ |
| 4832 | {0xaa, 0x13, 0x0003}, /* 00,13,03,aa */ |
| 4833 | {0xaa, 0x16, 0x0040}, /* 00,16,40,aa */ |
| 4834 | {0xaa, 0x18, 0x0040}, /* 00,18,40,aa */ |
| 4835 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 4836 | {0xaa, 0x29, 0x00e8}, /* 00,29,e8,aa */ |
| 4837 | {0xaa, 0x45, 0x0045}, /* 00,45,45,aa */ |
| 4838 | {0xaa, 0x50, 0x00ed}, /* 00,50,ed,aa */ |
| 4839 | {0xaa, 0x51, 0x0025}, /* 00,51,25,aa */ |
| 4840 | {0xaa, 0x52, 0x0042}, /* 00,52,42,aa */ |
| 4841 | {0xaa, 0x53, 0x002f}, /* 00,53,2f,aa */ |
| 4842 | {0xaa, 0x79, 0x0025}, /* 00,79,25,aa */ |
| 4843 | {0xaa, 0x7b, 0x0000}, /* 00,7b,00,aa */ |
| 4844 | {0xaa, 0x7e, 0x0025}, /* 00,7e,25,aa */ |
| 4845 | {0xaa, 0x7f, 0x0025}, /* 00,7f,25,aa */ |
| 4846 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 4847 | {0xaa, 0x33, 0x0036}, /* 00,33,36,aa */ |
| 4848 | {0xaa, 0x36, 0x0060}, /* 00,36,60,aa */ |
| 4849 | {0xaa, 0x37, 0x0008}, /* 00,37,08,aa */ |
| 4850 | {0xaa, 0x3b, 0x0031}, /* 00,3b,31,aa */ |
| 4851 | {0xaa, 0x44, 0x000f}, /* 00,44,0f,aa */ |
| 4852 | {0xaa, 0x58, 0x0002}, /* 00,58,02,aa */ |
| 4853 | {0xaa, 0x66, 0x00c0}, /* 00,66,c0,aa */ |
| 4854 | {0xaa, 0x67, 0x0044}, /* 00,67,44,aa */ |
| 4855 | {0xaa, 0x6b, 0x00a0}, /* 00,6b,a0,aa */ |
| 4856 | {0xaa, 0x6c, 0x0054}, /* 00,6c,54,aa */ |
| 4857 | {0xaa, 0xd6, 0x0007}, /* 00,d6,07,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4858 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,f7,cc */ |
| 4859 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 4860 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 4861 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4862 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4863 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 4864 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 4865 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 4866 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 4867 | {0xa0, 0x7a, ZC3XX_R116_RGAIN}, /* 01,16,7a,cc */ |
| 4868 | {0xa0, 0x4a, ZC3XX_R118_BGAIN}, /* 01,18,4a,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4869 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4870 | }; |
| 4871 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4872 | static const struct usb_action PO2030_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4873 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 4874 | {0xaa, 0x1a, 0x0001}, /* 00,1a,01,aa */ |
| 4875 | {0xaa, 0x1b, 0x000a}, /* 00,1b,0a,aa */ |
| 4876 | {0xaa, 0x1c, 0x00b0}, /* 00,1c,b0,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4877 | {0xa0, 0x05, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,05,cc */ |
| 4878 | {0xa0, 0x35, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,35,cc */ |
| 4879 | {0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,70,cc */ |
| 4880 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4881 | {0xa0, 0x85, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,85,cc */ |
| 4882 | {0xa0, 0x58, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,58,cc */ |
| 4883 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 4884 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
| 4885 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
| 4886 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 4887 | {0xa0, 0x22, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,22,cc */ |
| 4888 | {0xa0, 0x88, ZC3XX_R18D_YTARGET}, /* 01,8d,88,cc */ |
| 4889 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc */ |
| 4890 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4891 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4892 | }; |
| 4893 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4894 | static const struct usb_action PO2030_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4895 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 4896 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 4897 | {0xaa, 0x1b, 0x00de}, /* 00,1b,de,aa */ |
| 4898 | {0xaa, 0x1c, 0x0040}, /* 00,1c,40,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4899 | {0xa0, 0x08, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,08,cc */ |
| 4900 | {0xa0, 0xae, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,ae,cc */ |
| 4901 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,80,cc */ |
| 4902 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4903 | {0xa0, 0x6f, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,6f,cc */ |
| 4904 | {0xa0, 0x20, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,20,cc */ |
| 4905 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 4906 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
| 4907 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
| 4908 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 4909 | {0xa0, 0x22, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,22,cc */ |
| 4910 | {0xa0, 0x88, ZC3XX_R18D_YTARGET}, /* 01,8d,88,cc */ |
| 4911 | /* win: 01,8d,80 */ |
| 4912 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc */ |
| 4913 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4914 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4915 | }; |
| 4916 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4917 | static const struct usb_action PO2030_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4918 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4919 | {0xaa, 0x8d, 0x000d}, /* 00,8d,0d,aa */ |
| 4920 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 4921 | {0xaa, 0x1b, 0x0002}, /* 00,1b,02,aa */ |
| 4922 | {0xaa, 0x1c, 0x0078}, /* 00,1c,78,aa */ |
| 4923 | {0xaa, 0x46, 0x0000}, /* 00,46,00,aa */ |
| 4924 | {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4925 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4926 | }; |
| 4927 | |
| 4928 | /* TEST */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4929 | static const struct usb_action tas5130CK_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4930 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4931 | {0xa0, 0x01, 0x003b}, |
| 4932 | {0xa0, 0x0e, 0x003a}, |
| 4933 | {0xa0, 0x01, 0x0038}, |
| 4934 | {0xa0, 0x0b, 0x0039}, |
| 4935 | {0xa0, 0x00, 0x0038}, |
| 4936 | {0xa0, 0x0b, 0x0039}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4937 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4938 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4939 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4940 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 4941 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4942 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4943 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4944 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4945 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4946 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4947 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4948 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4949 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4950 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4951 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4952 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4953 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4954 | {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4955 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 4956 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 4957 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4958 | {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4959 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 4960 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 4961 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4962 | {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4963 | {0xa0, 0x83, ZC3XX_R093_I2CSETVALUE}, |
| 4964 | {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK}, |
| 4965 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4966 | {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4967 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 4968 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 4969 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4970 | {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4971 | {0xa0, 0x06, ZC3XX_R093_I2CSETVALUE}, |
| 4972 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 4973 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4974 | {0xa0, 0x02, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4975 | {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE}, |
| 4976 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 4977 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4978 | {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4979 | {0xa0, 0xE7, ZC3XX_R093_I2CSETVALUE}, |
| 4980 | {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK}, |
| 4981 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4982 | {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4983 | {0xa0, 0x87, ZC3XX_R093_I2CSETVALUE}, |
| 4984 | {0xa0, 0x02, ZC3XX_R094_I2CWRITEACK}, |
| 4985 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4986 | {0xa0, 0x07, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4987 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 4988 | {0xa0, 0x30, ZC3XX_R094_I2CWRITEACK}, |
| 4989 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4990 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4991 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 4992 | {0xa0, 0x51, ZC3XX_R094_I2CWRITEACK}, |
| 4993 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4994 | {0xa0, 0x35, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4995 | {0xa0, 0x7F, ZC3XX_R093_I2CSETVALUE}, |
| 4996 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 4997 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 4998 | {0xa0, 0x30, ZC3XX_R092_I2CADDRESSSELECT}, |
| 4999 | {0xa0, 0x05, ZC3XX_R093_I2CSETVALUE}, |
| 5000 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5001 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5002 | {0xa0, 0x31, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5003 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 5004 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5005 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5006 | {0xa0, 0x58, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5007 | {0xa0, 0x78, ZC3XX_R093_I2CSETVALUE}, |
| 5008 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5009 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5010 | {0xa0, 0x62, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5011 | {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE}, |
| 5012 | {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK}, |
| 5013 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5014 | {0xa0, 0x2B, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5015 | {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE}, |
| 5016 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5017 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5018 | {0xa0, 0x2c, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5019 | {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE}, |
| 5020 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5021 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5022 | {0xa0, 0x2D, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5023 | {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE}, |
| 5024 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5025 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5026 | {0xa0, 0x2e, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5027 | {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE}, |
| 5028 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5029 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5030 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 5031 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
| 5032 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 5033 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 5034 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5035 | {0xa0, 0x09, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5036 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 5037 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 5038 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 5039 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 5040 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 5041 | {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, |
| 5042 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 5043 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5044 | {0xa0, 0x09, 0x01ad}, |
| 5045 | {0xa0, 0x15, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5046 | {0xa0, 0x4c, ZC3XX_R10A_RGB00}, /* matrix */ |
| 5047 | {0xa0, 0xf1, ZC3XX_R10B_RGB01}, |
| 5048 | {0xa0, 0x03, ZC3XX_R10C_RGB02}, |
| 5049 | {0xa0, 0xfe, ZC3XX_R10D_RGB10}, |
| 5050 | {0xa0, 0x51, ZC3XX_R10E_RGB11}, |
| 5051 | {0xa0, 0xf1, ZC3XX_R10F_RGB12}, |
| 5052 | {0xa0, 0xec, ZC3XX_R110_RGB20}, |
| 5053 | {0xa0, 0x03, ZC3XX_R111_RGB21}, |
| 5054 | {0xa0, 0x51, ZC3XX_R112_RGB22}, |
| 5055 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 5056 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
| 5057 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 5058 | {0xa0, 0x38, ZC3XX_R120_GAMMA00}, /* gamma > 5 */ |
| 5059 | {0xa0, 0x51, ZC3XX_R121_GAMMA01}, |
| 5060 | {0xa0, 0x6e, ZC3XX_R122_GAMMA02}, |
| 5061 | {0xa0, 0x8c, ZC3XX_R123_GAMMA03}, |
| 5062 | {0xa0, 0xa2, ZC3XX_R124_GAMMA04}, |
| 5063 | {0xa0, 0xb6, ZC3XX_R125_GAMMA05}, |
| 5064 | {0xa0, 0xc8, ZC3XX_R126_GAMMA06}, |
| 5065 | {0xa0, 0xd6, ZC3XX_R127_GAMMA07}, |
| 5066 | {0xa0, 0xe2, ZC3XX_R128_GAMMA08}, |
| 5067 | {0xa0, 0xed, ZC3XX_R129_GAMMA09}, |
| 5068 | {0xa0, 0xf5, ZC3XX_R12A_GAMMA0A}, |
| 5069 | {0xa0, 0xfc, ZC3XX_R12B_GAMMA0B}, |
| 5070 | {0xa0, 0xff, ZC3XX_R12C_GAMMA0C}, |
| 5071 | {0xa0, 0xff, ZC3XX_R12D_GAMMA0D}, |
| 5072 | {0xa0, 0xff, ZC3XX_R12E_GAMMA0E}, |
| 5073 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 5074 | {0xa0, 0x12, ZC3XX_R130_GAMMA10}, |
| 5075 | {0xa0, 0x1b, ZC3XX_R131_GAMMA11}, |
| 5076 | {0xa0, 0x1d, ZC3XX_R132_GAMMA12}, |
| 5077 | {0xa0, 0x1a, ZC3XX_R133_GAMMA13}, |
| 5078 | {0xa0, 0x15, ZC3XX_R134_GAMMA14}, |
| 5079 | {0xa0, 0x12, ZC3XX_R135_GAMMA15}, |
| 5080 | {0xa0, 0x0f, ZC3XX_R136_GAMMA16}, |
| 5081 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 5082 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 5083 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 5084 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 5085 | {0xa0, 0x05, ZC3XX_R13B_GAMMA1B}, |
| 5086 | {0xa0, 0x00, ZC3XX_R13C_GAMMA1C}, |
| 5087 | {0xa0, 0x00, ZC3XX_R13D_GAMMA1D}, |
| 5088 | {0xa0, 0x00, ZC3XX_R13E_GAMMA1E}, |
| 5089 | {0xa0, 0x01, ZC3XX_R13F_GAMMA1F}, |
| 5090 | {0xa0, 0x4c, ZC3XX_R10A_RGB00}, /* matrix */ |
| 5091 | {0xa0, 0xf1, ZC3XX_R10B_RGB01}, |
| 5092 | {0xa0, 0x03, ZC3XX_R10C_RGB02}, |
| 5093 | {0xa0, 0xfe, ZC3XX_R10D_RGB10}, |
| 5094 | {0xa0, 0x51, ZC3XX_R10E_RGB11}, |
| 5095 | {0xa0, 0xf1, ZC3XX_R10F_RGB12}, |
| 5096 | {0xa0, 0xec, ZC3XX_R110_RGB20}, |
| 5097 | {0xa0, 0x03, ZC3XX_R111_RGB21}, |
| 5098 | {0xa0, 0x51, ZC3XX_R112_RGB22}, |
| 5099 | {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 5100 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 5101 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 5102 | {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5103 | {0xa0, 0x09, ZC3XX_R093_I2CSETVALUE}, |
| 5104 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5105 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5106 | {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5107 | {0xa0, 0x34, ZC3XX_R093_I2CSETVALUE}, |
| 5108 | {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK}, |
| 5109 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5110 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 5111 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5112 | {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 5113 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 5114 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 5115 | {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 5116 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 5117 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 5118 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5119 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 5120 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 5121 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 5122 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 5123 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 5124 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5125 | {0xa0, 0x09, 0x01ad}, |
| 5126 | {0xa0, 0x15, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5127 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 5128 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5129 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5130 | }; |
| 5131 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5132 | static const struct usb_action tas5130CK_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5133 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5134 | {0xa0, 0x01, 0x003b}, |
| 5135 | {0xa0, 0x0e, 0x003a}, |
| 5136 | {0xa0, 0x01, 0x0038}, |
| 5137 | {0xa0, 0x0b, 0x0039}, |
| 5138 | {0xa0, 0x00, 0x0038}, |
| 5139 | {0xa0, 0x0b, 0x0039}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5140 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 5141 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 5142 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 5143 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 5144 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 5145 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 5146 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 5147 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 5148 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 5149 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5150 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 5151 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 5152 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 5153 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 5154 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 5155 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 5156 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 5157 | {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5158 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 5159 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5160 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5161 | {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5162 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 5163 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5164 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5165 | {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5166 | {0xa0, 0x83, ZC3XX_R093_I2CSETVALUE}, |
| 5167 | {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK}, |
| 5168 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5169 | {0xa0, 0x01, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5170 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 5171 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5172 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5173 | {0xa0, 0x08, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5174 | {0xa0, 0x06, ZC3XX_R093_I2CSETVALUE}, |
| 5175 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5176 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5177 | {0xa0, 0x02, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5178 | {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE}, |
| 5179 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5180 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5181 | {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5182 | {0xa0, 0xe5, ZC3XX_R093_I2CSETVALUE}, |
| 5183 | {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK}, |
| 5184 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5185 | {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5186 | {0xa0, 0x85, ZC3XX_R093_I2CSETVALUE}, |
| 5187 | {0xa0, 0x02, ZC3XX_R094_I2CWRITEACK}, |
| 5188 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5189 | {0xa0, 0x07, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5190 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 5191 | {0xa0, 0x30, ZC3XX_R094_I2CWRITEACK}, |
| 5192 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5193 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5194 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 5195 | {0xa0, 0x51, ZC3XX_R094_I2CWRITEACK}, |
| 5196 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5197 | {0xa0, 0x35, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5198 | {0xa0, 0x7F, ZC3XX_R093_I2CSETVALUE}, |
| 5199 | {0xa0, 0x50, ZC3XX_R094_I2CWRITEACK}, |
| 5200 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5201 | {0xa0, 0x30, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5202 | {0xa0, 0x05, ZC3XX_R093_I2CSETVALUE}, |
| 5203 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5204 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5205 | {0xa0, 0x31, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5206 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 5207 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5208 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5209 | {0xa0, 0x58, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5210 | {0xa0, 0x78, ZC3XX_R093_I2CSETVALUE}, |
| 5211 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5212 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5213 | {0xa0, 0x62, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5214 | {0xa0, 0x11, ZC3XX_R093_I2CSETVALUE}, |
| 5215 | {0xa0, 0x04, ZC3XX_R094_I2CWRITEACK}, |
| 5216 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5217 | {0xa0, 0x2B, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5218 | {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE}, |
| 5219 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5220 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5221 | {0xa0, 0x2C, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5222 | {0xa0, 0x7F, ZC3XX_R093_I2CSETVALUE}, |
| 5223 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5224 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5225 | {0xa0, 0x2D, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5226 | {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE}, |
| 5227 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5228 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5229 | {0xa0, 0x2e, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5230 | {0xa0, 0x7f, ZC3XX_R093_I2CSETVALUE}, |
| 5231 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5232 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5233 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 5234 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
| 5235 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 5236 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 5237 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5238 | {0xa0, 0x09, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5239 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 5240 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 5241 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 5242 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 5243 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 5244 | {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, |
| 5245 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 5246 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5247 | {0xa0, 0x09, 0x01ad}, |
| 5248 | {0xa0, 0x15, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5249 | {0xa0, 0x4c, ZC3XX_R10A_RGB00}, /* matrix */ |
| 5250 | {0xa0, 0xf1, ZC3XX_R10B_RGB01}, |
| 5251 | {0xa0, 0x03, ZC3XX_R10C_RGB02}, |
| 5252 | {0xa0, 0xfe, ZC3XX_R10D_RGB10}, |
| 5253 | {0xa0, 0x51, ZC3XX_R10E_RGB11}, |
| 5254 | {0xa0, 0xf1, ZC3XX_R10F_RGB12}, |
| 5255 | {0xa0, 0xec, ZC3XX_R110_RGB20}, |
| 5256 | {0xa0, 0x03, ZC3XX_R111_RGB21}, |
| 5257 | {0xa0, 0x51, ZC3XX_R112_RGB22}, |
| 5258 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 5259 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
| 5260 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 5261 | {0xa0, 0x38, ZC3XX_R120_GAMMA00}, /* gamma > 5 */ |
| 5262 | {0xa0, 0x51, ZC3XX_R121_GAMMA01}, |
| 5263 | {0xa0, 0x6e, ZC3XX_R122_GAMMA02}, |
| 5264 | {0xa0, 0x8c, ZC3XX_R123_GAMMA03}, |
| 5265 | {0xa0, 0xa2, ZC3XX_R124_GAMMA04}, |
| 5266 | {0xa0, 0xb6, ZC3XX_R125_GAMMA05}, |
| 5267 | {0xa0, 0xc8, ZC3XX_R126_GAMMA06}, |
| 5268 | {0xa0, 0xd6, ZC3XX_R127_GAMMA07}, |
| 5269 | {0xa0, 0xe2, ZC3XX_R128_GAMMA08}, |
| 5270 | {0xa0, 0xed, ZC3XX_R129_GAMMA09}, |
| 5271 | {0xa0, 0xf5, ZC3XX_R12A_GAMMA0A}, |
| 5272 | {0xa0, 0xfc, ZC3XX_R12B_GAMMA0B}, |
| 5273 | {0xa0, 0xff, ZC3XX_R12C_GAMMA0C}, |
| 5274 | {0xa0, 0xff, ZC3XX_R12D_GAMMA0D}, |
| 5275 | {0xa0, 0xff, ZC3XX_R12E_GAMMA0E}, |
| 5276 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 5277 | {0xa0, 0x12, ZC3XX_R130_GAMMA10}, |
| 5278 | {0xa0, 0x1b, ZC3XX_R131_GAMMA11}, |
| 5279 | {0xa0, 0x1d, ZC3XX_R132_GAMMA12}, |
| 5280 | {0xa0, 0x1a, ZC3XX_R133_GAMMA13}, |
| 5281 | {0xa0, 0x15, ZC3XX_R134_GAMMA14}, |
| 5282 | {0xa0, 0x12, ZC3XX_R135_GAMMA15}, |
| 5283 | {0xa0, 0x0f, ZC3XX_R136_GAMMA16}, |
| 5284 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 5285 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 5286 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 5287 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 5288 | {0xa0, 0x05, ZC3XX_R13B_GAMMA1B}, |
| 5289 | {0xa0, 0x00, ZC3XX_R13C_GAMMA1C}, |
| 5290 | {0xa0, 0x00, ZC3XX_R13D_GAMMA1D}, |
| 5291 | {0xa0, 0x00, ZC3XX_R13E_GAMMA1E}, |
| 5292 | {0xa0, 0x01, ZC3XX_R13F_GAMMA1F}, |
| 5293 | {0xa0, 0x4c, ZC3XX_R10A_RGB00}, /* matrix */ |
| 5294 | {0xa0, 0xf1, ZC3XX_R10B_RGB01}, |
| 5295 | {0xa0, 0x03, ZC3XX_R10C_RGB02}, |
| 5296 | {0xa0, 0xfe, ZC3XX_R10D_RGB10}, |
| 5297 | {0xa0, 0x51, ZC3XX_R10E_RGB11}, |
| 5298 | {0xa0, 0xf1, ZC3XX_R10F_RGB12}, |
| 5299 | {0xa0, 0xec, ZC3XX_R110_RGB20}, |
| 5300 | {0xa0, 0x03, ZC3XX_R111_RGB21}, |
| 5301 | {0xa0, 0x51, ZC3XX_R112_RGB22}, |
| 5302 | {0xa0, 0x10, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 5303 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 5304 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 5305 | {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5306 | {0xa0, 0x62, ZC3XX_R093_I2CSETVALUE}, |
| 5307 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 5308 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5309 | {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT}, |
| 5310 | {0xa0, 0xaa, ZC3XX_R093_I2CSETVALUE}, |
| 5311 | {0xa0, 0x01, ZC3XX_R094_I2CWRITEACK}, |
| 5312 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 5313 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 5314 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5315 | {0xa0, 0x9b, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 5316 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 5317 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 5318 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, |
| 5319 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 5320 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 5321 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5322 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 5323 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, |
| 5324 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, |
| 5325 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, |
| 5326 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 5327 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 5328 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5329 | {0xa0, 0x09, 0x01ad}, |
| 5330 | {0xa0, 0x15, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5331 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 5332 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5333 | {0xa0, 0x30, 0x0007}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5334 | {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5335 | {0xa0, 0x00, 0x0007}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5336 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5337 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5338 | }; |
| 5339 | |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5340 | static const struct usb_action tas5130cxx_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5341 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 5342 | {0xa0, 0x50, ZC3XX_R002_CLOCKSELECT}, |
| 5343 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 5344 | {0xa0, 0x02, ZC3XX_R010_CMOSSENSORSELECT}, |
| 5345 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5346 | {0xa0, 0x00, ZC3XX_R001_SYSTEMOPERATING}, |
| 5347 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 5348 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5349 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5350 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 5351 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 5352 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 5353 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5354 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5355 | {0xa0, 0x04, ZC3XX_R098_WINYSTARTLOW}, |
| 5356 | {0xa0, 0x0f, ZC3XX_R09A_WINXSTARTLOW}, |
| 5357 | {0xa0, 0x04, ZC3XX_R11A_FIRSTYLOW}, |
| 5358 | {0xa0, 0x0f, ZC3XX_R11C_FIRSTXLOW}, |
| 5359 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 5360 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 5361 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 5362 | {0xa0, 0x06, ZC3XX_R08D_COMPABILITYMODE}, |
| 5363 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, |
| 5364 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 5365 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5366 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5367 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5368 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5369 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 5370 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 5371 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 5372 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5373 | {0xa0, 0x07, ZC3XX_R0A5_EXPOSUREGAIN}, |
| 5374 | {0xa0, 0x02, ZC3XX_R0A6_EXPOSUREBLACKLVL}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5375 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5376 | }; |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5377 | static const struct usb_action tas5130cxx_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5378 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 5379 | {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5380 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5381 | {0xa0, 0x02, ZC3XX_R010_CMOSSENSORSELECT}, |
| 5382 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5383 | {0xa0, 0x00, ZC3XX_R001_SYSTEMOPERATING}, |
| 5384 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 5385 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5386 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5387 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 5388 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 5389 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 5390 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 5391 | {0xa0, 0x05, ZC3XX_R098_WINYSTARTLOW}, |
| 5392 | {0xa0, 0x0f, ZC3XX_R09A_WINXSTARTLOW}, |
| 5393 | {0xa0, 0x05, ZC3XX_R11A_FIRSTYLOW}, |
| 5394 | {0xa0, 0x0f, ZC3XX_R11C_FIRSTXLOW}, |
| 5395 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
| 5396 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 5397 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
| 5398 | {0xa0, 0x06, ZC3XX_R08D_COMPABILITYMODE}, |
| 5399 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 5400 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 5401 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5402 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5403 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5404 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5405 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 5406 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 5407 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 5408 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5409 | {0xa0, 0x07, ZC3XX_R0A5_EXPOSUREGAIN}, |
| 5410 | {0xa0, 0x02, ZC3XX_R0A6_EXPOSUREBLACKLVL}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5411 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5412 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5413 | static const struct usb_action tas5130cxx_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5414 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5415 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5416 | {0xaa, 0xa4, 0x0063}, /* 00,a4,63,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5417 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5418 | {0xa0, 0x63, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,63,cc */ |
| 5419 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5420 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5421 | {0xa0, 0xfe, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5422 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5423 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5424 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,47,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5425 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5426 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5427 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5428 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5429 | {0xa0, 0xd3, ZC3XX_R01D_HSYNC_0}, /* 00,1d,d3,cc */ |
| 5430 | {0xa0, 0xda, ZC3XX_R01E_HSYNC_1}, /* 00,1e,da,cc */ |
| 5431 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */ |
| 5432 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5433 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5434 | {0xa0, 0x4c, ZC3XX_R0A0_MAXXLOW}, |
| 5435 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5436 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5437 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5438 | static const struct usb_action tas5130cxx_50HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5439 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5440 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5441 | {0xaa, 0xa4, 0x0077}, /* 00,a4,77,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5442 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5443 | {0xa0, 0x77, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,77,cc */ |
| 5444 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5445 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5446 | {0xa0, 0xd0, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5447 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5448 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5449 | {0xa0, 0x7d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,7d,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5450 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5451 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5452 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5453 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5454 | {0xa0, 0xf0, ZC3XX_R01D_HSYNC_0}, /* 00,1d,f0,cc */ |
| 5455 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,f4,cc */ |
| 5456 | {0xa0, 0xf8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,f8,cc */ |
| 5457 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5458 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5459 | {0xa0, 0xc0, ZC3XX_R0A0_MAXXLOW}, |
| 5460 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5461 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5462 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5463 | static const struct usb_action tas5130cxx_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5464 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5465 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5466 | {0xaa, 0xa4, 0x0036}, /* 00,a4,36,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5467 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5468 | {0xa0, 0x36, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,36,cc */ |
| 5469 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5470 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5471 | {0xa0, 0x54, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5472 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5473 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5474 | {0xa0, 0x3e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,3e,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5475 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5476 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5477 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5478 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5479 | {0xa0, 0xca, ZC3XX_R01D_HSYNC_0}, /* 00,1d,ca,cc */ |
| 5480 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5481 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5482 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5483 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5484 | {0xa0, 0x28, ZC3XX_R0A0_MAXXLOW}, |
| 5485 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5486 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5487 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5488 | static const struct usb_action tas5130cxx_60HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5489 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5490 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5491 | {0xaa, 0xa4, 0x0077}, /* 00,a4,77,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5492 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5493 | {0xa0, 0x77, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,77,cc */ |
| 5494 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5495 | {0xa0, 0x09, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5496 | {0xa0, 0x47, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5497 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5498 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5499 | {0xa0, 0x7d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,7d,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5500 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5501 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5502 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5503 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5504 | {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c8,cc */ |
| 5505 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5506 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5507 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5508 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5509 | {0xa0, 0x20, ZC3XX_R0A0_MAXXLOW}, |
| 5510 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5511 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5512 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5513 | static const struct usb_action tas5130cxx_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5514 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5515 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5516 | {0xaa, 0xa4, 0x0040}, /* 00,a4,40,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5517 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5518 | {0xa0, 0x40, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,40,cc */ |
| 5519 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5520 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5521 | {0xa0, 0xa0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 5522 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 5523 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 5524 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 5525 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5526 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5527 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 5528 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 5529 | {0xa0, 0xbc, ZC3XX_R01D_HSYNC_0}, /* 00,1d,bc,cc */ |
| 5530 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5531 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5532 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5533 | {0xa0, 0x02, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,02,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5534 | {0xa0, 0xf0, ZC3XX_R0A0_MAXXLOW}, |
| 5535 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5536 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5537 | }; |
| 5538 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5539 | static const struct usb_action tas5130cxx_NoFlikerScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5540 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5541 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5542 | {0xaa, 0xa4, 0x0090}, /* 00,a4,90,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5543 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5544 | {0xa0, 0x90, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,90,cc */ |
| 5545 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5546 | {0xa0, 0x0a, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5547 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 5548 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 5549 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 5550 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 5551 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5552 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5553 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 5554 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 5555 | {0xa0, 0xbc, ZC3XX_R01D_HSYNC_0}, /* 00,1d,bc,cc */ |
| 5556 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5557 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5558 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5559 | {0xa0, 0x02, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,02,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5560 | {0xa0, 0xf0, ZC3XX_R0A0_MAXXLOW}, |
| 5561 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
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 | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5565 | static const struct usb_action tas5130c_vf0250_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5566 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc, */ |
| 5567 | {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, /* 00,08,02,cc, */ |
| 5568 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc, */ |
| 5569 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc, |
| 5570 | * 0<->10 */ |
| 5571 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc, */ |
| 5572 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc, */ |
| 5573 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc, */ |
| 5574 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc, */ |
| 5575 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
| 5576 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc, */ |
| 5577 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc, */ |
| 5578 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc, */ |
| 5579 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc, */ |
| 5580 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc, */ |
| 5581 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc, */ |
| 5582 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc, */ |
| 5583 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc, |
| 5584 | * 6<->8 */ |
| 5585 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc, |
| 5586 | * 6<->8 */ |
| 5587 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, /* 00,87,10,cc, */ |
| 5588 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5589 | {0xaa, 0x1b, 0x0024}, /* 00,1b,24,aa, */ |
| 5590 | {0xdd, 0x00, 0x0080}, /* 00,00,80,dd, */ |
| 5591 | {0xaa, 0x1b, 0x0000}, /* 00,1b,00,aa, */ |
| 5592 | {0xaa, 0x13, 0x0002}, /* 00,13,02,aa, */ |
| 5593 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5594 | /*?? {0xaa, 0x01, 0x0000}, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5595 | {0xaa, 0x01, 0x0000}, |
| 5596 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */ |
| 5597 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5598 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc, */ |
| 5599 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc, */ |
| 5600 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5601 | {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */ |
| 5602 | {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa, */ |
| 5603 | {0xaa, 0x0b, 0x00a0}, /* 00,0b,a0,aa, */ |
| 5604 | {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa, */ |
| 5605 | {0xaa, 0x0d, 0x00a0}, /* 00,0d,a0,aa, */ |
| 5606 | {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa, */ |
| 5607 | {0xaa, 0x0f, 0x00a0}, /* 00,0f,a0,aa, */ |
| 5608 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa, */ |
| 5609 | {0xaa, 0x11, 0x00a0}, /* 00,11,a0,aa, */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5610 | /*?? {0xa0, 0x00, 0x0039}, |
| 5611 | {0xa1, 0x01, 0x0037}, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5612 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */ |
| 5613 | {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa, (e6 -> e8) */ |
| 5614 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */ |
| 5615 | {0xaa, 0x19, 0x0088}, /* 00,19,86,aa, */ |
| 5616 | {0xaa, 0x20, 0x0020}, /* 00,20,20,aa, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5617 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc, */ |
| 5618 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc, */ |
| 5619 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc, */ |
| 5620 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc, */ |
| 5621 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc, */ |
| 5622 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc, */ |
| 5623 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc, */ |
| 5624 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc, */ |
| 5625 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc, */ |
| 5626 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc, */ |
| 5627 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, /* 01,16,61,cc, */ |
| 5628 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, /* 01,18,65,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5629 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5630 | }; |
| 5631 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5632 | static const struct usb_action tas5130c_vf0250_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5633 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc, */ |
| 5634 | {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, /* 00,08,02,cc, */ |
| 5635 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc, */ |
| 5636 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc, */ |
| 5637 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc, */ |
| 5638 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc, */ |
| 5639 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc, */ |
| 5640 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc, */ |
| 5641 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
| 5642 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc, */ |
| 5643 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc, */ |
| 5644 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc, */ |
| 5645 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc, */ |
| 5646 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc, */ |
| 5647 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc, */ |
| 5648 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc, */ |
| 5649 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e8,cc, |
| 5650 | * 8<->6 */ |
| 5651 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc, |
| 5652 | * 8<->6 */ |
| 5653 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, /* 00,87,10,cc, */ |
| 5654 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5655 | {0xaa, 0x1b, 0x0024}, /* 00,1b,24,aa, */ |
| 5656 | {0xdd, 0x00, 0x0080}, /* 00,00,80,dd, */ |
| 5657 | {0xaa, 0x1b, 0x0000}, /* 00,1b,00,aa, */ |
| 5658 | {0xaa, 0x13, 0x0002}, /* 00,13,02,aa, */ |
| 5659 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
Jean-Francois Moine | 2ed9f81 | 2008-11-28 15:31:43 -0300 | [diff] [blame] | 5660 | /*?? {0xaa, 0x01, 0x0000}, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5661 | {0xaa, 0x01, 0x0000}, |
| 5662 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */ |
| 5663 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5664 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc, */ |
| 5665 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc, */ |
| 5666 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5667 | {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */ |
| 5668 | {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa, */ |
| 5669 | {0xaa, 0x0b, 0x00a0}, /* 00,0b,a0,aa, */ |
| 5670 | {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa, */ |
| 5671 | {0xaa, 0x0d, 0x00a0}, /* 00,0d,a0,aa, */ |
| 5672 | {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa, */ |
| 5673 | {0xaa, 0x0f, 0x00a0}, /* 00,0f,a0,aa, */ |
| 5674 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa, */ |
| 5675 | {0xaa, 0x11, 0x00a0}, /* 00,11,a0,aa, */ |
Jean-Francois Moine | 2ed9f81 | 2008-11-28 15:31:43 -0300 | [diff] [blame] | 5676 | /*?? {0xa0, 0x00, 0x0039}, |
| 5677 | {0xa1, 0x01, 0x0037}, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5678 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */ |
| 5679 | {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa (e6 -> e8) */ |
| 5680 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */ |
| 5681 | {0xaa, 0x19, 0x0088}, /* 00,19,88,aa, */ |
| 5682 | {0xaa, 0x20, 0x0020}, /* 00,20,20,aa, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5683 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc, */ |
| 5684 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc, */ |
| 5685 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc, */ |
| 5686 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc, */ |
| 5687 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc, */ |
| 5688 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc, */ |
| 5689 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc, */ |
| 5690 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc, */ |
| 5691 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc, */ |
| 5692 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc, */ |
| 5693 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, /* 01,16,61,cc, */ |
| 5694 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, /* 01,18,65,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5695 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5696 | }; |
| 5697 | /* "50HZ" light frequency banding filter */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5698 | static const struct usb_action tas5130c_vf0250_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5699 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5700 | {0xaa, 0x83, 0x0001}, /* 00,83,01,aa */ |
| 5701 | {0xaa, 0x84, 0x00aa}, /* 00,84,aa,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5702 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5703 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0d,cc, */ |
| 5704 | {0xa0, 0xa8, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc, */ |
| 5705 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5706 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5707 | {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,47,cc, */ |
| 5708 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5709 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5710 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ |
| 5711 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */ |
| 5712 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5713 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5714 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5715 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5716 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5717 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
| 5718 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,8d,78,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5719 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5720 | }; |
| 5721 | |
| 5722 | /* "50HZScale" light frequency banding filter */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5723 | static const struct usb_action tas5130c_vf0250_50HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5724 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5725 | {0xaa, 0x83, 0x0003}, /* 00,83,03,aa */ |
| 5726 | {0xaa, 0x84, 0x0054}, /* 00,84,54,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5727 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5728 | {0xa0, 0x0d, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0d,cc, */ |
| 5729 | {0xa0, 0x50, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc, */ |
| 5730 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5731 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5732 | {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,8e,cc, */ |
| 5733 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5734 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5735 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ |
| 5736 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */ |
| 5737 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5738 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5739 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5740 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5741 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5742 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
| 5743 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,8d,78,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5744 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5745 | }; |
| 5746 | |
| 5747 | /* "60HZ" light frequency banding filter */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5748 | static const struct usb_action tas5130c_vf0250_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5749 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5750 | {0xaa, 0x83, 0x0001}, /* 00,83,01,aa */ |
| 5751 | {0xaa, 0x84, 0x0062}, /* 00,84,62,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5752 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5753 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,05,cc, */ |
| 5754 | {0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,88,cc, */ |
| 5755 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5756 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5757 | {0xa0, 0x3b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,3b,cc, */ |
| 5758 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5759 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5760 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ |
| 5761 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */ |
| 5762 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5763 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5764 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5765 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5766 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5767 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
| 5768 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,8d,78,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5769 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5770 | }; |
| 5771 | |
| 5772 | /* "60HZScale" light frequency banding ilter */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5773 | static const struct usb_action tas5130c_vf0250_60HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5774 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5775 | {0xaa, 0x83, 0x0002}, /* 00,83,02,aa */ |
| 5776 | {0xaa, 0x84, 0x00c4}, /* 00,84,c4,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5777 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5778 | {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,1,0b,cc, */ |
| 5779 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,2,10,cc, */ |
| 5780 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,5,00,cc, */ |
| 5781 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,6,00,cc, */ |
| 5782 | {0xa0, 0x76, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,7,76,cc, */ |
| 5783 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,c,0e,cc, */ |
| 5784 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,f,15,cc, */ |
| 5785 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,9,10,cc, */ |
| 5786 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,a,24,cc, */ |
| 5787 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,d,62,cc, */ |
| 5788 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,e,90,cc, */ |
| 5789 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,f,c8,cc, */ |
| 5790 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,0,ff,cc, */ |
| 5791 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,d,58,cc, */ |
| 5792 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
| 5793 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /* 01,d,78,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5794 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5795 | }; |
| 5796 | |
| 5797 | /* "NoFliker" light frequency banding flter */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5798 | static const struct usb_action tas5130c_vf0250_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5799 | {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5800 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5801 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 5802 | {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5803 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,0,00,cc, */ |
| 5804 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,05,cc, */ |
| 5805 | {0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,88,cc, */ |
| 5806 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5807 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5808 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc, */ |
| 5809 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5810 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5811 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5812 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5813 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5814 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5815 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5816 | {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5817 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5818 | }; |
| 5819 | |
| 5820 | /* "NoFlikerScale" light frequency banding filter */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5821 | static const struct usb_action tas5130c_vf0250_NoFlikerScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5822 | {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5823 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5824 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 5825 | {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5826 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5827 | {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0b,cc, */ |
| 5828 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,10,cc, */ |
| 5829 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5830 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5831 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc, */ |
| 5832 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5833 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5834 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5835 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5836 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5837 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5838 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5839 | {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5840 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5841 | }; |
| 5842 | |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 5843 | static u8 reg_r_i(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5844 | __u16 index) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5845 | { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5846 | usb_control_msg(gspca_dev->dev, |
| 5847 | usb_rcvctrlpipe(gspca_dev->dev, 0), |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5848 | 0xa1, |
| 5849 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
| 5850 | 0x01, /* value */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5851 | index, gspca_dev->usb_buf, 1, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5852 | 500); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5853 | return gspca_dev->usb_buf[0]; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5854 | } |
| 5855 | |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 5856 | static u8 reg_r(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5857 | __u16 index) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5858 | { |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 5859 | u8 ret; |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5860 | |
| 5861 | ret = reg_r_i(gspca_dev, index); |
| 5862 | PDEBUG(D_USBI, "reg r [%04x] -> %02x", index, ret); |
| 5863 | return ret; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5864 | } |
| 5865 | |
| 5866 | static void reg_w_i(struct usb_device *dev, |
| 5867 | __u8 value, |
| 5868 | __u16 index) |
| 5869 | { |
| 5870 | usb_control_msg(dev, |
| 5871 | usb_sndctrlpipe(dev, 0), |
| 5872 | 0xa0, |
| 5873 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
| 5874 | value, index, NULL, 0, |
| 5875 | 500); |
| 5876 | } |
| 5877 | |
| 5878 | static void reg_w(struct usb_device *dev, |
| 5879 | __u8 value, |
| 5880 | __u16 index) |
| 5881 | { |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5882 | PDEBUG(D_USBO, "reg w [%04x] = %02x", index, value); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5883 | reg_w_i(dev, value, index); |
| 5884 | } |
| 5885 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5886 | static __u16 i2c_read(struct gspca_dev *gspca_dev, |
| 5887 | __u8 reg) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5888 | { |
| 5889 | __u8 retbyte; |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5890 | __u16 retval; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5891 | |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 5892 | reg_w_i(gspca_dev->dev, reg, 0x0092); |
| 5893 | reg_w_i(gspca_dev->dev, 0x02, 0x0090); /* <- read command */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5894 | msleep(20); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5895 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5896 | if (retbyte != 0x00) |
| 5897 | err("i2c_r status error %02x", retbyte); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5898 | retval = reg_r_i(gspca_dev, 0x0095); /* read Lowbyte */ |
| 5899 | retval |= reg_r_i(gspca_dev, 0x0096) << 8; /* read Hightbyte */ |
Jean-Francois Moine | 0b119b7 | 2009-04-07 05:30:31 -0300 | [diff] [blame] | 5900 | PDEBUG(D_USBI, "i2c r [%02x] -> %04x (%02x)", |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5901 | reg, retval, retbyte); |
| 5902 | return retval; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5903 | } |
| 5904 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5905 | static __u8 i2c_write(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5906 | __u8 reg, |
| 5907 | __u8 valL, |
| 5908 | __u8 valH) |
| 5909 | { |
| 5910 | __u8 retbyte; |
| 5911 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5912 | reg_w_i(gspca_dev->dev, reg, 0x92); |
| 5913 | reg_w_i(gspca_dev->dev, valL, 0x93); |
| 5914 | reg_w_i(gspca_dev->dev, valH, 0x94); |
| 5915 | reg_w_i(gspca_dev->dev, 0x01, 0x90); /* <- write command */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5916 | msleep(1); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5917 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5918 | if (retbyte != 0x00) |
| 5919 | err("i2c_w status error %02x", retbyte); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5920 | PDEBUG(D_USBO, "i2c w [%02x] = %02x%02x (%02x)", |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5921 | reg, valH, valL, retbyte); |
| 5922 | return retbyte; |
| 5923 | } |
| 5924 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5925 | static void usb_exchange(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5926 | const struct usb_action *action) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5927 | { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5928 | while (action->req) { |
| 5929 | switch (action->req) { |
| 5930 | case 0xa0: /* write register */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5931 | reg_w(gspca_dev->dev, action->val, action->idx); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5932 | break; |
| 5933 | case 0xa1: /* read status */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5934 | reg_r(gspca_dev, action->idx); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5935 | break; |
| 5936 | case 0xaa: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5937 | i2c_write(gspca_dev, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5938 | action->val, /* reg */ |
| 5939 | action->idx & 0xff, /* valL */ |
| 5940 | action->idx >> 8); /* valH */ |
| 5941 | break; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 5942 | case 0xbb: |
| 5943 | i2c_write(gspca_dev, |
| 5944 | action->idx >> 8, /* reg */ |
| 5945 | action->idx & 0xff, /* valL */ |
| 5946 | action->val); /* valH */ |
| 5947 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5948 | default: |
| 5949 | /* case 0xdd: * delay */ |
| 5950 | msleep(action->val / 64 + 10); |
| 5951 | break; |
| 5952 | } |
| 5953 | action++; |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5954 | msleep(1); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5955 | } |
| 5956 | } |
| 5957 | |
| 5958 | static void setmatrix(struct gspca_dev *gspca_dev) |
| 5959 | { |
| 5960 | struct sd *sd = (struct sd *) gspca_dev; |
| 5961 | int i; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5962 | const __u8 *matrix; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 5963 | static const u8 adcm2700_matrix[9] = |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 5964 | /* {0x66, 0xed, 0xed, 0xed, 0x66, 0xed, 0xed, 0xed, 0x66}; */ |
| 5965 | /*ms-win*/ |
| 5966 | {0x74, 0xed, 0xed, 0xed, 0x74, 0xed, 0xed, 0xed, 0x74}; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5967 | static const __u8 gc0305_matrix[9] = |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5968 | {0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50}; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5969 | static const __u8 ov7620_matrix[9] = |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5970 | {0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58}; |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 5971 | static const __u8 pas202b_matrix[9] = |
| 5972 | {0x4c, 0xf5, 0xff, 0xf9, 0x51, 0xf5, 0xfb, 0xed, 0x5f}; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5973 | static const __u8 po2030_matrix[9] = |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5974 | {0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60}; |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5975 | static const u8 tas5130c_matrix[9] = |
| 5976 | {0x68, 0xec, 0xec, 0xec, 0x68, 0xec, 0xec, 0xec, 0x68}; |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5977 | static const __u8 vf0250_matrix[9] = |
| 5978 | {0x7b, 0xea, 0xea, 0xea, 0x7b, 0xea, 0xea, 0xea, 0x7b}; |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 5979 | static const __u8 *matrix_tb[SENSOR_MAX] = { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 5980 | adcm2700_matrix, /* SENSOR_ADCM2700 0 */ |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 5981 | ov7620_matrix, /* SENSOR_CS2102 1 */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 5982 | NULL, /* SENSOR_CS2102K 2 */ |
| 5983 | gc0305_matrix, /* SENSOR_GC0305 3 */ |
| 5984 | NULL, /* SENSOR_HDCS2020b 4 */ |
| 5985 | NULL, /* SENSOR_HV7131B 5 */ |
| 5986 | NULL, /* SENSOR_HV7131C 6 */ |
| 5987 | NULL, /* SENSOR_ICM105A 7 */ |
| 5988 | NULL, /* SENSOR_MC501CB 8 */ |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 5989 | gc0305_matrix, /* SENSOR_MI0360SOC 9 */ |
| 5990 | ov7620_matrix, /* SENSOR_OV7620 10 */ |
| 5991 | NULL, /* SENSOR_OV7630C 11 */ |
| 5992 | NULL, /* SENSOR_PAS106 12 */ |
| 5993 | pas202b_matrix, /* SENSOR_PAS202B 13 */ |
| 5994 | gc0305_matrix, /* SENSOR_PB0330 14 */ |
| 5995 | po2030_matrix, /* SENSOR_PO2030 15 */ |
| 5996 | NULL, /* SENSOR_TAS5130CK 16 */ |
| 5997 | tas5130c_matrix, /* SENSOR_TAS5130CXX 17 */ |
| 5998 | vf0250_matrix, /* SENSOR_TAS5130C_VF0250 18 */ |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 5999 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6000 | |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6001 | matrix = matrix_tb[sd->sensor]; |
| 6002 | if (matrix == NULL) |
| 6003 | return; /* matrix already loaded */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6004 | for (i = 0; i < ARRAY_SIZE(ov7620_matrix); i++) |
| 6005 | reg_w(gspca_dev->dev, matrix[i], 0x010a + i); |
| 6006 | } |
| 6007 | |
| 6008 | static void setbrightness(struct gspca_dev *gspca_dev) |
| 6009 | { |
| 6010 | struct sd *sd = (struct sd *) gspca_dev; |
| 6011 | __u8 brightness; |
| 6012 | |
| 6013 | switch (sd->sensor) { |
| 6014 | case SENSOR_GC0305: |
| 6015 | case SENSOR_OV7620: |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 6016 | case SENSOR_PAS202B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6017 | case SENSOR_PO2030: |
| 6018 | return; |
| 6019 | } |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6020 | /*fixme: is it really write to 011d and 018d for all other sensors? */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6021 | brightness = sd->brightness; |
| 6022 | reg_w(gspca_dev->dev, brightness, 0x011d); |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 6023 | switch (sd->sensor) { |
| 6024 | case SENSOR_ADCM2700: |
| 6025 | case SENSOR_HV7131B: |
Jean-Francois Moine | c9ff1b6 | 2008-11-06 15:29:47 -0300 | [diff] [blame] | 6026 | return; |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 6027 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6028 | if (brightness < 0x70) |
| 6029 | brightness += 0x10; |
| 6030 | else |
| 6031 | brightness = 0x80; |
| 6032 | reg_w(gspca_dev->dev, brightness, 0x018d); |
| 6033 | } |
| 6034 | |
| 6035 | static void setsharpness(struct gspca_dev *gspca_dev) |
| 6036 | { |
| 6037 | struct sd *sd = (struct sd *) gspca_dev; |
| 6038 | struct usb_device *dev = gspca_dev->dev; |
| 6039 | int sharpness; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 6040 | static const __u8 sharpness_tb[][2] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6041 | {0x02, 0x03}, |
| 6042 | {0x04, 0x07}, |
| 6043 | {0x08, 0x0f}, |
| 6044 | {0x10, 0x1e} |
| 6045 | }; |
| 6046 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6047 | sharpness = sd->sharpness; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6048 | reg_w(dev, sharpness_tb[sharpness][0], 0x01c6); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6049 | reg_r(gspca_dev, 0x01c8); |
| 6050 | reg_r(gspca_dev, 0x01c9); |
| 6051 | reg_r(gspca_dev, 0x01ca); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6052 | reg_w(dev, sharpness_tb[sharpness][1], 0x01cb); |
| 6053 | } |
| 6054 | |
| 6055 | static void setcontrast(struct gspca_dev *gspca_dev) |
| 6056 | { |
| 6057 | struct sd *sd = (struct sd *) gspca_dev; |
| 6058 | struct usb_device *dev = gspca_dev->dev; |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6059 | const __u8 *Tgamma; |
| 6060 | int g, i, k, adj, gp; |
| 6061 | u8 gr[16]; |
| 6062 | static const u8 delta_tb[16] = /* delta for contrast */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6063 | {0x15, 0x0d, 0x0a, 0x09, 0x08, 0x08, 0x08, 0x08, |
| 6064 | 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6065 | static const u8 gamma_tb[6][16] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6066 | {0x00, 0x00, 0x03, 0x0d, 0x1b, 0x2e, 0x45, 0x5f, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6067 | 0x79, 0x93, 0xab, 0xc1, 0xd4, 0xe5, 0xf3, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6068 | {0x01, 0x0c, 0x1f, 0x3a, 0x53, 0x6d, 0x85, 0x9c, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6069 | 0xb0, 0xc2, 0xd1, 0xde, 0xe9, 0xf2, 0xf9, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6070 | {0x04, 0x16, 0x30, 0x4e, 0x68, 0x81, 0x98, 0xac, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6071 | 0xbe, 0xcd, 0xda, 0xe4, 0xed, 0xf5, 0xfb, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6072 | {0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6073 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6074 | {0x20, 0x4b, 0x6e, 0x8d, 0xa3, 0xb5, 0xc5, 0xd2, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6075 | 0xdc, 0xe5, 0xec, 0xf2, 0xf6, 0xfa, 0xfd, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6076 | {0x24, 0x44, 0x64, 0x84, 0x9d, 0xb2, 0xc4, 0xd3, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6077 | 0xe0, 0xeb, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6078 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6079 | |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6080 | Tgamma = gamma_tb[sd->gamma - 1]; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6081 | |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6082 | k = ((int) sd->contrast - 128); /* -128 / 128 */ |
| 6083 | adj = 0; |
| 6084 | gp = 0; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6085 | for (i = 0; i < 16; i++) { |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6086 | g = Tgamma[i] - delta_tb[i] * k / 128 - adj / 2; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6087 | if (g > 0xff) |
| 6088 | g = 0xff; |
| 6089 | else if (g <= 0) |
| 6090 | g = 1; |
| 6091 | reg_w(dev, g, 0x0120 + i); /* gamma */ |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6092 | if (k > 0) |
| 6093 | adj--; |
| 6094 | else |
| 6095 | adj++; |
| 6096 | |
| 6097 | if (i != 0) { |
| 6098 | if (gp == 0) |
| 6099 | gr[i - 1] = 0; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6100 | else |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6101 | gr[i - 1] = g - gp; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6102 | } |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6103 | gp = g; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6104 | } |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 6105 | gr[15] = gr[14] / 2; |
| 6106 | for (i = 0; i < 16; i++) |
| 6107 | reg_w(dev, gr[i], 0x0130 + i); /* gradient */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6108 | } |
| 6109 | |
| 6110 | static void setquality(struct gspca_dev *gspca_dev) |
| 6111 | { |
| 6112 | struct sd *sd = (struct sd *) gspca_dev; |
| 6113 | struct usb_device *dev = gspca_dev->dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6114 | __u8 frxt; |
| 6115 | |
| 6116 | switch (sd->sensor) { |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 6117 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6118 | case SENSOR_GC0305: |
Jean-Francois Moine | c9ff1b6 | 2008-11-06 15:29:47 -0300 | [diff] [blame] | 6119 | case SENSOR_HV7131B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6120 | case SENSOR_OV7620: |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 6121 | case SENSOR_PAS202B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6122 | case SENSOR_PO2030: |
| 6123 | return; |
| 6124 | } |
| 6125 | /*fixme: is it really 0008 0007 0018 for all other sensors? */ |
Jean-Francois Moine | 36e819d | 2009-01-07 16:49:57 -0300 | [diff] [blame] | 6126 | reg_w(dev, QUANT_VAL, 0x0008); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6127 | frxt = 0x30; |
| 6128 | reg_w(dev, frxt, 0x0007); |
Jean-Francois Moine | 36e819d | 2009-01-07 16:49:57 -0300 | [diff] [blame] | 6129 | #if QUANT_VAL == 0 || QUANT_VAL == 1 || QUANT_VAL == 2 |
| 6130 | frxt = 0xff; |
| 6131 | #elif QUANT_VAL == 3 |
| 6132 | frxt = 0xf0; |
| 6133 | #elif QUANT_VAL == 4 |
| 6134 | frxt = 0xe0; |
| 6135 | #else |
| 6136 | frxt = 0x20; |
| 6137 | #endif |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6138 | reg_w(dev, frxt, 0x0018); |
| 6139 | } |
| 6140 | |
| 6141 | /* Matches the sensor's internal frame rate to the lighting frequency. |
| 6142 | * Valid frequencies are: |
| 6143 | * 50Hz, for European and Asian lighting (default) |
| 6144 | * 60Hz, for American lighting |
| 6145 | * 0 = No Fliker (for outdoore usage) |
| 6146 | * Returns: 0 for success |
| 6147 | */ |
| 6148 | static int setlightfreq(struct gspca_dev *gspca_dev) |
| 6149 | { |
| 6150 | struct sd *sd = (struct sd *) gspca_dev; |
| 6151 | int i, mode; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 6152 | const struct usb_action *zc3_freq; |
| 6153 | static const struct usb_action *freq_tb[SENSOR_MAX][6] = { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6154 | /* SENSOR_ADCM2700 0 */ |
Jean-Francois Moine | c314b53 | 2009-01-20 10:02:35 -0300 | [diff] [blame] | 6155 | {adcm2700_NoFliker, adcm2700_NoFliker, |
| 6156 | adcm2700_50HZ, adcm2700_50HZ, |
| 6157 | adcm2700_60HZ, adcm2700_60HZ}, |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6158 | /* SENSOR_CS2102 1 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6159 | {cs2102_NoFliker, cs2102_NoFlikerScale, |
| 6160 | cs2102_50HZ, cs2102_50HZScale, |
| 6161 | cs2102_60HZ, cs2102_60HZScale}, |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6162 | /* SENSOR_CS2102K 2 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6163 | {cs2102_NoFliker, cs2102_NoFlikerScale, |
Costantino Leandro | 5be8b73e | 2008-09-09 04:32:46 -0300 | [diff] [blame] | 6164 | NULL, NULL, /* currently disabled */ |
| 6165 | NULL, NULL}, |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6166 | /* SENSOR_GC0305 3 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6167 | {gc0305_NoFliker, gc0305_NoFliker, |
| 6168 | gc0305_50HZ, gc0305_50HZ, |
| 6169 | gc0305_60HZ, gc0305_60HZ}, |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6170 | /* SENSOR_HDCS2020b 4 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6171 | {hdcs2020b_NoFliker, hdcs2020b_NoFliker, |
| 6172 | hdcs2020b_50HZ, hdcs2020b_50HZ, |
| 6173 | hdcs2020b_60HZ, hdcs2020b_60HZ}, |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6174 | /* SENSOR_HV7131B 5 */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 6175 | {hv7131b_NoFlikerScale, hv7131b_NoFliker, |
| 6176 | hv7131b_50HZScale, hv7131b_50HZ, |
| 6177 | hv7131b_60HZScale, hv7131b_60HZ}, |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6178 | /* SENSOR_HV7131C 6 */ |
Harvey Harrison | efab821 | 2008-07-05 06:12:47 -0300 | [diff] [blame] | 6179 | {NULL, NULL, |
| 6180 | NULL, NULL, |
| 6181 | NULL, NULL}, |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6182 | /* SENSOR_ICM105A 7 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6183 | {icm105a_NoFliker, icm105a_NoFlikerScale, |
| 6184 | icm105a_50HZ, icm105a_50HZScale, |
| 6185 | icm105a_60HZ, icm105a_60HZScale}, |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6186 | /* SENSOR_MC501CB 8 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6187 | {MC501CB_NoFliker, MC501CB_NoFlikerScale, |
| 6188 | MC501CB_50HZ, MC501CB_50HZScale, |
| 6189 | MC501CB_60HZ, MC501CB_60HZScale}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6190 | /* SENSOR_MI0360SOC 9 */ |
| 6191 | {mi360soc_AENoFlikerScale, mi360soc_AENoFliker, |
| 6192 | mi360soc_AE50HZScale, mi360soc_AE50HZ, |
| 6193 | mi360soc_AE60HZScale, mi360soc_AE60HZ}, |
| 6194 | /* SENSOR_OV7620 10 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6195 | {OV7620_NoFliker, OV7620_NoFliker, |
| 6196 | OV7620_50HZ, OV7620_50HZ, |
| 6197 | OV7620_60HZ, OV7620_60HZ}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6198 | /* SENSOR_OV7630C 11 */ |
Harvey Harrison | efab821 | 2008-07-05 06:12:47 -0300 | [diff] [blame] | 6199 | {NULL, NULL, |
| 6200 | NULL, NULL, |
| 6201 | NULL, NULL}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6202 | /* SENSOR_PAS106 12 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6203 | {pas106b_NoFliker, pas106b_NoFliker, |
| 6204 | pas106b_50HZ, pas106b_50HZ, |
| 6205 | pas106b_60HZ, pas106b_60HZ}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6206 | /* SENSOR_PAS202B 13 */ |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6207 | {pas202b_NoFlikerScale, pas202b_NoFliker, |
| 6208 | pas202b_50HZScale, pas202b_50HZ, |
| 6209 | pas202b_60HZScale, pas202b_60HZ}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6210 | /* SENSOR_PB0330 14 */ |
| 6211 | {pb0330_NoFlikerScale, pb0330_NoFliker, |
| 6212 | pb0330_50HZScale, pb0330_50HZ, |
| 6213 | pb0330_60HZScale, pb0330_60HZ}, |
| 6214 | /* SENSOR_PO2030 15 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6215 | {PO2030_NoFliker, PO2030_NoFliker, |
| 6216 | PO2030_50HZ, PO2030_50HZ, |
| 6217 | PO2030_60HZ, PO2030_60HZ}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6218 | /* SENSOR_TAS5130CK 16 */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 6219 | {tas5130cxx_NoFlikerScale, tas5130cxx_NoFliker, |
| 6220 | tas5130cxx_50HZScale, tas5130cxx_50HZ, |
| 6221 | tas5130cxx_60HZScale, tas5130cxx_60HZ}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6222 | /* SENSOR_TAS5130CXX 17 */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 6223 | {tas5130cxx_NoFlikerScale, tas5130cxx_NoFliker, |
| 6224 | tas5130cxx_50HZScale, tas5130cxx_50HZ, |
| 6225 | tas5130cxx_60HZScale, tas5130cxx_60HZ}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6226 | /* SENSOR_TAS5130C_VF0250 18 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6227 | {tas5130c_vf0250_NoFliker, tas5130c_vf0250_NoFlikerScale, |
| 6228 | tas5130c_vf0250_50HZ, tas5130c_vf0250_50HZScale, |
| 6229 | tas5130c_vf0250_60HZ, tas5130c_vf0250_60HZScale}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6230 | }; |
| 6231 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6232 | i = sd->lightfreq * 2; |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 6233 | mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6234 | if (!mode) |
| 6235 | i++; /* 640x480 */ |
| 6236 | zc3_freq = freq_tb[(int) sd->sensor][i]; |
Harvey Harrison | efab821 | 2008-07-05 06:12:47 -0300 | [diff] [blame] | 6237 | if (zc3_freq != NULL) { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6238 | usb_exchange(gspca_dev, zc3_freq); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6239 | switch (sd->sensor) { |
| 6240 | case SENSOR_GC0305: |
| 6241 | if (mode /* if 320x240 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6242 | && sd->lightfreq == 1) /* and 50Hz */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6243 | reg_w(gspca_dev->dev, 0x85, 0x018d); |
| 6244 | /* win: 0x80, 0x018d */ |
| 6245 | break; |
| 6246 | case SENSOR_OV7620: |
| 6247 | if (!mode) { /* if 640x480 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6248 | if (sd->lightfreq != 0) /* and 50 or 60 Hz */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6249 | reg_w(gspca_dev->dev, 0x40, 0x0002); |
| 6250 | else |
| 6251 | reg_w(gspca_dev->dev, 0x44, 0x0002); |
| 6252 | } |
| 6253 | break; |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 6254 | case SENSOR_PAS202B: |
| 6255 | reg_w(gspca_dev->dev, 0x00, 0x01a7); |
| 6256 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6257 | } |
| 6258 | } |
| 6259 | return 0; |
| 6260 | } |
| 6261 | |
| 6262 | static void setautogain(struct gspca_dev *gspca_dev) |
| 6263 | { |
| 6264 | struct sd *sd = (struct sd *) gspca_dev; |
| 6265 | __u8 autoval; |
| 6266 | |
| 6267 | if (sd->autogain) |
| 6268 | autoval = 0x42; |
| 6269 | else |
| 6270 | autoval = 0x02; |
| 6271 | reg_w(gspca_dev->dev, autoval, 0x0180); |
| 6272 | } |
| 6273 | |
| 6274 | static void send_unknown(struct usb_device *dev, int sensor) |
| 6275 | { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6276 | reg_w(dev, 0x01, 0x0000); /* led off */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6277 | switch (sensor) { |
| 6278 | case SENSOR_PAS106: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6279 | reg_w(dev, 0x03, 0x003a); |
| 6280 | reg_w(dev, 0x0c, 0x003b); |
| 6281 | reg_w(dev, 0x08, 0x0038); |
| 6282 | break; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6283 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6284 | case SENSOR_GC0305: |
| 6285 | case SENSOR_OV7620: |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6286 | case SENSOR_MI0360SOC: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6287 | case SENSOR_PB0330: |
| 6288 | case SENSOR_PO2030: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6289 | reg_w(dev, 0x0d, 0x003a); |
| 6290 | reg_w(dev, 0x02, 0x003b); |
| 6291 | reg_w(dev, 0x00, 0x0038); |
| 6292 | break; |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 6293 | case SENSOR_PAS202B: |
| 6294 | reg_w(dev, 0x03, 0x003b); |
| 6295 | reg_w(dev, 0x0c, 0x003a); |
| 6296 | reg_w(dev, 0x0b, 0x0039); |
| 6297 | reg_w(dev, 0x0b, 0x0038); |
| 6298 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6299 | } |
| 6300 | } |
| 6301 | |
| 6302 | /* start probe 2 wires */ |
| 6303 | static void start_2wr_probe(struct usb_device *dev, int sensor) |
| 6304 | { |
| 6305 | reg_w(dev, 0x01, 0x0000); |
| 6306 | reg_w(dev, sensor, 0x0010); |
| 6307 | reg_w(dev, 0x01, 0x0001); |
| 6308 | reg_w(dev, 0x03, 0x0012); |
| 6309 | reg_w(dev, 0x01, 0x0012); |
| 6310 | /* msleep(2); */ |
| 6311 | } |
| 6312 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6313 | static int sif_probe(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6314 | { |
| 6315 | __u16 checkword; |
| 6316 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6317 | start_2wr_probe(gspca_dev->dev, 0x0f); /* PAS106 */ |
| 6318 | reg_w(gspca_dev->dev, 0x08, 0x008d); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6319 | msleep(150); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6320 | checkword = ((i2c_read(gspca_dev, 0x00) & 0x0f) << 4) |
| 6321 | | ((i2c_read(gspca_dev, 0x01) & 0xf0) >> 4); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6322 | PDEBUG(D_PROBE, "probe sif 0x%04x", checkword); |
| 6323 | if (checkword == 0x0007) { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6324 | send_unknown(gspca_dev->dev, SENSOR_PAS106); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6325 | return 0x0f; /* PAS106 */ |
| 6326 | } |
| 6327 | return -1; |
| 6328 | } |
| 6329 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6330 | static int vga_2wr_probe(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6331 | { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6332 | struct usb_device *dev = gspca_dev->dev; |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6333 | u16 retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6334 | |
| 6335 | start_2wr_probe(dev, 0x00); /* HV7131B */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6336 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6337 | retword = i2c_read(gspca_dev, 0x01); |
| 6338 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6339 | return 0x00; /* HV7131B */ |
| 6340 | |
| 6341 | start_2wr_probe(dev, 0x04); /* CS2102 */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6342 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6343 | retword = i2c_read(gspca_dev, 0x01); |
| 6344 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6345 | return 0x04; /* CS2102 */ |
| 6346 | |
| 6347 | start_2wr_probe(dev, 0x06); /* OmniVision */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6348 | reg_w(dev, 0x08, 0x008d); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6349 | i2c_write(gspca_dev, 0x11, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6350 | retword = i2c_read(gspca_dev, 0x11); |
| 6351 | if (retword != 0) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6352 | /* (should have returned 0xaa) --> Omnivision? */ |
| 6353 | /* reg_r 0x10 -> 0x06 --> */ |
| 6354 | goto ov_check; |
| 6355 | } |
| 6356 | |
| 6357 | start_2wr_probe(dev, 0x08); /* HDCS2020 */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6358 | i2c_write(gspca_dev, 0x15, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6359 | retword = i2c_read(gspca_dev, 0x15); |
| 6360 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6361 | return 0x08; /* HDCS2020 */ |
| 6362 | |
| 6363 | start_2wr_probe(dev, 0x0a); /* PB0330 */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6364 | i2c_write(gspca_dev, 0x07, 0xaa, 0xaa); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6365 | retword = i2c_read(gspca_dev, 0x07); |
| 6366 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6367 | return 0x0a; /* PB0330 */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6368 | retword = i2c_read(gspca_dev, 0x03); |
| 6369 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6370 | return 0x0a; /* PB0330 ?? */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6371 | retword = i2c_read(gspca_dev, 0x04); |
| 6372 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6373 | return 0x0a; /* PB0330 ?? */ |
| 6374 | |
| 6375 | start_2wr_probe(dev, 0x0c); /* ICM105A */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6376 | i2c_write(gspca_dev, 0x01, 0x11, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6377 | retword = i2c_read(gspca_dev, 0x01); |
| 6378 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6379 | return 0x0c; /* ICM105A */ |
| 6380 | |
| 6381 | start_2wr_probe(dev, 0x0e); /* PAS202BCB */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6382 | reg_w(dev, 0x08, 0x008d); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6383 | i2c_write(gspca_dev, 0x03, 0xaa, 0x00); |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 6384 | msleep(50); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6385 | retword = i2c_read(gspca_dev, 0x03); |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 6386 | if (retword != 0) { |
| 6387 | send_unknown(dev, SENSOR_PAS202B); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6388 | return 0x0e; /* PAS202BCB */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 6389 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6390 | |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6391 | start_2wr_probe(dev, 0x02); /* TAS5130C */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6392 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6393 | retword = i2c_read(gspca_dev, 0x01); |
| 6394 | if (retword != 0) |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6395 | return 0x02; /* TAS5130C */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6396 | ov_check: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6397 | reg_r(gspca_dev, 0x0010); /* ?? */ |
| 6398 | reg_r(gspca_dev, 0x0010); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6399 | |
| 6400 | reg_w(dev, 0x01, 0x0000); |
| 6401 | reg_w(dev, 0x01, 0x0001); |
| 6402 | reg_w(dev, 0x06, 0x0010); /* OmniVision */ |
| 6403 | reg_w(dev, 0xa1, 0x008b); |
| 6404 | reg_w(dev, 0x08, 0x008d); |
| 6405 | msleep(500); |
| 6406 | reg_w(dev, 0x01, 0x0012); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6407 | i2c_write(gspca_dev, 0x12, 0x80, 0x00); /* sensor reset */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6408 | retword = i2c_read(gspca_dev, 0x0a) << 8; |
| 6409 | retword |= i2c_read(gspca_dev, 0x0b); |
| 6410 | PDEBUG(D_PROBE, "probe 2wr ov vga 0x%04x", retword); |
| 6411 | switch (retword) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6412 | case 0x7631: /* OV7630C */ |
| 6413 | reg_w(dev, 0x06, 0x0010); |
| 6414 | break; |
| 6415 | case 0x7620: /* OV7620 */ |
| 6416 | case 0x7648: /* OV7648 */ |
| 6417 | break; |
| 6418 | default: |
| 6419 | return -1; /* not OmniVision */ |
| 6420 | } |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6421 | return retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6422 | } |
| 6423 | |
| 6424 | struct sensor_by_chipset_revision { |
| 6425 | __u16 revision; |
| 6426 | __u8 internal_sensor_id; |
| 6427 | }; |
| 6428 | static const struct sensor_by_chipset_revision chipset_revision_sensor[] = { |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 6429 | {0xc000, 0x12}, /* TAS5130C */ |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6430 | {0xc001, 0x13}, /* MI0360SOC */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6431 | {0xe001, 0x13}, |
| 6432 | {0x8001, 0x13}, |
| 6433 | {0x8000, 0x14}, /* CS2102K */ |
| 6434 | {0x8400, 0x15}, /* TAS5130K */ |
Luis Maia | 658604e | 2009-12-15 13:40:44 -0300 | [diff] [blame] | 6435 | {0xe400, 0x15}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6436 | }; |
| 6437 | |
| 6438 | static int vga_3wr_probe(struct gspca_dev *gspca_dev) |
| 6439 | { |
| 6440 | struct sd *sd = (struct sd *) gspca_dev; |
| 6441 | struct usb_device *dev = gspca_dev->dev; |
| 6442 | int i; |
| 6443 | __u8 retbyte; |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6444 | u16 retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6445 | |
| 6446 | /*fixme: lack of 8b=b3 (11,12)-> 10, 8b=e0 (14,15,16)-> 12 found in gspcav1*/ |
| 6447 | reg_w(dev, 0x02, 0x0010); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6448 | reg_r(gspca_dev, 0x0010); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6449 | reg_w(dev, 0x01, 0x0000); |
| 6450 | reg_w(dev, 0x00, 0x0010); |
| 6451 | reg_w(dev, 0x01, 0x0001); |
| 6452 | reg_w(dev, 0x91, 0x008b); |
| 6453 | reg_w(dev, 0x03, 0x0012); |
| 6454 | reg_w(dev, 0x01, 0x0012); |
| 6455 | reg_w(dev, 0x05, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6456 | retword = i2c_read(gspca_dev, 0x14); |
| 6457 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6458 | return 0x11; /* HV7131R */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6459 | retword = i2c_read(gspca_dev, 0x15); |
| 6460 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6461 | return 0x11; /* HV7131R */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6462 | retword = i2c_read(gspca_dev, 0x16); |
| 6463 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6464 | return 0x11; /* HV7131R */ |
| 6465 | |
| 6466 | reg_w(dev, 0x02, 0x0010); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6467 | retword = reg_r(gspca_dev, 0x000b) << 8; |
| 6468 | retword |= reg_r(gspca_dev, 0x000a); |
| 6469 | PDEBUG(D_PROBE, "probe 3wr vga 1 0x%04x", retword); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6470 | reg_r(gspca_dev, 0x0010); |
Jean-Francois Moine | 881cd41 | 2009-04-05 04:01:13 -0300 | [diff] [blame] | 6471 | /* value 0x4001 is meaningless */ |
| 6472 | if (retword != 0x4001) { |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6473 | if ((retword & 0xff00) == 0x6400) |
| 6474 | return 0x02; /* TAS5130C */ |
Jean-Francois Moine | 881cd41 | 2009-04-05 04:01:13 -0300 | [diff] [blame] | 6475 | for (i = 0; i < ARRAY_SIZE(chipset_revision_sensor); i++) { |
| 6476 | if (chipset_revision_sensor[i].revision == retword) { |
| 6477 | sd->chip_revision = retword; |
| 6478 | send_unknown(dev, SENSOR_PB0330); |
| 6479 | return chipset_revision_sensor[i] |
| 6480 | .internal_sensor_id; |
| 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 | } |
| 6484 | |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6485 | reg_w(dev, 0x01, 0x0000); /* check PB0330 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6486 | reg_w(dev, 0x01, 0x0001); |
| 6487 | reg_w(dev, 0xdd, 0x008b); |
| 6488 | reg_w(dev, 0x0a, 0x0010); |
| 6489 | reg_w(dev, 0x03, 0x0012); |
| 6490 | reg_w(dev, 0x01, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6491 | retword = i2c_read(gspca_dev, 0x00); |
| 6492 | if (retword != 0) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6493 | PDEBUG(D_PROBE, "probe 3wr vga type 0a ?"); |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6494 | return 0x0a; /* PB0330 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6495 | } |
| 6496 | |
| 6497 | reg_w(dev, 0x01, 0x0000); |
| 6498 | reg_w(dev, 0x01, 0x0001); |
| 6499 | reg_w(dev, 0x98, 0x008b); |
| 6500 | reg_w(dev, 0x01, 0x0010); |
| 6501 | reg_w(dev, 0x03, 0x0012); |
| 6502 | msleep(2); |
| 6503 | reg_w(dev, 0x01, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6504 | retword = i2c_read(gspca_dev, 0x00); |
| 6505 | if (retword != 0) { |
| 6506 | PDEBUG(D_PROBE, "probe 3wr vga type %02x", retword); |
| 6507 | if (retword == 0x0011) /* VF0250 */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6508 | return 0x0250; |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6509 | if (retword == 0x0029) /* gc0305 */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6510 | send_unknown(dev, SENSOR_GC0305); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6511 | return retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6512 | } |
| 6513 | |
| 6514 | reg_w(dev, 0x01, 0x0000); /* check OmniVision */ |
| 6515 | reg_w(dev, 0x01, 0x0001); |
| 6516 | reg_w(dev, 0xa1, 0x008b); |
| 6517 | reg_w(dev, 0x08, 0x008d); |
| 6518 | reg_w(dev, 0x06, 0x0010); |
| 6519 | reg_w(dev, 0x01, 0x0012); |
| 6520 | reg_w(dev, 0x05, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6521 | if (i2c_read(gspca_dev, 0x1c) == 0x007f /* OV7610 - manufacturer ID */ |
| 6522 | && i2c_read(gspca_dev, 0x1d) == 0x00a2) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6523 | send_unknown(dev, SENSOR_OV7620); |
| 6524 | return 0x06; /* OmniVision confirm ? */ |
| 6525 | } |
| 6526 | |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6527 | reg_w(dev, 0x01, 0x0000); |
| 6528 | reg_w(dev, 0x00, 0x0002); |
| 6529 | reg_w(dev, 0x01, 0x0010); |
| 6530 | reg_w(dev, 0x01, 0x0001); |
| 6531 | reg_w(dev, 0xee, 0x008b); |
| 6532 | reg_w(dev, 0x03, 0x0012); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6533 | reg_w(dev, 0x01, 0x0012); |
| 6534 | reg_w(dev, 0x05, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6535 | retword = i2c_read(gspca_dev, 0x00) << 8; /* ID 0 */ |
| 6536 | retword |= i2c_read(gspca_dev, 0x01); /* ID 1 */ |
| 6537 | PDEBUG(D_PROBE, "probe 3wr vga 2 0x%04x", retword); |
| 6538 | if (retword == 0x2030) { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6539 | retbyte = i2c_read(gspca_dev, 0x02); /* revision number */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6540 | PDEBUG(D_PROBE, "sensor PO2030 rev 0x%02x", retbyte); |
| 6541 | send_unknown(dev, SENSOR_PO2030); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6542 | return retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6543 | } |
| 6544 | |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6545 | reg_w(dev, 0x01, 0x0000); |
| 6546 | reg_w(dev, 0x0a, 0x0010); |
| 6547 | reg_w(dev, 0xd3, 0x008b); |
| 6548 | reg_w(dev, 0x01, 0x0001); |
| 6549 | reg_w(dev, 0x03, 0x0012); |
| 6550 | reg_w(dev, 0x01, 0x0012); |
Jean-Francois Moine | 881cd41 | 2009-04-05 04:01:13 -0300 | [diff] [blame] | 6551 | reg_w(dev, 0x05, 0x0012); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6552 | reg_w(dev, 0xd3, 0x008b); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6553 | retword = i2c_read(gspca_dev, 0x01); |
| 6554 | if (retword != 0) { |
| 6555 | PDEBUG(D_PROBE, "probe 3wr vga type 0a ? ret: %04x", retword); |
Jean-Francois Moine | 881cd41 | 2009-04-05 04:01:13 -0300 | [diff] [blame] | 6556 | return 0x16; /* adcm2700 (6100/6200) */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6557 | } |
| 6558 | return -1; |
| 6559 | } |
| 6560 | |
| 6561 | static int zcxx_probeSensor(struct gspca_dev *gspca_dev) |
| 6562 | { |
| 6563 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 603538a | 2009-02-19 15:38:31 -0300 | [diff] [blame] | 6564 | int sensor; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6565 | |
| 6566 | switch (sd->sensor) { |
| 6567 | case SENSOR_MC501CB: |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6568 | return -1; /* don't probe */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6569 | case SENSOR_TAS5130C_VF0250: |
Hans de Goede | 34662342 | 2008-09-03 16:47:28 -0300 | [diff] [blame] | 6570 | /* may probe but with no write in reg 0x0010 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6571 | return -1; /* don't probe */ |
Hans de Goede | 34662342 | 2008-09-03 16:47:28 -0300 | [diff] [blame] | 6572 | case SENSOR_PAS106: |
| 6573 | sensor = sif_probe(gspca_dev); |
| 6574 | if (sensor >= 0) |
| 6575 | return sensor; |
| 6576 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6577 | } |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6578 | sensor = vga_2wr_probe(gspca_dev); |
Jean-Francois Moine | 603538a | 2009-02-19 15:38:31 -0300 | [diff] [blame] | 6579 | if (sensor >= 0) |
Hans de Goede | 34662342 | 2008-09-03 16:47:28 -0300 | [diff] [blame] | 6580 | return sensor; |
Jean-Francois Moine | 603538a | 2009-02-19 15:38:31 -0300 | [diff] [blame] | 6581 | return vga_3wr_probe(gspca_dev); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6582 | } |
| 6583 | |
| 6584 | /* this function is called at probe time */ |
| 6585 | static int sd_config(struct gspca_dev *gspca_dev, |
| 6586 | const struct usb_device_id *id) |
| 6587 | { |
| 6588 | struct sd *sd = (struct sd *) gspca_dev; |
| 6589 | struct cam *cam; |
| 6590 | int sensor; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6591 | int vga = 1; /* 1: vga, 0: sif */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 6592 | static const __u8 gamma[SENSOR_MAX] = { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6593 | 4, /* SENSOR_ADCM2700 0 */ |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 6594 | 4, /* SENSOR_CS2102 1 */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6595 | 5, /* SENSOR_CS2102K 2 */ |
| 6596 | 4, /* SENSOR_GC0305 3 */ |
| 6597 | 4, /* SENSOR_HDCS2020b 4 */ |
| 6598 | 4, /* SENSOR_HV7131B 5 */ |
| 6599 | 4, /* SENSOR_HV7131C 6 */ |
| 6600 | 4, /* SENSOR_ICM105A 7 */ |
| 6601 | 4, /* SENSOR_MC501CB 8 */ |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6602 | 4, /* SENSOR_MI0360SOC 9 */ |
| 6603 | 3, /* SENSOR_OV7620 10 */ |
| 6604 | 4, /* SENSOR_OV7630C 11 */ |
| 6605 | 4, /* SENSOR_PAS106 12 */ |
| 6606 | 4, /* SENSOR_PAS202B 13 */ |
| 6607 | 4, /* SENSOR_PB0330 14 */ |
| 6608 | 4, /* SENSOR_PO2030 15 */ |
| 6609 | 4, /* SENSOR_TAS5130CK 16 */ |
| 6610 | 3, /* SENSOR_TAS5130CXX 17 */ |
| 6611 | 3, /* SENSOR_TAS5130C_VF0250 18 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6612 | }; |
| 6613 | |
| 6614 | /* define some sensors from the vendor/product */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6615 | sd->sharpness = 2; |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 6616 | sd->sensor = id->driver_info; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6617 | sensor = zcxx_probeSensor(gspca_dev); |
| 6618 | if (sensor >= 0) |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6619 | PDEBUG(D_PROBE, "probe sensor -> %04x", sensor); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6620 | if ((unsigned) force_sensor < SENSOR_MAX) { |
| 6621 | sd->sensor = force_sensor; |
| 6622 | PDEBUG(D_PROBE, "sensor forced to %d", force_sensor); |
| 6623 | } else { |
| 6624 | switch (sensor) { |
| 6625 | case -1: |
| 6626 | switch (sd->sensor) { |
| 6627 | case SENSOR_MC501CB: |
| 6628 | PDEBUG(D_PROBE, "Sensor MC501CB"); |
| 6629 | break; |
| 6630 | case SENSOR_TAS5130C_VF0250: |
| 6631 | PDEBUG(D_PROBE, "Sensor Tas5130 (VF0250)"); |
| 6632 | break; |
| 6633 | default: |
| 6634 | PDEBUG(D_PROBE, |
André Goddard Rosa | af901ca | 2009-11-14 13:09:05 -0200 | [diff] [blame] | 6635 | "Sensor UNKNOWN_0 force Tas5130"); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6636 | sd->sensor = SENSOR_TAS5130CXX; |
| 6637 | } |
| 6638 | break; |
| 6639 | case 0: |
Jean-Francois Moine | d754a6c | 2009-12-20 05:07:10 -0300 | [diff] [blame] | 6640 | /* check the sensor type */ |
| 6641 | sensor = i2c_read(gspca_dev, 0x00); |
| 6642 | PDEBUG(D_PROBE, "Sensor hv7131 type %d", sensor); |
| 6643 | switch (sensor) { |
| 6644 | case 0: /* hv7131b */ |
| 6645 | case 1: /* hv7131e */ |
| 6646 | PDEBUG(D_PROBE, "Find Sensor HV7131B"); |
| 6647 | sd->sensor = SENSOR_HV7131B; |
| 6648 | break; |
| 6649 | default: |
| 6650 | /* case 2: * hv7131r */ |
| 6651 | PDEBUG(D_PROBE, "Find Sensor HV7131R(c)"); |
| 6652 | sd->sensor = SENSOR_HV7131C; |
| 6653 | break; |
| 6654 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6655 | break; |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6656 | case 0x02: |
| 6657 | PDEBUG(D_PROBE, "Sensor TAS5130C"); |
| 6658 | sd->sensor = SENSOR_TAS5130CXX; |
| 6659 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6660 | case 0x04: |
| 6661 | PDEBUG(D_PROBE, "Find Sensor CS2102"); |
| 6662 | sd->sensor = SENSOR_CS2102; |
| 6663 | break; |
| 6664 | case 0x08: |
| 6665 | PDEBUG(D_PROBE, "Find Sensor HDCS2020(b)"); |
| 6666 | sd->sensor = SENSOR_HDCS2020b; |
| 6667 | break; |
| 6668 | case 0x0a: |
| 6669 | PDEBUG(D_PROBE, |
| 6670 | "Find Sensor PB0330. Chip revision %x", |
| 6671 | sd->chip_revision); |
| 6672 | sd->sensor = SENSOR_PB0330; |
| 6673 | break; |
| 6674 | case 0x0c: |
| 6675 | PDEBUG(D_PROBE, "Find Sensor ICM105A"); |
| 6676 | sd->sensor = SENSOR_ICM105A; |
| 6677 | break; |
| 6678 | case 0x0e: |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6679 | PDEBUG(D_PROBE, "Find Sensor PAS202B"); |
| 6680 | sd->sensor = SENSOR_PAS202B; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6681 | sd->sharpness = 1; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6682 | break; |
| 6683 | case 0x0f: |
| 6684 | PDEBUG(D_PROBE, "Find Sensor PAS106"); |
| 6685 | sd->sensor = SENSOR_PAS106; |
| 6686 | vga = 0; /* SIF */ |
| 6687 | break; |
| 6688 | case 0x10: |
| 6689 | case 0x12: |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 6690 | PDEBUG(D_PROBE, "Find Sensor TAS5130C"); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6691 | sd->sensor = SENSOR_TAS5130CXX; |
| 6692 | break; |
| 6693 | case 0x11: |
| 6694 | PDEBUG(D_PROBE, "Find Sensor HV7131R(c)"); |
| 6695 | sd->sensor = SENSOR_HV7131C; |
| 6696 | break; |
| 6697 | case 0x13: |
| 6698 | PDEBUG(D_PROBE, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6699 | "Find Sensor MI0360SOC. Chip revision %x", |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6700 | sd->chip_revision); |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6701 | sd->sensor = SENSOR_MI0360SOC; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6702 | break; |
| 6703 | case 0x14: |
| 6704 | PDEBUG(D_PROBE, |
| 6705 | "Find Sensor CS2102K?. Chip revision %x", |
| 6706 | sd->chip_revision); |
| 6707 | sd->sensor = SENSOR_CS2102K; |
| 6708 | break; |
| 6709 | case 0x15: |
| 6710 | PDEBUG(D_PROBE, |
| 6711 | "Find Sensor TAS5130CK?. Chip revision %x", |
| 6712 | sd->chip_revision); |
| 6713 | sd->sensor = SENSOR_TAS5130CK; |
| 6714 | break; |
Jean-Francois Moine | 5be2b09 | 2009-01-20 05:12:34 -0300 | [diff] [blame] | 6715 | case 0x16: |
| 6716 | PDEBUG(D_PROBE, "Find Sensor ADCM2700"); |
| 6717 | sd->sensor = SENSOR_ADCM2700; |
| 6718 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6719 | case 0x29: |
| 6720 | PDEBUG(D_PROBE, "Find Sensor GC0305"); |
| 6721 | sd->sensor = SENSOR_GC0305; |
| 6722 | break; |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6723 | case 0x0250: |
| 6724 | PDEBUG(D_PROBE, "Sensor Tas5130 (VF0250)"); |
| 6725 | sd->sensor = SENSOR_TAS5130C_VF0250; |
| 6726 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6727 | case 0x2030: |
| 6728 | PDEBUG(D_PROBE, "Find Sensor PO2030"); |
| 6729 | sd->sensor = SENSOR_PO2030; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6730 | sd->sharpness = 0; /* from win traces */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6731 | break; |
| 6732 | case 0x7620: |
| 6733 | PDEBUG(D_PROBE, "Find Sensor OV7620"); |
| 6734 | sd->sensor = SENSOR_OV7620; |
| 6735 | break; |
Jean-Francois Moine | e2d750f | 2009-02-19 15:41:28 -0300 | [diff] [blame] | 6736 | case 0x7631: |
| 6737 | PDEBUG(D_PROBE, "Find Sensor OV7630C"); |
| 6738 | sd->sensor = SENSOR_OV7630C; |
| 6739 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6740 | case 0x7648: |
| 6741 | PDEBUG(D_PROBE, "Find Sensor OV7648"); |
| 6742 | sd->sensor = SENSOR_OV7620; /* same sensor (?) */ |
| 6743 | break; |
| 6744 | default: |
Jean-Francois Moine | 5be2b09 | 2009-01-20 05:12:34 -0300 | [diff] [blame] | 6745 | PDEBUG(D_ERR|D_PROBE, "Unknown sensor %04x", sensor); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6746 | return -EINVAL; |
| 6747 | } |
| 6748 | } |
| 6749 | if (sensor < 0x20) { |
| 6750 | if (sensor == -1 || sensor == 0x10 || sensor == 0x12) |
| 6751 | reg_w(gspca_dev->dev, 0x02, 0x0010); |
| 6752 | else |
| 6753 | reg_w(gspca_dev->dev, sensor & 0x0f, 0x0010); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6754 | reg_r(gspca_dev, 0x0010); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6755 | } |
| 6756 | |
| 6757 | cam = &gspca_dev->cam; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6758 | /*fixme:test*/ |
| 6759 | gspca_dev->nbalt--; |
| 6760 | if (vga) { |
| 6761 | cam->cam_mode = vga_mode; |
Jean-Francois Moine | c41492c | 2008-07-07 08:31:16 -0300 | [diff] [blame] | 6762 | cam->nmodes = ARRAY_SIZE(vga_mode); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6763 | } else { |
| 6764 | cam->cam_mode = sif_mode; |
Jean-Francois Moine | c41492c | 2008-07-07 08:31:16 -0300 | [diff] [blame] | 6765 | cam->nmodes = ARRAY_SIZE(sif_mode); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6766 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6767 | sd->brightness = sd_ctrls[SD_BRIGHTNESS].qctrl.default_value; |
| 6768 | sd->contrast = sd_ctrls[SD_CONTRAST].qctrl.default_value; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6769 | sd->gamma = gamma[(int) sd->sensor]; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6770 | sd->autogain = sd_ctrls[SD_AUTOGAIN].qctrl.default_value; |
| 6771 | sd->lightfreq = sd_ctrls[SD_FREQ].qctrl.default_value; |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 6772 | sd->quality = QUALITY_DEF; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6773 | |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 6774 | switch (sd->sensor) { |
| 6775 | case SENSOR_GC0305: |
| 6776 | case SENSOR_OV7620: |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 6777 | case SENSOR_PAS202B: |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 6778 | case SENSOR_PO2030: |
| 6779 | gspca_dev->ctrl_dis = (1 << BRIGHTNESS_IDX); |
| 6780 | break; |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 6781 | case SENSOR_HV7131B: |
| 6782 | case SENSOR_HV7131C: |
| 6783 | case SENSOR_OV7630C: |
| 6784 | gspca_dev->ctrl_dis = (1 << LIGHTFREQ_IDX); |
| 6785 | break; |
| 6786 | } |
| 6787 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6788 | /* switch the led off */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6789 | reg_w(gspca_dev->dev, 0x01, 0x0000); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6790 | return 0; |
| 6791 | } |
| 6792 | |
Jean-Francois Moine | 012d6b0 | 2008-09-03 17:12:16 -0300 | [diff] [blame] | 6793 | /* this function is called at probe and resume time */ |
| 6794 | static int sd_init(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6795 | { |
| 6796 | reg_w(gspca_dev->dev, 0x01, 0x0000); |
| 6797 | return 0; |
| 6798 | } |
| 6799 | |
Jean-Francois Moine | 72ab97c | 2008-09-20 06:39:08 -0300 | [diff] [blame] | 6800 | static int sd_start(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6801 | { |
| 6802 | struct sd *sd = (struct sd *) gspca_dev; |
| 6803 | struct usb_device *dev = gspca_dev->dev; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 6804 | const struct usb_action *zc3_init; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6805 | int mode; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 6806 | static const struct usb_action *init_tb[SENSOR_MAX][2] = { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6807 | {adcm2700_Initial, adcm2700_InitialScale}, /* 0 */ |
| 6808 | {cs2102_InitialScale, cs2102_Initial}, /* 1 */ |
| 6809 | {cs2102K_InitialScale, cs2102K_Initial}, /* 2 */ |
| 6810 | {gc0305_Initial, gc0305_InitialScale}, /* 3 */ |
| 6811 | {hdcs2020xb_InitialScale, hdcs2020xb_Initial}, /* 4 */ |
| 6812 | {hv7131bxx_InitialScale, hv7131bxx_Initial}, /* 5 */ |
| 6813 | {hv7131cxx_InitialScale, hv7131cxx_Initial}, /* 6 */ |
| 6814 | {icm105axx_InitialScale, icm105axx_Initial}, /* 7 */ |
| 6815 | {MC501CB_InitialScale, MC501CB_Initial}, /* 8 */ |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6816 | {mi0360soc_Initial, mi0360soc_InitialScale}, /* 9 */ |
| 6817 | {OV7620_mode0, OV7620_mode1}, /* 10 */ |
| 6818 | {ov7630c_InitialScale, ov7630c_Initial}, /* 11 */ |
| 6819 | {pas106b_InitialScale, pas106b_Initial}, /* 12 */ |
| 6820 | {pas202b_Initial, pas202b_InitialScale}, /* 13 */ |
| 6821 | {pb0330_Initial, pb0330_InitialScale}, /* 14 */ |
| 6822 | {PO2030_mode0, PO2030_mode1}, /* 15 */ |
| 6823 | {tas5130CK_InitialScale, tas5130CK_Initial}, /* 16 */ |
| 6824 | {tas5130cxx_Initial, tas5130cxx_InitialScale}, /* 17 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6825 | {tas5130c_vf0250_InitialScale, tas5130c_vf0250_Initial}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 6826 | /* 18 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6827 | }; |
| 6828 | |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6829 | /* create the JPEG header */ |
| 6830 | sd->jpeg_hdr = kmalloc(JPEG_HDR_SZ, GFP_KERNEL); |
Julia Lawall | 3eb0237 | 2009-07-19 07:09:32 -0300 | [diff] [blame] | 6831 | if (!sd->jpeg_hdr) |
| 6832 | return -ENOMEM; |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6833 | jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, |
| 6834 | 0x21); /* JPEG 422 */ |
| 6835 | jpeg_set_qual(sd->jpeg_hdr, sd->quality); |
| 6836 | |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 6837 | mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6838 | zc3_init = init_tb[(int) sd->sensor][mode]; |
| 6839 | switch (sd->sensor) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6840 | case SENSOR_HV7131C: |
| 6841 | zcxx_probeSensor(gspca_dev); |
| 6842 | break; |
| 6843 | case SENSOR_PAS106: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6844 | usb_exchange(gspca_dev, pas106b_Initial_com); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6845 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6846 | } |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6847 | usb_exchange(gspca_dev, zc3_init); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6848 | |
| 6849 | switch (sd->sensor) { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6850 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6851 | case SENSOR_GC0305: |
| 6852 | case SENSOR_OV7620: |
| 6853 | case SENSOR_PO2030: |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6854 | case SENSOR_TAS5130CXX: |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6855 | case SENSOR_TAS5130C_VF0250: |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6856 | /* msleep(100); * ?? */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6857 | reg_r(gspca_dev, 0x0002); /* --> 0x40 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6858 | reg_w(dev, 0x09, 0x01ad); /* (from win traces) */ |
| 6859 | reg_w(dev, 0x15, 0x01ae); |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6860 | if (sd->sensor == SENSOR_TAS5130CXX) |
| 6861 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6862 | reg_w(dev, 0x0d, 0x003a); |
| 6863 | reg_w(dev, 0x02, 0x003b); |
| 6864 | reg_w(dev, 0x00, 0x0038); |
| 6865 | break; |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 6866 | case SENSOR_PAS202B: |
| 6867 | reg_w(dev, 0x03, 0x003b); |
| 6868 | reg_w(dev, 0x0c, 0x003a); |
| 6869 | reg_w(dev, 0x0b, 0x0039); |
| 6870 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6871 | } |
| 6872 | |
| 6873 | setmatrix(gspca_dev); |
| 6874 | setbrightness(gspca_dev); |
| 6875 | switch (sd->sensor) { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6876 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6877 | case SENSOR_OV7620: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6878 | reg_r(gspca_dev, 0x0008); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6879 | reg_w(dev, 0x00, 0x0008); |
| 6880 | break; |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6881 | case SENSOR_PAS202B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6882 | case SENSOR_GC0305: |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6883 | case SENSOR_TAS5130CXX: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6884 | reg_r(gspca_dev, 0x0008); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6885 | /* fall thru */ |
| 6886 | case SENSOR_PO2030: |
| 6887 | reg_w(dev, 0x03, 0x0008); |
| 6888 | break; |
| 6889 | } |
| 6890 | setsharpness(gspca_dev); |
| 6891 | |
| 6892 | /* set the gamma tables when not set */ |
| 6893 | switch (sd->sensor) { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 6894 | case SENSOR_CS2102K: /* gamma set in xxx_Initial */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6895 | case SENSOR_HDCS2020b: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6896 | case SENSOR_OV7630C: |
| 6897 | case SENSOR_TAS5130CK: |
| 6898 | break; |
| 6899 | default: |
| 6900 | setcontrast(gspca_dev); |
| 6901 | break; |
| 6902 | } |
| 6903 | setmatrix(gspca_dev); /* one more time? */ |
| 6904 | switch (sd->sensor) { |
| 6905 | case SENSOR_OV7620: |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6906 | case SENSOR_PAS202B: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6907 | reg_r(gspca_dev, 0x0180); /* from win */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6908 | reg_w(dev, 0x00, 0x0180); |
| 6909 | break; |
| 6910 | default: |
| 6911 | setquality(gspca_dev); |
| 6912 | break; |
| 6913 | } |
| 6914 | setlightfreq(gspca_dev); |
| 6915 | |
| 6916 | switch (sd->sensor) { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6917 | case SENSOR_ADCM2700: |
| 6918 | reg_w(dev, 0x09, 0x01ad); /* (from win traces) */ |
| 6919 | reg_w(dev, 0x15, 0x01ae); |
| 6920 | reg_w(dev, 0x02, 0x0180); |
| 6921 | /* ms-win + */ |
| 6922 | reg_w(dev, 0x40, 0x0117); |
| 6923 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6924 | case SENSOR_GC0305: |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6925 | case SENSOR_TAS5130CXX: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6926 | reg_w(dev, 0x09, 0x01ad); /* (from win traces) */ |
| 6927 | reg_w(dev, 0x15, 0x01ae); |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6928 | /* fall thru */ |
| 6929 | case SENSOR_PAS202B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6930 | case SENSOR_PO2030: |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6931 | /* reg_w(dev, 0x40, ZC3XX_R117_GGAIN); * (from win traces) */ |
| 6932 | reg_r(gspca_dev, 0x0180); |
| 6933 | break; |
| 6934 | case SENSOR_OV7620: |
| 6935 | reg_w(dev, 0x09, 0x01ad); |
| 6936 | reg_w(dev, 0x15, 0x01ae); |
| 6937 | i2c_read(gspca_dev, 0x13); /*fixme: returns 0xa3 */ |
| 6938 | i2c_write(gspca_dev, 0x13, 0xa3, 0x00); |
| 6939 | /*fixme: returned value to send? */ |
| 6940 | reg_w(dev, 0x40, 0x0117); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6941 | reg_r(gspca_dev, 0x0180); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6942 | break; |
| 6943 | } |
| 6944 | |
| 6945 | setautogain(gspca_dev); |
| 6946 | switch (sd->sensor) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6947 | case SENSOR_PO2030: |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 6948 | msleep(50); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6949 | reg_w(dev, 0x00, 0x0007); /* (from win traces) */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 6950 | reg_w(dev, 0x02, ZC3XX_R008_CLOCKSETTING); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6951 | break; |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame^] | 6952 | case SENSOR_PAS202B: |
| 6953 | reg_w(dev, 0x32, 0x0007); /* (from win traces) */ |
| 6954 | reg_w(dev, 0x02, ZC3XX_R008_CLOCKSETTING); |
| 6955 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6956 | } |
Jean-Francois Moine | 72ab97c | 2008-09-20 06:39:08 -0300 | [diff] [blame] | 6957 | return 0; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6958 | } |
| 6959 | |
Jean-Francois Moine | 98522a7 | 2008-11-18 06:33:08 -0300 | [diff] [blame] | 6960 | /* called on streamoff with alt 0 and on disconnect */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6961 | static void sd_stop0(struct gspca_dev *gspca_dev) |
| 6962 | { |
| 6963 | struct sd *sd = (struct sd *) gspca_dev; |
| 6964 | |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6965 | kfree(sd->jpeg_hdr); |
Jean-Francois Moine | 98522a7 | 2008-11-18 06:33:08 -0300 | [diff] [blame] | 6966 | if (!gspca_dev->present) |
| 6967 | return; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6968 | send_unknown(gspca_dev->dev, sd->sensor); |
| 6969 | } |
| 6970 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6971 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6972 | u8 *data, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6973 | int len) |
| 6974 | { |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6975 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6976 | |
| 6977 | if (data[0] == 0xff && data[1] == 0xd8) { /* start of frame */ |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6978 | gspca_frame_add(gspca_dev, LAST_PACKET, |
| 6979 | NULL, 0); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6980 | /* put the JPEG header in the new frame */ |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6981 | gspca_frame_add(gspca_dev, FIRST_PACKET, |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6982 | sd->jpeg_hdr, JPEG_HDR_SZ); |
| 6983 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6984 | /* remove the webcam's header: |
| 6985 | * ff d8 ff fe 00 0e 00 00 ss ss 00 01 ww ww hh hh pp pp |
| 6986 | * - 'ss ss' is the frame sequence number (BE) |
| 6987 | * - 'ww ww' and 'hh hh' are the window dimensions (BE) |
| 6988 | * - 'pp pp' is the packet sequence number (BE) |
| 6989 | */ |
| 6990 | data += 18; |
| 6991 | len -= 18; |
| 6992 | } |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6993 | gspca_frame_add(gspca_dev, INTER_PACKET, data, len); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6994 | } |
| 6995 | |
| 6996 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) |
| 6997 | { |
| 6998 | struct sd *sd = (struct sd *) gspca_dev; |
| 6999 | |
| 7000 | sd->brightness = val; |
| 7001 | if (gspca_dev->streaming) |
| 7002 | setbrightness(gspca_dev); |
| 7003 | return 0; |
| 7004 | } |
| 7005 | |
| 7006 | static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val) |
| 7007 | { |
| 7008 | struct sd *sd = (struct sd *) gspca_dev; |
| 7009 | |
| 7010 | *val = sd->brightness; |
| 7011 | return 0; |
| 7012 | } |
| 7013 | |
| 7014 | static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val) |
| 7015 | { |
| 7016 | struct sd *sd = (struct sd *) gspca_dev; |
| 7017 | |
| 7018 | sd->contrast = val; |
| 7019 | if (gspca_dev->streaming) |
| 7020 | setcontrast(gspca_dev); |
| 7021 | return 0; |
| 7022 | } |
| 7023 | |
| 7024 | static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val) |
| 7025 | { |
| 7026 | struct sd *sd = (struct sd *) gspca_dev; |
| 7027 | |
| 7028 | *val = sd->contrast; |
| 7029 | return 0; |
| 7030 | } |
| 7031 | |
| 7032 | static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val) |
| 7033 | { |
| 7034 | struct sd *sd = (struct sd *) gspca_dev; |
| 7035 | |
| 7036 | sd->autogain = val; |
| 7037 | if (gspca_dev->streaming) |
| 7038 | setautogain(gspca_dev); |
| 7039 | return 0; |
| 7040 | } |
| 7041 | |
| 7042 | static int sd_getautogain(struct gspca_dev *gspca_dev, __s32 *val) |
| 7043 | { |
| 7044 | struct sd *sd = (struct sd *) gspca_dev; |
| 7045 | |
| 7046 | *val = sd->autogain; |
| 7047 | return 0; |
| 7048 | } |
| 7049 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7050 | static int sd_setgamma(struct gspca_dev *gspca_dev, __s32 val) |
| 7051 | { |
| 7052 | struct sd *sd = (struct sd *) gspca_dev; |
| 7053 | |
| 7054 | sd->gamma = val; |
| 7055 | if (gspca_dev->streaming) |
| 7056 | setcontrast(gspca_dev); |
| 7057 | return 0; |
| 7058 | } |
| 7059 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7060 | static int sd_getgamma(struct gspca_dev *gspca_dev, __s32 *val) |
| 7061 | { |
| 7062 | struct sd *sd = (struct sd *) gspca_dev; |
| 7063 | |
| 7064 | *val = sd->gamma; |
| 7065 | return 0; |
| 7066 | } |
| 7067 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7068 | static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val) |
| 7069 | { |
| 7070 | struct sd *sd = (struct sd *) gspca_dev; |
| 7071 | |
| 7072 | sd->lightfreq = val; |
| 7073 | if (gspca_dev->streaming) |
| 7074 | setlightfreq(gspca_dev); |
| 7075 | return 0; |
| 7076 | } |
| 7077 | |
| 7078 | static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val) |
| 7079 | { |
| 7080 | struct sd *sd = (struct sd *) gspca_dev; |
| 7081 | |
| 7082 | *val = sd->lightfreq; |
| 7083 | return 0; |
| 7084 | } |
| 7085 | |
| 7086 | static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val) |
| 7087 | { |
| 7088 | struct sd *sd = (struct sd *) gspca_dev; |
| 7089 | |
| 7090 | sd->sharpness = val; |
| 7091 | if (gspca_dev->streaming) |
| 7092 | setsharpness(gspca_dev); |
| 7093 | return 0; |
| 7094 | } |
| 7095 | |
| 7096 | static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val) |
| 7097 | { |
| 7098 | struct sd *sd = (struct sd *) gspca_dev; |
| 7099 | |
| 7100 | *val = sd->sharpness; |
| 7101 | return 0; |
| 7102 | } |
| 7103 | |
| 7104 | static int sd_querymenu(struct gspca_dev *gspca_dev, |
| 7105 | struct v4l2_querymenu *menu) |
| 7106 | { |
| 7107 | switch (menu->id) { |
| 7108 | case V4L2_CID_POWER_LINE_FREQUENCY: |
| 7109 | switch (menu->index) { |
| 7110 | case 0: /* V4L2_CID_POWER_LINE_FREQUENCY_DISABLED */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7111 | strcpy((char *) menu->name, "NoFliker"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7112 | return 0; |
| 7113 | case 1: /* V4L2_CID_POWER_LINE_FREQUENCY_50HZ */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7114 | strcpy((char *) menu->name, "50 Hz"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7115 | return 0; |
| 7116 | case 2: /* V4L2_CID_POWER_LINE_FREQUENCY_60HZ */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7117 | strcpy((char *) menu->name, "60 Hz"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7118 | return 0; |
| 7119 | } |
| 7120 | break; |
| 7121 | } |
| 7122 | return -EINVAL; |
| 7123 | } |
| 7124 | |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 7125 | static int sd_set_jcomp(struct gspca_dev *gspca_dev, |
| 7126 | struct v4l2_jpegcompression *jcomp) |
| 7127 | { |
| 7128 | struct sd *sd = (struct sd *) gspca_dev; |
| 7129 | |
| 7130 | if (jcomp->quality < QUALITY_MIN) |
| 7131 | sd->quality = QUALITY_MIN; |
| 7132 | else if (jcomp->quality > QUALITY_MAX) |
| 7133 | sd->quality = QUALITY_MAX; |
| 7134 | else |
| 7135 | sd->quality = jcomp->quality; |
| 7136 | if (gspca_dev->streaming) |
| 7137 | jpeg_set_qual(sd->jpeg_hdr, sd->quality); |
| 7138 | return 0; |
| 7139 | } |
| 7140 | |
| 7141 | static int sd_get_jcomp(struct gspca_dev *gspca_dev, |
| 7142 | struct v4l2_jpegcompression *jcomp) |
| 7143 | { |
| 7144 | struct sd *sd = (struct sd *) gspca_dev; |
| 7145 | |
| 7146 | memset(jcomp, 0, sizeof *jcomp); |
| 7147 | jcomp->quality = sd->quality; |
| 7148 | jcomp->jpeg_markers = V4L2_JPEG_MARKER_DHT |
| 7149 | | V4L2_JPEG_MARKER_DQT; |
| 7150 | return 0; |
| 7151 | } |
| 7152 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7153 | static const struct sd_desc sd_desc = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7154 | .name = MODULE_NAME, |
| 7155 | .ctrls = sd_ctrls, |
Mauro Carvalho Chehab | d6f76b9 | 2009-07-22 00:02:29 -0300 | [diff] [blame] | 7156 | .nctrls = ARRAY_SIZE(sd_ctrls), |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7157 | .config = sd_config, |
Jean-Francois Moine | 012d6b0 | 2008-09-03 17:12:16 -0300 | [diff] [blame] | 7158 | .init = sd_init, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7159 | .start = sd_start, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7160 | .stop0 = sd_stop0, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7161 | .pkt_scan = sd_pkt_scan, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7162 | .querymenu = sd_querymenu, |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 7163 | .get_jcomp = sd_get_jcomp, |
| 7164 | .set_jcomp = sd_set_jcomp, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7165 | }; |
| 7166 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7167 | static const __devinitdata struct usb_device_id device_table[] = { |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7168 | {USB_DEVICE(0x041e, 0x041e)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7169 | {USB_DEVICE(0x041e, 0x4017)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7170 | {USB_DEVICE(0x041e, 0x401c), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7171 | {USB_DEVICE(0x041e, 0x401e)}, |
| 7172 | {USB_DEVICE(0x041e, 0x401f)}, |
Hans de Goede | 222a07f | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 7173 | {USB_DEVICE(0x041e, 0x4022)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7174 | {USB_DEVICE(0x041e, 0x4029)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7175 | {USB_DEVICE(0x041e, 0x4034), .driver_info = SENSOR_PAS106}, |
| 7176 | {USB_DEVICE(0x041e, 0x4035), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7177 | {USB_DEVICE(0x041e, 0x4036)}, |
| 7178 | {USB_DEVICE(0x041e, 0x403a)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7179 | {USB_DEVICE(0x041e, 0x4051), .driver_info = SENSOR_TAS5130C_VF0250}, |
| 7180 | {USB_DEVICE(0x041e, 0x4053), .driver_info = SENSOR_TAS5130C_VF0250}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7181 | {USB_DEVICE(0x0458, 0x7007)}, |
| 7182 | {USB_DEVICE(0x0458, 0x700c)}, |
| 7183 | {USB_DEVICE(0x0458, 0x700f)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7184 | {USB_DEVICE(0x0461, 0x0a00)}, |
Fabio Rossi | 88a40cf | 2008-12-26 14:41:48 -0300 | [diff] [blame] | 7185 | {USB_DEVICE(0x046d, 0x089d), .driver_info = SENSOR_MC501CB}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7186 | {USB_DEVICE(0x046d, 0x08a0)}, |
| 7187 | {USB_DEVICE(0x046d, 0x08a1)}, |
| 7188 | {USB_DEVICE(0x046d, 0x08a2)}, |
| 7189 | {USB_DEVICE(0x046d, 0x08a3)}, |
| 7190 | {USB_DEVICE(0x046d, 0x08a6)}, |
| 7191 | {USB_DEVICE(0x046d, 0x08a7)}, |
| 7192 | {USB_DEVICE(0x046d, 0x08a9)}, |
| 7193 | {USB_DEVICE(0x046d, 0x08aa)}, |
| 7194 | {USB_DEVICE(0x046d, 0x08ac)}, |
| 7195 | {USB_DEVICE(0x046d, 0x08ad)}, |
Hans de Goede | 222a07f | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 7196 | #if !defined CONFIG_USB_ZC0301 && !defined CONFIG_USB_ZC0301_MODULE |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7197 | {USB_DEVICE(0x046d, 0x08ae)}, |
Jean-Francois Moine | c41492c | 2008-07-07 08:31:16 -0300 | [diff] [blame] | 7198 | #endif |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7199 | {USB_DEVICE(0x046d, 0x08af)}, |
| 7200 | {USB_DEVICE(0x046d, 0x08b9)}, |
| 7201 | {USB_DEVICE(0x046d, 0x08d7)}, |
| 7202 | {USB_DEVICE(0x046d, 0x08d9)}, |
| 7203 | {USB_DEVICE(0x046d, 0x08d8)}, |
| 7204 | {USB_DEVICE(0x046d, 0x08da)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7205 | {USB_DEVICE(0x046d, 0x08dd), .driver_info = SENSOR_MC501CB}, |
| 7206 | {USB_DEVICE(0x0471, 0x0325), .driver_info = SENSOR_PAS106}, |
| 7207 | {USB_DEVICE(0x0471, 0x0326), .driver_info = SENSOR_PAS106}, |
| 7208 | {USB_DEVICE(0x0471, 0x032d), .driver_info = SENSOR_PAS106}, |
| 7209 | {USB_DEVICE(0x0471, 0x032e), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7210 | {USB_DEVICE(0x055f, 0xc005)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7211 | {USB_DEVICE(0x055f, 0xd003)}, |
| 7212 | {USB_DEVICE(0x055f, 0xd004)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7213 | {USB_DEVICE(0x0698, 0x2003)}, |
Hans de Goede | 222a07f | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 7214 | {USB_DEVICE(0x0ac8, 0x0301), .driver_info = SENSOR_PAS106}, |
Douglas Schilling Landgraf | d99819d | 2009-03-26 05:10:55 -0300 | [diff] [blame] | 7215 | {USB_DEVICE(0x0ac8, 0x0302), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7216 | {USB_DEVICE(0x0ac8, 0x301b)}, |
| 7217 | {USB_DEVICE(0x0ac8, 0x303b)}, |
Jean-Francois Moine | 7bd330b4 | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 7218 | {USB_DEVICE(0x0ac8, 0x305b)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7219 | {USB_DEVICE(0x0ac8, 0x307b)}, |
| 7220 | {USB_DEVICE(0x10fd, 0x0128)}, |
Hans de Goede | 222a07f | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 7221 | {USB_DEVICE(0x10fd, 0x804d)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7222 | {USB_DEVICE(0x10fd, 0x8050)}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7223 | {} /* end of entry */ |
| 7224 | }; |
| 7225 | #undef DVNAME |
| 7226 | MODULE_DEVICE_TABLE(usb, device_table); |
| 7227 | |
| 7228 | /* -- device connect -- */ |
| 7229 | static int sd_probe(struct usb_interface *intf, |
| 7230 | const struct usb_device_id *id) |
| 7231 | { |
| 7232 | return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd), |
| 7233 | THIS_MODULE); |
| 7234 | } |
| 7235 | |
| 7236 | /* USB driver */ |
| 7237 | static struct usb_driver sd_driver = { |
| 7238 | .name = MODULE_NAME, |
| 7239 | .id_table = device_table, |
| 7240 | .probe = sd_probe, |
| 7241 | .disconnect = gspca_disconnect, |
Jean-Francois Moine | 6a70974 | 2008-09-03 16:48:10 -0300 | [diff] [blame] | 7242 | #ifdef CONFIG_PM |
| 7243 | .suspend = gspca_suspend, |
| 7244 | .resume = gspca_resume, |
| 7245 | #endif |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7246 | }; |
| 7247 | |
| 7248 | static int __init sd_mod_init(void) |
| 7249 | { |
Alexey Klimov | f69e952 | 2009-01-01 13:02:07 -0300 | [diff] [blame] | 7250 | int ret; |
| 7251 | ret = usb_register(&sd_driver); |
| 7252 | if (ret < 0) |
Alexey Klimov | e6b1484 | 2009-01-01 13:04:58 -0300 | [diff] [blame] | 7253 | return ret; |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 7254 | PDEBUG(D_PROBE, "registered"); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7255 | return 0; |
| 7256 | } |
| 7257 | |
| 7258 | static void __exit sd_mod_exit(void) |
| 7259 | { |
| 7260 | usb_deregister(&sd_driver); |
| 7261 | PDEBUG(D_PROBE, "deregistered"); |
| 7262 | } |
| 7263 | |
| 7264 | module_init(sd_mod_init); |
| 7265 | module_exit(sd_mod_exit); |
| 7266 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7267 | module_param(force_sensor, int, 0644); |
| 7268 | MODULE_PARM_DESC(force_sensor, |
| 7269 | "Force sensor. Only for experts!!!"); |