Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1 | /* |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 2 | * Z-Star/Vimicro zc301/zc302p/vc30x library |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3 | * |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 4 | * Copyright (C) 2009-2011 Jean-Francois Moine <http://moinejf.free.fr> |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5 | * Copyright (C) 2004 2005 2006 Michel Xhaard mxhaard@magic.fr |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | * |
| 17 | * You should have received a copy of the GNU General Public License |
| 18 | * along with this program; if not, write to the Free Software |
| 19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 20 | */ |
| 21 | |
Joe Perches | 133a9fe | 2011-08-21 19:56:57 -0300 | [diff] [blame] | 22 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
| 23 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 24 | #define MODULE_NAME "zc3xx" |
| 25 | |
Hans de Goede | 1a35102 | 2010-01-29 11:05:25 -0300 | [diff] [blame] | 26 | #include <linux/input.h> |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 27 | #include "gspca.h" |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 28 | #include "jpeg.h" |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 29 | |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 30 | MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>, " |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 31 | "Serge A. Suchkov <Serge.A.S@tochka.ru>"); |
| 32 | MODULE_DESCRIPTION("GSPCA ZC03xx/VC3xx USB Camera Driver"); |
| 33 | MODULE_LICENSE("GPL"); |
| 34 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 35 | static int force_sensor = -1; |
| 36 | |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 37 | #define REG08_DEF 3 /* default JPEG compression (70%) */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 38 | #include "zc3xx-reg.h" |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 39 | |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 40 | /* controls */ |
| 41 | enum e_ctrl { |
| 42 | BRIGHTNESS, |
| 43 | CONTRAST, |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 44 | EXPOSURE, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 45 | GAMMA, |
| 46 | AUTOGAIN, |
| 47 | LIGHTFREQ, |
| 48 | SHARPNESS, |
| 49 | NCTRLS /* number of controls */ |
| 50 | }; |
| 51 | |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 52 | #define AUTOGAIN_DEF 1 |
| 53 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 54 | /* specific webcam descriptor */ |
| 55 | struct sd { |
| 56 | struct gspca_dev gspca_dev; /* !! must be the first item */ |
| 57 | |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 58 | struct gspca_ctrl ctrls[NCTRLS]; |
| 59 | |
Jean-François Moine | f180190 | 2012-02-27 07:48:32 -0300 | [diff] [blame^] | 60 | struct work_struct work; |
| 61 | struct workqueue_struct *work_thread; |
| 62 | |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 63 | u8 reg08; /* webcam compression quality */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 64 | |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 65 | u8 bridge; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 66 | u8 sensor; /* Type of image sensor chip */ |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 67 | u16 chip_revision; |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 68 | |
Jean-François Moine | 9a731a3 | 2010-06-04 05:26:42 -0300 | [diff] [blame] | 69 | u8 jpeg_hdr[JPEG_HDR_SZ]; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 70 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 71 | enum bridges { |
| 72 | BRIDGE_ZC301, |
| 73 | BRIDGE_ZC303, |
| 74 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 75 | enum sensors { |
| 76 | SENSOR_ADCM2700, |
| 77 | SENSOR_CS2102, |
| 78 | SENSOR_CS2102K, |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 79 | SENSOR_GC0303, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 80 | SENSOR_GC0305, |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 81 | SENSOR_HDCS2020, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 82 | SENSOR_HV7131B, |
| 83 | SENSOR_HV7131R, |
| 84 | SENSOR_ICM105A, |
| 85 | SENSOR_MC501CB, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 86 | SENSOR_MT9V111_1, /* (mi360soc) zc301 */ |
| 87 | SENSOR_MT9V111_3, /* (mi360soc) zc303 */ |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 88 | SENSOR_OV7620, /* OV7648 - same values */ |
| 89 | SENSOR_OV7630C, |
| 90 | SENSOR_PAS106, |
| 91 | SENSOR_PAS202B, |
| 92 | SENSOR_PB0330, |
| 93 | SENSOR_PO2030, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 94 | SENSOR_TAS5130C, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 95 | SENSOR_MAX |
| 96 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 97 | |
| 98 | /* V4L2 controls supported by the driver */ |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 99 | static void setcontrast(struct gspca_dev *gspca_dev); |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 100 | static void setexposure(struct gspca_dev *gspca_dev); |
| 101 | static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val); |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 102 | static void setlightfreq(struct gspca_dev *gspca_dev); |
| 103 | static void setsharpness(struct gspca_dev *gspca_dev); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 104 | |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 105 | static const struct ctrl sd_ctrls[NCTRLS] = { |
| 106 | [BRIGHTNESS] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 107 | { |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 108 | .id = V4L2_CID_BRIGHTNESS, |
| 109 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 110 | .name = "Brightness", |
| 111 | .minimum = 0, |
| 112 | .maximum = 255, |
| 113 | .step = 1, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 114 | .default_value = 128, |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 115 | }, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 116 | .set_control = setcontrast |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 117 | }, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 118 | [CONTRAST] = { |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 119 | { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 120 | .id = V4L2_CID_CONTRAST, |
| 121 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 122 | .name = "Contrast", |
| 123 | .minimum = 0, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 124 | .maximum = 255, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 125 | .step = 1, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 126 | .default_value = 128, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 127 | }, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 128 | .set_control = setcontrast |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 129 | }, |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 130 | [EXPOSURE] = { |
| 131 | { |
| 132 | .id = V4L2_CID_EXPOSURE, |
| 133 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 134 | .name = "Exposure", |
| 135 | .minimum = 0x30d, |
| 136 | .maximum = 0x493e, |
| 137 | .step = 1, |
| 138 | .default_value = 0x927 |
| 139 | }, |
| 140 | .set_control = setexposure |
| 141 | }, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 142 | [GAMMA] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 143 | { |
| 144 | .id = V4L2_CID_GAMMA, |
| 145 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 146 | .name = "Gamma", |
| 147 | .minimum = 1, |
| 148 | .maximum = 6, |
| 149 | .step = 1, |
| 150 | .default_value = 4, |
| 151 | }, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 152 | .set_control = setcontrast |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 153 | }, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 154 | [AUTOGAIN] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 155 | { |
| 156 | .id = V4L2_CID_AUTOGAIN, |
| 157 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
| 158 | .name = "Auto Gain", |
| 159 | .minimum = 0, |
| 160 | .maximum = 1, |
| 161 | .step = 1, |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 162 | .default_value = AUTOGAIN_DEF, |
| 163 | .flags = V4L2_CTRL_FLAG_UPDATE |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 164 | }, |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 165 | .set = sd_setautogain |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 166 | }, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 167 | [LIGHTFREQ] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 168 | { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 169 | .id = V4L2_CID_POWER_LINE_FREQUENCY, |
| 170 | .type = V4L2_CTRL_TYPE_MENU, |
| 171 | .name = "Light frequency filter", |
| 172 | .minimum = 0, |
| 173 | .maximum = 2, /* 0: 0, 1: 50Hz, 2:60Hz */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 174 | .step = 1, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 175 | .default_value = 0, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 176 | }, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 177 | .set_control = setlightfreq |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 178 | }, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 179 | [SHARPNESS] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 180 | { |
| 181 | .id = V4L2_CID_SHARPNESS, |
| 182 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 183 | .name = "Sharpness", |
| 184 | .minimum = 0, |
| 185 | .maximum = 3, |
| 186 | .step = 1, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 187 | .default_value = 2, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 188 | }, |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 189 | .set_control = setsharpness |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 190 | }, |
| 191 | }; |
| 192 | |
Jean-Francois Moine | cc611b8 | 2008-12-29 07:49:41 -0300 | [diff] [blame] | 193 | static const struct v4l2_pix_format vga_mode[] = { |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 194 | {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 195 | .bytesperline = 320, |
| 196 | .sizeimage = 320 * 240 * 3 / 8 + 590, |
| 197 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 198 | .priv = 1}, |
| 199 | {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 200 | .bytesperline = 640, |
| 201 | .sizeimage = 640 * 480 * 3 / 8 + 590, |
| 202 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 203 | .priv = 0}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 204 | }; |
| 205 | |
Hans de Goede | 9919fe8 | 2010-01-13 07:12:28 -0300 | [diff] [blame] | 206 | static const struct v4l2_pix_format broken_vga_mode[] = { |
| 207 | {320, 232, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 208 | .bytesperline = 320, |
| 209 | .sizeimage = 320 * 232 * 4 / 8 + 590, |
| 210 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 211 | .priv = 1}, |
| 212 | {640, 472, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 213 | .bytesperline = 640, |
| 214 | .sizeimage = 640 * 472 * 3 / 8 + 590, |
| 215 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 216 | .priv = 0}, |
| 217 | }; |
| 218 | |
Jean-Francois Moine | cc611b8 | 2008-12-29 07:49:41 -0300 | [diff] [blame] | 219 | static const struct v4l2_pix_format sif_mode[] = { |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 220 | {176, 144, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 221 | .bytesperline = 176, |
| 222 | .sizeimage = 176 * 144 * 3 / 8 + 590, |
| 223 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 224 | .priv = 1}, |
| 225 | {352, 288, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 226 | .bytesperline = 352, |
| 227 | .sizeimage = 352 * 288 * 3 / 8 + 590, |
| 228 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 229 | .priv = 0}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 230 | }; |
| 231 | |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 232 | /* bridge reg08 -> JPEG quality conversion table */ |
| 233 | static u8 jpeg_qual[] = {40, 50, 60, 70, /*80*/}; |
| 234 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 235 | /* usb exchanges */ |
| 236 | struct usb_action { |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 237 | u8 req; |
| 238 | u8 val; |
| 239 | u16 idx; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 240 | }; |
| 241 | |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 242 | static const struct usb_action adcm2700_Initial[] = { |
| 243 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 244 | {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT}, /* 00,02,04,cc */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 245 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 246 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 247 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 248 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 249 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 250 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 251 | {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d8,cc */ |
| 252 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 253 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 254 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 255 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 256 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 257 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 258 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 259 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 260 | {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,de,cc */ |
| 261 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 262 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 263 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 264 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 265 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 266 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 267 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 268 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 269 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 270 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 271 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 272 | {0xa0, 0x58, ZC3XX_R116_RGAIN}, /* 01,16,58,cc */ |
| 273 | {0xa0, 0x5a, ZC3XX_R118_BGAIN}, /* 01,18,5a,cc */ |
| 274 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 275 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 276 | {0xbb, 0x00, 0x0408}, /* 04,00,08,bb */ |
| 277 | {0xdd, 0x00, 0x0200}, /* 00,02,00,dd */ |
| 278 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 279 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 280 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
| 281 | {0xbb, 0xe0, 0x0c2e}, /* 0c,e0,2e,bb */ |
| 282 | {0xbb, 0x01, 0x2000}, /* 20,01,00,bb */ |
| 283 | {0xbb, 0x96, 0x2400}, /* 24,96,00,bb */ |
| 284 | {0xbb, 0x06, 0x1006}, /* 10,06,06,bb */ |
| 285 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 286 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 287 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 288 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 289 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 290 | {0xbb, 0x5f, 0x2090}, /* 20,5f,90,bb */ |
| 291 | {0xbb, 0x01, 0x8000}, /* 80,01,00,bb */ |
| 292 | {0xbb, 0x09, 0x8400}, /* 84,09,00,bb */ |
| 293 | {0xbb, 0x86, 0x0002}, /* 00,86,02,bb */ |
| 294 | {0xbb, 0xe6, 0x0401}, /* 04,e6,01,bb */ |
| 295 | {0xbb, 0x86, 0x0802}, /* 08,86,02,bb */ |
| 296 | {0xbb, 0xe6, 0x0c01}, /* 0c,e6,01,bb */ |
| 297 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 298 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 299 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 300 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 301 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 302 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 303 | {0xaa, 0xfe, 0x0020}, /* 00,fe,20,aa */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 304 | /*mswin+*/ |
| 305 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, |
| 306 | {0xaa, 0xfe, 0x0002}, |
| 307 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 308 | {0xaa, 0xb4, 0xcd37}, |
| 309 | {0xaa, 0xa4, 0x0004}, |
| 310 | {0xaa, 0xa8, 0x0007}, |
| 311 | {0xaa, 0xac, 0x0004}, |
| 312 | /*mswin-*/ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 313 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 314 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 315 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 316 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 317 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 318 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 319 | {0xbb, 0x04, 0x0400}, /* 04,04,00,bb */ |
| 320 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 321 | {0xbb, 0x01, 0x0400}, /* 04,01,00,bb */ |
| 322 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 323 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 324 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 325 | {0xbb, 0x41, 0x2803}, /* 28,41,03,bb */ |
| 326 | {0xbb, 0x40, 0x2c03}, /* 2c,40,03,bb */ |
| 327 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 328 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 329 | {} |
| 330 | }; |
| 331 | static const struct usb_action adcm2700_InitialScale[] = { |
| 332 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 333 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 334 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 335 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 336 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 337 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 338 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 339 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 340 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ |
| 341 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 342 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 343 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 344 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 345 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 346 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 347 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 348 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 349 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d8,cc */ |
| 350 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 351 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 352 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 353 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 354 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 355 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 356 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 357 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 358 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 359 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 360 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 361 | {0xa0, 0x58, ZC3XX_R116_RGAIN}, /* 01,16,58,cc */ |
| 362 | {0xa0, 0x5a, ZC3XX_R118_BGAIN}, /* 01,18,5a,cc */ |
| 363 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 364 | {0xa0, 0xd3, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,d3,cc */ |
| 365 | {0xbb, 0x00, 0x0408}, /* 04,00,08,bb */ |
| 366 | {0xdd, 0x00, 0x0200}, /* 00,02,00,dd */ |
| 367 | {0xbb, 0x00, 0x0400}, /* 04,00,00,bb */ |
| 368 | {0xdd, 0x00, 0x0050}, /* 00,00,50,dd */ |
| 369 | {0xbb, 0x0f, 0x140f}, /* 14,0f,0f,bb */ |
| 370 | {0xbb, 0xe0, 0x0c2e}, /* 0c,e0,2e,bb */ |
| 371 | {0xbb, 0x01, 0x2000}, /* 20,01,00,bb */ |
| 372 | {0xbb, 0x96, 0x2400}, /* 24,96,00,bb */ |
| 373 | {0xbb, 0x06, 0x1006}, /* 10,06,06,bb */ |
| 374 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 375 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 376 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 377 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 378 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 379 | {0xbb, 0x5f, 0x2090}, /* 20,5f,90,bb */ |
| 380 | {0xbb, 0x01, 0x8000}, /* 80,01,00,bb */ |
| 381 | {0xbb, 0x09, 0x8400}, /* 84,09,00,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 382 | {0xbb, 0x86, 0x0002}, /* 00,88,02,bb */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 383 | {0xbb, 0xe6, 0x0401}, /* 04,e6,01,bb */ |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 384 | {0xbb, 0x86, 0x0802}, /* 08,88,02,bb */ |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 385 | {0xbb, 0xe6, 0x0c01}, /* 0c,e6,01,bb */ |
| 386 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 387 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 388 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 389 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 390 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 391 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 392 | {0xaa, 0xfe, 0x0020}, /* 00,fe,20,aa */ |
| 393 | /*******/ |
| 394 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 395 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 396 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 397 | {0xaa, 0xfe, 0x0000}, /* 00,fe,00,aa */ |
| 398 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 399 | {0xdd, 0x00, 0x0010}, /* 00,00,10,dd */ |
| 400 | {0xbb, 0x04, 0x0400}, /* 04,04,00,bb */ |
| 401 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 402 | {0xbb, 0x01, 0x0400}, /* 04,01,00,bb */ |
| 403 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 404 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 405 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 406 | {0xbb, 0x41, 0x2803}, /* 28,41,03,bb */ |
| 407 | {0xbb, 0x40, 0x2c03}, /* 2c,40,03,bb */ |
| 408 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 409 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 410 | {} |
| 411 | }; |
| 412 | static const struct usb_action adcm2700_50HZ[] = { |
| 413 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 414 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 415 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 416 | {0xbb, 0x05, 0x8400}, /* 84,05,00,bb */ |
| 417 | {0xbb, 0xd0, 0xb007}, /* b0,d0,07,bb */ |
| 418 | {0xbb, 0xa0, 0xb80f}, /* b8,a0,0f,bb */ |
| 419 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 420 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 421 | {0xaa, 0x26, 0x00d0}, /* 00,26,d0,aa */ |
| 422 | {0xaa, 0x28, 0x0002}, /* 00,28,02,aa */ |
| 423 | {} |
| 424 | }; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 425 | static const struct usb_action adcm2700_60HZ[] = { |
| 426 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 427 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 428 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 429 | {0xbb, 0x07, 0x8400}, /* 84,07,00,bb */ |
| 430 | {0xbb, 0x82, 0xb006}, /* b0,82,06,bb */ |
| 431 | {0xbb, 0x04, 0xb80d}, /* b8,04,0d,bb */ |
| 432 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 433 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 434 | {0xaa, 0x26, 0x0057}, /* 00,26,57,aa */ |
| 435 | {0xaa, 0x28, 0x0002}, /* 00,28,02,aa */ |
| 436 | {} |
| 437 | }; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 438 | static const struct usb_action adcm2700_NoFliker[] = { |
| 439 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 440 | {0xaa, 0xfe, 0x0002}, /* 00,fe,02,aa */ |
| 441 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0a,cc */ |
| 442 | {0xbb, 0x07, 0x8400}, /* 84,07,00,bb */ |
| 443 | {0xbb, 0x05, 0xb000}, /* b0,05,00,bb */ |
| 444 | {0xbb, 0xa0, 0xb801}, /* b8,a0,01,bb */ |
| 445 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 446 | {0xaa, 0xfe, 0x0010}, /* 00,fe,10,aa */ |
| 447 | {} |
| 448 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 449 | static const struct usb_action cs2102_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 450 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 451 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 452 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 453 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 454 | {0xa0, 0x20, ZC3XX_R080_HBLANKHIGH}, |
| 455 | {0xa0, 0x21, ZC3XX_R081_HBLANKLOW}, |
| 456 | {0xa0, 0x30, ZC3XX_R083_RGAINADDR}, |
| 457 | {0xa0, 0x31, ZC3XX_R084_GGAINADDR}, |
| 458 | {0xa0, 0x32, ZC3XX_R085_BGAINADDR}, |
| 459 | {0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH}, |
| 460 | {0xa0, 0x24, ZC3XX_R087_EXPTIMEMID}, |
| 461 | {0xa0, 0x25, ZC3XX_R088_EXPTIMELOW}, |
| 462 | {0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR}, |
| 463 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 464 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 465 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 466 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 467 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 468 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 469 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 470 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 471 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 472 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 473 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 474 | {0xaa, 0x02, 0x0008}, |
| 475 | {0xaa, 0x03, 0x0000}, |
| 476 | {0xaa, 0x11, 0x0000}, |
| 477 | {0xaa, 0x12, 0x0089}, |
| 478 | {0xaa, 0x13, 0x0000}, |
| 479 | {0xaa, 0x14, 0x00e9}, |
| 480 | {0xaa, 0x20, 0x0000}, |
| 481 | {0xaa, 0x22, 0x0000}, |
| 482 | {0xaa, 0x0b, 0x0004}, |
| 483 | {0xaa, 0x30, 0x0030}, |
| 484 | {0xaa, 0x31, 0x0030}, |
| 485 | {0xaa, 0x32, 0x0030}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 486 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 487 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 488 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 489 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 490 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 491 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 492 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 493 | {0xa0, 0x10, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 494 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 495 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 496 | {0xa0, 0x68, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 497 | {0xa0, 0x00, 0x01ad}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 498 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 499 | }; |
| 500 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 501 | static const struct usb_action cs2102_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 502 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 503 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 504 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 505 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 506 | {0xa0, 0x20, ZC3XX_R080_HBLANKHIGH}, |
| 507 | {0xa0, 0x21, ZC3XX_R081_HBLANKLOW}, |
| 508 | {0xa0, 0x30, ZC3XX_R083_RGAINADDR}, |
| 509 | {0xa0, 0x31, ZC3XX_R084_GGAINADDR}, |
| 510 | {0xa0, 0x32, ZC3XX_R085_BGAINADDR}, |
| 511 | {0xa0, 0x23, ZC3XX_R086_EXPTIMEHIGH}, |
| 512 | {0xa0, 0x24, ZC3XX_R087_EXPTIMEMID}, |
| 513 | {0xa0, 0x25, ZC3XX_R088_EXPTIMELOW}, |
| 514 | {0xa0, 0xb3, ZC3XX_R08B_I2CDEVICEADDR}, |
| 515 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 516 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 517 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 518 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 519 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 520 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 521 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 522 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 523 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 524 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 525 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 526 | {0xaa, 0x02, 0x0008}, |
| 527 | {0xaa, 0x03, 0x0000}, |
| 528 | {0xaa, 0x11, 0x0001}, |
| 529 | {0xaa, 0x12, 0x0087}, |
| 530 | {0xaa, 0x13, 0x0001}, |
| 531 | {0xaa, 0x14, 0x00e7}, |
| 532 | {0xaa, 0x20, 0x0000}, |
| 533 | {0xaa, 0x22, 0x0000}, |
| 534 | {0xaa, 0x0b, 0x0004}, |
| 535 | {0xaa, 0x30, 0x0030}, |
| 536 | {0xaa, 0x31, 0x0030}, |
| 537 | {0xaa, 0x32, 0x0030}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 538 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 539 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 540 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 541 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 542 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 543 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 544 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 545 | {0xa0, 0x15, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 546 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 547 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 548 | {0xa0, 0x68, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 549 | {0xa0, 0x00, 0x01ad}, |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 550 | {} |
| 551 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 552 | static const struct usb_action cs2102_50HZScale[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 553 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 554 | {0xaa, 0x23, 0x0001}, |
| 555 | {0xaa, 0x24, 0x005f}, |
| 556 | {0xaa, 0x25, 0x0090}, |
| 557 | {0xaa, 0x21, 0x00dd}, |
| 558 | {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 559 | {0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID}, |
| 560 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 561 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 562 | {0xa0, 0x3a, ZC3XX_R196_ANTIFLICKERMID}, |
| 563 | {0xa0, 0x98, ZC3XX_R197_ANTIFLICKERLOW}, |
| 564 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 565 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 566 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 567 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 568 | {0xa0, 0xdd, ZC3XX_R01D_HSYNC_0}, |
| 569 | {0xa0, 0xe4, ZC3XX_R01E_HSYNC_1}, |
| 570 | {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2}, |
| 571 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 572 | {} |
| 573 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 574 | static const struct usb_action cs2102_50HZ[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 575 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 576 | {0xaa, 0x23, 0x0000}, |
| 577 | {0xaa, 0x24, 0x00af}, |
| 578 | {0xaa, 0x25, 0x00c8}, |
| 579 | {0xaa, 0x21, 0x0068}, |
| 580 | {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 581 | {0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID}, |
| 582 | {0xa0, 0x90, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 583 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 584 | {0xa0, 0x1d, ZC3XX_R196_ANTIFLICKERMID}, |
| 585 | {0xa0, 0x4c, ZC3XX_R197_ANTIFLICKERLOW}, |
| 586 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 587 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 588 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 589 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 590 | {0xa0, 0x68, ZC3XX_R01D_HSYNC_0}, |
| 591 | {0xa0, 0xe3, ZC3XX_R01E_HSYNC_1}, |
| 592 | {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2}, |
| 593 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 594 | {} |
| 595 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 596 | static const struct usb_action cs2102_60HZScale[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 597 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 598 | {0xaa, 0x23, 0x0001}, |
| 599 | {0xaa, 0x24, 0x0055}, |
| 600 | {0xaa, 0x25, 0x00cc}, |
| 601 | {0xaa, 0x21, 0x003f}, |
| 602 | {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 603 | {0xa0, 0xab, ZC3XX_R191_EXPOSURELIMITMID}, |
| 604 | {0xa0, 0x98, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 605 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 606 | {0xa0, 0x30, ZC3XX_R196_ANTIFLICKERMID}, |
| 607 | {0xa0, 0xd4, ZC3XX_R197_ANTIFLICKERLOW}, |
| 608 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 609 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 610 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 611 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 612 | {0xa0, 0x39, ZC3XX_R01D_HSYNC_0}, |
| 613 | {0xa0, 0x70, ZC3XX_R01E_HSYNC_1}, |
| 614 | {0xa0, 0xb0, ZC3XX_R01F_HSYNC_2}, |
| 615 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 616 | {} |
| 617 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 618 | static const struct usb_action cs2102_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 619 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 620 | {0xaa, 0x23, 0x0000}, |
| 621 | {0xaa, 0x24, 0x00aa}, |
| 622 | {0xaa, 0x25, 0x00e6}, |
| 623 | {0xaa, 0x21, 0x003f}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 624 | {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 625 | {0xa0, 0x55, ZC3XX_R191_EXPOSURELIMITMID}, |
| 626 | {0xa0, 0xcc, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 627 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 628 | {0xa0, 0x18, ZC3XX_R196_ANTIFLICKERMID}, |
| 629 | {0xa0, 0x6a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 630 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 631 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 632 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 633 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 634 | {0xa0, 0x3f, ZC3XX_R01D_HSYNC_0}, |
| 635 | {0xa0, 0xa5, ZC3XX_R01E_HSYNC_1}, |
| 636 | {0xa0, 0xf0, ZC3XX_R01F_HSYNC_2}, |
| 637 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 638 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 639 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 640 | static const struct usb_action cs2102_NoFlikerScale[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 641 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 642 | {0xaa, 0x23, 0x0001}, |
| 643 | {0xaa, 0x24, 0x005f}, |
| 644 | {0xaa, 0x25, 0x0000}, |
| 645 | {0xaa, 0x21, 0x0001}, |
| 646 | {0xa0, 0x02, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 647 | {0xa0, 0xbf, ZC3XX_R191_EXPOSURELIMITMID}, |
| 648 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 649 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 650 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 651 | {0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW}, |
| 652 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 653 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 654 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 655 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 656 | {0xa0, 0x01, ZC3XX_R01D_HSYNC_0}, |
| 657 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 658 | {0xa0, 0xa0, ZC3XX_R01F_HSYNC_2}, |
| 659 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 660 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 661 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 662 | static const struct usb_action cs2102_NoFliker[] = { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 663 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 664 | {0xaa, 0x23, 0x0000}, |
| 665 | {0xaa, 0x24, 0x00af}, |
| 666 | {0xaa, 0x25, 0x0080}, |
| 667 | {0xaa, 0x21, 0x0001}, |
| 668 | {0xa0, 0x01, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 669 | {0xa0, 0x5f, ZC3XX_R191_EXPOSURELIMITMID}, |
| 670 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 671 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 672 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 673 | {0xa0, 0x80, ZC3XX_R197_ANTIFLICKERLOW}, |
| 674 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 675 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 676 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 677 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 678 | {0xa0, 0x01, ZC3XX_R01D_HSYNC_0}, |
| 679 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 680 | {0xa0, 0xa0, ZC3XX_R01F_HSYNC_2}, |
| 681 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 682 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 683 | }; |
| 684 | |
| 685 | /* CS2102_KOCOM */ |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 686 | static const struct usb_action cs2102K_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 687 | {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT}, |
| 688 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 689 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 690 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 691 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 692 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 693 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 694 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 695 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 696 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 697 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 698 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 699 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 700 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 701 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 702 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 703 | {0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR}, |
| 704 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 705 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 706 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 707 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 708 | {0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT}, |
| 709 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 710 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 711 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 712 | {0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT}, |
| 713 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 714 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 715 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 716 | {0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT}, |
| 717 | {0xa0, 0x7c, ZC3XX_R093_I2CSETVALUE}, |
| 718 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 719 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 720 | {0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT}, |
| 721 | {0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE}, |
| 722 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 723 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 724 | {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT}, |
| 725 | {0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE}, |
| 726 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 727 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 728 | {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT}, |
| 729 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 730 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 731 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 732 | {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT}, |
| 733 | {0xa0, 0x03, ZC3XX_R093_I2CSETVALUE}, |
| 734 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 735 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 736 | {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT}, |
| 737 | {0xa0, 0x08, ZC3XX_R093_I2CSETVALUE}, |
| 738 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 739 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 740 | {0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT}, |
| 741 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 742 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 743 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 744 | {0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT}, |
| 745 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 746 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 747 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 748 | {0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT}, |
| 749 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 750 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 751 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 752 | {0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT}, |
| 753 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 754 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 755 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 756 | {0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT}, |
| 757 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 758 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 759 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 760 | {0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT}, |
| 761 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 762 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 763 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 764 | {0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT}, |
| 765 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 766 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 767 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 768 | {0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT}, |
| 769 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 770 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 771 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 772 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 773 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 774 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 775 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 776 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
| 777 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 778 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
| 779 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 780 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 781 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 782 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 783 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, |
| 784 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, |
| 785 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 786 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 787 | {0xa0, 0x00, 0x01ad}, |
| 788 | {0xa0, 0x01, 0x01b1}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 789 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 790 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 791 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 792 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
| 793 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 794 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
| 795 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 796 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 797 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 798 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 799 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 800 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 801 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 802 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 803 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 804 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 805 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 806 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 807 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 808 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 809 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 810 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 811 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 812 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 813 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 814 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 815 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 816 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 817 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 818 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 819 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 820 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 821 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 822 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 823 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 824 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 825 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 826 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 827 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
| 828 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 829 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 830 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 831 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 832 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 833 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 834 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 835 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 836 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
| 837 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 838 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 839 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 840 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 841 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 842 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 843 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 844 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 845 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 846 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 847 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 848 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 849 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 850 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 851 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 852 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 853 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 854 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 855 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 856 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 857 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 858 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 859 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 860 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 861 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 862 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 863 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 864 | {0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 865 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 866 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 867 | {0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 868 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 869 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 870 | {0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 871 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 872 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 873 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 874 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 875 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 876 | {0xa0, 0x0f, ZC3XX_R01E_HSYNC_1}, |
| 877 | {0xa0, 0x19, ZC3XX_R01F_HSYNC_2}, |
| 878 | {0xa0, 0x1f, ZC3XX_R020_HSYNC_3}, |
| 879 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 880 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 881 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 882 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 883 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 884 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 885 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
| 886 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 887 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 888 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 889 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 890 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 891 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 892 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 893 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 894 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 895 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 896 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 897 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 898 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 899 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 900 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 901 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 902 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 903 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 904 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 905 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 906 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 907 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 908 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 909 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 910 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 911 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 912 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 913 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 914 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 915 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 916 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 917 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 918 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 919 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 920 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 921 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 922 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 923 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 924 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 925 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 926 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 927 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 928 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 929 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 930 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 931 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 932 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 933 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 934 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 935 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 936 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 937 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 938 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 939 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 940 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 941 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 942 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 943 | }; |
| 944 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 945 | static const struct usb_action cs2102K_Initial[] = { |
Jean-Francois Moine | f1ee8e8 | 2009-01-20 08:14:17 -0300 | [diff] [blame] | 946 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 947 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 948 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 949 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 950 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 951 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 952 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 953 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 954 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 955 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 956 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 957 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 958 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 959 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 960 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 961 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 962 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | f1ee8e8 | 2009-01-20 08:14:17 -0300 | [diff] [blame] | 963 | /*fixme: next sequence = i2c exchanges*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 964 | {0xa0, 0x55, ZC3XX_R08B_I2CDEVICEADDR}, |
| 965 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 966 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 967 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 968 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 969 | {0xa0, 0x0a, ZC3XX_R092_I2CADDRESSSELECT}, |
| 970 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 971 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 972 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 973 | {0xa0, 0x0b, ZC3XX_R092_I2CADDRESSSELECT}, |
| 974 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 975 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 976 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 977 | {0xa0, 0x0c, ZC3XX_R092_I2CADDRESSSELECT}, |
| 978 | {0xa0, 0x7b, ZC3XX_R093_I2CSETVALUE}, |
| 979 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 980 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 981 | {0xa0, 0x0d, ZC3XX_R092_I2CADDRESSSELECT}, |
| 982 | {0xa0, 0xa3, ZC3XX_R093_I2CSETVALUE}, |
| 983 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 984 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 985 | {0xa0, 0x03, ZC3XX_R092_I2CADDRESSSELECT}, |
| 986 | {0xa0, 0xfb, ZC3XX_R093_I2CSETVALUE}, |
| 987 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 988 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 989 | {0xa0, 0x05, ZC3XX_R092_I2CADDRESSSELECT}, |
| 990 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 991 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 992 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 993 | {0xa0, 0x06, ZC3XX_R092_I2CADDRESSSELECT}, |
| 994 | {0xa0, 0x03, ZC3XX_R093_I2CSETVALUE}, |
| 995 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 996 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 997 | {0xa0, 0x09, ZC3XX_R092_I2CADDRESSSELECT}, |
| 998 | {0xa0, 0x08, ZC3XX_R093_I2CSETVALUE}, |
| 999 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1000 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1001 | {0xa0, 0x0e, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1002 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1003 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1004 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1005 | {0xa0, 0x0f, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1006 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 1007 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1008 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1009 | {0xa0, 0x10, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1010 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 1011 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1012 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1013 | {0xa0, 0x11, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1014 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 1015 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1016 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1017 | {0xa0, 0x12, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1018 | {0xa0, 0x18, ZC3XX_R093_I2CSETVALUE}, |
| 1019 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1020 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1021 | {0xa0, 0x15, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1022 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1023 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1024 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1025 | {0xa0, 0x16, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1026 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 1027 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1028 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1029 | {0xa0, 0x17, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1030 | {0xa0, 0x0c, ZC3XX_R093_I2CSETVALUE}, |
| 1031 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1032 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1033 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1034 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1035 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1036 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1037 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, |
| 1038 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1039 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
| 1040 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1041 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1042 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1043 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1044 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, |
| 1045 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, |
| 1046 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1047 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1048 | {0xa0, 0x00, 0x01ad}, |
| 1049 | {0xa0, 0x01, 0x01b1}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1050 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1051 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 1052 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1053 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
| 1054 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 1055 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
| 1056 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 1057 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 1058 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 1059 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 1060 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 1061 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 1062 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 1063 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 1064 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 1065 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 1066 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 1067 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 1068 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 1069 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 1070 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 1071 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 1072 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 1073 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 1074 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 1075 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 1076 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 1077 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 1078 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 1079 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 1080 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 1081 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 1082 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 1083 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 1084 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 1085 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 1086 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 1087 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 1088 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
| 1089 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 1090 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 1091 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 1092 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 1093 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 1094 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 1095 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 1096 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 1097 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
| 1098 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1099 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 1100 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1101 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1102 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1103 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1104 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1105 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 1106 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1107 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1108 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1109 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1110 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1111 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1112 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1113 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1114 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1115 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1116 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1117 | {0xa0, 0x22, ZC3XX_R093_I2CSETVALUE}, |
| 1118 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1119 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1120 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1121 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1122 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1123 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1124 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 1125 | {0xa0, 0x22, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 1126 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 1127 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 1128 | {0xa0, 0xee, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 1129 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 1130 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 1131 | {0xa0, 0x3a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 1132 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 1133 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 1134 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 1135 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 1136 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 1137 | {0xa0, 0x0f, ZC3XX_R01E_HSYNC_1}, |
| 1138 | {0xa0, 0x19, ZC3XX_R01F_HSYNC_2}, |
| 1139 | {0xa0, 0x1f, ZC3XX_R020_HSYNC_3}, |
| 1140 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1141 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1142 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1143 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1144 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 1145 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1146 | {0xa0, 0x4c, ZC3XX_R118_BGAIN}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1147 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1148 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1149 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1150 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1151 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1152 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1153 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 1154 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1155 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1156 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1157 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1158 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1159 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1160 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1161 | {0xa0, 0x5c, ZC3XX_R093_I2CSETVALUE}, |
| 1162 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1163 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1164 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1165 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1166 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1167 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1168 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1169 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1170 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1171 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1172 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1173 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1174 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1175 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1176 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1177 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1178 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1179 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1180 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1181 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 1182 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1183 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1184 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1185 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1186 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1187 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1188 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1189 | {0xa0, 0x96, ZC3XX_R093_I2CSETVALUE}, |
| 1190 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1191 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1192 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1193 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1194 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1195 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1196 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1197 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1198 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1199 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1200 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1201 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1202 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | f1ee8e8 | 2009-01-20 08:14:17 -0300 | [diff] [blame] | 1203 | /*fixme:what does the next sequence?*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1204 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1205 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1206 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1207 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1208 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1209 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1210 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1211 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1212 | {0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE}, |
| 1213 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1214 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1215 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1216 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1217 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1218 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1219 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1220 | {0xa0, 0xd0, ZC3XX_R093_I2CSETVALUE}, |
| 1221 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1222 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1223 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1224 | {0xa0, 0x01, ZC3XX_R093_I2CSETVALUE}, |
| 1225 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1226 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1227 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1228 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1229 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1230 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1231 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1232 | {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, |
| 1233 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1234 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1235 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1236 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1237 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1238 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1239 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1240 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1241 | {0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE}, |
| 1242 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1243 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1244 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1245 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1246 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1247 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1248 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1249 | {0xa0, 0x0a, ZC3XX_R093_I2CSETVALUE}, |
| 1250 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1251 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1252 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1253 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1254 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1255 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1256 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1257 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1258 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1259 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1260 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1261 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1262 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1263 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1264 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1265 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1266 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1267 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1268 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1269 | {0xa0, 0x44, ZC3XX_R093_I2CSETVALUE}, |
| 1270 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1271 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1272 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1273 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1274 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1275 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1276 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1277 | {0xa0, 0x44, ZC3XX_R093_I2CSETVALUE}, |
| 1278 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1279 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1280 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1281 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1282 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1283 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1284 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1285 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1286 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1287 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1288 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1289 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1290 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1291 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1292 | {0xa0, 0x20, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1293 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1294 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1295 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1296 | {0xa0, 0x21, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1297 | {0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE}, |
| 1298 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1299 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1300 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1301 | {0xa0, 0x00, ZC3XX_R093_I2CSETVALUE}, |
| 1302 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1303 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1304 | {0xa0, 0x13, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1305 | {0xa0, 0x7e, ZC3XX_R093_I2CSETVALUE}, |
| 1306 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1307 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1308 | {0xa0, 0x14, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1309 | {0xa0, 0x02, ZC3XX_R093_I2CSETVALUE}, |
| 1310 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1311 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1312 | {0xa0, 0x18, ZC3XX_R092_I2CADDRESSSELECT}, |
| 1313 | {0xa0, 0x04, ZC3XX_R093_I2CSETVALUE}, |
| 1314 | {0xa0, 0x00, ZC3XX_R094_I2CWRITEACK}, |
| 1315 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
| 1316 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1317 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1318 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 1319 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1320 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1321 | }; |
| 1322 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1323 | static const struct usb_action gc0305_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1324 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 1325 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 1326 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 1327 | {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT}, /* 00,02,04,cc */ |
| 1328 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 1329 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 1330 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 1331 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 1332 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 1333 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 1334 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 1335 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 1336 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 1337 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 1338 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 1339 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc */ |
| 1340 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 1341 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1342 | {0xaa, 0x13, 0x0002}, /* 00,13,02,aa */ |
| 1343 | {0xaa, 0x15, 0x0003}, /* 00,15,03,aa */ |
| 1344 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 1345 | {0xaa, 0x02, 0x0000}, /* 00,02,00,aa */ |
| 1346 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 1347 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa */ |
| 1348 | {0xaa, 0x1d, 0x0080}, /* 00,1d,80,aa */ |
| 1349 | {0xaa, 0x1f, 0x0008}, /* 00,1f,08,aa */ |
| 1350 | {0xaa, 0x21, 0x0012}, /* 00,21,12,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1351 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc */ |
| 1352 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc */ |
| 1353 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1354 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 1355 | {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa */ |
| 1356 | {0xaa, 0x0b, 0x00b0}, /* 00,0b,b0,aa */ |
| 1357 | {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa */ |
| 1358 | {0xaa, 0x0d, 0x00b0}, /* 00,0d,b0,aa */ |
| 1359 | {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa */ |
| 1360 | {0xaa, 0x0f, 0x00b0}, /* 00,0f,b0,aa */ |
| 1361 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 1362 | {0xaa, 0x11, 0x00b0}, /* 00,11,b0,aa */ |
| 1363 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa */ |
| 1364 | {0xaa, 0x17, 0x00e6}, /* 00,17,e6,aa */ |
| 1365 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa */ |
| 1366 | {0xaa, 0x19, 0x0086}, /* 00,19,86,aa */ |
| 1367 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1368 | {0xaa, 0x1b, 0x0020}, /* 00,1b,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1369 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc */ |
| 1370 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 1371 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 1372 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1373 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1374 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 1375 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 1376 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 1377 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 1378 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
| 1379 | {0xa0, 0x85, ZC3XX_R18D_YTARGET}, /* 01,8d,85,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1380 | {0xa0, 0x00, 0x011e}, /* 01,1e,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1381 | {0xa0, 0x52, ZC3XX_R116_RGAIN}, /* 01,16,52,cc */ |
| 1382 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, /* 01,17,40,cc */ |
| 1383 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 1384 | {0xa0, 0x03, ZC3XX_R113_RGB03}, /* 01,13,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1385 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1386 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1387 | static const struct usb_action gc0305_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1388 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 1389 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 1390 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 1391 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 1392 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 1393 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 1394 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 1395 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 1396 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 1397 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 1398 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 1399 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 1400 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 1401 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 1402 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 1403 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e8,cc */ |
| 1404 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 1405 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1406 | {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */ |
| 1407 | {0xaa, 0x15, 0x0001}, /* 00,15,01,aa */ |
| 1408 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 1409 | {0xaa, 0x02, 0x0000}, /* 00,02,00,aa */ |
| 1410 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 1411 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa */ |
| 1412 | {0xaa, 0x1d, 0x0080}, /* 00,1d,80,aa */ |
| 1413 | {0xaa, 0x1f, 0x0008}, /* 00,1f,08,aa */ |
| 1414 | {0xaa, 0x21, 0x0012}, /* 00,21,12,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1415 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc */ |
| 1416 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc */ |
| 1417 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1418 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 1419 | {0xaa, 0x0a, 0x0000}, /* 00,0a,00,aa */ |
| 1420 | {0xaa, 0x0b, 0x00b0}, /* 00,0b,b0,aa */ |
| 1421 | {0xaa, 0x0c, 0x0000}, /* 00,0c,00,aa */ |
| 1422 | {0xaa, 0x0d, 0x00b0}, /* 00,0d,b0,aa */ |
| 1423 | {0xaa, 0x0e, 0x0000}, /* 00,0e,00,aa */ |
| 1424 | {0xaa, 0x0f, 0x00b0}, /* 00,0f,b0,aa */ |
| 1425 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 1426 | {0xaa, 0x11, 0x00b0}, /* 00,11,b0,aa */ |
| 1427 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa */ |
| 1428 | {0xaa, 0x17, 0x00e8}, /* 00,17,e8,aa */ |
| 1429 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa */ |
| 1430 | {0xaa, 0x19, 0x0088}, /* 00,19,88,aa */ |
| 1431 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1432 | {0xaa, 0x1b, 0x0020}, /* 00,1b,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1433 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc */ |
| 1434 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 1435 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 1436 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1437 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1438 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 1439 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 1440 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 1441 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 1442 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1443 | {0xa0, 0x00, 0x011e}, /* 01,1e,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1444 | {0xa0, 0x52, ZC3XX_R116_RGAIN}, /* 01,16,52,cc */ |
| 1445 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, /* 01,17,40,cc */ |
| 1446 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 1447 | {0xa0, 0x03, ZC3XX_R113_RGB03}, /* 01,13,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1448 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1449 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1450 | static const struct usb_action gc0305_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1451 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 1452 | {0xaa, 0x83, 0x0002}, /* 00,83,02,aa */ |
| 1453 | {0xaa, 0x84, 0x0038}, /* 00,84,38,aa */ /* win: 00,84,ec */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1454 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1455 | {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0b,cc */ |
| 1456 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 1457 | /* win: 01,92,10 */ |
| 1458 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1459 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1460 | {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,8e,cc */ |
| 1461 | /* win: 01,97,ec */ |
| 1462 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc */ |
| 1463 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc */ |
| 1464 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 1465 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1466 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc */ |
| 1467 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc */ |
| 1468 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc */ |
| 1469 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 1470 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,60,cc */ |
| 1471 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 1472 | /* {0xa0, 0x85, ZC3XX_R18D_YTARGET}, * 01,8d,85,cc * |
| 1473 | * if 640x480 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1474 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1475 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1476 | static const struct usb_action gc0305_60HZ[] = { |
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, 0x00ec}, /* 00,84,ec,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, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0b,cc */ |
| 1482 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,10,cc */ |
| 1483 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1484 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1485 | {0xa0, 0xec, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,ec,cc */ |
| 1486 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc */ |
| 1487 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc */ |
| 1488 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 1489 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 1490 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc */ |
| 1491 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc */ |
| 1492 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc */ |
| 1493 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 1494 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,60,cc */ |
| 1495 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 1496 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, /* 01,8d,80,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1497 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1498 | }; |
| 1499 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 1500 | static const struct usb_action gc0305_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1501 | {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1502 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 1503 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 1504 | {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1505 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1506 | {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,00,cc */ |
| 1507 | {0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,48,cc */ |
| 1508 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1509 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1510 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 1511 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc */ |
| 1512 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc */ |
| 1513 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc */ |
| 1514 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc */ |
| 1515 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc */ |
| 1516 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 1517 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,60,cc */ |
| 1518 | {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,03,cc */ |
| 1519 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, /* 01,8d,80,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1520 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1521 | }; |
| 1522 | |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 1523 | static const struct usb_action hdcs2020_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1524 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1525 | {0xa0, 0x11, ZC3XX_R002_CLOCKSELECT}, |
| 1526 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* qtable 0x05 */ |
| 1527 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1528 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1529 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1530 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1531 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1532 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1533 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1534 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1535 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1536 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1537 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1538 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 1539 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 1540 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1541 | {0xaa, 0x1c, 0x0000}, |
| 1542 | {0xaa, 0x0a, 0x0001}, |
| 1543 | {0xaa, 0x0b, 0x0006}, |
| 1544 | {0xaa, 0x0c, 0x007b}, |
| 1545 | {0xaa, 0x0d, 0x00a7}, |
| 1546 | {0xaa, 0x03, 0x00fb}, |
| 1547 | {0xaa, 0x05, 0x0000}, |
| 1548 | {0xaa, 0x06, 0x0003}, |
| 1549 | {0xaa, 0x09, 0x0008}, |
| 1550 | |
| 1551 | {0xaa, 0x0f, 0x0018}, /* set sensor gain */ |
| 1552 | {0xaa, 0x10, 0x0018}, |
| 1553 | {0xaa, 0x11, 0x0018}, |
| 1554 | {0xaa, 0x12, 0x0018}, |
| 1555 | |
| 1556 | {0xaa, 0x15, 0x004e}, |
| 1557 | {0xaa, 0x1c, 0x0004}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1558 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
| 1559 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1560 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
| 1561 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1562 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1563 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1564 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1565 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1566 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1567 | {0xa1, 0x01, 0x0002}, |
| 1568 | {0xa1, 0x01, 0x0008}, |
| 1569 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1570 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1571 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1572 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1573 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1574 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1575 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 1576 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1577 | {0xa1, 0x01, 0x01c8}, |
| 1578 | {0xa1, 0x01, 0x01c9}, |
| 1579 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1580 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 1581 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 1582 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 1583 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 1584 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 1585 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 1586 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 1587 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 1588 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 1589 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 1590 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 1591 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 1592 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 1593 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 1594 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 1595 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 1596 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 1597 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 1598 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 1599 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 1600 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 1601 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 1602 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 1603 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 1604 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 1605 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 1606 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 1607 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 1608 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 1609 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 1610 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 1611 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 1612 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1613 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1614 | {0xa0, 0x66, ZC3XX_R10A_RGB00}, /* matrix */ |
| 1615 | {0xa0, 0xed, ZC3XX_R10B_RGB01}, |
| 1616 | {0xa0, 0xed, ZC3XX_R10C_RGB02}, |
| 1617 | {0xa0, 0xed, ZC3XX_R10D_RGB10}, |
| 1618 | {0xa0, 0x66, ZC3XX_R10E_RGB11}, |
| 1619 | {0xa0, 0xed, ZC3XX_R10F_RGB12}, |
| 1620 | {0xa0, 0xed, ZC3XX_R110_RGB20}, |
| 1621 | {0xa0, 0xed, ZC3XX_R111_RGB21}, |
| 1622 | {0xa0, 0x66, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1623 | |
| 1624 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1625 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1626 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1627 | {0xaa, 0x13, 0x0031}, |
| 1628 | {0xaa, 0x14, 0x0001}, |
| 1629 | {0xaa, 0x0e, 0x0004}, |
| 1630 | {0xaa, 0x19, 0x00cd}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1631 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 1632 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 1633 | {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 1634 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 1635 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 1636 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, |
| 1637 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 1638 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1639 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1640 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 0x14 */ |
| 1641 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 1642 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 1643 | {0xa0, 0x18, ZC3XX_R01E_HSYNC_1}, |
| 1644 | {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2}, |
| 1645 | {0xa0, 0x41, ZC3XX_R020_HSYNC_3}, |
| 1646 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1647 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1648 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1649 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1650 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1651 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1652 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1653 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1654 | }; |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 1655 | static const struct usb_action hdcs2020_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1656 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1657 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 1658 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 1659 | {0xa0, 0x08, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1660 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1661 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1662 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1663 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1664 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1665 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1666 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1667 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1668 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1669 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1670 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 1671 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 1672 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1673 | {0xaa, 0x1c, 0x0000}, |
| 1674 | {0xaa, 0x0a, 0x0001}, |
| 1675 | {0xaa, 0x0b, 0x0006}, |
| 1676 | {0xaa, 0x0c, 0x007a}, |
| 1677 | {0xaa, 0x0d, 0x00a7}, |
| 1678 | {0xaa, 0x03, 0x00fb}, |
| 1679 | {0xaa, 0x05, 0x0000}, |
| 1680 | {0xaa, 0x06, 0x0003}, |
| 1681 | {0xaa, 0x09, 0x0008}, |
| 1682 | {0xaa, 0x0f, 0x0018}, /* original setting */ |
| 1683 | {0xaa, 0x10, 0x0018}, |
| 1684 | {0xaa, 0x11, 0x0018}, |
| 1685 | {0xaa, 0x12, 0x0018}, |
| 1686 | {0xaa, 0x15, 0x004e}, |
| 1687 | {0xaa, 0x1c, 0x0004}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1688 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, |
| 1689 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1690 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
| 1691 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1692 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1693 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1694 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1695 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1696 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1697 | {0xa1, 0x01, 0x0002}, |
| 1698 | {0xa1, 0x01, 0x0008}, |
| 1699 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1700 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1701 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1702 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1703 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1704 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1705 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 1706 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1707 | {0xa1, 0x01, 0x01c8}, |
| 1708 | {0xa1, 0x01, 0x01c9}, |
| 1709 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1710 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 1711 | {0xa0, 0x13, ZC3XX_R120_GAMMA00}, /* gamma 4 */ |
| 1712 | {0xa0, 0x38, ZC3XX_R121_GAMMA01}, |
| 1713 | {0xa0, 0x59, ZC3XX_R122_GAMMA02}, |
| 1714 | {0xa0, 0x79, ZC3XX_R123_GAMMA03}, |
| 1715 | {0xa0, 0x92, ZC3XX_R124_GAMMA04}, |
| 1716 | {0xa0, 0xa7, ZC3XX_R125_GAMMA05}, |
| 1717 | {0xa0, 0xb9, ZC3XX_R126_GAMMA06}, |
| 1718 | {0xa0, 0xc8, ZC3XX_R127_GAMMA07}, |
| 1719 | {0xa0, 0xd4, ZC3XX_R128_GAMMA08}, |
| 1720 | {0xa0, 0xdf, ZC3XX_R129_GAMMA09}, |
| 1721 | {0xa0, 0xe7, ZC3XX_R12A_GAMMA0A}, |
| 1722 | {0xa0, 0xee, ZC3XX_R12B_GAMMA0B}, |
| 1723 | {0xa0, 0xf4, ZC3XX_R12C_GAMMA0C}, |
| 1724 | {0xa0, 0xf9, ZC3XX_R12D_GAMMA0D}, |
| 1725 | {0xa0, 0xfc, ZC3XX_R12E_GAMMA0E}, |
| 1726 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 1727 | {0xa0, 0x26, ZC3XX_R130_GAMMA10}, |
| 1728 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 1729 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 1730 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 1731 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 1732 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 1733 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 1734 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 1735 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 1736 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 1737 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 1738 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 1739 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 1740 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 1741 | {0xa0, 0x03, ZC3XX_R13E_GAMMA1E}, |
| 1742 | {0xa0, 0x02, ZC3XX_R13F_GAMMA1F}, |
| 1743 | {0xa0, 0x66, ZC3XX_R10A_RGB00}, /* matrix */ |
| 1744 | {0xa0, 0xed, ZC3XX_R10B_RGB01}, |
| 1745 | {0xa0, 0xed, ZC3XX_R10C_RGB02}, |
| 1746 | {0xa0, 0xed, ZC3XX_R10D_RGB10}, |
| 1747 | {0xa0, 0x66, ZC3XX_R10E_RGB11}, |
| 1748 | {0xa0, 0xed, ZC3XX_R10F_RGB12}, |
| 1749 | {0xa0, 0xed, ZC3XX_R110_RGB20}, |
| 1750 | {0xa0, 0xed, ZC3XX_R111_RGB21}, |
| 1751 | {0xa0, 0x66, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1752 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1753 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1754 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1755 | /**** set exposure ***/ |
| 1756 | {0xaa, 0x13, 0x0031}, |
| 1757 | {0xaa, 0x14, 0x0001}, |
| 1758 | {0xaa, 0x0e, 0x0004}, |
| 1759 | {0xaa, 0x19, 0x00cd}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1760 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 1761 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 1762 | {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 1763 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 1764 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 1765 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, |
| 1766 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 1767 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 1768 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 1769 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 1770 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, |
| 1771 | {0xa0, 0x18, ZC3XX_R01E_HSYNC_1}, |
| 1772 | {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2}, |
| 1773 | {0xa0, 0x41, ZC3XX_R020_HSYNC_3}, |
| 1774 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 1775 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1776 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1777 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 1778 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 1779 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 1780 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1781 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1782 | }; |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 1783 | static const struct usb_action hdcs2020_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1784 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 1785 | {0xaa, 0x13, 0x0018}, /* 00,13,18,aa */ |
| 1786 | {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */ |
| 1787 | {0xaa, 0x0e, 0x0005}, /* 00,0e,05,aa */ |
| 1788 | {0xaa, 0x19, 0x001f}, /* 00,19,1f,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1789 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1790 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */ |
| 1791 | {0xa0, 0x76, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,76,cc */ |
| 1792 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1793 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1794 | {0xa0, 0x46, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,46,cc */ |
| 1795 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 1796 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 1797 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,0c,cc */ |
| 1798 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,28,cc */ |
| 1799 | {0xa0, 0x05, ZC3XX_R01D_HSYNC_0}, /* 00,1d,05,cc */ |
| 1800 | {0xa0, 0x1a, ZC3XX_R01E_HSYNC_1}, /* 00,1e,1a,cc */ |
| 1801 | {0xa0, 0x2f, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2f,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1802 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1803 | }; |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 1804 | static const struct usb_action hdcs2020_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1805 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 1806 | {0xaa, 0x13, 0x0031}, /* 00,13,31,aa */ |
| 1807 | {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */ |
| 1808 | {0xaa, 0x0e, 0x0004}, /* 00,0e,04,aa */ |
| 1809 | {0xaa, 0x19, 0x00cd}, /* 00,19,cd,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1810 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1811 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */ |
| 1812 | {0xa0, 0x62, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,62,cc */ |
| 1813 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1814 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1815 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,3d,cc */ |
| 1816 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 1817 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 1818 | {0xa0, 0x0c, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,0c,cc */ |
| 1819 | {0xa0, 0x28, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,28,cc */ |
| 1820 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, /* 00,1d,04,cc */ |
| 1821 | {0xa0, 0x18, ZC3XX_R01E_HSYNC_1}, /* 00,1e,18,cc */ |
| 1822 | {0xa0, 0x2c, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2c,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1823 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1824 | }; |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 1825 | static const struct usb_action hdcs2020_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1826 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 1827 | {0xaa, 0x13, 0x0010}, /* 00,13,10,aa */ |
| 1828 | {0xaa, 0x14, 0x0001}, /* 00,14,01,aa */ |
| 1829 | {0xaa, 0x0e, 0x0004}, /* 00,0e,04,aa */ |
| 1830 | {0xaa, 0x19, 0x0000}, /* 00,19,00,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1831 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 1832 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,02,cc */ |
| 1833 | {0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,70,cc */ |
| 1834 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1835 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 1836 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 1837 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 1838 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 1839 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 1840 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 1841 | {0xa0, 0x04, ZC3XX_R01D_HSYNC_0}, /* 00,1d,04,cc */ |
| 1842 | {0xa0, 0x17, ZC3XX_R01E_HSYNC_1}, /* 00,1e,17,cc */ |
| 1843 | {0xa0, 0x2a, ZC3XX_R01F_HSYNC_2}, /* 00,1f,2a,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1844 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1845 | }; |
| 1846 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 1847 | static const struct usb_action hv7131b_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1848 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1849 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 1850 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1851 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1852 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 1853 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 1854 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1855 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1856 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1857 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1858 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1859 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1860 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1861 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1862 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1863 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1864 | {0xaa, 0x30, 0x002d}, |
| 1865 | {0xaa, 0x01, 0x0005}, |
| 1866 | {0xaa, 0x11, 0x0000}, |
| 1867 | {0xaa, 0x13, 0x0001}, /* {0xaa, 0x13, 0x0000}, */ |
| 1868 | {0xaa, 0x14, 0x0001}, |
| 1869 | {0xaa, 0x15, 0x00e8}, |
| 1870 | {0xaa, 0x16, 0x0002}, |
Jean-Francois Moine | c9ff1b6 | 2008-11-06 15:29:47 -0300 | [diff] [blame] | 1871 | {0xaa, 0x17, 0x0086}, /* 00,17,88,aa */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1872 | {0xaa, 0x31, 0x0038}, |
| 1873 | {0xaa, 0x32, 0x0038}, |
| 1874 | {0xaa, 0x33, 0x0038}, |
| 1875 | {0xaa, 0x5b, 0x0001}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1876 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 1877 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1878 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1879 | {0xa0, 0x68, ZC3XX_R18D_YTARGET}, |
| 1880 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1881 | {0xa0, 0x00, 0x01ad}, |
| 1882 | {0xa0, 0xc0, 0x019b}, |
| 1883 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1884 | {0xa0, 0x02, ZC3XX_R188_MINGAIN}, |
| 1885 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1886 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1887 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1888 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1889 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | c9ff1b6 | 2008-11-06 15:29:47 -0300 | [diff] [blame] | 1890 | {0xaa, 0x02, 0x0090}, /* 00,02,80,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1891 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1892 | }; |
| 1893 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 1894 | static const struct usb_action hv7131b_Initial[] = { /* 640x480*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1895 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 1896 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 1897 | {0xa0, 0x00, ZC3XX_R010_CMOSSENSORSELECT}, |
| 1898 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 1899 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 1900 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 1901 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1902 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1903 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 1904 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 1905 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 1906 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 1907 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 1908 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 1909 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 1910 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1911 | {0xaa, 0x30, 0x002d}, |
| 1912 | {0xaa, 0x01, 0x0005}, |
| 1913 | {0xaa, 0x11, 0x0001}, |
| 1914 | {0xaa, 0x13, 0x0000}, /* {0xaa, 0x13, 0x0001}; */ |
| 1915 | {0xaa, 0x14, 0x0001}, |
| 1916 | {0xaa, 0x15, 0x00e6}, |
| 1917 | {0xaa, 0x16, 0x0002}, |
| 1918 | {0xaa, 0x17, 0x0086}, |
| 1919 | {0xaa, 0x31, 0x0038}, |
| 1920 | {0xaa, 0x32, 0x0038}, |
| 1921 | {0xaa, 0x33, 0x0038}, |
| 1922 | {0xaa, 0x5b, 0x0001}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1923 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 1924 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 1925 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 1926 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
| 1927 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1928 | {0xa0, 0x00, 0x01ad}, |
| 1929 | {0xa0, 0xc0, 0x019b}, |
| 1930 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 1931 | {0xa0, 0x02, ZC3XX_R188_MINGAIN}, |
| 1932 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 1933 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 1934 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 1935 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 1936 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 1937 | {0xaa, 0x02, 0x0090}, /* {0xaa, 0x02, 0x0080}, */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1938 | {} |
| 1939 | }; |
| 1940 | static const struct usb_action hv7131b_50HZ[] = { /* 640x480*/ |
| 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, 0x001b}, /* 00,22,1b,aa */ |
| 1948 | {0xaa, 0x23, 0x00fc}, /* 00,23,fc,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, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 1953 | {0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,ea,cc */ |
| 1954 | {0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,60,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1955 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 1956 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,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, 0x1b, ZC3XX_R01F_HSYNC_2}, /* 00,1f,1b,cc */ |
| 1962 | {0xa0, 0xfc, ZC3XX_R020_HSYNC_3}, /* 00,20,fc,cc */ |
| 1963 | {} |
| 1964 | }; |
| 1965 | static const struct usb_action hv7131b_50HZScale[] = { /* 320x240 */ |
| 1966 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 1967 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
| 1968 | {0xaa, 0x26, 0x0053}, /* 00,26,53,aa */ |
| 1969 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
| 1970 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 1971 | {0xaa, 0x21, 0x0050}, /* 00,21,50,aa */ |
| 1972 | {0xaa, 0x22, 0x0012}, /* 00,22,12,aa */ |
| 1973 | {0xaa, 0x23, 0x0080}, /* 00,23,80,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, 0x9b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,9b,cc */ |
| 1976 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,80,cc */ |
| 1977 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,01,cc */ |
| 1978 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,d4,cc */ |
| 1979 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,c0,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 1980 | {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, /* 01,8c,07,cc */ |
| 1981 | {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,0f,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, 0x50, ZC3XX_R01E_HSYNC_1}, /* 00,1e,50,cc */ |
| 1986 | {0xa0, 0x12, ZC3XX_R01F_HSYNC_2}, /* 00,1f,12,cc */ |
| 1987 | {0xa0, 0x80, ZC3XX_R020_HSYNC_3}, /* 00,20,80,cc */ |
| 1988 | {} |
| 1989 | }; |
| 1990 | static const struct usb_action hv7131b_60HZ[] = { /* 640x480*/ |
| 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, 0x0040}, /* 00,21,40,aa */ |
| 1997 | {0xaa, 0x22, 0x0013}, /* 00,22,13,aa */ |
| 1998 | {0xaa, 0x23, 0x004c}, /* 00,23,4c,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, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2003 | {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,c3,cc */ |
| 2004 | {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,50,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 2005 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 2006 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,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, 0x40, ZC3XX_R01E_HSYNC_1}, /* 00,1e,40,cc */ |
| 2011 | {0xa0, 0x13, ZC3XX_R01F_HSYNC_2}, /* 00,1f,13,cc */ |
| 2012 | {0xa0, 0x4c, ZC3XX_R020_HSYNC_3}, /* 00,20,4c,cc */ |
| 2013 | {} |
| 2014 | }; |
| 2015 | static const struct usb_action hv7131b_60HZScale[] = { /* 320x240 */ |
| 2016 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 2017 | {0xaa, 0x25, 0x0007}, /* 00,25,07,aa */ |
| 2018 | {0xaa, 0x26, 0x00a1}, /* 00,26,a1,aa */ |
| 2019 | {0xaa, 0x27, 0x0020}, /* 00,27,20,aa */ |
| 2020 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 2021 | {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */ |
| 2022 | {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */ |
| 2023 | {0xaa, 0x23, 0x0040}, /* 00,23,40,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, 0x4d, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,4d,cc */ |
| 2026 | {0xa0, 0x60, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,60,cc */ |
| 2027 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,01,cc */ |
| 2028 | {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,86,cc */ |
| 2029 | {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,a0,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 2030 | {0xa0, 0x07, ZC3XX_R18C_AEFREEZE}, /* 01,8c,07,cc */ |
| 2031 | {0xa0, 0x0f, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,0f,cc */ |
| 2032 | {0xa0, 0x18, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,18,cc */ |
| 2033 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 2034 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 2035 | {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,a0,cc */ |
| 2036 | {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, /* 00,1f,16,cc */ |
| 2037 | {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, /* 00,20,40,cc */ |
| 2038 | {} |
| 2039 | }; |
| 2040 | static const struct usb_action hv7131b_NoFliker[] = { /* 640x480*/ |
| 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, 0x0010}, /* 00,21,10,aa */ |
| 2047 | {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */ |
| 2048 | {0xaa, 0x23, 0x0003}, /* 00,23,03,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, 0x10, ZC3XX_R01E_HSYNC_1}, /* 00,1e,10,cc */ |
| 2061 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, /* 00,1f,00,cc */ |
| 2062 | {0xa0, 0x03, ZC3XX_R020_HSYNC_3}, /* 00,20,03,cc */ |
| 2063 | {} |
| 2064 | }; |
| 2065 | static const struct usb_action hv7131b_NoFlikerScale[] = { /* 320x240 */ |
| 2066 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 2067 | {0xaa, 0x25, 0x0003}, /* 00,25,03,aa */ |
| 2068 | {0xaa, 0x26, 0x0000}, /* 00,26,00,aa */ |
| 2069 | {0xaa, 0x27, 0x0000}, /* 00,27,00,aa */ |
| 2070 | {0xaa, 0x20, 0x0000}, /* 00,20,00,aa */ |
| 2071 | {0xaa, 0x21, 0x00a0}, /* 00,21,a0,aa */ |
| 2072 | {0xaa, 0x22, 0x0016}, /* 00,22,16,aa */ |
| 2073 | {0xaa, 0x23, 0x0040}, /* 00,23,40,aa */ |
Jean-Francois Moine | f4f4ef7 | 2008-12-08 06:25:40 -0300 | [diff] [blame] | 2074 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,2f,cc */ |
| 2075 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,f8,cc */ |
| 2076 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,00,cc */ |
| 2077 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2078 | {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,02,cc */ |
| 2079 | {0xa0, 0x00, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,00,cc */ |
Jean-Francois Moine | 13563f4 | 2008-11-06 15:35:21 -0300 | [diff] [blame] | 2080 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2081 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2082 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 2083 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 2084 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, /* 00,1d,00,cc */ |
| 2085 | {0xa0, 0xa0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,a0,cc */ |
| 2086 | {0xa0, 0x16, ZC3XX_R01F_HSYNC_2}, /* 00,1f,16,cc */ |
| 2087 | {0xa0, 0x40, ZC3XX_R020_HSYNC_3}, /* 00,20,40,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2088 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2089 | }; |
| 2090 | |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2091 | /* from lPEPI264v.inf (hv7131b!) */ |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2092 | static const struct usb_action hv7131r_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2093 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 2094 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 2095 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2096 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2097 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 2098 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2099 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2100 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2101 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2102 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2103 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 2104 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 2105 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 2106 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 2107 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
| 2108 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 2109 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 2110 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 2111 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 2112 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2113 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2114 | {0xdd, 0x00, 0x0200}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2115 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2116 | {0xaa, 0x01, 0x000c}, |
| 2117 | {0xaa, 0x11, 0x0000}, |
| 2118 | {0xaa, 0x13, 0x0000}, |
| 2119 | {0xaa, 0x14, 0x0001}, |
| 2120 | {0xaa, 0x15, 0x00e8}, |
| 2121 | {0xaa, 0x16, 0x0002}, |
| 2122 | {0xaa, 0x17, 0x0088}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2123 | {0xaa, 0x30, 0x000b}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2124 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2125 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2126 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2127 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2128 | {0xa0, 0x00, 0x01ad}, |
| 2129 | {0xa0, 0xc0, 0x019b}, |
| 2130 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2131 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2132 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2133 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 2134 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2135 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2136 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2137 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2138 | static const struct usb_action hv7131r_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2139 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2140 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2141 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2142 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2143 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 2144 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2145 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2146 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2147 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2148 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2149 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2150 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2151 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 2152 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 2153 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2154 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2155 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2156 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2157 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 2158 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2159 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2160 | {0xdd, 0x00, 0x0200}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2161 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2162 | {0xaa, 0x01, 0x000c}, |
| 2163 | {0xaa, 0x11, 0x0000}, |
| 2164 | {0xaa, 0x13, 0x0000}, |
| 2165 | {0xaa, 0x14, 0x0001}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2166 | {0xaa, 0x15, 0x00e6}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2167 | {0xaa, 0x16, 0x0002}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2168 | {0xaa, 0x17, 0x0086}, |
| 2169 | {0xaa, 0x30, 0x000b}, |
| 2170 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2171 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2172 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2173 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2174 | {0xa0, 0x00, 0x01ad}, |
| 2175 | {0xa0, 0xc0, 0x019b}, |
| 2176 | {0xa0, 0xa0, 0x019c}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2177 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2178 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2179 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 2180 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2181 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2182 | {} |
| 2183 | }; |
| 2184 | static const struct usb_action hv7131r_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2185 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2186 | {0xa0, 0x06, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2187 | {0xa0, 0x68, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2188 | {0xa0, 0xa0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2189 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2190 | {0xa0, 0xea, ZC3XX_R196_ANTIFLICKERMID}, |
| 2191 | {0xa0, 0x60, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2192 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, |
| 2193 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2194 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2195 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2196 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2197 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2198 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2199 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
| 2200 | {} |
| 2201 | }; |
| 2202 | static const struct usb_action hv7131r_50HZScale[] = { |
| 2203 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2204 | {0xa0, 0x0c, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2205 | {0xa0, 0xd1, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2206 | {0xa0, 0x40, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2207 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2208 | {0xa0, 0xd4, ZC3XX_R196_ANTIFLICKERMID}, |
| 2209 | {0xa0, 0xc0, ZC3XX_R197_ANTIFLICKERLOW}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2210 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2211 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2212 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 2213 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2214 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2215 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2216 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2217 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
| 2218 | {} |
| 2219 | }; |
| 2220 | static const struct usb_action hv7131r_60HZ[] = { |
| 2221 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2222 | {0xa0, 0x06, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2223 | {0xa0, 0x1a, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2224 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2225 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2226 | {0xa0, 0xc3, ZC3XX_R196_ANTIFLICKERMID}, |
| 2227 | {0xa0, 0x50, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2228 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, |
| 2229 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2230 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2231 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2232 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2233 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2234 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2235 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
| 2236 | {} |
| 2237 | }; |
| 2238 | static const struct usb_action hv7131r_60HZScale[] = { |
| 2239 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2240 | {0xa0, 0x0c, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2241 | {0xa0, 0x35, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2242 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2243 | {0xa0, 0x01, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2244 | {0xa0, 0x86, ZC3XX_R196_ANTIFLICKERMID}, |
| 2245 | {0xa0, 0xa0, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2246 | {0xa0, 0x18, ZC3XX_R18C_AEFREEZE}, |
| 2247 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2248 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2249 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2250 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2251 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2252 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2253 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
| 2254 | {} |
| 2255 | }; |
| 2256 | static const struct usb_action hv7131r_NoFliker[] = { |
| 2257 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2258 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2259 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2260 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2261 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2262 | {0xa0, 0x02, ZC3XX_R196_ANTIFLICKERMID}, |
| 2263 | {0xa0, 0x58, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2264 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 2265 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 2266 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2267 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2268 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2269 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2270 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2271 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
| 2272 | {} |
| 2273 | }; |
| 2274 | static const struct usb_action hv7131r_NoFlikerScale[] = { |
| 2275 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 2276 | {0xa0, 0x2f, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2277 | {0xa0, 0xf8, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2278 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2279 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2280 | {0xa0, 0x04, ZC3XX_R196_ANTIFLICKERMID}, |
| 2281 | {0xa0, 0xb0, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2282 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 2283 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 2284 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2285 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2286 | {0xa0, 0x00, ZC3XX_R01D_HSYNC_0}, |
| 2287 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, |
| 2288 | {0xa0, 0x00, ZC3XX_R01F_HSYNC_2}, |
| 2289 | {0xa0, 0x08, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2290 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2291 | }; |
| 2292 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2293 | static const struct usb_action icm105a_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2294 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 2295 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 2296 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 2297 | {0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2298 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2299 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2300 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 2301 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 2302 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2303 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2304 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2305 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 2306 | {0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH}, |
| 2307 | {0xa0, 0x01, ZC3XX_R098_WINYSTARTLOW}, |
| 2308 | {0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH}, |
| 2309 | {0xa0, 0x01, ZC3XX_R09A_WINXSTARTLOW}, |
| 2310 | {0xa0, 0x01, ZC3XX_R11A_FIRSTYLOW}, |
| 2311 | {0xa0, 0x01, ZC3XX_R11C_FIRSTXLOW}, |
| 2312 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
| 2313 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 2314 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 2315 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 2316 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 2317 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 2318 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2319 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2320 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2321 | {0xaa, 0x01, 0x0010}, |
| 2322 | {0xaa, 0x03, 0x0000}, |
| 2323 | {0xaa, 0x04, 0x0001}, |
| 2324 | {0xaa, 0x05, 0x0020}, |
| 2325 | {0xaa, 0x06, 0x0001}, |
| 2326 | {0xaa, 0x08, 0x0000}, |
| 2327 | {0xaa, 0x03, 0x0001}, |
| 2328 | {0xaa, 0x04, 0x0011}, |
| 2329 | {0xaa, 0x05, 0x00a0}, |
| 2330 | {0xaa, 0x06, 0x0001}, |
| 2331 | {0xaa, 0x08, 0x0000}, |
| 2332 | {0xaa, 0x03, 0x0002}, |
| 2333 | {0xaa, 0x04, 0x0013}, |
| 2334 | {0xaa, 0x05, 0x0020}, |
| 2335 | {0xaa, 0x06, 0x0001}, |
| 2336 | {0xaa, 0x08, 0x0000}, |
| 2337 | {0xaa, 0x03, 0x0003}, |
| 2338 | {0xaa, 0x04, 0x0015}, |
| 2339 | {0xaa, 0x05, 0x0020}, |
| 2340 | {0xaa, 0x06, 0x0005}, |
| 2341 | {0xaa, 0x08, 0x0000}, |
| 2342 | {0xaa, 0x03, 0x0004}, |
| 2343 | {0xaa, 0x04, 0x0017}, |
| 2344 | {0xaa, 0x05, 0x0020}, |
| 2345 | {0xaa, 0x06, 0x000d}, |
| 2346 | {0xaa, 0x08, 0x0000}, |
| 2347 | {0xaa, 0x03, 0x0005}, |
| 2348 | {0xaa, 0x04, 0x0019}, |
| 2349 | {0xaa, 0x05, 0x0020}, |
| 2350 | {0xaa, 0x06, 0x0005}, |
| 2351 | {0xaa, 0x08, 0x0000}, |
| 2352 | {0xaa, 0x03, 0x0006}, |
| 2353 | {0xaa, 0x04, 0x0017}, |
| 2354 | {0xaa, 0x05, 0x0026}, |
| 2355 | {0xaa, 0x06, 0x0005}, |
| 2356 | {0xaa, 0x08, 0x0000}, |
| 2357 | {0xaa, 0x03, 0x0007}, |
| 2358 | {0xaa, 0x04, 0x0019}, |
| 2359 | {0xaa, 0x05, 0x0022}, |
| 2360 | {0xaa, 0x06, 0x0005}, |
| 2361 | {0xaa, 0x08, 0x0000}, |
| 2362 | {0xaa, 0x03, 0x0008}, |
| 2363 | {0xaa, 0x04, 0x0021}, |
| 2364 | {0xaa, 0x05, 0x00aa}, |
| 2365 | {0xaa, 0x06, 0x0005}, |
| 2366 | {0xaa, 0x08, 0x0000}, |
| 2367 | {0xaa, 0x03, 0x0009}, |
| 2368 | {0xaa, 0x04, 0x0023}, |
| 2369 | {0xaa, 0x05, 0x00aa}, |
| 2370 | {0xaa, 0x06, 0x000d}, |
| 2371 | {0xaa, 0x08, 0x0000}, |
| 2372 | {0xaa, 0x03, 0x000a}, |
| 2373 | {0xaa, 0x04, 0x0025}, |
| 2374 | {0xaa, 0x05, 0x00aa}, |
| 2375 | {0xaa, 0x06, 0x0005}, |
| 2376 | {0xaa, 0x08, 0x0000}, |
| 2377 | {0xaa, 0x03, 0x000b}, |
| 2378 | {0xaa, 0x04, 0x00ec}, |
| 2379 | {0xaa, 0x05, 0x002e}, |
| 2380 | {0xaa, 0x06, 0x0005}, |
| 2381 | {0xaa, 0x08, 0x0000}, |
| 2382 | {0xaa, 0x03, 0x000c}, |
| 2383 | {0xaa, 0x04, 0x00fa}, |
| 2384 | {0xaa, 0x05, 0x002a}, |
| 2385 | {0xaa, 0x06, 0x0005}, |
| 2386 | {0xaa, 0x08, 0x0000}, |
| 2387 | {0xaa, 0x07, 0x000d}, |
| 2388 | {0xaa, 0x01, 0x0005}, |
| 2389 | {0xaa, 0x94, 0x0002}, |
| 2390 | {0xaa, 0x90, 0x0000}, |
| 2391 | {0xaa, 0x91, 0x001f}, |
| 2392 | {0xaa, 0x10, 0x0064}, |
| 2393 | {0xaa, 0x9b, 0x00f0}, |
| 2394 | {0xaa, 0x9c, 0x0002}, |
| 2395 | {0xaa, 0x14, 0x001a}, |
| 2396 | {0xaa, 0x20, 0x0080}, |
| 2397 | {0xaa, 0x22, 0x0080}, |
| 2398 | {0xaa, 0x24, 0x0080}, |
| 2399 | {0xaa, 0x26, 0x0080}, |
| 2400 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2401 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2402 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2403 | {0xaa, 0xa8, 0x00c0}, |
| 2404 | {0xa1, 0x01, 0x0002}, |
| 2405 | {0xa1, 0x01, 0x0008}, |
| 2406 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2407 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2408 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2409 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2410 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2411 | {0xa1, 0x01, 0x0008}, |
| 2412 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2413 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 2414 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2415 | {0xa1, 0x01, 0x01c8}, |
| 2416 | {0xa1, 0x01, 0x01c9}, |
| 2417 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2418 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 2419 | {0xa0, 0x52, ZC3XX_R10A_RGB00}, /* matrix */ |
| 2420 | {0xa0, 0xf7, ZC3XX_R10B_RGB01}, |
| 2421 | {0xa0, 0xf7, ZC3XX_R10C_RGB02}, |
| 2422 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 2423 | {0xa0, 0x52, ZC3XX_R10E_RGB11}, |
| 2424 | {0xa0, 0xf7, ZC3XX_R10F_RGB12}, |
| 2425 | {0xa0, 0xf7, ZC3XX_R110_RGB20}, |
| 2426 | {0xa0, 0xf7, ZC3XX_R111_RGB21}, |
| 2427 | {0xa0, 0x52, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2428 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2429 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2430 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2431 | {0xaa, 0x0d, 0x0003}, |
| 2432 | {0xaa, 0x0c, 0x008c}, |
| 2433 | {0xaa, 0x0e, 0x0095}, |
| 2434 | {0xaa, 0x0f, 0x0002}, |
| 2435 | {0xaa, 0x1c, 0x0094}, |
| 2436 | {0xaa, 0x1d, 0x0002}, |
| 2437 | {0xaa, 0x20, 0x0080}, |
| 2438 | {0xaa, 0x22, 0x0080}, |
| 2439 | {0xaa, 0x24, 0x0080}, |
| 2440 | {0xaa, 0x26, 0x0080}, |
| 2441 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2442 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 2443 | {0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 2444 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2445 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2446 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2447 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2448 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 2449 | {0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2450 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 2451 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2452 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2453 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2454 | {0xa0, 0xe3, ZC3XX_R01D_HSYNC_0}, |
| 2455 | {0xa0, 0xec, ZC3XX_R01E_HSYNC_1}, |
| 2456 | {0xa0, 0xf5, ZC3XX_R01F_HSYNC_2}, |
| 2457 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 2458 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 2459 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, |
| 2460 | {0xa0, 0xc0, ZC3XX_R11D_GLOBALGAIN}, |
| 2461 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2462 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2463 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2464 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2465 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2466 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2467 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2468 | }; |
| 2469 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2470 | static const struct usb_action icm105a_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2471 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 2472 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 2473 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 2474 | {0xa0, 0x0c, ZC3XX_R010_CMOSSENSORSELECT}, |
| 2475 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 2476 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 2477 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 2478 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 2479 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 2480 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2481 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 2482 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 2483 | {0xa0, 0x00, ZC3XX_R097_WINYSTARTHIGH}, |
| 2484 | {0xa0, 0x02, ZC3XX_R098_WINYSTARTLOW}, |
| 2485 | {0xa0, 0x00, ZC3XX_R099_WINXSTARTHIGH}, |
| 2486 | {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW}, |
| 2487 | {0xa0, 0x02, ZC3XX_R11A_FIRSTYLOW}, |
| 2488 | {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW}, |
| 2489 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, |
| 2490 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
| 2491 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 2492 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
| 2493 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 2494 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 2495 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 2496 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 2497 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2498 | {0xaa, 0x01, 0x0010}, |
| 2499 | {0xaa, 0x03, 0x0000}, |
| 2500 | {0xaa, 0x04, 0x0001}, |
| 2501 | {0xaa, 0x05, 0x0020}, |
| 2502 | {0xaa, 0x06, 0x0001}, |
| 2503 | {0xaa, 0x08, 0x0000}, |
| 2504 | {0xaa, 0x03, 0x0001}, |
| 2505 | {0xaa, 0x04, 0x0011}, |
| 2506 | {0xaa, 0x05, 0x00a0}, |
| 2507 | {0xaa, 0x06, 0x0001}, |
| 2508 | {0xaa, 0x08, 0x0000}, |
| 2509 | {0xaa, 0x03, 0x0002}, |
| 2510 | {0xaa, 0x04, 0x0013}, |
| 2511 | {0xaa, 0x05, 0x0020}, |
| 2512 | {0xaa, 0x06, 0x0001}, |
| 2513 | {0xaa, 0x08, 0x0000}, |
| 2514 | {0xaa, 0x03, 0x0003}, |
| 2515 | {0xaa, 0x04, 0x0015}, |
| 2516 | {0xaa, 0x05, 0x0020}, |
| 2517 | {0xaa, 0x06, 0x0005}, |
| 2518 | {0xaa, 0x08, 0x0000}, |
| 2519 | {0xaa, 0x03, 0x0004}, |
| 2520 | {0xaa, 0x04, 0x0017}, |
| 2521 | {0xaa, 0x05, 0x0020}, |
| 2522 | {0xaa, 0x06, 0x000d}, |
| 2523 | {0xaa, 0x08, 0x0000}, |
| 2524 | {0xaa, 0x03, 0x0005}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2525 | {0xa0, 0x04, ZC3XX_R092_I2CADDRESSSELECT}, |
| 2526 | {0xa0, 0x19, ZC3XX_R093_I2CSETVALUE}, |
| 2527 | {0xa0, 0x01, ZC3XX_R090_I2CCOMMAND}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2528 | {0xa1, 0x01, 0x0091}, |
| 2529 | {0xaa, 0x05, 0x0020}, |
| 2530 | {0xaa, 0x06, 0x0005}, |
| 2531 | {0xaa, 0x08, 0x0000}, |
| 2532 | {0xaa, 0x03, 0x0006}, |
| 2533 | {0xaa, 0x04, 0x0017}, |
| 2534 | {0xaa, 0x05, 0x0026}, |
| 2535 | {0xaa, 0x06, 0x0005}, |
| 2536 | {0xaa, 0x08, 0x0000}, |
| 2537 | {0xaa, 0x03, 0x0007}, |
| 2538 | {0xaa, 0x04, 0x0019}, |
| 2539 | {0xaa, 0x05, 0x0022}, |
| 2540 | {0xaa, 0x06, 0x0005}, |
| 2541 | {0xaa, 0x08, 0x0000}, |
| 2542 | {0xaa, 0x03, 0x0008}, |
| 2543 | {0xaa, 0x04, 0x0021}, |
| 2544 | {0xaa, 0x05, 0x00aa}, |
| 2545 | {0xaa, 0x06, 0x0005}, |
| 2546 | {0xaa, 0x08, 0x0000}, |
| 2547 | {0xaa, 0x03, 0x0009}, |
| 2548 | {0xaa, 0x04, 0x0023}, |
| 2549 | {0xaa, 0x05, 0x00aa}, |
| 2550 | {0xaa, 0x06, 0x000d}, |
| 2551 | {0xaa, 0x08, 0x0000}, |
| 2552 | {0xaa, 0x03, 0x000a}, |
| 2553 | {0xaa, 0x04, 0x0025}, |
| 2554 | {0xaa, 0x05, 0x00aa}, |
| 2555 | {0xaa, 0x06, 0x0005}, |
| 2556 | {0xaa, 0x08, 0x0000}, |
| 2557 | {0xaa, 0x03, 0x000b}, |
| 2558 | {0xaa, 0x04, 0x00ec}, |
| 2559 | {0xaa, 0x05, 0x002e}, |
| 2560 | {0xaa, 0x06, 0x0005}, |
| 2561 | {0xaa, 0x08, 0x0000}, |
| 2562 | {0xaa, 0x03, 0x000c}, |
| 2563 | {0xaa, 0x04, 0x00fa}, |
| 2564 | {0xaa, 0x05, 0x002a}, |
| 2565 | {0xaa, 0x06, 0x0005}, |
| 2566 | {0xaa, 0x08, 0x0000}, |
| 2567 | {0xaa, 0x07, 0x000d}, |
| 2568 | {0xaa, 0x01, 0x0005}, |
| 2569 | {0xaa, 0x94, 0x0002}, |
| 2570 | {0xaa, 0x90, 0x0000}, |
| 2571 | {0xaa, 0x91, 0x0010}, |
| 2572 | {0xaa, 0x10, 0x0064}, |
| 2573 | {0xaa, 0x9b, 0x00f0}, |
| 2574 | {0xaa, 0x9c, 0x0002}, |
| 2575 | {0xaa, 0x14, 0x001a}, |
| 2576 | {0xaa, 0x20, 0x0080}, |
| 2577 | {0xaa, 0x22, 0x0080}, |
| 2578 | {0xaa, 0x24, 0x0080}, |
| 2579 | {0xaa, 0x26, 0x0080}, |
| 2580 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2581 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 2582 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2583 | {0xaa, 0xa8, 0x0080}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2584 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2585 | {0xa1, 0x01, 0x0002}, |
| 2586 | {0xa1, 0x01, 0x0008}, |
| 2587 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2588 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2589 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2590 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2591 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2592 | {0xa1, 0x01, 0x0008}, |
| 2593 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2594 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 2595 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2596 | {0xa1, 0x01, 0x01c8}, |
| 2597 | {0xa1, 0x01, 0x01c9}, |
| 2598 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2599 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2600 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2601 | {0xa0, 0x52, ZC3XX_R10A_RGB00}, /* matrix */ |
| 2602 | {0xa0, 0xf7, ZC3XX_R10B_RGB01}, |
| 2603 | {0xa0, 0xf7, ZC3XX_R10C_RGB02}, |
| 2604 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 2605 | {0xa0, 0x52, ZC3XX_R10E_RGB11}, |
| 2606 | {0xa0, 0xf7, ZC3XX_R10F_RGB12}, |
| 2607 | {0xa0, 0xf7, ZC3XX_R110_RGB20}, |
| 2608 | {0xa0, 0xf7, ZC3XX_R111_RGB21}, |
| 2609 | {0xa0, 0x52, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2610 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2611 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2612 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2613 | {0xaa, 0x0d, 0x0003}, |
| 2614 | {0xaa, 0x0c, 0x0020}, |
| 2615 | {0xaa, 0x0e, 0x000e}, |
| 2616 | {0xaa, 0x0f, 0x0002}, |
| 2617 | {0xaa, 0x1c, 0x000d}, |
| 2618 | {0xaa, 0x1d, 0x0002}, |
| 2619 | {0xaa, 0x20, 0x0080}, |
| 2620 | {0xaa, 0x22, 0x0080}, |
| 2621 | {0xaa, 0x24, 0x0080}, |
| 2622 | {0xaa, 0x26, 0x0080}, |
| 2623 | {0xaa, 0x00, 0x0084}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2624 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, |
| 2625 | {0xa0, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW}, |
| 2626 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 2627 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 2628 | {0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 2629 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 2630 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 2631 | {0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW}, |
| 2632 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 2633 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 2634 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 2635 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 2636 | {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0}, |
| 2637 | {0xa0, 0xd8, ZC3XX_R01E_HSYNC_1}, |
| 2638 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, |
| 2639 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 2640 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, |
| 2641 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2642 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2643 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 2644 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 2645 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 2646 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
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 | 1cb6d7b1 | 2010-01-08 07:06:06 -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, 0x0020}, /* 00,0c,20,aa */ |
| 2653 | {0xaa, 0x0e, 0x000e}, /* 00,0e,0e,aa */ |
| 2654 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2655 | {0xaa, 0x1c, 0x000d}, /* 00,1c,0d,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, 0x0d, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,0d,cc */ |
| 2664 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2665 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2666 | {0xa0, 0x1a, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,1a,cc */ |
| 2667 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2668 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2669 | {0xa0, 0x4b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,4b,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, 0xc8, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c8,cc */ |
| 2675 | {0xa0, 0xd8, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d8,cc */ |
| 2676 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */ |
| 2677 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2678 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2679 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2680 | static const struct usb_action icm105a_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2681 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2682 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2683 | {0xaa, 0x0c, 0x008c}, /* 00,0c,8c,aa */ |
| 2684 | {0xaa, 0x0e, 0x0095}, /* 00,0e,95,aa */ |
| 2685 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2686 | {0xaa, 0x1c, 0x0094}, /* 00,1c,94,aa */ |
| 2687 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2688 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2689 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2690 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2691 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2692 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2693 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2694 | {0xa0, 0x94, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,94,cc */ |
| 2695 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2696 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2697 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */ |
| 2698 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2699 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2700 | {0xa0, 0x84, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,84,cc */ |
| 2701 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2702 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2703 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 2704 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */ |
| 2705 | {0xa0, 0xe3, ZC3XX_R01D_HSYNC_0}, /* 00,1d,e3,cc */ |
| 2706 | {0xa0, 0xec, ZC3XX_R01E_HSYNC_1}, /* 00,1e,ec,cc */ |
| 2707 | {0xa0, 0xf5, ZC3XX_R01F_HSYNC_2}, /* 00,1f,f5,cc */ |
| 2708 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 2709 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */ |
| 2710 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,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 | 1cb6d7b1 | 2010-01-08 07:06:06 -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, 0x0004}, /* 00,0c,04,aa */ |
| 2717 | {0xaa, 0x0e, 0x000d}, /* 00,0e,0d,aa */ |
| 2718 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2719 | {0xaa, 0x1c, 0x0008}, /* 00,1c,08,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, 0x08, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,08,cc */ |
| 2728 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2729 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2730 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,10,cc */ |
| 2731 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2732 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2733 | {0xa0, 0x41, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,41,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, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */ |
| 2739 | {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */ |
| 2740 | {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */ |
| 2741 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2742 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2743 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2744 | static const struct usb_action icm105a_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2745 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2746 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2747 | {0xaa, 0x0c, 0x0008}, /* 00,0c,08,aa */ |
| 2748 | {0xaa, 0x0e, 0x0086}, /* 00,0e,86,aa */ |
| 2749 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2750 | {0xaa, 0x1c, 0x0085}, /* 00,1c,85,aa */ |
| 2751 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2752 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2753 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2754 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2755 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2756 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2757 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2758 | {0xa0, 0x85, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,85,cc */ |
| 2759 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2760 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2761 | {0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,08,cc */ |
| 2762 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2763 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2764 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,81,cc */ |
| 2765 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2766 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2767 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 2768 | {0xa0, 0x12, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,12,cc */ |
| 2769 | {0xa0, 0xc2, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c2,cc */ |
| 2770 | {0xa0, 0xd6, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d6,cc */ |
| 2771 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */ |
| 2772 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 2773 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */ |
| 2774 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,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 | 1cb6d7b1 | 2010-01-08 07:06:06 -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, 0x000d}, /* 00,0e,0d,aa */ |
| 2782 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2783 | {0xaa, 0x1c, 0x0000}, /* 00,1c,00,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, 0x00, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,00,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 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2806 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2807 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2808 | static const struct usb_action icm105a_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2809 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2810 | {0xaa, 0x0d, 0x0003}, /* 00,0d,03,aa */ |
| 2811 | {0xaa, 0x0c, 0x0004}, /* 00,0c,04,aa */ |
| 2812 | {0xaa, 0x0e, 0x0081}, /* 00,0e,81,aa */ |
| 2813 | {0xaa, 0x0f, 0x0002}, /* 00,0f,02,aa */ |
| 2814 | {0xaa, 0x1c, 0x0080}, /* 00,1c,80,aa */ |
| 2815 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 2816 | {0xaa, 0x20, 0x0080}, /* 00,20,80,aa */ |
| 2817 | {0xaa, 0x22, 0x0080}, /* 00,22,80,aa */ |
| 2818 | {0xaa, 0x24, 0x0080}, /* 00,24,80,aa */ |
| 2819 | {0xaa, 0x26, 0x0080}, /* 00,26,80,aa */ |
| 2820 | {0xaa, 0x00, 0x0084}, /* 00,00,84,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2821 | {0xa0, 0x02, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,02,cc */ |
| 2822 | {0xa0, 0x80, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,80,cc */ |
| 2823 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 2824 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 2825 | {0xa0, 0x20, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,20,cc */ |
| 2826 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 2827 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 2828 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 2829 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 2830 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 2831 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 2832 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 2833 | {0xa0, 0xc1, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c1,cc */ |
| 2834 | {0xa0, 0xd4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d4,cc */ |
| 2835 | {0xa0, 0xe8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e8,cc */ |
| 2836 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 2837 | {0xa0, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN}, /* 01,a7,00,cc */ |
| 2838 | {0xa0, 0xc0, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,c0,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2839 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2840 | }; |
| 2841 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 2842 | static const struct usb_action mc501cb_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2843 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 2844 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc */ |
| 2845 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 2846 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 2847 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 2848 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 2849 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 2850 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 2851 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 2852 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 2853 | {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d8,cc */ |
| 2854 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 2855 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 2856 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 2857 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 2858 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
| 2859 | {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,de,cc */ |
| 2860 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 2861 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 2862 | {0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,33,cc */ |
| 2863 | {0xa0, 0x34, ZC3XX_R087_EXPTIMEMID}, /* 00,87,34,cc */ |
| 2864 | {0xa0, 0x35, ZC3XX_R088_EXPTIMELOW}, /* 00,88,35,cc */ |
| 2865 | {0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,b0,cc */ |
| 2866 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2867 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2868 | {0xaa, 0x01, 0x0003}, /* 00,01,03,aa */ |
| 2869 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2870 | {0xaa, 0x03, 0x0000}, /* 00,03,00,aa */ |
| 2871 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 2872 | {0xaa, 0x11, 0x0080}, /* 00,11,80,aa */ |
| 2873 | {0xaa, 0x12, 0x0000}, /* 00,12,00,aa */ |
| 2874 | {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */ |
| 2875 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 2876 | {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */ |
| 2877 | {0xaa, 0x16, 0x0000}, /* 00,16,00,aa */ |
| 2878 | {0xaa, 0x17, 0x0001}, /* 00,17,01,aa */ |
| 2879 | {0xaa, 0x18, 0x00de}, /* 00,18,de,aa */ |
| 2880 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 2881 | {0xaa, 0x1a, 0x0086}, /* 00,1a,86,aa */ |
| 2882 | {0xaa, 0x20, 0x00a8}, /* 00,20,a8,aa */ |
| 2883 | {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */ |
| 2884 | {0xaa, 0x23, 0x0000}, /* 00,23,00,aa */ |
| 2885 | {0xaa, 0x24, 0x0000}, /* 00,24,00,aa */ |
| 2886 | {0xaa, 0x40, 0x0033}, /* 00,40,33,aa */ |
| 2887 | {0xaa, 0x41, 0x0077}, /* 00,41,77,aa */ |
| 2888 | {0xaa, 0x42, 0x0053}, /* 00,42,53,aa */ |
| 2889 | {0xaa, 0x43, 0x00b0}, /* 00,43,b0,aa */ |
| 2890 | {0xaa, 0x4b, 0x0001}, /* 00,4b,01,aa */ |
| 2891 | {0xaa, 0x72, 0x0020}, /* 00,72,20,aa */ |
| 2892 | {0xaa, 0x73, 0x0000}, /* 00,73,00,aa */ |
| 2893 | {0xaa, 0x80, 0x0000}, /* 00,80,00,aa */ |
| 2894 | {0xaa, 0x85, 0x0050}, /* 00,85,50,aa */ |
| 2895 | {0xaa, 0x91, 0x0070}, /* 00,91,70,aa */ |
| 2896 | {0xaa, 0x92, 0x0072}, /* 00,92,72,aa */ |
| 2897 | {0xaa, 0x03, 0x0001}, /* 00,03,01,aa */ |
| 2898 | {0xaa, 0x10, 0x00a0}, /* 00,10,a0,aa */ |
| 2899 | {0xaa, 0x11, 0x0001}, /* 00,11,01,aa */ |
| 2900 | {0xaa, 0x30, 0x0000}, /* 00,30,00,aa */ |
| 2901 | {0xaa, 0x60, 0x0000}, /* 00,60,00,aa */ |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 2902 | {0xaa, 0xa0, 0x001a}, /* 00,a0,1a,aa */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2903 | {0xaa, 0xa1, 0x0000}, /* 00,a1,00,aa */ |
| 2904 | {0xaa, 0xa2, 0x003f}, /* 00,a2,3f,aa */ |
| 2905 | {0xaa, 0xa3, 0x0028}, /* 00,a3,28,aa */ |
| 2906 | {0xaa, 0xa4, 0x0010}, /* 00,a4,10,aa */ |
| 2907 | {0xaa, 0xa5, 0x0020}, /* 00,a5,20,aa */ |
| 2908 | {0xaa, 0xb1, 0x0044}, /* 00,b1,44,aa */ |
| 2909 | {0xaa, 0xd0, 0x0001}, /* 00,d0,01,aa */ |
| 2910 | {0xaa, 0xd1, 0x0085}, /* 00,d1,85,aa */ |
| 2911 | {0xaa, 0xd2, 0x0080}, /* 00,d2,80,aa */ |
| 2912 | {0xaa, 0xd3, 0x0080}, /* 00,d3,80,aa */ |
| 2913 | {0xaa, 0xd4, 0x0080}, /* 00,d4,80,aa */ |
| 2914 | {0xaa, 0xd5, 0x0080}, /* 00,d5,80,aa */ |
| 2915 | {0xaa, 0xc0, 0x00c3}, /* 00,c0,c3,aa */ |
| 2916 | {0xaa, 0xc2, 0x0044}, /* 00,c2,44,aa */ |
| 2917 | {0xaa, 0xc4, 0x0040}, /* 00,c4,40,aa */ |
| 2918 | {0xaa, 0xc5, 0x0020}, /* 00,c5,20,aa */ |
| 2919 | {0xaa, 0xc6, 0x0008}, /* 00,c6,08,aa */ |
| 2920 | {0xaa, 0x03, 0x0004}, /* 00,03,04,aa */ |
| 2921 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 2922 | {0xaa, 0x40, 0x0030}, /* 00,40,30,aa */ |
| 2923 | {0xaa, 0x41, 0x0020}, /* 00,41,20,aa */ |
| 2924 | {0xaa, 0x42, 0x002d}, /* 00,42,2d,aa */ |
| 2925 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 2926 | {0xaa, 0x1c, 0x0050}, /* 00,1C,50,aa */ |
| 2927 | {0xaa, 0x11, 0x0081}, /* 00,11,81,aa */ |
| 2928 | {0xaa, 0x3b, 0x001d}, /* 00,3b,1D,aa */ |
| 2929 | {0xaa, 0x3c, 0x004c}, /* 00,3c,4C,aa */ |
| 2930 | {0xaa, 0x3d, 0x0018}, /* 00,3d,18,aa */ |
| 2931 | {0xaa, 0x3e, 0x006a}, /* 00,3e,6A,aa */ |
| 2932 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 2933 | {0xaa, 0x52, 0x00ff}, /* 00,52,FF,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2934 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 2935 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 2936 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
| 2937 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 2938 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 2939 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 2940 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 2941 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 2942 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2943 | {0xaa, 0x03, 0x0002}, /* 00,03,02,aa */ |
| 2944 | {0xaa, 0x51, 0x0027}, /* 00,51,27,aa */ |
| 2945 | {0xaa, 0x52, 0x0020}, /* 00,52,20,aa */ |
| 2946 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 2947 | {0xaa, 0x50, 0x0010}, /* 00,50,10,aa */ |
| 2948 | {0xaa, 0x51, 0x0010}, /* 00,51,10,aa */ |
| 2949 | {0xaa, 0x54, 0x0010}, /* 00,54,10,aa */ |
| 2950 | {0xaa, 0x55, 0x0010}, /* 00,55,10,aa */ |
| 2951 | {0xa0, 0xf0, 0x0199}, /* 01,99,F0,cc */ |
| 2952 | {0xa0, 0x80, 0x019a}, /* 01,9A,80,cc */ |
| 2953 | |
| 2954 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 2955 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 2956 | {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */ |
| 2957 | {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */ |
| 2958 | {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2959 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2960 | }; |
| 2961 | |
Jean-François Moine | 780e312 | 2010-10-19 04:29:10 -0300 | [diff] [blame] | 2962 | static const struct usb_action mc501cb_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 2963 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 2964 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 2965 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 2966 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 2967 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 2968 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 2969 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 2970 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 2971 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 2972 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 2973 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ |
| 2974 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 2975 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 2976 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 2977 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 2978 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
| 2979 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d8,cc */ |
| 2980 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 2981 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 2982 | {0xa0, 0x33, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,33,cc */ |
| 2983 | {0xa0, 0x34, ZC3XX_R087_EXPTIMEMID}, /* 00,87,34,cc */ |
| 2984 | {0xa0, 0x35, ZC3XX_R088_EXPTIMELOW}, /* 00,88,35,cc */ |
| 2985 | {0xa0, 0xb0, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,b0,cc */ |
| 2986 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 2987 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2988 | {0xaa, 0x01, 0x0003}, /* 00,01,03,aa */ |
| 2989 | {0xaa, 0x01, 0x0001}, /* 00,01,01,aa */ |
| 2990 | {0xaa, 0x03, 0x0000}, /* 00,03,00,aa */ |
| 2991 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 2992 | {0xaa, 0x11, 0x0080}, /* 00,11,80,aa */ |
| 2993 | {0xaa, 0x12, 0x0000}, /* 00,12,00,aa */ |
| 2994 | {0xaa, 0x13, 0x0000}, /* 00,13,00,aa */ |
| 2995 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 2996 | {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */ |
| 2997 | {0xaa, 0x16, 0x0000}, /* 00,16,00,aa */ |
| 2998 | {0xaa, 0x17, 0x0001}, /* 00,17,01,aa */ |
| 2999 | {0xaa, 0x18, 0x00d8}, /* 00,18,d8,aa */ |
| 3000 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 3001 | {0xaa, 0x1a, 0x0088}, /* 00,1a,88,aa */ |
| 3002 | {0xaa, 0x20, 0x00a8}, /* 00,20,a8,aa */ |
| 3003 | {0xaa, 0x22, 0x0000}, /* 00,22,00,aa */ |
| 3004 | {0xaa, 0x23, 0x0000}, /* 00,23,00,aa */ |
| 3005 | {0xaa, 0x24, 0x0000}, /* 00,24,00,aa */ |
| 3006 | {0xaa, 0x40, 0x0033}, /* 00,40,33,aa */ |
| 3007 | {0xaa, 0x41, 0x0077}, /* 00,41,77,aa */ |
| 3008 | {0xaa, 0x42, 0x0053}, /* 00,42,53,aa */ |
| 3009 | {0xaa, 0x43, 0x00b0}, /* 00,43,b0,aa */ |
| 3010 | {0xaa, 0x4b, 0x0001}, /* 00,4b,01,aa */ |
| 3011 | {0xaa, 0x72, 0x0020}, /* 00,72,20,aa */ |
| 3012 | {0xaa, 0x73, 0x0000}, /* 00,73,00,aa */ |
| 3013 | {0xaa, 0x80, 0x0000}, /* 00,80,00,aa */ |
| 3014 | {0xaa, 0x85, 0x0050}, /* 00,85,50,aa */ |
| 3015 | {0xaa, 0x91, 0x0070}, /* 00,91,70,aa */ |
| 3016 | {0xaa, 0x92, 0x0072}, /* 00,92,72,aa */ |
| 3017 | {0xaa, 0x03, 0x0001}, /* 00,03,01,aa */ |
| 3018 | {0xaa, 0x10, 0x00a0}, /* 00,10,a0,aa */ |
| 3019 | {0xaa, 0x11, 0x0001}, /* 00,11,01,aa */ |
| 3020 | {0xaa, 0x30, 0x0000}, /* 00,30,00,aa */ |
| 3021 | {0xaa, 0x60, 0x0000}, /* 00,60,00,aa */ |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 3022 | {0xaa, 0xa0, 0x001a}, /* 00,a0,1a,aa */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3023 | {0xaa, 0xa1, 0x0000}, /* 00,a1,00,aa */ |
| 3024 | {0xaa, 0xa2, 0x003f}, /* 00,a2,3f,aa */ |
| 3025 | {0xaa, 0xa3, 0x0028}, /* 00,a3,28,aa */ |
| 3026 | {0xaa, 0xa4, 0x0010}, /* 00,a4,10,aa */ |
| 3027 | {0xaa, 0xa5, 0x0020}, /* 00,a5,20,aa */ |
| 3028 | {0xaa, 0xb1, 0x0044}, /* 00,b1,44,aa */ |
| 3029 | {0xaa, 0xd0, 0x0001}, /* 00,d0,01,aa */ |
| 3030 | {0xaa, 0xd1, 0x0085}, /* 00,d1,85,aa */ |
| 3031 | {0xaa, 0xd2, 0x0080}, /* 00,d2,80,aa */ |
| 3032 | {0xaa, 0xd3, 0x0080}, /* 00,d3,80,aa */ |
| 3033 | {0xaa, 0xd4, 0x0080}, /* 00,d4,80,aa */ |
| 3034 | {0xaa, 0xd5, 0x0080}, /* 00,d5,80,aa */ |
| 3035 | {0xaa, 0xc0, 0x00c3}, /* 00,c0,c3,aa */ |
| 3036 | {0xaa, 0xc2, 0x0044}, /* 00,c2,44,aa */ |
| 3037 | {0xaa, 0xc4, 0x0040}, /* 00,c4,40,aa */ |
| 3038 | {0xaa, 0xc5, 0x0020}, /* 00,c5,20,aa */ |
| 3039 | {0xaa, 0xc6, 0x0008}, /* 00,c6,08,aa */ |
| 3040 | {0xaa, 0x03, 0x0004}, /* 00,03,04,aa */ |
| 3041 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 3042 | {0xaa, 0x40, 0x0030}, /* 00,40,30,aa */ |
| 3043 | {0xaa, 0x41, 0x0020}, /* 00,41,20,aa */ |
| 3044 | {0xaa, 0x42, 0x002d}, /* 00,42,2d,aa */ |
| 3045 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3046 | {0xaa, 0x1c, 0x0050}, /* 00,1c,50,aa */ |
| 3047 | {0xaa, 0x11, 0x0081}, /* 00,11,81,aa */ |
| 3048 | {0xaa, 0x3b, 0x003a}, /* 00,3b,3A,aa */ |
| 3049 | {0xaa, 0x3c, 0x0098}, /* 00,3c,98,aa */ |
| 3050 | {0xaa, 0x3d, 0x0030}, /* 00,3d,30,aa */ |
| 3051 | {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */ |
| 3052 | {0xaa, 0x01, 0x0000}, /* 00,01,00,aa */ |
| 3053 | {0xaa, 0x52, 0x00ff}, /* 00,52,FF,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3054 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 3055 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 3056 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
| 3057 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 3058 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 3059 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 3060 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 3061 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 3062 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3063 | {0xaa, 0x03, 0x0002}, /* 00,03,02,aa */ |
| 3064 | {0xaa, 0x51, 0x004e}, /* 00,51,4E,aa */ |
| 3065 | {0xaa, 0x52, 0x0041}, /* 00,52,41,aa */ |
| 3066 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3067 | {0xaa, 0x50, 0x0010}, /* 00,50,10,aa */ |
| 3068 | {0xaa, 0x51, 0x0010}, /* 00,51,10,aa */ |
| 3069 | {0xaa, 0x54, 0x0010}, /* 00,54,10,aa */ |
| 3070 | {0xaa, 0x55, 0x0010}, /* 00,55,10,aa */ |
| 3071 | {0xa0, 0xf0, 0x0199}, /* 01,99,F0,cc */ |
| 3072 | {0xa0, 0x80, 0x019a}, /* 01,9A,80,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3073 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3074 | }; |
| 3075 | |
Jean-François Moine | da75191 | 2011-04-19 14:51:15 -0300 | [diff] [blame] | 3076 | static const struct usb_action mc501cb_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3077 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3078 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3079 | {0xaa, 0x36, 0x001d}, /* 00,36,1D,aa */ |
| 3080 | {0xaa, 0x37, 0x004c}, /* 00,37,4C,aa */ |
| 3081 | {0xaa, 0x3b, 0x001d}, /* 00,3B,1D,aa */ |
| 3082 | {0xaa, 0x3c, 0x004c}, /* 00,3C,4C,aa */ |
| 3083 | {0xaa, 0x3d, 0x001d}, /* 00,3D,1D,aa */ |
| 3084 | {0xaa, 0x3e, 0x004c}, /* 00,3E,4C,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3085 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3086 | }; |
| 3087 | |
Jean-François Moine | da75191 | 2011-04-19 14:51:15 -0300 | [diff] [blame] | 3088 | static const struct usb_action mc501cb_50HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3089 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3090 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3091 | {0xaa, 0x36, 0x003a}, /* 00,36,3A,aa */ |
| 3092 | {0xaa, 0x37, 0x0098}, /* 00,37,98,aa */ |
| 3093 | {0xaa, 0x3b, 0x003a}, /* 00,3B,3A,aa */ |
| 3094 | {0xaa, 0x3c, 0x0098}, /* 00,3C,98,aa */ |
| 3095 | {0xaa, 0x3d, 0x003a}, /* 00,3D,3A,aa */ |
| 3096 | {0xaa, 0x3e, 0x0098}, /* 00,3E,98,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3097 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3098 | }; |
| 3099 | |
Jean-François Moine | da75191 | 2011-04-19 14:51:15 -0300 | [diff] [blame] | 3100 | static const struct usb_action mc501cb_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3101 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3102 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3103 | {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */ |
| 3104 | {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */ |
| 3105 | {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */ |
| 3106 | {0xaa, 0x3e, 0x006a}, /* 00,3E,6A,aa */ |
| 3107 | {0xaa, 0x3b, 0x0018}, /* 00,3B,18,aa */ |
| 3108 | {0xaa, 0x3c, 0x006a}, /* 00,3C,6A,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3109 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3110 | }; |
| 3111 | |
Jean-François Moine | da75191 | 2011-04-19 14:51:15 -0300 | [diff] [blame] | 3112 | static const struct usb_action mc501cb_60HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3113 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3114 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3115 | {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */ |
| 3116 | {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */ |
| 3117 | {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */ |
| 3118 | {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */ |
| 3119 | {0xaa, 0x3b, 0x0030}, /* 00,3B,30,aa */ |
| 3120 | {0xaa, 0x3c, 0x00d4}, /* 00,3C,D4,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3121 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3122 | }; |
| 3123 | |
Jean-François Moine | da75191 | 2011-04-19 14:51:15 -0300 | [diff] [blame] | 3124 | static const struct usb_action mc501cb_NoFliker[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3125 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3126 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3127 | {0xaa, 0x36, 0x0018}, /* 00,36,18,aa */ |
| 3128 | {0xaa, 0x37, 0x006a}, /* 00,37,6A,aa */ |
| 3129 | {0xaa, 0x3d, 0x0018}, /* 00,3D,18,aa */ |
| 3130 | {0xaa, 0x3e, 0x006a}, /* 00,3E,6A,aa */ |
| 3131 | {0xaa, 0x3b, 0x0018}, /* 00,3B,18,aa */ |
| 3132 | {0xaa, 0x3c, 0x006a}, /* 00,3C,6A,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3133 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3134 | }; |
| 3135 | |
Jean-François Moine | da75191 | 2011-04-19 14:51:15 -0300 | [diff] [blame] | 3136 | static const struct usb_action mc501cb_NoFlikerScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3137 | {0xaa, 0x03, 0x0003}, /* 00,03,03,aa */ |
| 3138 | {0xaa, 0x10, 0x00fc}, /* 00,10,fc,aa */ |
| 3139 | {0xaa, 0x36, 0x0030}, /* 00,36,30,aa */ |
| 3140 | {0xaa, 0x37, 0x00d4}, /* 00,37,D4,aa */ |
| 3141 | {0xaa, 0x3d, 0x0030}, /* 00,3D,30,aa */ |
| 3142 | {0xaa, 0x3e, 0x00d4}, /* 00,3E,D4,aa */ |
| 3143 | {0xaa, 0x3b, 0x0030}, /* 00,3B,30,aa */ |
| 3144 | {0xaa, 0x3c, 0x00d4}, /* 00,3C,D4,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3145 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3146 | }; |
| 3147 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3148 | /* from zs211.inf */ |
| 3149 | static const struct usb_action ov7620_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3150 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 3151 | {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, /* 00,02,40,cc */ |
| 3152 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, /* 00,08,00,cc */ |
| 3153 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 3154 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,06,cc */ |
| 3155 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, /* 00,83,02,cc */ |
| 3156 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, /* 00,85,01,cc */ |
| 3157 | {0xa0, 0x80, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,80,cc */ |
| 3158 | {0xa0, 0x81, ZC3XX_R087_EXPTIMEMID}, /* 00,87,81,cc */ |
| 3159 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, /* 00,88,10,cc */ |
| 3160 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,a1,cc */ |
| 3161 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 3162 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 3163 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 3164 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 3165 | {0xa0, 0xd8, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d8,cc */ |
| 3166 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 3167 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 3168 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 3169 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 3170 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 3171 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 3172 | {0xa0, 0xde, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,de,cc */ |
| 3173 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3174 | {0xaa, 0x12, 0x0088}, /* 00,12,88,aa */ |
| 3175 | {0xaa, 0x12, 0x0048}, /* 00,12,48,aa */ |
| 3176 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3177 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3178 | {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */ |
| 3179 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 3180 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 3181 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
| 3182 | {0xaa, 0x17, 0x0018}, /* 00,17,18,aa */ |
| 3183 | {0xaa, 0x18, 0x00ba}, /* 00,18,ba,aa */ |
| 3184 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 3185 | {0xaa, 0x1a, 0x00f1}, /* 00,1a,f1,aa */ |
| 3186 | {0xaa, 0x20, 0x0040}, /* 00,20,40,aa */ |
| 3187 | {0xaa, 0x24, 0x0088}, /* 00,24,88,aa */ |
| 3188 | {0xaa, 0x25, 0x0078}, /* 00,25,78,aa */ |
| 3189 | {0xaa, 0x27, 0x00f6}, /* 00,27,f6,aa */ |
| 3190 | {0xaa, 0x28, 0x00a0}, /* 00,28,a0,aa */ |
| 3191 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 3192 | {0xaa, 0x2a, 0x0083}, /* 00,2a,83,aa */ |
| 3193 | {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */ |
| 3194 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
| 3195 | {0xaa, 0x74, 0x0020}, /* 00,74,20,aa */ |
| 3196 | {0xaa, 0x61, 0x0068}, /* 00,61,68,aa */ |
| 3197 | {0xaa, 0x64, 0x0088}, /* 00,64,88,aa */ |
| 3198 | {0xaa, 0x00, 0x0000}, /* 00,00,00,aa */ |
| 3199 | {0xaa, 0x06, 0x0080}, /* 00,06,80,aa */ |
| 3200 | {0xaa, 0x01, 0x0090}, /* 00,01,90,aa */ |
| 3201 | {0xaa, 0x02, 0x0030}, /* 00,02,30,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3202 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,77,cc */ |
| 3203 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 3204 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 3205 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3206 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3207 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 3208 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 3209 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 3210 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 3211 | {0xa0, 0x68, ZC3XX_R116_RGAIN}, /* 01,16,68,cc */ |
| 3212 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 3213 | {0xa0, 0x40, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,40,cc */ |
| 3214 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 3215 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,50,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3216 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3217 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3218 | static const struct usb_action ov7620_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3219 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 3220 | {0xa0, 0x50, ZC3XX_R002_CLOCKSELECT}, /* 00,02,50,cc */ |
| 3221 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,00,cc */ |
| 3222 | /* mx change? */ |
| 3223 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 3224 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,06,cc */ |
| 3225 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, /* 00,83,02,cc */ |
| 3226 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, /* 00,85,01,cc */ |
| 3227 | {0xa0, 0x80, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,80,cc */ |
| 3228 | {0xa0, 0x81, ZC3XX_R087_EXPTIMEMID}, /* 00,87,81,cc */ |
| 3229 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, /* 00,88,10,cc */ |
| 3230 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,a1,cc */ |
| 3231 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 3232 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 3233 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 3234 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 3235 | {0xa0, 0xd0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,d0,cc */ |
| 3236 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 3237 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 3238 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 3239 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 3240 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 3241 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 3242 | {0xa0, 0xd6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,d6,cc */ |
| 3243 | /* OV7648 00,9c,d8,cc */ |
| 3244 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3245 | {0xaa, 0x12, 0x0088}, /* 00,12,88,aa */ |
| 3246 | {0xaa, 0x12, 0x0048}, /* 00,12,48,aa */ |
| 3247 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3248 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3249 | {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */ |
| 3250 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 3251 | {0xaa, 0x14, 0x0000}, /* 00,14,00,aa */ |
| 3252 | {0xaa, 0x15, 0x0004}, /* 00,15,04,aa */ |
| 3253 | {0xaa, 0x24, 0x0088}, /* 00,24,88,aa */ |
| 3254 | {0xaa, 0x25, 0x0078}, /* 00,25,78,aa */ |
| 3255 | {0xaa, 0x17, 0x0018}, /* 00,17,18,aa */ |
| 3256 | {0xaa, 0x18, 0x00ba}, /* 00,18,ba,aa */ |
| 3257 | {0xaa, 0x19, 0x0002}, /* 00,19,02,aa */ |
| 3258 | {0xaa, 0x1a, 0x00f2}, /* 00,1a,f2,aa */ |
| 3259 | {0xaa, 0x20, 0x0040}, /* 00,20,40,aa */ |
| 3260 | {0xaa, 0x27, 0x00f6}, /* 00,27,f6,aa */ |
| 3261 | {0xaa, 0x28, 0x00a0}, /* 00,28,a0,aa */ |
| 3262 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 3263 | {0xaa, 0x2a, 0x0083}, /* 00,2a,83,aa */ |
| 3264 | {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */ |
| 3265 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
| 3266 | {0xaa, 0x74, 0x0020}, /* 00,74,20,aa */ |
| 3267 | {0xaa, 0x61, 0x0068}, /* 00,61,68,aa */ |
| 3268 | {0xaa, 0x64, 0x0088}, /* 00,64,88,aa */ |
| 3269 | {0xaa, 0x00, 0x0000}, /* 00,00,00,aa */ |
| 3270 | {0xaa, 0x06, 0x0080}, /* 00,06,80,aa */ |
| 3271 | {0xaa, 0x01, 0x0090}, /* 00,01,90,aa */ |
| 3272 | {0xaa, 0x02, 0x0030}, /* 00,02,30,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3273 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,77,cc */ |
| 3274 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 3275 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 3276 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 3277 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
| 3278 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 3279 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 3280 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 3281 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 3282 | {0xa0, 0x68, ZC3XX_R116_RGAIN}, /* 01,16,68,cc */ |
| 3283 | {0xa0, 0x52, ZC3XX_R118_BGAIN}, /* 01,18,52,cc */ |
| 3284 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,50,cc */ |
| 3285 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
| 3286 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,50,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3287 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3288 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3289 | static const struct usb_action ov7620_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3290 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3291 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 3292 | {0xaa, 0x2b, 0x0096}, /* 00,2b,96,aa */ |
| 3293 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3294 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3295 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3296 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 3297 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 3298 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3299 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3300 | {0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,83,cc */ |
| 3301 | {0xaa, 0x10, 0x0082}, /* 00,10,82,aa */ |
| 3302 | {0xaa, 0x76, 0x0003}, /* 00,76,03,aa */ |
| 3303 | /* {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, * 00,02,40,cc |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 3304 | * if mode0 (640x480) */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3305 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3306 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3307 | static const struct usb_action ov7620_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3308 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3309 | /* (bug in zs211.inf) */ |
| 3310 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 3311 | {0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */ |
| 3312 | {0xaa, 0x75, 0x008a}, /* 00,75,8a,aa */ |
| 3313 | {0xaa, 0x2d, 0x0005}, /* 00,2d,05,aa */ |
| 3314 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3315 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 3316 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 3317 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3318 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3319 | {0xa0, 0x83, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,83,cc */ |
| 3320 | {0xaa, 0x10, 0x0020}, /* 00,10,20,aa */ |
| 3321 | {0xaa, 0x76, 0x0003}, /* 00,76,03,aa */ |
| 3322 | /* {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, * 00,02,40,cc |
| 3323 | * if mode0 (640x480) */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3324 | /* ?? in gspca v1, it was |
| 3325 | {0xa0, 0x00, 0x0039}, * 00,00,00,dd * |
| 3326 | {0xa1, 0x01, 0x0037}, */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3327 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3328 | }; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3329 | static const struct usb_action ov7620_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3330 | {0xaa, 0x13, 0x00a3}, /* 00,13,a3,aa */ |
| 3331 | /* (bug in zs211.inf) */ |
| 3332 | {0xdd, 0x00, 0x0100}, /* 00,01,00,dd */ |
| 3333 | {0xaa, 0x2b, 0x0000}, /* 00,2b,00,aa */ |
| 3334 | {0xaa, 0x75, 0x008e}, /* 00,75,8e,aa */ |
| 3335 | {0xaa, 0x2d, 0x0001}, /* 00,2d,01,aa */ |
| 3336 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3337 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,04,cc */ |
| 3338 | {0xa0, 0x18, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,18,cc */ |
| 3339 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3340 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3341 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,01,cc */ |
| 3342 | /* {0xa0, 0x44, ZC3XX_R002_CLOCKSELECT}, * 00,02,44,cc |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 3343 | * if mode1 (320x240) */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3344 | /* ?? was |
| 3345 | {0xa0, 0x00, 0x0039}, * 00,00,00,dd * |
| 3346 | {0xa1, 0x01, 0x0037}, */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3347 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3348 | }; |
| 3349 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3350 | static const struct usb_action ov7630c_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3351 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 3352 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 3353 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 3354 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 3355 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3356 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 3357 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, |
| 3358 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 3359 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
| 3360 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3361 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3362 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3363 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 3364 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3365 | {0xaa, 0x12, 0x0080}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3366 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, |
| 3367 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, |
| 3368 | {0xa0, 0x90, ZC3XX_R086_EXPTIMEHIGH}, |
| 3369 | {0xa0, 0x91, ZC3XX_R087_EXPTIMEMID}, |
| 3370 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, |
| 3371 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 3372 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 3373 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3374 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 3375 | {0xa0, 0xd8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3376 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3377 | {0xaa, 0x12, 0x0069}, |
| 3378 | {0xaa, 0x04, 0x0020}, |
| 3379 | {0xaa, 0x06, 0x0050}, |
| 3380 | {0xaa, 0x13, 0x0083}, |
| 3381 | {0xaa, 0x14, 0x0000}, |
| 3382 | {0xaa, 0x15, 0x0024}, |
| 3383 | {0xaa, 0x17, 0x0018}, |
| 3384 | {0xaa, 0x18, 0x00ba}, |
| 3385 | {0xaa, 0x19, 0x0002}, |
| 3386 | {0xaa, 0x1a, 0x00f6}, |
| 3387 | {0xaa, 0x1b, 0x0002}, |
| 3388 | {0xaa, 0x20, 0x00c2}, |
| 3389 | {0xaa, 0x24, 0x0060}, |
| 3390 | {0xaa, 0x25, 0x0040}, |
| 3391 | {0xaa, 0x26, 0x0030}, |
| 3392 | {0xaa, 0x27, 0x00ea}, |
| 3393 | {0xaa, 0x28, 0x00a0}, |
| 3394 | {0xaa, 0x21, 0x0000}, |
| 3395 | {0xaa, 0x2a, 0x0081}, |
| 3396 | {0xaa, 0x2b, 0x0096}, |
| 3397 | {0xaa, 0x2d, 0x0094}, |
| 3398 | {0xaa, 0x2f, 0x003d}, |
| 3399 | {0xaa, 0x30, 0x0024}, |
| 3400 | {0xaa, 0x60, 0x0000}, |
| 3401 | {0xaa, 0x61, 0x0040}, |
| 3402 | {0xaa, 0x68, 0x007c}, |
| 3403 | {0xaa, 0x6f, 0x0015}, |
| 3404 | {0xaa, 0x75, 0x0088}, |
| 3405 | {0xaa, 0x77, 0x00b5}, |
| 3406 | {0xaa, 0x01, 0x0060}, |
| 3407 | {0xaa, 0x02, 0x0060}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3408 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3409 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 3410 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 3411 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 3412 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3413 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3414 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3415 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 3416 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 3417 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 3418 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 3419 | {0xa0, 0x46, ZC3XX_R118_BGAIN}, |
| 3420 | {0xa0, 0x04, ZC3XX_R113_RGB03}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3421 | /* 0x10, */ |
| 3422 | {0xa1, 0x01, 0x0002}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3423 | {0xa0, 0x50, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3424 | {0xa0, 0xf8, ZC3XX_R10B_RGB01}, |
| 3425 | {0xa0, 0xf8, ZC3XX_R10C_RGB02}, |
| 3426 | {0xa0, 0xf8, ZC3XX_R10D_RGB10}, |
| 3427 | {0xa0, 0x50, ZC3XX_R10E_RGB11}, |
| 3428 | {0xa0, 0xf8, ZC3XX_R10F_RGB12}, |
| 3429 | {0xa0, 0xf8, ZC3XX_R110_RGB20}, |
| 3430 | {0xa0, 0xf8, ZC3XX_R111_RGB21}, |
| 3431 | {0xa0, 0x50, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3432 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3433 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 3434 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3435 | {0xa1, 0x01, 0x01c8}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3436 | {0xa1, 0x01, 0x01c9}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3437 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3438 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 3439 | {0xa0, 0x01, ZC3XX_R120_GAMMA00}, /* gamma 2 ?*/ |
| 3440 | {0xa0, 0x0c, ZC3XX_R121_GAMMA01}, |
| 3441 | {0xa0, 0x1f, ZC3XX_R122_GAMMA02}, |
| 3442 | {0xa0, 0x3a, ZC3XX_R123_GAMMA03}, |
| 3443 | {0xa0, 0x53, ZC3XX_R124_GAMMA04}, |
| 3444 | {0xa0, 0x6d, ZC3XX_R125_GAMMA05}, |
| 3445 | {0xa0, 0x85, ZC3XX_R126_GAMMA06}, |
| 3446 | {0xa0, 0x9c, ZC3XX_R127_GAMMA07}, |
| 3447 | {0xa0, 0xb0, ZC3XX_R128_GAMMA08}, |
| 3448 | {0xa0, 0xc2, ZC3XX_R129_GAMMA09}, |
| 3449 | {0xa0, 0xd1, ZC3XX_R12A_GAMMA0A}, |
| 3450 | {0xa0, 0xde, ZC3XX_R12B_GAMMA0B}, |
| 3451 | {0xa0, 0xe9, ZC3XX_R12C_GAMMA0C}, |
| 3452 | {0xa0, 0xf2, ZC3XX_R12D_GAMMA0D}, |
| 3453 | {0xa0, 0xf9, ZC3XX_R12E_GAMMA0E}, |
| 3454 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 3455 | {0xa0, 0x05, ZC3XX_R130_GAMMA10}, |
| 3456 | {0xa0, 0x0f, ZC3XX_R131_GAMMA11}, |
| 3457 | {0xa0, 0x16, ZC3XX_R132_GAMMA12}, |
| 3458 | {0xa0, 0x1a, ZC3XX_R133_GAMMA13}, |
| 3459 | {0xa0, 0x19, ZC3XX_R134_GAMMA14}, |
| 3460 | {0xa0, 0x19, ZC3XX_R135_GAMMA15}, |
| 3461 | {0xa0, 0x17, ZC3XX_R136_GAMMA16}, |
| 3462 | {0xa0, 0x15, ZC3XX_R137_GAMMA17}, |
| 3463 | {0xa0, 0x12, ZC3XX_R138_GAMMA18}, |
| 3464 | {0xa0, 0x10, ZC3XX_R139_GAMMA19}, |
| 3465 | {0xa0, 0x0e, ZC3XX_R13A_GAMMA1A}, |
| 3466 | {0xa0, 0x0b, ZC3XX_R13B_GAMMA1B}, |
| 3467 | {0xa0, 0x09, ZC3XX_R13C_GAMMA1C}, |
| 3468 | {0xa0, 0x08, ZC3XX_R13D_GAMMA1D}, |
| 3469 | {0xa0, 0x06, ZC3XX_R13E_GAMMA1E}, |
| 3470 | {0xa0, 0x03, ZC3XX_R13F_GAMMA1F}, |
| 3471 | {0xa0, 0x50, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3472 | {0xa0, 0xf8, ZC3XX_R10B_RGB01}, |
| 3473 | {0xa0, 0xf8, ZC3XX_R10C_RGB02}, |
| 3474 | {0xa0, 0xf8, ZC3XX_R10D_RGB10}, |
| 3475 | {0xa0, 0x50, ZC3XX_R10E_RGB11}, |
| 3476 | {0xa0, 0xf8, ZC3XX_R10F_RGB12}, |
| 3477 | {0xa0, 0xf8, ZC3XX_R110_RGB20}, |
| 3478 | {0xa0, 0xf8, ZC3XX_R111_RGB21}, |
| 3479 | {0xa0, 0x50, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3480 | |
| 3481 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3482 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3483 | {0xaa, 0x10, 0x001b}, |
| 3484 | {0xaa, 0x76, 0x0002}, |
| 3485 | {0xaa, 0x2a, 0x0081}, |
| 3486 | {0xaa, 0x2b, 0x0000}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3487 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3488 | {0xa0, 0x01, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3489 | {0xa0, 0xb8, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 3490 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3491 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3492 | {0xa0, 0x37, ZC3XX_R197_ANTIFLICKERLOW}, |
| 3493 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 3494 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 3495 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3496 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3497 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
| 3498 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 3499 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3500 | {0xaa, 0x13, 0x0083}, /* 40 */ |
| 3501 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3502 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3503 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3504 | }; |
| 3505 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3506 | static const struct usb_action ov7630c_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3507 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 3508 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 3509 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3510 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 3511 | {0xa0, 0x06, ZC3XX_R010_CMOSSENSORSELECT}, |
| 3512 | {0xa0, 0xa1, ZC3XX_R08B_I2CDEVICEADDR}, |
| 3513 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
| 3514 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3515 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3516 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3517 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 3518 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3519 | |
| 3520 | {0xaa, 0x12, 0x0080}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3521 | {0xa0, 0x02, ZC3XX_R083_RGAINADDR}, |
| 3522 | {0xa0, 0x01, ZC3XX_R085_BGAINADDR}, |
| 3523 | {0xa0, 0x90, ZC3XX_R086_EXPTIMEHIGH}, |
| 3524 | {0xa0, 0x91, ZC3XX_R087_EXPTIMEMID}, |
| 3525 | {0xa0, 0x10, ZC3XX_R088_EXPTIMELOW}, |
| 3526 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 3527 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 3528 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3529 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 3530 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3531 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3532 | {0xaa, 0x12, 0x0069}, /* i2c */ |
| 3533 | {0xaa, 0x04, 0x0020}, |
| 3534 | {0xaa, 0x06, 0x0050}, |
| 3535 | {0xaa, 0x13, 0x00c3}, |
| 3536 | {0xaa, 0x14, 0x0000}, |
| 3537 | {0xaa, 0x15, 0x0024}, |
| 3538 | {0xaa, 0x19, 0x0003}, |
| 3539 | {0xaa, 0x1a, 0x00f6}, |
| 3540 | {0xaa, 0x1b, 0x0002}, |
| 3541 | {0xaa, 0x20, 0x00c2}, |
| 3542 | {0xaa, 0x24, 0x0060}, |
| 3543 | {0xaa, 0x25, 0x0040}, |
| 3544 | {0xaa, 0x26, 0x0030}, |
| 3545 | {0xaa, 0x27, 0x00ea}, |
| 3546 | {0xaa, 0x28, 0x00a0}, |
| 3547 | {0xaa, 0x21, 0x0000}, |
| 3548 | {0xaa, 0x2a, 0x0081}, |
| 3549 | {0xaa, 0x2b, 0x0096}, |
| 3550 | {0xaa, 0x2d, 0x0084}, |
| 3551 | {0xaa, 0x2f, 0x003d}, |
| 3552 | {0xaa, 0x30, 0x0024}, |
| 3553 | {0xaa, 0x60, 0x0000}, |
| 3554 | {0xaa, 0x61, 0x0040}, |
| 3555 | {0xaa, 0x68, 0x007c}, |
| 3556 | {0xaa, 0x6f, 0x0015}, |
| 3557 | {0xaa, 0x75, 0x0088}, |
| 3558 | {0xaa, 0x77, 0x00b5}, |
| 3559 | {0xaa, 0x01, 0x0060}, |
| 3560 | {0xaa, 0x02, 0x0060}, |
| 3561 | {0xaa, 0x17, 0x0018}, |
| 3562 | {0xaa, 0x18, 0x00ba}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3563 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3564 | {0xa0, 0x77, ZC3XX_R101_SENSORCORRECTION}, |
| 3565 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 3566 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 3567 | {0xa0, 0x04, ZC3XX_R1A7_CALCGLOBALMEAN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3568 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3569 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3570 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 3571 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 3572 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 3573 | {0xa0, 0x60, ZC3XX_R116_RGAIN}, |
| 3574 | {0xa0, 0x46, ZC3XX_R118_BGAIN}, |
| 3575 | {0xa0, 0x04, ZC3XX_R113_RGB03}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3576 | |
| 3577 | {0xa1, 0x01, 0x0002}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3578 | {0xa0, 0x4e, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3579 | {0xa0, 0xfe, ZC3XX_R10B_RGB01}, |
| 3580 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3581 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 3582 | {0xa0, 0x4d, ZC3XX_R10E_RGB11}, |
| 3583 | {0xa0, 0xfc, ZC3XX_R10F_RGB12}, |
| 3584 | {0xa0, 0x00, ZC3XX_R110_RGB20}, |
| 3585 | {0xa0, 0xf6, ZC3XX_R111_RGB21}, |
| 3586 | {0xa0, 0x4a, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3587 | |
| 3588 | {0xa1, 0x01, 0x0008}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3589 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* clock ? */ |
| 3590 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, /* sharpness+ */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3591 | {0xa1, 0x01, 0x01c8}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3592 | {0xa1, 0x01, 0x01c9}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3593 | {0xa1, 0x01, 0x01ca}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3594 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, /* sharpness- */ |
| 3595 | {0xa0, 0x16, ZC3XX_R120_GAMMA00}, /* gamma ~4 */ |
| 3596 | {0xa0, 0x3a, ZC3XX_R121_GAMMA01}, |
| 3597 | {0xa0, 0x5b, ZC3XX_R122_GAMMA02}, |
| 3598 | {0xa0, 0x7c, ZC3XX_R123_GAMMA03}, |
| 3599 | {0xa0, 0x94, ZC3XX_R124_GAMMA04}, |
| 3600 | {0xa0, 0xa9, ZC3XX_R125_GAMMA05}, |
| 3601 | {0xa0, 0xbb, ZC3XX_R126_GAMMA06}, |
| 3602 | {0xa0, 0xca, ZC3XX_R127_GAMMA07}, |
| 3603 | {0xa0, 0xd7, ZC3XX_R128_GAMMA08}, |
| 3604 | {0xa0, 0xe1, ZC3XX_R129_GAMMA09}, |
| 3605 | {0xa0, 0xea, ZC3XX_R12A_GAMMA0A}, |
| 3606 | {0xa0, 0xf1, ZC3XX_R12B_GAMMA0B}, |
| 3607 | {0xa0, 0xf7, ZC3XX_R12C_GAMMA0C}, |
| 3608 | {0xa0, 0xfc, ZC3XX_R12D_GAMMA0D}, |
| 3609 | {0xa0, 0xff, ZC3XX_R12E_GAMMA0E}, |
| 3610 | {0xa0, 0xff, ZC3XX_R12F_GAMMA0F}, |
| 3611 | {0xa0, 0x20, ZC3XX_R130_GAMMA10}, |
| 3612 | {0xa0, 0x22, ZC3XX_R131_GAMMA11}, |
| 3613 | {0xa0, 0x20, ZC3XX_R132_GAMMA12}, |
| 3614 | {0xa0, 0x1c, ZC3XX_R133_GAMMA13}, |
| 3615 | {0xa0, 0x16, ZC3XX_R134_GAMMA14}, |
| 3616 | {0xa0, 0x13, ZC3XX_R135_GAMMA15}, |
| 3617 | {0xa0, 0x10, ZC3XX_R136_GAMMA16}, |
| 3618 | {0xa0, 0x0d, ZC3XX_R137_GAMMA17}, |
| 3619 | {0xa0, 0x0b, ZC3XX_R138_GAMMA18}, |
| 3620 | {0xa0, 0x09, ZC3XX_R139_GAMMA19}, |
| 3621 | {0xa0, 0x07, ZC3XX_R13A_GAMMA1A}, |
| 3622 | {0xa0, 0x06, ZC3XX_R13B_GAMMA1B}, |
| 3623 | {0xa0, 0x05, ZC3XX_R13C_GAMMA1C}, |
| 3624 | {0xa0, 0x04, ZC3XX_R13D_GAMMA1D}, |
| 3625 | {0xa0, 0x00, ZC3XX_R13E_GAMMA1E}, |
| 3626 | {0xa0, 0x01, ZC3XX_R13F_GAMMA1F}, |
| 3627 | {0xa0, 0x4e, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3628 | {0xa0, 0xfe, ZC3XX_R10B_RGB01}, |
| 3629 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3630 | {0xa0, 0xf7, ZC3XX_R10D_RGB10}, |
| 3631 | {0xa0, 0x4d, ZC3XX_R10E_RGB11}, |
| 3632 | {0xa0, 0xfc, ZC3XX_R10F_RGB12}, |
| 3633 | {0xa0, 0x00, ZC3XX_R110_RGB20}, |
| 3634 | {0xa0, 0xf6, ZC3XX_R111_RGB21}, |
| 3635 | {0xa0, 0x4a, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3636 | |
| 3637 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3638 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3639 | {0xaa, 0x10, 0x000d}, |
| 3640 | {0xaa, 0x76, 0x0002}, |
| 3641 | {0xaa, 0x2a, 0x0081}, |
| 3642 | {0xaa, 0x2b, 0x0000}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3643 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3644 | {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3645 | {0xa0, 0xd8, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 3646 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3647 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3648 | {0xa0, 0x1b, ZC3XX_R197_ANTIFLICKERLOW}, |
| 3649 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 3650 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 3651 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3652 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3653 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
| 3654 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 3655 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3656 | {0xaa, 0x13, 0x00c3}, |
| 3657 | |
| 3658 | {0xa1, 0x01, 0x0180}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3659 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3660 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3661 | }; |
| 3662 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3663 | static const struct usb_action pas106b_Initial_com[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3664 | /* Sream and Sensor specific */ |
| 3665 | {0xa1, 0x01, 0x0010}, /* CMOSSensorSelect */ |
| 3666 | /* System */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3667 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* SystemControl */ |
| 3668 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* SystemControl */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3669 | /* Picture size */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3670 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* ClockSelect */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3671 | {0xa0, 0x03, 0x003a}, |
| 3672 | {0xa0, 0x0c, 0x003b}, |
| 3673 | {0xa0, 0x04, 0x0038}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3674 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3675 | }; |
| 3676 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3677 | static const struct usb_action pas106b_InitialScale[] = { /* 176x144 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3678 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3679 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3680 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3681 | {0xa0, 0x0f, ZC3XX_R010_CMOSSENSORSELECT}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3682 | /* Picture size */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3683 | {0xa0, 0x00, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3684 | {0xa0, 0xb0, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3685 | {0xa0, 0x00, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3686 | {0xa0, 0x90, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3687 | /* System */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3688 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3689 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3690 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3691 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3692 | /* Sensor Interface */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3693 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3694 | /* Window inside sensor array */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3695 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, |
| 3696 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3697 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, |
| 3698 | {0xa0, 0x28, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3699 | {0xa0, 0x68, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3700 | /* Init the sensor */ |
| 3701 | {0xaa, 0x02, 0x0004}, |
| 3702 | {0xaa, 0x08, 0x0000}, |
| 3703 | {0xaa, 0x09, 0x0005}, |
| 3704 | {0xaa, 0x0a, 0x0002}, |
| 3705 | {0xaa, 0x0b, 0x0002}, |
| 3706 | {0xaa, 0x0c, 0x0005}, |
| 3707 | {0xaa, 0x0d, 0x0000}, |
| 3708 | {0xaa, 0x0e, 0x0002}, |
| 3709 | {0xaa, 0x14, 0x0081}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 3710 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3711 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3712 | /* Frame retreiving */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3713 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3714 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3715 | {0xa0, 0xa0, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3716 | /* Unknown */ |
| 3717 | {0xa0, 0x00, 0x01ad}, |
| 3718 | /* Sharpness */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3719 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3720 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 3721 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3722 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3723 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3724 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3725 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3726 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3727 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3728 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3729 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3730 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3731 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3732 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3733 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3734 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3735 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3736 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3737 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3738 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3739 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3740 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3741 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3742 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3743 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3744 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3745 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3746 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3747 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 3748 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3749 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 3750 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 3751 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 3752 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 3753 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 3754 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3755 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3756 | {0xa0, 0x03, ZC3XX_R181_WINXSTART}, |
| 3757 | {0xa0, 0x08, ZC3XX_R182_WINXWIDTH}, |
| 3758 | {0xa0, 0x16, ZC3XX_R183_WINXCENTER}, |
| 3759 | {0xa0, 0x03, ZC3XX_R184_WINYSTART}, |
| 3760 | {0xa0, 0x05, ZC3XX_R185_WINYWIDTH}, |
| 3761 | {0xa0, 0x14, ZC3XX_R186_WINYCENTER}, |
| 3762 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3763 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3764 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3765 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3766 | {0xa0, 0xb1, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 3767 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3768 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3769 | {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW}, |
| 3770 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 3771 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3772 | /* sensor on */ |
| 3773 | {0xaa, 0x07, 0x00b1}, |
| 3774 | {0xaa, 0x05, 0x0003}, |
| 3775 | {0xaa, 0x04, 0x0001}, |
| 3776 | {0xaa, 0x03, 0x003b}, |
| 3777 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3778 | {0xa0, 0x20, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3779 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3780 | {0xa0, 0xa0, ZC3XX_R11D_GLOBALGAIN}, |
| 3781 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3782 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3783 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3784 | {0xa1, 0x01, 0x0180}, /* AutoCorrectEnable */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3785 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3786 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3787 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 3788 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 3789 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3790 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3791 | }; |
| 3792 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 3793 | static const struct usb_action pas106b_Initial[] = { /* 352x288 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3794 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3795 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3796 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3797 | {0xa0, 0x0f, ZC3XX_R010_CMOSSENSORSELECT}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3798 | /* Picture size */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3799 | {0xa0, 0x01, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 3800 | {0xa0, 0x60, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 3801 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 3802 | {0xa0, 0x20, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3803 | /* System */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3804 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3805 | /* Sream and Sensor specific */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3806 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 3807 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3808 | /* Sensor Interface */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3809 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3810 | /* Window inside sensor array */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3811 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, |
| 3812 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 3813 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, |
| 3814 | {0xa0, 0x28, ZC3XX_R09C_WINHEIGHTLOW}, |
| 3815 | {0xa0, 0x68, ZC3XX_R09E_WINWIDTHLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3816 | /* Init the sensor */ |
| 3817 | {0xaa, 0x02, 0x0004}, |
| 3818 | {0xaa, 0x08, 0x0000}, |
| 3819 | {0xaa, 0x09, 0x0005}, |
| 3820 | {0xaa, 0x0a, 0x0002}, |
| 3821 | {0xaa, 0x0b, 0x0002}, |
| 3822 | {0xaa, 0x0c, 0x0005}, |
| 3823 | {0xaa, 0x0d, 0x0000}, |
| 3824 | {0xaa, 0x0e, 0x0002}, |
| 3825 | {0xaa, 0x14, 0x0081}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 3826 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3827 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3828 | /* Frame retreiving */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3829 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3830 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3831 | {0xa0, 0xa0, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3832 | /* Unknown */ |
| 3833 | {0xa0, 0x00, 0x01ad}, |
| 3834 | /* Sharpness */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3835 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 3836 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 3837 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3838 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3839 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3840 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 3841 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3842 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3843 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3844 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3845 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3846 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3847 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3848 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3849 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3850 | /* Other registers */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3851 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3852 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3853 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3854 | /*Dead pixels */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3855 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3856 | /* EEPROM */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3857 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3858 | /* JPEG control */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3859 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 3860 | {0xa0, 0x08, ZC3XX_R1C6_SHARPNESS00}, |
| 3861 | {0xa0, 0x0f, ZC3XX_R1CB_SHARPNESS05}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3862 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3863 | {0xa0, 0x58, ZC3XX_R10A_RGB00}, /* matrix */ |
| 3864 | {0xa0, 0xf4, ZC3XX_R10B_RGB01}, |
| 3865 | {0xa0, 0xf4, ZC3XX_R10C_RGB02}, |
| 3866 | {0xa0, 0xf4, ZC3XX_R10D_RGB10}, |
| 3867 | {0xa0, 0x58, ZC3XX_R10E_RGB11}, |
| 3868 | {0xa0, 0xf4, ZC3XX_R10F_RGB12}, |
| 3869 | {0xa0, 0xf4, ZC3XX_R110_RGB20}, |
| 3870 | {0xa0, 0xf4, ZC3XX_R111_RGB21}, |
| 3871 | {0xa0, 0x58, ZC3XX_R112_RGB22}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3872 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3873 | {0xa0, 0x03, ZC3XX_R181_WINXSTART}, |
| 3874 | {0xa0, 0x08, ZC3XX_R182_WINXWIDTH}, |
| 3875 | {0xa0, 0x16, ZC3XX_R183_WINXCENTER}, |
| 3876 | {0xa0, 0x03, ZC3XX_R184_WINYSTART}, |
| 3877 | {0xa0, 0x05, ZC3XX_R185_WINYWIDTH}, |
| 3878 | {0xa0, 0x14, ZC3XX_R186_WINYCENTER}, |
| 3879 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3880 | |
| 3881 | /* Auto exposure and white balance */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3882 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 3883 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
| 3884 | {0xa0, 0xb1, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3885 | |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3886 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 3887 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 3888 | {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3889 | |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3890 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 3891 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3892 | /* sensor on */ |
| 3893 | {0xaa, 0x07, 0x00b1}, |
| 3894 | {0xaa, 0x05, 0x0003}, |
| 3895 | {0xaa, 0x04, 0x0001}, |
| 3896 | {0xaa, 0x03, 0x003b}, |
| 3897 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3898 | {0xa0, 0x20, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 3899 | {0xa0, 0x26, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 3900 | {0xa0, 0xa0, ZC3XX_R11D_GLOBALGAIN}, |
| 3901 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3902 | /* Auto correction */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3903 | {0xa0, 0x40, ZC3XX_R180_AUTOCORRECTENABLE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3904 | {0xa1, 0x01, 0x0180}, /* AutoCorrectEnable */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3905 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3906 | /* Gains */ |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 3907 | {0xa0, 0x40, ZC3XX_R116_RGAIN}, |
| 3908 | {0xa0, 0x40, ZC3XX_R117_GGAIN}, |
| 3909 | {0xa0, 0x40, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3910 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3911 | {0xa0, 0x00, 0x0007}, /* AutoCorrectEnable */ |
| 3912 | {0xa0, 0xff, ZC3XX_R018_FRAMELOST}, /* Frame adjust */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3913 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3914 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3915 | static const struct usb_action pas106b_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3916 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3917 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,06,cc */ |
| 3918 | {0xa0, 0x54, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,54,cc */ |
| 3919 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3920 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3921 | {0xa0, 0x87, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,87,cc */ |
| 3922 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 3923 | {0xa0, 0x30, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,30,cc */ |
| 3924 | {0xaa, 0x03, 0x0021}, /* 00,03,21,aa */ |
| 3925 | {0xaa, 0x04, 0x000c}, /* 00,04,0c,aa */ |
| 3926 | {0xaa, 0x05, 0x0002}, /* 00,05,02,aa */ |
| 3927 | {0xaa, 0x07, 0x001c}, /* 00,07,1c,aa */ |
| 3928 | {0xa0, 0x04, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,04,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3929 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3930 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3931 | static const struct usb_action pas106b_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3932 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3933 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,06,cc */ |
| 3934 | {0xa0, 0x2e, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,2e,cc */ |
| 3935 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3936 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3937 | {0xa0, 0x71, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,71,cc */ |
| 3938 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 3939 | {0xa0, 0x30, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,30,cc */ |
| 3940 | {0xaa, 0x03, 0x001c}, /* 00,03,1c,aa */ |
| 3941 | {0xaa, 0x04, 0x0004}, /* 00,04,04,aa */ |
| 3942 | {0xaa, 0x05, 0x0001}, /* 00,05,01,aa */ |
| 3943 | {0xaa, 0x07, 0x00c4}, /* 00,07,c4,aa */ |
| 3944 | {0xa0, 0x04, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,04,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3945 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3946 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3947 | static const struct usb_action pas106b_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 3948 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
| 3949 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,06,cc */ |
| 3950 | {0xa0, 0x50, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc */ |
| 3951 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 3952 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 3953 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc */ |
| 3954 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 3955 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 3956 | {0xaa, 0x03, 0x0013}, /* 00,03,13,aa */ |
| 3957 | {0xaa, 0x04, 0x0000}, /* 00,04,00,aa */ |
| 3958 | {0xaa, 0x05, 0x0001}, /* 00,05,01,aa */ |
| 3959 | {0xaa, 0x07, 0x0030}, /* 00,07,30,aa */ |
| 3960 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3961 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 3962 | }; |
| 3963 | |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 3964 | /* from lvWIMv.inf 046d:08a2/:08aa 2007/06/03 */ |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 3965 | static const struct usb_action pas202b_Initial[] = { /* 640x480 */ |
| 3966 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 3967 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 3968 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ |
| 3969 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, /* 00,02,00,cc */ |
| 3970 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 3971 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 3972 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 3973 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 3974 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 3975 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 3976 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 3977 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 3978 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 3979 | {0xa0, 0x03, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,03,cc */ |
| 3980 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 3981 | {0xa0, 0x03, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,03,cc */ |
| 3982 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
| 3983 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc */ |
| 3984 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 3985 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
| 3986 | {0xaa, 0x02, 0x0002}, /* 00,02,04,aa --> 02 */ |
| 3987 | {0xaa, 0x07, 0x0006}, /* 00,07,06,aa */ |
| 3988 | {0xaa, 0x08, 0x0002}, /* 00,08,02,aa */ |
| 3989 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ |
| 3990 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ |
| 3991 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 3992 | {0xaa, 0x0c, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 3993 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ |
| 3994 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 3995 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ |
| 3996 | {0xaa, 0x13, 0x0063}, /* 00,13,63,aa */ |
| 3997 | {0xaa, 0x15, 0x0070}, /* 00,15,70,aa */ |
| 3998 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc */ |
| 3999 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 4000 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 4001 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
| 4002 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 4003 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 4004 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 4005 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 4006 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, /* 01,8d,70,cc */ |
| 4007 | {} |
| 4008 | }; |
| 4009 | static const struct usb_action pas202b_InitialScale[] = { /* 320x240 */ |
| 4010 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4011 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4012 | {0xa0, 0x0e, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,0e,cc */ |
| 4013 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 4014 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 4015 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 4016 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4017 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4018 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 4019 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 4020 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 4021 | {0xa0, 0x08, ZC3XX_R08D_COMPABILITYMODE}, /* 00,8d,08,cc */ |
| 4022 | {0xa0, 0x08, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,08,cc */ |
| 4023 | {0xa0, 0x02, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,02,cc */ |
| 4024 | {0xa0, 0x08, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,08,cc */ |
| 4025 | {0xa0, 0x02, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,02,cc */ |
| 4026 | {0xa0, 0x01, ZC3XX_R09B_WINHEIGHTHIGH}, /* 00,9b,01,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4027 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4028 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, /* 00,9d,02,cc */ |
| 4029 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
| 4030 | {0xaa, 0x02, 0x0002}, /* 00,02,02,aa */ |
| 4031 | {0xaa, 0x07, 0x0006}, /* 00,07,06,aa */ |
| 4032 | {0xaa, 0x08, 0x0002}, /* 00,08,02,aa */ |
| 4033 | {0xaa, 0x09, 0x0006}, /* 00,09,06,aa */ |
| 4034 | {0xaa, 0x0a, 0x0001}, /* 00,0a,01,aa */ |
| 4035 | {0xaa, 0x0b, 0x0001}, /* 00,0b,01,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4036 | {0xaa, 0x0c, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4037 | {0xaa, 0x0d, 0x0000}, /* 00,0d,00,aa */ |
| 4038 | {0xaa, 0x10, 0x0000}, /* 00,10,00,aa */ |
| 4039 | {0xaa, 0x12, 0x0005}, /* 00,12,05,aa */ |
| 4040 | {0xaa, 0x13, 0x0063}, /* 00,13,63,aa */ |
| 4041 | {0xaa, 0x15, 0x0070}, /* 00,15,70,aa */ |
| 4042 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,37,cc */ |
| 4043 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 4044 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
| 4045 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
| 4046 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 4047 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 4048 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 4049 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 4050 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, /* 01,8d,70,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4051 | {0xa0, 0xff, ZC3XX_R097_WINYSTARTHIGH}, |
| 4052 | {0xa0, 0xfe, ZC3XX_R098_WINYSTARTLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4053 | {} |
| 4054 | }; |
| 4055 | static const struct usb_action pas202b_50HZ[] = { |
| 4056 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4057 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4058 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
| 4059 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4060 | {0xaa, 0x21, 0x001b}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4061 | {0xaa, 0x03, 0x0044}, /* 00,03,44,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4062 | {0xaa, 0x04, 0x0008}, |
| 4063 | {0xaa, 0x05, 0x001b}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4064 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4065 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4066 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4067 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4068 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4069 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4070 | {0xa0, 0x1b, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4071 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4072 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4073 | {0xa0, 0x4d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,4d,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4074 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4075 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4076 | {0xa0, 0x44, ZC3XX_R01D_HSYNC_0}, /* 00,1d,44,cc */ |
| 4077 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
| 4078 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ |
| 4079 | {0xa0, 0xeb, ZC3XX_R020_HSYNC_3}, /* 00,20,eb,cc */ |
| 4080 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4081 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4082 | {} |
| 4083 | }; |
| 4084 | static const struct usb_action pas202b_50HZScale[] = { |
| 4085 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4086 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4087 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4088 | {0xaa, 0x20, 0x0004}, |
| 4089 | {0xaa, 0x21, 0x003d}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4090 | {0xaa, 0x03, 0x0041}, /* 00,03,41,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4091 | {0xaa, 0x04, 0x0010}, |
| 4092 | {0xaa, 0x05, 0x003d}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4093 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4094 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4095 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4096 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4097 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4098 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4099 | {0xa0, 0x3d, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4100 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4101 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4102 | {0xa0, 0x9b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,9b,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4103 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4104 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4105 | {0xa0, 0x41, ZC3XX_R01D_HSYNC_0}, /* 00,1d,41,cc */ |
| 4106 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
| 4107 | {0xa0, 0xad, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ad,cc */ |
| 4108 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4109 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4110 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4111 | {} |
| 4112 | }; |
| 4113 | static const struct usb_action pas202b_60HZ[] = { |
| 4114 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4115 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4116 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
| 4117 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
| 4118 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 4119 | {0xaa, 0x03, 0x0045}, /* 00,03,45,aa */ |
| 4120 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ |
| 4121 | {0xaa, 0x05, 0x0000}, /* 00,05,00,aa */ |
| 4122 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4123 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4124 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4125 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4126 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4127 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4128 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4129 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4130 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4131 | {0xa0, 0x40, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,40,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4132 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4133 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4134 | {0xa0, 0x45, ZC3XX_R01D_HSYNC_0}, /* 00,1d,45,cc */ |
| 4135 | {0xa0, 0x8e, ZC3XX_R01E_HSYNC_1}, /* 00,1e,8e,cc */ |
| 4136 | {0xa0, 0xc1, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c1,cc */ |
| 4137 | {0xa0, 0xf5, ZC3XX_R020_HSYNC_3}, /* 00,20,f5,cc */ |
| 4138 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4139 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4140 | {} |
| 4141 | }; |
| 4142 | static const struct usb_action pas202b_60HZScale[] = { |
| 4143 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4144 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4145 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4146 | {0xaa, 0x20, 0x0004}, |
| 4147 | {0xaa, 0x21, 0x0008}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4148 | {0xaa, 0x03, 0x0042}, /* 00,03,42,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4149 | {0xaa, 0x04, 0x0010}, |
| 4150 | {0xaa, 0x05, 0x0008}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4151 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4152 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4153 | {0xa0, 0x1c, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4154 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc */ |
| 4155 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4156 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4157 | {0xa0, 0x08, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4158 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4159 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4160 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,81,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4161 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4162 | {0xa0, 0x1b, ZC3XX_R18F_AEUNFREEZE}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4163 | {0xa0, 0x42, ZC3XX_R01D_HSYNC_0}, /* 00,1d,42,cc */ |
| 4164 | {0xa0, 0x6f, ZC3XX_R01E_HSYNC_1}, /* 00,1e,6f,cc */ |
| 4165 | {0xa0, 0xaf, ZC3XX_R01F_HSYNC_2}, /* 00,1f,af,cc */ |
| 4166 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4167 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4168 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4169 | {} |
| 4170 | }; |
| 4171 | static const struct usb_action pas202b_NoFliker[] = { |
| 4172 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4173 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4174 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
| 4175 | {0xaa, 0x20, 0x0002}, /* 00,20,02,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4176 | {0xaa, 0x21, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4177 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ |
| 4178 | {0xaa, 0x04, 0x0008}, /* 00,04,08,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4179 | {0xaa, 0x05, 0x0006}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4180 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4181 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
| 4182 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4183 | {0xa0, 0x02, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4184 | {0xa0, 0x06, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4185 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4186 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4187 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4188 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 4189 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 4190 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4191 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4192 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ |
| 4193 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ |
| 4194 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ |
| 4195 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4196 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4197 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4198 | {} |
| 4199 | }; |
| 4200 | static const struct usb_action pas202b_NoFlikerScale[] = { |
| 4201 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
| 4202 | {0xa0, 0x20, ZC3XX_R087_EXPTIMEMID}, /* 00,87,20,cc */ |
| 4203 | {0xa0, 0x21, ZC3XX_R088_EXPTIMELOW}, /* 00,88,21,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4204 | {0xaa, 0x20, 0x0004}, |
| 4205 | {0xaa, 0x21, 0x000c}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4206 | {0xaa, 0x03, 0x0040}, /* 00,03,40,aa */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4207 | {0xaa, 0x04, 0x0010}, |
| 4208 | {0xaa, 0x05, 0x000c}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4209 | {0xaa, 0x0e, 0x0001}, /* 00,0e,01,aa */ |
| 4210 | {0xaa, 0x0f, 0x0000}, /* 00,0f,00,aa */ |
| 4211 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4212 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4213 | {0xa0, 0x0c, ZC3XX_R192_EXPOSURELIMITLOW}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4214 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 4215 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 4216 | {0xa0, 0x02, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,02,cc */ |
| 4217 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, /* 01,8c,10,cc */ |
| 4218 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,20,cc */ |
| 4219 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 4220 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 4221 | {0xa0, 0x40, ZC3XX_R01D_HSYNC_0}, /* 00,1d,40,cc */ |
| 4222 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, /* 00,1e,60,cc */ |
| 4223 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, /* 00,1f,90,cc */ |
| 4224 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 4225 | {0xa0, 0x0f, ZC3XX_R087_EXPTIMEMID}, /* 00,87,0f,cc */ |
| 4226 | {0xa0, 0x0e, ZC3XX_R088_EXPTIMELOW}, /* 00,88,0e,cc */ |
| 4227 | {} |
| 4228 | }; |
| 4229 | |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4230 | /* mt9v111 (mi0360soc) and pb0330 from vm30x.inf 0ac8:301b 07/02/13 */ |
| 4231 | static const struct usb_action mt9v111_1_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4232 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4233 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4234 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4235 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 4236 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4237 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4238 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4239 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4240 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4241 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4242 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4243 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4244 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4245 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4246 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4247 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4248 | {0xdd, 0x00, 0x0200}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4249 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4250 | {0xaa, 0x01, 0x0001}, |
| 4251 | {0xaa, 0x06, 0x0000}, |
| 4252 | {0xaa, 0x08, 0x0483}, |
| 4253 | {0xaa, 0x01, 0x0004}, |
| 4254 | {0xaa, 0x08, 0x0006}, |
| 4255 | {0xaa, 0x02, 0x0011}, |
| 4256 | {0xaa, 0x03, 0x01e5}, /*jfm: was 01e7*/ |
| 4257 | {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/ |
| 4258 | {0xaa, 0x07, 0x3002}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4259 | {0xaa, 0x20, 0x5100}, |
| 4260 | {0xaa, 0x35, 0x507f}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4261 | {0xaa, 0x30, 0x0005}, |
| 4262 | {0xaa, 0x31, 0x0000}, |
| 4263 | {0xaa, 0x58, 0x0078}, |
| 4264 | {0xaa, 0x62, 0x0411}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4265 | {0xaa, 0x2b, 0x007f}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4266 | {0xaa, 0x2c, 0x007f}, /*jfm: was 0030*/ |
| 4267 | {0xaa, 0x2d, 0x007f}, /*jfm: was 0030*/ |
| 4268 | {0xaa, 0x2e, 0x007f}, /*jfm: was 0030*/ |
| 4269 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4270 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4271 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4272 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4273 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 4274 | {0xa0, 0x09, 0x01ad}, /*jfm: was 00*/ |
| 4275 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4276 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4277 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4278 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4279 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4280 | {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4281 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 4282 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
| 4283 | {} |
| 4284 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4285 | static const struct usb_action mt9v111_1_InitialScale[] = { /* 320x240 */ |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4286 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4287 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4288 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4289 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 4290 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4291 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4292 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4293 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4294 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4295 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4296 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4297 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4298 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4299 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4300 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4301 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4302 | {0xdd, 0x00, 0x0200}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4303 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4304 | {0xaa, 0x01, 0x0001}, |
| 4305 | {0xaa, 0x06, 0x0000}, |
| 4306 | {0xaa, 0x08, 0x0483}, |
| 4307 | {0xaa, 0x01, 0x0004}, |
| 4308 | {0xaa, 0x08, 0x0006}, |
| 4309 | {0xaa, 0x02, 0x0011}, |
| 4310 | {0xaa, 0x03, 0x01e7}, |
| 4311 | {0xaa, 0x04, 0x0287}, |
| 4312 | {0xaa, 0x07, 0x3002}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4313 | {0xaa, 0x20, 0x5100}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4314 | {0xaa, 0x35, 0x007f}, /*jfm: was 0050*/ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4315 | {0xaa, 0x30, 0x0005}, |
| 4316 | {0xaa, 0x31, 0x0000}, |
| 4317 | {0xaa, 0x58, 0x0078}, |
| 4318 | {0xaa, 0x62, 0x0411}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4319 | {0xaa, 0x2b, 0x007f}, /*jfm: was 28*/ |
| 4320 | {0xaa, 0x2c, 0x007f}, /*jfm: was 30*/ |
| 4321 | {0xaa, 0x2d, 0x007f}, /*jfm: was 30*/ |
| 4322 | {0xaa, 0x2e, 0x007f}, /*jfm: was 28*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4323 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4324 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4325 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4326 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4327 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4328 | {0xa0, 0x09, 0x01ad}, /*jfm: was 00*/ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4329 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4330 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4331 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4332 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4333 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4334 | {0xa0, 0x6c, ZC3XX_R18D_YTARGET}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4335 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 4336 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4337 | {} |
| 4338 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4339 | static const struct usb_action mt9v111_1_AE50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4340 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4341 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4342 | {0xbb, 0x00, 0x0562}, |
| 4343 | {0xbb, 0x01, 0x09aa}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4344 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4345 | {0xa0, 0x03, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4346 | {0xa0, 0x9b, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4347 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4348 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4349 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4350 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4351 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4352 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4353 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4354 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, |
| 4355 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, |
| 4356 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, |
| 4357 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4358 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4359 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4360 | {} |
| 4361 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4362 | static const struct usb_action mt9v111_1_AE50HZScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4363 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4364 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4365 | {0xbb, 0x00, 0x0509}, |
| 4366 | {0xbb, 0x01, 0x0934}, |
| 4367 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4368 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4369 | {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4370 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4371 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4372 | {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4373 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4374 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4375 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4376 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4377 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4378 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4379 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4380 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4381 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4382 | {} |
| 4383 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4384 | static const struct usb_action mt9v111_1_AE60HZ[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4385 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4386 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4387 | {0xaa, 0x05, 0x003d}, |
| 4388 | {0xaa, 0x09, 0x016e}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4389 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4390 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4391 | {0xa0, 0xdd, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4392 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4393 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4394 | {0xa0, 0x3d, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4395 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4396 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4397 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4398 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4399 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, |
| 4400 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, |
| 4401 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, |
| 4402 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4403 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4404 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4405 | {} |
| 4406 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4407 | static const struct usb_action mt9v111_1_AE60HZScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4408 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4409 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4410 | {0xbb, 0x00, 0x0509}, |
| 4411 | {0xbb, 0x01, 0x0983}, |
| 4412 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4413 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4414 | {0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4415 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4416 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4417 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4418 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4419 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4420 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4421 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4422 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4423 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4424 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4425 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4426 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4427 | {} |
| 4428 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4429 | static const struct usb_action mt9v111_1_AENoFliker[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4430 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4431 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4432 | {0xbb, 0x00, 0x0509}, |
| 4433 | {0xbb, 0x01, 0x0960}, |
| 4434 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4435 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4436 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4437 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4438 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4439 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4440 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4441 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4442 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4443 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4444 | {0xa0, 0x09, ZC3XX_R01D_HSYNC_0}, |
| 4445 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 4446 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4447 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
| 4448 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4449 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4450 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4451 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4452 | static const struct usb_action mt9v111_1_AENoFlikerScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4453 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4454 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4455 | {0xbb, 0x00, 0x0534}, |
| 4456 | {0xbb, 0x02, 0x0960}, |
| 4457 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4458 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4459 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4460 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4461 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4462 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4463 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4464 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4465 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4466 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4467 | {0xa0, 0x34, ZC3XX_R01D_HSYNC_0}, |
| 4468 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, |
| 4469 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4470 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
| 4471 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4472 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4473 | {} |
| 4474 | }; |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4475 | /* from usbvm303.inf 0ac8:303b 07/03/25 (3 - tas5130c) */ |
| 4476 | static const struct usb_action mt9v111_3_Initial[] = { |
| 4477 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4478 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4479 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
Jean-François Moine | d581bcd | 2010-10-29 08:01:01 -0300 | [diff] [blame] | 4480 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 4481 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4482 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4483 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4484 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4485 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4486 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4487 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4488 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4489 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4490 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4491 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4492 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4493 | {0xdd, 0x00, 0x0200}, |
| 4494 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4495 | {0xaa, 0x01, 0x0001}, /* select IFP/SOC registers */ |
| 4496 | {0xaa, 0x06, 0x0000}, /* operating mode control */ |
| 4497 | {0xaa, 0x08, 0x0483}, /* output format control */ |
| 4498 | /* H red first, V red or blue first, |
| 4499 | * raw Bayer, auto flicker */ |
| 4500 | {0xaa, 0x01, 0x0004}, /* select sensor core registers */ |
| 4501 | {0xaa, 0x08, 0x0006}, /* row start */ |
| 4502 | {0xaa, 0x02, 0x0011}, /* column start */ |
| 4503 | {0xaa, 0x03, 0x01e5}, /* window height - 1 */ |
| 4504 | {0xaa, 0x04, 0x0285}, /* window width - 1 */ |
| 4505 | {0xaa, 0x07, 0x3002}, /* output control */ |
| 4506 | {0xaa, 0x20, 0x1100}, /* read mode: bits 8 & 12 (?) */ |
| 4507 | {0xaa, 0x35, 0x007f}, /* global gain */ |
| 4508 | {0xaa, 0x30, 0x0005}, |
| 4509 | {0xaa, 0x31, 0x0000}, |
| 4510 | {0xaa, 0x58, 0x0078}, |
| 4511 | {0xaa, 0x62, 0x0411}, |
| 4512 | {0xaa, 0x2b, 0x007f}, /* green1 gain */ |
| 4513 | {0xaa, 0x2c, 0x007f}, /* blue gain */ |
| 4514 | {0xaa, 0x2d, 0x007f}, /* red gain */ |
| 4515 | {0xaa, 0x2e, 0x007f}, /* green2 gain */ |
| 4516 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 4517 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 4518 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4519 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4520 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 4521 | {0xa0, 0x00, 0x01ad}, |
| 4522 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4523 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4524 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4525 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4526 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 4527 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, |
| 4528 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 4529 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
| 4530 | {} |
| 4531 | }; |
| 4532 | static const struct usb_action mt9v111_3_InitialScale[] = { |
| 4533 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4534 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 4535 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4536 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 4537 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4538 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4539 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4540 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4541 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4542 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4543 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4544 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4545 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4546 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4547 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4548 | {0xa0, 0xdc, ZC3XX_R08B_I2CDEVICEADDR}, |
| 4549 | {0xdd, 0x00, 0x0200}, |
| 4550 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4551 | {0xaa, 0x01, 0x0001}, |
| 4552 | {0xaa, 0x06, 0x0000}, |
| 4553 | {0xaa, 0x08, 0x0483}, |
| 4554 | {0xaa, 0x01, 0x0004}, |
| 4555 | {0xaa, 0x08, 0x0006}, |
| 4556 | {0xaa, 0x02, 0x0011}, |
| 4557 | {0xaa, 0x03, 0x01e7}, |
| 4558 | {0xaa, 0x04, 0x0287}, |
| 4559 | {0xaa, 0x07, 0x3002}, |
| 4560 | {0xaa, 0x20, 0x1100}, |
| 4561 | {0xaa, 0x35, 0x007f}, |
| 4562 | {0xaa, 0x30, 0x0005}, |
| 4563 | {0xaa, 0x31, 0x0000}, |
| 4564 | {0xaa, 0x58, 0x0078}, |
| 4565 | {0xaa, 0x62, 0x0411}, |
| 4566 | {0xaa, 0x2b, 0x007f}, |
| 4567 | {0xaa, 0x2c, 0x007f}, |
| 4568 | {0xaa, 0x2d, 0x007f}, |
| 4569 | {0xaa, 0x2e, 0x007f}, |
| 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}, |
| 4575 | {0xa0, 0x00, 0x01ad}, |
| 4576 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4577 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4578 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4579 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4580 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 4581 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, |
| 4582 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, |
| 4583 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, |
| 4584 | {} |
| 4585 | }; |
| 4586 | static const struct usb_action mt9v111_3_AE50HZ[] = { |
| 4587 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4588 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4589 | {0xaa, 0x05, 0x0009}, /* horizontal blanking */ |
| 4590 | {0xaa, 0x09, 0x01ce}, /* shutter width */ |
| 4591 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4592 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4593 | {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4594 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4595 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4596 | {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4597 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4598 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4599 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4600 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4601 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4602 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4603 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4604 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4605 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4606 | {} |
| 4607 | }; |
| 4608 | static const struct usb_action mt9v111_3_AE50HZScale[] = { |
| 4609 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4610 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4611 | {0xaa, 0x05, 0x0009}, |
| 4612 | {0xaa, 0x09, 0x01ce}, |
| 4613 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4614 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4615 | {0xa0, 0xd2, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4616 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4617 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4618 | {0xa0, 0x9a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4619 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4620 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4621 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4622 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4623 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4624 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4625 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4626 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4627 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4628 | {} |
| 4629 | }; |
| 4630 | static const struct usb_action mt9v111_3_AE60HZ[] = { |
| 4631 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4632 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4633 | {0xaa, 0x05, 0x0009}, |
| 4634 | {0xaa, 0x09, 0x0083}, |
| 4635 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4636 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4637 | {0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4638 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4639 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4640 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4641 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4642 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4643 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4644 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4645 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4646 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4647 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4648 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4649 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4650 | {} |
| 4651 | }; |
| 4652 | static const struct usb_action mt9v111_3_AE60HZScale[] = { |
| 4653 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4654 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4655 | {0xaa, 0x05, 0x0009}, |
| 4656 | {0xaa, 0x09, 0x0083}, |
| 4657 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4658 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4659 | {0xa0, 0x8f, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4660 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4661 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4662 | {0xa0, 0x81, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4663 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4664 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4665 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4666 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4667 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4668 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, |
| 4669 | {0xa0, 0xf9, ZC3XX_R01F_HSYNC_2}, |
| 4670 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
| 4671 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4672 | {} |
| 4673 | }; |
| 4674 | static const struct usb_action mt9v111_3_AENoFliker[] = { |
| 4675 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4676 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4677 | {0xaa, 0x05, 0x0034}, |
| 4678 | {0xaa, 0x09, 0x0260}, |
| 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, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4685 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4686 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4687 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4688 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4689 | {0xa0, 0x34, ZC3XX_R01D_HSYNC_0}, |
| 4690 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, |
| 4691 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4692 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
| 4693 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4694 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4695 | {} |
| 4696 | }; |
| 4697 | static const struct usb_action mt9v111_3_AENoFlikerScale[] = { |
| 4698 | {0xa0, 0x00, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4699 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4700 | {0xaa, 0x05, 0x0034}, |
| 4701 | {0xaa, 0x09, 0x0260}, |
| 4702 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4703 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4704 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4705 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4706 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4707 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4708 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4709 | {0xa0, 0x1c, ZC3XX_R18F_AEUNFREEZE}, |
| 4710 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4711 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4712 | {0xa0, 0x34, ZC3XX_R01D_HSYNC_0}, |
| 4713 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, |
| 4714 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4715 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
| 4716 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4717 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, |
| 4718 | {} |
| 4719 | }; |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4720 | |
| 4721 | static const struct usb_action pb0330_Initial[] = { /* 640x480 */ |
| 4722 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4723 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 4724 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4725 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
| 4726 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4727 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4728 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4729 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4730 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4731 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4732 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4733 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4734 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4735 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4736 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
| 4737 | {0xdd, 0x00, 0x0200}, |
| 4738 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4739 | {0xaa, 0x01, 0x0006}, |
| 4740 | {0xaa, 0x02, 0x0011}, |
| 4741 | {0xaa, 0x03, 0x01e5}, /*jfm: was 1e7*/ |
| 4742 | {0xaa, 0x04, 0x0285}, /*jfm: was 0287*/ |
| 4743 | {0xaa, 0x06, 0x0003}, |
| 4744 | {0xaa, 0x07, 0x3002}, |
| 4745 | {0xaa, 0x20, 0x1100}, |
| 4746 | {0xaa, 0x2f, 0xf7b0}, |
| 4747 | {0xaa, 0x30, 0x0005}, |
| 4748 | {0xaa, 0x31, 0x0000}, |
| 4749 | {0xaa, 0x34, 0x0100}, |
| 4750 | {0xaa, 0x35, 0x0060}, |
| 4751 | {0xaa, 0x3d, 0x068f}, |
| 4752 | {0xaa, 0x40, 0x01e0}, |
| 4753 | {0xaa, 0x58, 0x0078}, |
| 4754 | {0xaa, 0x62, 0x0411}, |
| 4755 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 4756 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 4757 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4758 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4759 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
| 4760 | {0xa0, 0x09, 0x01ad}, /*jfm: was 00 */ |
| 4761 | {0xa0, 0x15, 0x01ae}, |
| 4762 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4763 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4764 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4765 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4766 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
| 4767 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /*jfm: was 6c*/ |
| 4768 | {} |
| 4769 | }; |
| 4770 | static const struct usb_action pb0330_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4771 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 4772 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00 */ |
| 4773 | {0xa0, 0x0a, ZC3XX_R010_CMOSSENSORSELECT}, |
| 4774 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
| 4775 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 4776 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 4777 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 4778 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 4779 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 4780 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4781 | {0xa0, 0x07, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4782 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, |
| 4783 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, |
| 4784 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, |
| 4785 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4786 | {0xdd, 0x00, 0x0200}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4787 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4788 | {0xaa, 0x01, 0x0006}, |
| 4789 | {0xaa, 0x02, 0x0011}, |
| 4790 | {0xaa, 0x03, 0x01e7}, |
| 4791 | {0xaa, 0x04, 0x0287}, |
| 4792 | {0xaa, 0x06, 0x0003}, |
| 4793 | {0xaa, 0x07, 0x3002}, |
| 4794 | {0xaa, 0x20, 0x1100}, |
| 4795 | {0xaa, 0x2f, 0xf7b0}, |
| 4796 | {0xaa, 0x30, 0x0005}, |
| 4797 | {0xaa, 0x31, 0x0000}, |
| 4798 | {0xaa, 0x34, 0x0100}, |
| 4799 | {0xaa, 0x35, 0x0060}, |
| 4800 | {0xaa, 0x3d, 0x068f}, |
| 4801 | {0xaa, 0x40, 0x01e0}, |
| 4802 | {0xaa, 0x58, 0x0078}, |
| 4803 | {0xaa, 0x62, 0x0411}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4804 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, |
| 4805 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 4806 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 4807 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 4808 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4809 | {0xa0, 0x09, 0x01ad}, |
| 4810 | {0xa0, 0x15, 0x01ae}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4811 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 4812 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 4813 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 4814 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
| 4815 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4816 | {0xa0, 0x78, ZC3XX_R18D_YTARGET}, /*jfm: was 6c*/ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4817 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4818 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4819 | static const struct usb_action pb0330_50HZ[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4820 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4821 | {0xbb, 0x00, 0x055c}, |
| 4822 | {0xbb, 0x01, 0x09aa}, |
| 4823 | {0xbb, 0x00, 0x1001}, |
| 4824 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4825 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4826 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4827 | {0xa0, 0xc4, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4828 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4829 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4830 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4831 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4832 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4833 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4834 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4835 | {0xa0, 0x5c, ZC3XX_R01D_HSYNC_0}, |
| 4836 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, |
| 4837 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, |
| 4838 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4839 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4840 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4841 | static const struct usb_action pb0330_50HZScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4842 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4843 | {0xbb, 0x00, 0x0566}, |
| 4844 | {0xbb, 0x02, 0x09b2}, |
| 4845 | {0xbb, 0x00, 0x1002}, |
| 4846 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4847 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4848 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4849 | {0xa0, 0x8c, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4850 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4851 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4852 | {0xa0, 0x8a, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4853 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4854 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4855 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4856 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4857 | {0xa0, 0xd7, ZC3XX_R01D_HSYNC_0}, |
| 4858 | {0xa0, 0xf0, ZC3XX_R01E_HSYNC_1}, |
| 4859 | {0xa0, 0xf8, ZC3XX_R01F_HSYNC_2}, |
| 4860 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4861 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4862 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4863 | static const struct usb_action pb0330_60HZ[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4864 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4865 | {0xbb, 0x00, 0x0535}, |
| 4866 | {0xbb, 0x01, 0x0974}, |
| 4867 | {0xbb, 0x00, 0x1001}, |
| 4868 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4869 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4870 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4871 | {0xa0, 0xfe, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4872 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4873 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4874 | {0xa0, 0x3e, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4875 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4876 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4877 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4878 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4879 | {0xa0, 0x35, ZC3XX_R01D_HSYNC_0}, |
| 4880 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, |
| 4881 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4882 | {0xa0, 0xd0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4883 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4884 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4885 | static const struct usb_action pb0330_60HZScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4886 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4887 | {0xbb, 0x00, 0x0535}, |
| 4888 | {0xbb, 0x02, 0x096c}, |
| 4889 | {0xbb, 0x00, 0x1002}, |
| 4890 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4891 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4892 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4893 | {0xa0, 0xc0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4894 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4895 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4896 | {0xa0, 0x7c, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4897 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, |
| 4898 | {0xa0, 0x1a, ZC3XX_R18F_AEUNFREEZE}, |
| 4899 | {0xa0, 0x14, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4900 | {0xa0, 0x66, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4901 | {0xa0, 0x35, ZC3XX_R01D_HSYNC_0}, |
| 4902 | {0xa0, 0x50, ZC3XX_R01E_HSYNC_1}, |
| 4903 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4904 | {0xa0, 0xd0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4905 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4906 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4907 | static const struct usb_action pb0330_NoFliker[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4908 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4909 | {0xbb, 0x00, 0x0509}, |
| 4910 | {0xbb, 0x02, 0x0940}, |
| 4911 | {0xbb, 0x00, 0x1002}, |
| 4912 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4913 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4914 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4915 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4916 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4917 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4918 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4919 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 4920 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 4921 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4922 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4923 | {0xa0, 0x09, ZC3XX_R01D_HSYNC_0}, |
| 4924 | {0xa0, 0x40, ZC3XX_R01E_HSYNC_1}, |
| 4925 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4926 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4927 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4928 | }; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 4929 | static const struct usb_action pb0330_NoFlikerScale[] = { |
Jean-Francois Moine | 56205cc | 2009-11-04 16:38:04 -0300 | [diff] [blame] | 4930 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, |
| 4931 | {0xbb, 0x00, 0x0535}, |
| 4932 | {0xbb, 0x01, 0x0980}, |
| 4933 | {0xbb, 0x00, 0x1001}, |
| 4934 | {0xa0, 0x60, ZC3XX_R11D_GLOBALGAIN}, |
| 4935 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, |
| 4936 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 4937 | {0xa0, 0xf0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 4938 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 4939 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 4940 | {0xa0, 0x01, ZC3XX_R197_ANTIFLICKERLOW}, |
| 4941 | {0xa0, 0x10, ZC3XX_R18C_AEFREEZE}, |
| 4942 | {0xa0, 0x20, ZC3XX_R18F_AEUNFREEZE}, |
| 4943 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 4944 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, |
| 4945 | {0xa0, 0x35, ZC3XX_R01D_HSYNC_0}, |
| 4946 | {0xa0, 0x60, ZC3XX_R01E_HSYNC_1}, |
| 4947 | {0xa0, 0x90, ZC3XX_R01F_HSYNC_2}, |
| 4948 | {0xa0, 0xe0, ZC3XX_R020_HSYNC_3}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 4949 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4950 | }; |
| 4951 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 4952 | /* from oem9.inf */ |
| 4953 | static const struct usb_action po2030_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 4954 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 4955 | {0xa0, 0x04, ZC3XX_R002_CLOCKSELECT}, /* 00,02,04,cc */ |
| 4956 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 4957 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 4958 | {0xa0, 0x04, ZC3XX_R080_HBLANKHIGH}, /* 00,80,04,cc */ |
| 4959 | {0xa0, 0x05, ZC3XX_R081_HBLANKLOW}, /* 00,81,05,cc */ |
| 4960 | {0xa0, 0x16, ZC3XX_R083_RGAINADDR}, /* 00,83,16,cc */ |
| 4961 | {0xa0, 0x18, ZC3XX_R085_BGAINADDR}, /* 00,85,18,cc */ |
| 4962 | {0xa0, 0x1a, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,1a,cc */ |
| 4963 | {0xa0, 0x1b, ZC3XX_R087_EXPTIMEMID}, /* 00,87,1b,cc */ |
| 4964 | {0xa0, 0x1c, ZC3XX_R088_EXPTIMELOW}, /* 00,88,1c,cc */ |
| 4965 | {0xa0, 0xee, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,ee,cc */ |
| 4966 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 4967 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 4968 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 4969 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 4970 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 4971 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 4972 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 4973 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 4974 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 4975 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 4976 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 4977 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 4978 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 4979 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc */ |
| 4980 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 4981 | {0xaa, 0x09, 0x00ce}, /* 00,09,ce,aa */ |
| 4982 | {0xaa, 0x0b, 0x0005}, /* 00,0b,05,aa */ |
| 4983 | {0xaa, 0x0d, 0x0054}, /* 00,0d,54,aa */ |
| 4984 | {0xaa, 0x0f, 0x00eb}, /* 00,0f,eb,aa */ |
| 4985 | {0xaa, 0x87, 0x0000}, /* 00,87,00,aa */ |
| 4986 | {0xaa, 0x88, 0x0004}, /* 00,88,04,aa */ |
| 4987 | {0xaa, 0x89, 0x0000}, /* 00,89,00,aa */ |
| 4988 | {0xaa, 0x8a, 0x0005}, /* 00,8a,05,aa */ |
| 4989 | {0xaa, 0x13, 0x0003}, /* 00,13,03,aa */ |
| 4990 | {0xaa, 0x16, 0x0040}, /* 00,16,40,aa */ |
| 4991 | {0xaa, 0x18, 0x0040}, /* 00,18,40,aa */ |
| 4992 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 4993 | {0xaa, 0x29, 0x00e8}, /* 00,29,e8,aa */ |
| 4994 | {0xaa, 0x45, 0x0045}, /* 00,45,45,aa */ |
| 4995 | {0xaa, 0x50, 0x00ed}, /* 00,50,ed,aa */ |
| 4996 | {0xaa, 0x51, 0x0025}, /* 00,51,25,aa */ |
| 4997 | {0xaa, 0x52, 0x0042}, /* 00,52,42,aa */ |
| 4998 | {0xaa, 0x53, 0x002f}, /* 00,53,2f,aa */ |
| 4999 | {0xaa, 0x79, 0x0025}, /* 00,79,25,aa */ |
| 5000 | {0xaa, 0x7b, 0x0000}, /* 00,7b,00,aa */ |
| 5001 | {0xaa, 0x7e, 0x0025}, /* 00,7e,25,aa */ |
| 5002 | {0xaa, 0x7f, 0x0025}, /* 00,7f,25,aa */ |
| 5003 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 5004 | {0xaa, 0x33, 0x0036}, /* 00,33,36,aa */ |
| 5005 | {0xaa, 0x36, 0x0060}, /* 00,36,60,aa */ |
| 5006 | {0xaa, 0x37, 0x0008}, /* 00,37,08,aa */ |
| 5007 | {0xaa, 0x3b, 0x0031}, /* 00,3b,31,aa */ |
| 5008 | {0xaa, 0x44, 0x000f}, /* 00,44,0f,aa */ |
| 5009 | {0xaa, 0x58, 0x0002}, /* 00,58,02,aa */ |
| 5010 | {0xaa, 0x66, 0x00c0}, /* 00,66,c0,aa */ |
| 5011 | {0xaa, 0x67, 0x0044}, /* 00,67,44,aa */ |
| 5012 | {0xaa, 0x6b, 0x00a0}, /* 00,6b,a0,aa */ |
| 5013 | {0xaa, 0x6c, 0x0054}, /* 00,6c,54,aa */ |
| 5014 | {0xaa, 0xd6, 0x0007}, /* 00,d6,07,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5015 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,f7,cc */ |
| 5016 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 5017 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 5018 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5019 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5020 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 5021 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 5022 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 5023 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 5024 | {0xa0, 0x7a, ZC3XX_R116_RGAIN}, /* 01,16,7a,cc */ |
| 5025 | {0xa0, 0x4a, ZC3XX_R118_BGAIN}, /* 01,18,4a,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5026 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5027 | }; |
| 5028 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5029 | /* from oem9.inf */ |
| 5030 | static const struct usb_action po2030_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5031 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc */ |
| 5032 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, /* 00,02,10,cc */ |
| 5033 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc */ |
| 5034 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc */ |
| 5035 | {0xa0, 0x04, ZC3XX_R080_HBLANKHIGH}, /* 00,80,04,cc */ |
| 5036 | {0xa0, 0x05, ZC3XX_R081_HBLANKLOW}, /* 00,81,05,cc */ |
| 5037 | {0xa0, 0x16, ZC3XX_R083_RGAINADDR}, /* 00,83,16,cc */ |
| 5038 | {0xa0, 0x18, ZC3XX_R085_BGAINADDR}, /* 00,85,18,cc */ |
| 5039 | {0xa0, 0x1a, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,1a,cc */ |
| 5040 | {0xa0, 0x1b, ZC3XX_R087_EXPTIMEMID}, /* 00,87,1b,cc */ |
| 5041 | {0xa0, 0x1c, ZC3XX_R088_EXPTIMELOW}, /* 00,88,1c,cc */ |
| 5042 | {0xa0, 0xee, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,ee,cc */ |
| 5043 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, /* 00,08,03,cc */ |
| 5044 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc */ |
| 5045 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc */ |
| 5046 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc */ |
| 5047 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc */ |
| 5048 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc */ |
| 5049 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc */ |
| 5050 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
| 5051 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 5052 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc */ |
| 5053 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc */ |
| 5054 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc */ |
| 5055 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc */ |
| 5056 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e8,cc */ |
| 5057 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5058 | {0xaa, 0x09, 0x00cc}, /* 00,09,cc,aa */ |
| 5059 | {0xaa, 0x0b, 0x0005}, /* 00,0b,05,aa */ |
| 5060 | {0xaa, 0x0d, 0x0058}, /* 00,0d,58,aa */ |
| 5061 | {0xaa, 0x0f, 0x00ed}, /* 00,0f,ed,aa */ |
| 5062 | {0xaa, 0x87, 0x0000}, /* 00,87,00,aa */ |
| 5063 | {0xaa, 0x88, 0x0004}, /* 00,88,04,aa */ |
| 5064 | {0xaa, 0x89, 0x0000}, /* 00,89,00,aa */ |
| 5065 | {0xaa, 0x8a, 0x0005}, /* 00,8a,05,aa */ |
| 5066 | {0xaa, 0x13, 0x0003}, /* 00,13,03,aa */ |
| 5067 | {0xaa, 0x16, 0x0040}, /* 00,16,40,aa */ |
| 5068 | {0xaa, 0x18, 0x0040}, /* 00,18,40,aa */ |
| 5069 | {0xaa, 0x1d, 0x0002}, /* 00,1d,02,aa */ |
| 5070 | {0xaa, 0x29, 0x00e8}, /* 00,29,e8,aa */ |
| 5071 | {0xaa, 0x45, 0x0045}, /* 00,45,45,aa */ |
| 5072 | {0xaa, 0x50, 0x00ed}, /* 00,50,ed,aa */ |
| 5073 | {0xaa, 0x51, 0x0025}, /* 00,51,25,aa */ |
| 5074 | {0xaa, 0x52, 0x0042}, /* 00,52,42,aa */ |
| 5075 | {0xaa, 0x53, 0x002f}, /* 00,53,2f,aa */ |
| 5076 | {0xaa, 0x79, 0x0025}, /* 00,79,25,aa */ |
| 5077 | {0xaa, 0x7b, 0x0000}, /* 00,7b,00,aa */ |
| 5078 | {0xaa, 0x7e, 0x0025}, /* 00,7e,25,aa */ |
| 5079 | {0xaa, 0x7f, 0x0025}, /* 00,7f,25,aa */ |
| 5080 | {0xaa, 0x21, 0x0000}, /* 00,21,00,aa */ |
| 5081 | {0xaa, 0x33, 0x0036}, /* 00,33,36,aa */ |
| 5082 | {0xaa, 0x36, 0x0060}, /* 00,36,60,aa */ |
| 5083 | {0xaa, 0x37, 0x0008}, /* 00,37,08,aa */ |
| 5084 | {0xaa, 0x3b, 0x0031}, /* 00,3b,31,aa */ |
| 5085 | {0xaa, 0x44, 0x000f}, /* 00,44,0f,aa */ |
| 5086 | {0xaa, 0x58, 0x0002}, /* 00,58,02,aa */ |
| 5087 | {0xaa, 0x66, 0x00c0}, /* 00,66,c0,aa */ |
| 5088 | {0xaa, 0x67, 0x0044}, /* 00,67,44,aa */ |
| 5089 | {0xaa, 0x6b, 0x00a0}, /* 00,6b,a0,aa */ |
| 5090 | {0xaa, 0x6c, 0x0054}, /* 00,6c,54,aa */ |
| 5091 | {0xaa, 0xd6, 0x0007}, /* 00,d6,07,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5092 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,f7,cc */ |
| 5093 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc */ |
| 5094 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc */ |
| 5095 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, /* 01,89,06,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5096 | {0xa0, 0x00, 0x01ad}, /* 01,ad,00,cc */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5097 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc */ |
| 5098 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc */ |
| 5099 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc */ |
| 5100 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc */ |
| 5101 | {0xa0, 0x7a, ZC3XX_R116_RGAIN}, /* 01,16,7a,cc */ |
| 5102 | {0xa0, 0x4a, ZC3XX_R118_BGAIN}, /* 01,18,4a,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5103 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5104 | }; |
| 5105 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5106 | static const struct usb_action po2030_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5107 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 5108 | {0xaa, 0x1a, 0x0001}, /* 00,1a,01,aa */ |
| 5109 | {0xaa, 0x1b, 0x000a}, /* 00,1b,0a,aa */ |
| 5110 | {0xaa, 0x1c, 0x00b0}, /* 00,1c,b0,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5111 | {0xa0, 0x05, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,05,cc */ |
| 5112 | {0xa0, 0x35, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,35,cc */ |
| 5113 | {0xa0, 0x70, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,70,cc */ |
| 5114 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5115 | {0xa0, 0x85, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,85,cc */ |
| 5116 | {0xa0, 0x58, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,58,cc */ |
| 5117 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 5118 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
| 5119 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
| 5120 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 5121 | {0xa0, 0x22, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,22,cc */ |
| 5122 | {0xa0, 0x88, ZC3XX_R18D_YTARGET}, /* 01,8d,88,cc */ |
| 5123 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc */ |
| 5124 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5125 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5126 | }; |
| 5127 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5128 | static const struct usb_action po2030_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5129 | {0xaa, 0x8d, 0x0008}, /* 00,8d,08,aa */ |
| 5130 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 5131 | {0xaa, 0x1b, 0x00de}, /* 00,1b,de,aa */ |
| 5132 | {0xaa, 0x1c, 0x0040}, /* 00,1c,40,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5133 | {0xa0, 0x08, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,08,cc */ |
| 5134 | {0xa0, 0xae, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,ae,cc */ |
| 5135 | {0xa0, 0x80, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,80,cc */ |
| 5136 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5137 | {0xa0, 0x6f, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,6f,cc */ |
| 5138 | {0xa0, 0x20, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,20,cc */ |
| 5139 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0c,cc */ |
| 5140 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,18,cc */ |
| 5141 | {0xa0, 0x60, ZC3XX_R1A8_DIGITALGAIN}, /* 01,a8,60,cc */ |
| 5142 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc */ |
| 5143 | {0xa0, 0x22, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,22,cc */ |
| 5144 | {0xa0, 0x88, ZC3XX_R18D_YTARGET}, /* 01,8d,88,cc */ |
| 5145 | /* win: 01,8d,80 */ |
| 5146 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc */ |
| 5147 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5148 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5149 | }; |
| 5150 | |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5151 | static const struct usb_action po2030_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5152 | {0xa0, 0x02, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,02,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5153 | {0xaa, 0x8d, 0x000d}, /* 00,8d,0d,aa */ |
| 5154 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa */ |
| 5155 | {0xaa, 0x1b, 0x0002}, /* 00,1b,02,aa */ |
| 5156 | {0xaa, 0x1c, 0x0078}, /* 00,1c,78,aa */ |
| 5157 | {0xaa, 0x46, 0x0000}, /* 00,46,00,aa */ |
| 5158 | {0xaa, 0x15, 0x0000}, /* 00,15,00,aa */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5159 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5160 | }; |
| 5161 | |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5162 | static const struct usb_action tas5130c_InitialScale[] = { /* 320x240 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5163 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 5164 | {0xa0, 0x50, ZC3XX_R002_CLOCKSELECT}, |
| 5165 | {0xa0, 0x03, ZC3XX_R008_CLOCKSETTING}, |
| 5166 | {0xa0, 0x02, ZC3XX_R010_CMOSSENSORSELECT}, |
| 5167 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5168 | {0xa0, 0x00, ZC3XX_R001_SYSTEMOPERATING}, |
| 5169 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 5170 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5171 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5172 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 5173 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 5174 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 5175 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5176 | |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5177 | {0xa0, 0x04, ZC3XX_R098_WINYSTARTLOW}, |
| 5178 | {0xa0, 0x0f, ZC3XX_R09A_WINXSTARTLOW}, |
| 5179 | {0xa0, 0x04, ZC3XX_R11A_FIRSTYLOW}, |
| 5180 | {0xa0, 0x0f, ZC3XX_R11C_FIRSTXLOW}, |
| 5181 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, |
| 5182 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 5183 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, |
| 5184 | {0xa0, 0x06, ZC3XX_R08D_COMPABILITYMODE}, |
| 5185 | {0xa0, 0xf7, ZC3XX_R101_SENSORCORRECTION}, |
| 5186 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 5187 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5188 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5189 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5190 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5191 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 5192 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 5193 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 5194 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5195 | {0xa0, 0x07, ZC3XX_R0A5_EXPOSUREGAIN}, |
| 5196 | {0xa0, 0x02, ZC3XX_R0A6_EXPOSUREBLACKLVL}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5197 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5198 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5199 | static const struct usb_action tas5130c_Initial[] = { /* 640x480 */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5200 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, |
| 5201 | {0xa0, 0x40, ZC3XX_R002_CLOCKSELECT}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5202 | {0xa0, 0x00, ZC3XX_R008_CLOCKSETTING}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5203 | {0xa0, 0x02, ZC3XX_R010_CMOSSENSORSELECT}, |
| 5204 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5205 | {0xa0, 0x00, ZC3XX_R001_SYSTEMOPERATING}, |
| 5206 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, |
| 5207 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, |
| 5208 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5209 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, |
| 5210 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, |
| 5211 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, |
| 5212 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, |
| 5213 | {0xa0, 0x05, ZC3XX_R098_WINYSTARTLOW}, |
| 5214 | {0xa0, 0x0f, ZC3XX_R09A_WINXSTARTLOW}, |
| 5215 | {0xa0, 0x05, ZC3XX_R11A_FIRSTYLOW}, |
| 5216 | {0xa0, 0x0f, ZC3XX_R11C_FIRSTXLOW}, |
| 5217 | {0xa0, 0xe6, ZC3XX_R09C_WINHEIGHTLOW}, |
| 5218 | {0xa0, 0x02, ZC3XX_R09D_WINWIDTHHIGH}, |
| 5219 | {0xa0, 0x86, ZC3XX_R09E_WINWIDTHLOW}, |
| 5220 | {0xa0, 0x06, ZC3XX_R08D_COMPABILITYMODE}, |
| 5221 | {0xa0, 0x37, ZC3XX_R101_SENSORCORRECTION}, |
| 5222 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, |
| 5223 | {0xa0, 0x06, ZC3XX_R189_AWBSTATUS}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5224 | {0xa0, 0x70, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5225 | {0xa0, 0x50, ZC3XX_R1A8_DIGITALGAIN}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5226 | {0xa0, 0x00, 0x01ad}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5227 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, |
| 5228 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, |
| 5229 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, |
| 5230 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 5231 | {0xa0, 0x07, ZC3XX_R0A5_EXPOSUREGAIN}, |
| 5232 | {0xa0, 0x02, ZC3XX_R0A6_EXPOSUREBLACKLVL}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5233 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5234 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5235 | static const struct usb_action tas5130c_50HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5236 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5237 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5238 | {0xaa, 0xa4, 0x0063}, /* 00,a4,63,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5239 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5240 | {0xa0, 0x63, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,63,cc */ |
| 5241 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5242 | {0xa0, 0x04, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5243 | {0xa0, 0xfe, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5244 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5245 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5246 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,47,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5247 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5248 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5249 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5250 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5251 | {0xa0, 0xd3, ZC3XX_R01D_HSYNC_0}, /* 00,1d,d3,cc */ |
| 5252 | {0xa0, 0xda, ZC3XX_R01E_HSYNC_1}, /* 00,1e,da,cc */ |
| 5253 | {0xa0, 0xea, ZC3XX_R01F_HSYNC_2}, /* 00,1f,ea,cc */ |
| 5254 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5255 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5256 | {0xa0, 0x4c, ZC3XX_R0A0_MAXXLOW}, |
| 5257 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5258 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5259 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5260 | static const struct usb_action tas5130c_50HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5261 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5262 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5263 | {0xaa, 0xa4, 0x0077}, /* 00,a4,77,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5264 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5265 | {0xa0, 0x77, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,77,cc */ |
| 5266 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5267 | {0xa0, 0x07, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5268 | {0xa0, 0xd0, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5269 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5270 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5271 | {0xa0, 0x7d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,7d,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5272 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5273 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5274 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5275 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5276 | {0xa0, 0xf0, ZC3XX_R01D_HSYNC_0}, /* 00,1d,f0,cc */ |
| 5277 | {0xa0, 0xf4, ZC3XX_R01E_HSYNC_1}, /* 00,1e,f4,cc */ |
| 5278 | {0xa0, 0xf8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,f8,cc */ |
| 5279 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5280 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5281 | {0xa0, 0xc0, ZC3XX_R0A0_MAXXLOW}, |
| 5282 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5283 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5284 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5285 | static const struct usb_action tas5130c_60HZ[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5286 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5287 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5288 | {0xaa, 0xa4, 0x0036}, /* 00,a4,36,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5289 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5290 | {0xa0, 0x36, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,36,cc */ |
| 5291 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5292 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5293 | {0xa0, 0x54, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5294 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5295 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5296 | {0xa0, 0x3e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,3e,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5297 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5298 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5299 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5300 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5301 | {0xa0, 0xca, ZC3XX_R01D_HSYNC_0}, /* 00,1d,ca,cc */ |
| 5302 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5303 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5304 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5305 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5306 | {0xa0, 0x28, ZC3XX_R0A0_MAXXLOW}, |
| 5307 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5308 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5309 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5310 | static const struct usb_action tas5130c_60HZScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5311 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5312 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5313 | {0xaa, 0xa4, 0x0077}, /* 00,a4,77,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5314 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5315 | {0xa0, 0x77, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,77,cc */ |
| 5316 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5317 | {0xa0, 0x09, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5318 | {0xa0, 0x47, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5319 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc */ |
| 5320 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc */ |
| 5321 | {0xa0, 0x7d, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,7d,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5322 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5323 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
| 5324 | {0xa0, 0x08, ZC3XX_R1A9_DIGITALLIMITDIFF}, |
| 5325 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5326 | {0xa0, 0xc8, ZC3XX_R01D_HSYNC_0}, /* 00,1d,c8,cc */ |
| 5327 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5328 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5329 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5330 | {0xa0, 0x03, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,03,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5331 | {0xa0, 0x20, ZC3XX_R0A0_MAXXLOW}, |
| 5332 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5333 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5334 | }; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5335 | static const struct usb_action tas5130c_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5336 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5337 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5338 | {0xaa, 0xa4, 0x0040}, /* 00,a4,40,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5339 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5340 | {0xa0, 0x40, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,40,cc */ |
| 5341 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5342 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5343 | {0xa0, 0xa0, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 5344 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 5345 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 5346 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 5347 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5348 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5349 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 5350 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 5351 | {0xa0, 0xbc, ZC3XX_R01D_HSYNC_0}, /* 00,1d,bc,cc */ |
| 5352 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5353 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5354 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5355 | {0xa0, 0x02, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,02,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5356 | {0xa0, 0xf0, ZC3XX_R0A0_MAXXLOW}, |
| 5357 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5358 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5359 | }; |
| 5360 | |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5361 | static const struct usb_action tas5130c_NoFlikerScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5362 | {0xa0, 0x00, ZC3XX_R019_AUTOADJUSTFPS}, /* 00,19,00,cc */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5363 | {0xaa, 0xa3, 0x0001}, /* 00,a3,01,aa */ |
| 5364 | {0xaa, 0xa4, 0x0090}, /* 00,a4,90,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5365 | {0xa0, 0x01, ZC3XX_R0A3_EXPOSURETIMEHIGH}, /* 00,a3,01,cc */ |
| 5366 | {0xa0, 0x90, ZC3XX_R0A4_EXPOSURETIMELOW}, /* 00,a4,90,cc */ |
| 5367 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5368 | {0xa0, 0x0a, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5369 | {0xa0, 0x00, ZC3XX_R192_EXPOSURELIMITLOW}, |
| 5370 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, |
| 5371 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, |
| 5372 | {0xa0, 0x04, ZC3XX_R197_ANTIFLICKERLOW}, |
| 5373 | {0xa0, 0x0c, ZC3XX_R18C_AEFREEZE}, |
| 5374 | {0xa0, 0x18, ZC3XX_R18F_AEUNFREEZE}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5375 | {0xa0, 0x00, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,00,cc */ |
| 5376 | {0xa0, 0x00, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,00,cc */ |
| 5377 | {0xa0, 0xbc, ZC3XX_R01D_HSYNC_0}, /* 00,1d,bc,cc */ |
| 5378 | {0xa0, 0xd0, ZC3XX_R01E_HSYNC_1}, /* 00,1e,d0,cc */ |
| 5379 | {0xa0, 0xe0, ZC3XX_R01F_HSYNC_2}, /* 00,1f,e0,cc */ |
| 5380 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc */ |
| 5381 | {0xa0, 0x02, ZC3XX_R09F_MAXXHIGH}, /* 00,9f,02,cc */ |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5382 | {0xa0, 0xf0, ZC3XX_R0A0_MAXXLOW}, |
| 5383 | {0xa0, 0x50, ZC3XX_R11D_GLOBALGAIN}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5384 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5385 | }; |
| 5386 | |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5387 | /* from usbvm305.inf 0ac8:305b 07/06/15 (3 - tas5130c) */ |
| 5388 | static const struct usb_action gc0303_Initial[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5389 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc, */ |
| 5390 | {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, /* 00,08,02,cc, */ |
| 5391 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5392 | {0xa0, 0x00, ZC3XX_R002_CLOCKSELECT}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5393 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc, */ |
| 5394 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc, */ |
| 5395 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc, */ |
| 5396 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc, */ |
| 5397 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
| 5398 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc, */ |
| 5399 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc, */ |
| 5400 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc, */ |
| 5401 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc, */ |
| 5402 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc, */ |
| 5403 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc, */ |
| 5404 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc, */ |
| 5405 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e6,cc, |
| 5406 | * 6<->8 */ |
| 5407 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,86,cc, |
| 5408 | * 6<->8 */ |
| 5409 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, /* 00,87,10,cc, */ |
| 5410 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5411 | {0xaa, 0x01, 0x0000}, |
| 5412 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */ |
| 5413 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5414 | {0xaa, 0x1b, 0x0000}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5415 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc, */ |
| 5416 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc, */ |
| 5417 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5418 | {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5419 | {0xaa, 0x0a, 0x0002}, |
| 5420 | {0xaa, 0x0b, 0x0000}, |
| 5421 | {0xaa, 0x0c, 0x0002}, |
| 5422 | {0xaa, 0x0d, 0x0000}, |
| 5423 | {0xaa, 0x0e, 0x0002}, |
| 5424 | {0xaa, 0x0f, 0x0000}, |
| 5425 | {0xaa, 0x10, 0x0002}, |
| 5426 | {0xaa, 0x11, 0x0000}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5427 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */ |
| 5428 | {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa, (e6 -> e8) */ |
| 5429 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */ |
| 5430 | {0xaa, 0x19, 0x0088}, /* 00,19,86,aa, */ |
| 5431 | {0xaa, 0x20, 0x0020}, /* 00,20,20,aa, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5432 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc, */ |
| 5433 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc, */ |
| 5434 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc, */ |
| 5435 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc, */ |
| 5436 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc, */ |
| 5437 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc, */ |
| 5438 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc, */ |
| 5439 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc, */ |
| 5440 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5441 | {0xa0, 0x58, ZC3XX_R1A8_DIGITALGAIN}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5442 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, /* 01,16,61,cc, */ |
| 5443 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, /* 01,18,65,cc */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5444 | {0xaa, 0x1b, 0x0000}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5445 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5446 | }; |
| 5447 | |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5448 | static const struct usb_action gc0303_InitialScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5449 | {0xa0, 0x01, ZC3XX_R000_SYSTEMCONTROL}, /* 00,00,01,cc, */ |
| 5450 | {0xa0, 0x02, ZC3XX_R008_CLOCKSETTING}, /* 00,08,02,cc, */ |
| 5451 | {0xa0, 0x01, ZC3XX_R010_CMOSSENSORSELECT}, /* 00,10,01,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5452 | {0xa0, 0x10, ZC3XX_R002_CLOCKSELECT}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5453 | {0xa0, 0x02, ZC3XX_R003_FRAMEWIDTHHIGH}, /* 00,03,02,cc, */ |
| 5454 | {0xa0, 0x80, ZC3XX_R004_FRAMEWIDTHLOW}, /* 00,04,80,cc, */ |
| 5455 | {0xa0, 0x01, ZC3XX_R005_FRAMEHEIGHTHIGH}, /* 00,05,01,cc, */ |
| 5456 | {0xa0, 0xe0, ZC3XX_R006_FRAMEHEIGHTLOW}, /* 00,06,e0,cc, */ |
| 5457 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
| 5458 | {0xa0, 0x01, ZC3XX_R001_SYSTEMOPERATING}, /* 00,01,01,cc, */ |
| 5459 | {0xa0, 0x03, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,03,cc, */ |
| 5460 | {0xa0, 0x01, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,01,cc, */ |
| 5461 | {0xa0, 0x00, ZC3XX_R098_WINYSTARTLOW}, /* 00,98,00,cc, */ |
| 5462 | {0xa0, 0x00, ZC3XX_R09A_WINXSTARTLOW}, /* 00,9a,00,cc, */ |
| 5463 | {0xa0, 0x00, ZC3XX_R11A_FIRSTYLOW}, /* 01,1a,00,cc, */ |
| 5464 | {0xa0, 0x00, ZC3XX_R11C_FIRSTXLOW}, /* 01,1c,00,cc, */ |
| 5465 | {0xa0, 0xe8, ZC3XX_R09C_WINHEIGHTLOW}, /* 00,9c,e8,cc, |
| 5466 | * 8<->6 */ |
| 5467 | {0xa0, 0x88, ZC3XX_R09E_WINWIDTHLOW}, /* 00,9e,88,cc, |
| 5468 | * 8<->6 */ |
| 5469 | {0xa0, 0x10, ZC3XX_R087_EXPTIMEMID}, /* 00,87,10,cc, */ |
| 5470 | {0xa0, 0x98, ZC3XX_R08B_I2CDEVICEADDR}, /* 00,8b,98,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5471 | {0xaa, 0x01, 0x0000}, |
| 5472 | {0xaa, 0x1a, 0x0000}, /* 00,1a,00,aa, */ |
| 5473 | {0xaa, 0x1c, 0x0017}, /* 00,1c,17,aa, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5474 | {0xaa, 0x1b, 0x0000}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5475 | {0xa0, 0x82, ZC3XX_R086_EXPTIMEHIGH}, /* 00,86,82,cc, */ |
| 5476 | {0xa0, 0x83, ZC3XX_R087_EXPTIMEMID}, /* 00,87,83,cc, */ |
| 5477 | {0xa0, 0x84, ZC3XX_R088_EXPTIMELOW}, /* 00,88,84,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5478 | {0xaa, 0x05, 0x0010}, /* 00,05,10,aa, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5479 | {0xaa, 0x0a, 0x0001}, |
| 5480 | {0xaa, 0x0b, 0x0000}, |
| 5481 | {0xaa, 0x0c, 0x0001}, |
| 5482 | {0xaa, 0x0d, 0x0000}, |
| 5483 | {0xaa, 0x0e, 0x0001}, |
| 5484 | {0xaa, 0x0f, 0x0000}, |
| 5485 | {0xaa, 0x10, 0x0001}, |
| 5486 | {0xaa, 0x11, 0x0000}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5487 | {0xaa, 0x16, 0x0001}, /* 00,16,01,aa, */ |
| 5488 | {0xaa, 0x17, 0x00e8}, /* 00,17,e6,aa (e6 -> e8) */ |
| 5489 | {0xaa, 0x18, 0x0002}, /* 00,18,02,aa, */ |
| 5490 | {0xaa, 0x19, 0x0088}, /* 00,19,88,aa, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5491 | {0xa0, 0xb7, ZC3XX_R101_SENSORCORRECTION}, /* 01,01,b7,cc, */ |
| 5492 | {0xa0, 0x05, ZC3XX_R012_VIDEOCONTROLFUNC}, /* 00,12,05,cc, */ |
| 5493 | {0xa0, 0x0d, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0d,cc, */ |
| 5494 | {0xa0, 0x76, ZC3XX_R189_AWBSTATUS}, /* 01,89,76,cc, */ |
| 5495 | {0xa0, 0x09, 0x01ad}, /* 01,ad,09,cc, */ |
| 5496 | {0xa0, 0x03, ZC3XX_R1C5_SHARPNESSMODE}, /* 01,c5,03,cc, */ |
| 5497 | {0xa0, 0x13, ZC3XX_R1CB_SHARPNESS05}, /* 01,cb,13,cc, */ |
| 5498 | {0xa0, 0x08, ZC3XX_R250_DEADPIXELSMODE}, /* 02,50,08,cc, */ |
| 5499 | {0xa0, 0x08, ZC3XX_R301_EEPROMACCESS}, /* 03,01,08,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5500 | {0xa0, 0x58, ZC3XX_R1A8_DIGITALGAIN}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5501 | {0xa0, 0x61, ZC3XX_R116_RGAIN}, /* 01,16,61,cc, */ |
| 5502 | {0xa0, 0x65, ZC3XX_R118_BGAIN}, /* 01,18,65,cc */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5503 | {0xaa, 0x1b, 0x0000}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5504 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5505 | }; |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5506 | static const struct usb_action gc0303_50HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5507 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5508 | {0xaa, 0x83, 0x0001}, /* 00,83,01,aa */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5509 | {0xaa, 0x84, 0x0063}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5510 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5511 | {0xa0, 0x06, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0d,cc, */ |
| 5512 | {0xa0, 0xa8, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc, */ |
| 5513 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5514 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5515 | {0xa0, 0x47, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,47,cc, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5516 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5517 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5518 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5519 | {0xa0, 0x48, ZC3XX_R1AA_DIGITALGAINSTEP}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5520 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5521 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5522 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5523 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5524 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5525 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5526 | {0xa0, 0x7f, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5527 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5528 | }; |
| 5529 | |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5530 | static const struct usb_action gc0303_50HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5531 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5532 | {0xaa, 0x83, 0x0003}, /* 00,83,03,aa */ |
| 5533 | {0xaa, 0x84, 0x0054}, /* 00,84,54,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5534 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5535 | {0xa0, 0x0d, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,0d,cc, */ |
| 5536 | {0xa0, 0x50, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,50,cc, */ |
| 5537 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5538 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5539 | {0xa0, 0x8e, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,8e,cc, */ |
| 5540 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5541 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5542 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5543 | {0xa0, 0x48, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5544 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5545 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5546 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5547 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5548 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5549 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5550 | {0xa0, 0x7f, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5551 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5552 | }; |
| 5553 | |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5554 | static const struct usb_action gc0303_60HZ[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5555 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5556 | {0xaa, 0x83, 0x0000}, |
| 5557 | {0xaa, 0x84, 0x003b}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5558 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5559 | {0xa0, 0x05, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,91,05,cc, */ |
| 5560 | {0xa0, 0x88, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,92,88,cc, */ |
| 5561 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5562 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5563 | {0xa0, 0x3b, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,3b,cc, */ |
| 5564 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5565 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5566 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,a9,10,cc, */ |
| 5567 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,aa,24,cc, */ |
| 5568 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5569 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5570 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5571 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5572 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5573 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5574 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5575 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5576 | }; |
| 5577 | |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5578 | static const struct usb_action gc0303_60HZScale[] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5579 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5580 | {0xaa, 0x83, 0x0000}, |
| 5581 | {0xaa, 0x84, 0x0076}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5582 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
| 5583 | {0xa0, 0x0b, ZC3XX_R191_EXPOSURELIMITMID}, /* 01,1,0b,cc, */ |
| 5584 | {0xa0, 0x10, ZC3XX_R192_EXPOSURELIMITLOW}, /* 01,2,10,cc, */ |
| 5585 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,5,00,cc, */ |
| 5586 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,6,00,cc, */ |
| 5587 | {0xa0, 0x76, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,7,76,cc, */ |
| 5588 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,c,0e,cc, */ |
| 5589 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,f,15,cc, */ |
| 5590 | {0xa0, 0x10, ZC3XX_R1A9_DIGITALLIMITDIFF}, /* 01,9,10,cc, */ |
| 5591 | {0xa0, 0x24, ZC3XX_R1AA_DIGITALGAINSTEP}, /* 01,a,24,cc, */ |
| 5592 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,d,62,cc, */ |
| 5593 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,e,90,cc, */ |
| 5594 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,f,c8,cc, */ |
| 5595 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,0,ff,cc, */ |
| 5596 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,d,58,cc, */ |
| 5597 | {0xa0, 0x42, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,42,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5598 | {0xa0, 0x80, ZC3XX_R18D_YTARGET}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5599 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5600 | }; |
| 5601 | |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5602 | static const struct usb_action gc0303_NoFliker[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5603 | {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5604 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5605 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 5606 | {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5607 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,0,00,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5608 | {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5609 | {0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5610 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5611 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5612 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc, */ |
| 5613 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5614 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5615 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5616 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5617 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5618 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5619 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5620 | {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5621 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5622 | }; |
| 5623 | |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5624 | static const struct usb_action gc0303_NoFlikerScale[] = { |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5625 | {0xa0, 0x0c, ZC3XX_R100_OPERATIONMODE}, /* 01,00,0c,cc, */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5626 | {0xaa, 0x82, 0x0000}, /* 00,82,00,aa */ |
| 5627 | {0xaa, 0x83, 0x0000}, /* 00,83,00,aa */ |
| 5628 | {0xaa, 0x84, 0x0020}, /* 00,84,20,aa */ |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5629 | {0xa0, 0x00, ZC3XX_R190_EXPOSURELIMITHIGH}, /* 01,90,00,cc, */ |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5630 | {0xa0, 0x00, ZC3XX_R191_EXPOSURELIMITMID}, |
| 5631 | {0xa0, 0x48, ZC3XX_R192_EXPOSURELIMITLOW}, |
Mauro Carvalho Chehab | 9a97a2a | 2008-07-15 14:23:08 -0300 | [diff] [blame] | 5632 | {0xa0, 0x00, ZC3XX_R195_ANTIFLICKERHIGH}, /* 01,95,00,cc, */ |
| 5633 | {0xa0, 0x00, ZC3XX_R196_ANTIFLICKERMID}, /* 01,96,00,cc, */ |
| 5634 | {0xa0, 0x10, ZC3XX_R197_ANTIFLICKERLOW}, /* 01,97,10,cc, */ |
| 5635 | {0xa0, 0x0e, ZC3XX_R18C_AEFREEZE}, /* 01,8c,0e,cc, */ |
| 5636 | {0xa0, 0x15, ZC3XX_R18F_AEUNFREEZE}, /* 01,8f,15,cc, */ |
| 5637 | {0xa0, 0x62, ZC3XX_R01D_HSYNC_0}, /* 00,1d,62,cc, */ |
| 5638 | {0xa0, 0x90, ZC3XX_R01E_HSYNC_1}, /* 00,1e,90,cc, */ |
| 5639 | {0xa0, 0xc8, ZC3XX_R01F_HSYNC_2}, /* 00,1f,c8,cc, */ |
| 5640 | {0xa0, 0xff, ZC3XX_R020_HSYNC_3}, /* 00,20,ff,cc, */ |
| 5641 | {0xa0, 0x58, ZC3XX_R11D_GLOBALGAIN}, /* 01,1d,58,cc, */ |
| 5642 | {0xa0, 0x03, ZC3XX_R180_AUTOCORRECTENABLE}, /* 01,80,03,cc */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5643 | {} |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5644 | }; |
| 5645 | |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 5646 | static u8 reg_r_i(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5647 | u16 index) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5648 | { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5649 | int ret; |
| 5650 | |
| 5651 | if (gspca_dev->usb_err < 0) |
| 5652 | return 0; |
| 5653 | ret = usb_control_msg(gspca_dev->dev, |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5654 | usb_rcvctrlpipe(gspca_dev->dev, 0), |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5655 | 0xa1, |
| 5656 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
| 5657 | 0x01, /* value */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5658 | index, gspca_dev->usb_buf, 1, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5659 | 500); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5660 | if (ret < 0) { |
Joe Perches | 133a9fe | 2011-08-21 19:56:57 -0300 | [diff] [blame] | 5661 | pr_err("reg_r_i err %d\n", ret); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5662 | gspca_dev->usb_err = ret; |
| 5663 | return 0; |
| 5664 | } |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5665 | return gspca_dev->usb_buf[0]; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5666 | } |
| 5667 | |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 5668 | static u8 reg_r(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5669 | u16 index) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5670 | { |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 5671 | u8 ret; |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5672 | |
| 5673 | ret = reg_r_i(gspca_dev, index); |
| 5674 | PDEBUG(D_USBI, "reg r [%04x] -> %02x", index, ret); |
| 5675 | return ret; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5676 | } |
| 5677 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5678 | static void reg_w_i(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5679 | u8 value, |
| 5680 | u16 index) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5681 | { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5682 | int ret; |
| 5683 | |
| 5684 | if (gspca_dev->usb_err < 0) |
| 5685 | return; |
| 5686 | ret = usb_control_msg(gspca_dev->dev, |
| 5687 | usb_sndctrlpipe(gspca_dev->dev, 0), |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5688 | 0xa0, |
| 5689 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
| 5690 | value, index, NULL, 0, |
| 5691 | 500); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5692 | if (ret < 0) { |
Joe Perches | 133a9fe | 2011-08-21 19:56:57 -0300 | [diff] [blame] | 5693 | pr_err("reg_w_i err %d\n", ret); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5694 | gspca_dev->usb_err = ret; |
| 5695 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5696 | } |
| 5697 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5698 | static void reg_w(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5699 | u8 value, |
| 5700 | u16 index) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5701 | { |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5702 | PDEBUG(D_USBO, "reg w [%04x] = %02x", index, value); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5703 | reg_w_i(gspca_dev, value, index); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5704 | } |
| 5705 | |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5706 | static u16 i2c_read(struct gspca_dev *gspca_dev, |
| 5707 | u8 reg) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5708 | { |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5709 | u8 retbyte; |
| 5710 | u16 retval; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5711 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5712 | if (gspca_dev->usb_err < 0) |
| 5713 | return 0; |
| 5714 | reg_w_i(gspca_dev, reg, 0x0092); |
| 5715 | reg_w_i(gspca_dev, 0x02, 0x0090); /* <- read command */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5716 | msleep(20); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5717 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5718 | if (retbyte != 0x00) |
Joe Perches | 133a9fe | 2011-08-21 19:56:57 -0300 | [diff] [blame] | 5719 | pr_err("i2c_r status error %02x\n", retbyte); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5720 | retval = reg_r_i(gspca_dev, 0x0095); /* read Lowbyte */ |
| 5721 | retval |= reg_r_i(gspca_dev, 0x0096) << 8; /* read Hightbyte */ |
Jean-Francois Moine | 0b119b7 | 2009-04-07 05:30:31 -0300 | [diff] [blame] | 5722 | PDEBUG(D_USBI, "i2c r [%02x] -> %04x (%02x)", |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5723 | reg, retval, retbyte); |
| 5724 | return retval; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5725 | } |
| 5726 | |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5727 | static u8 i2c_write(struct gspca_dev *gspca_dev, |
| 5728 | u8 reg, |
| 5729 | u8 valL, |
| 5730 | u8 valH) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5731 | { |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5732 | u8 retbyte; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5733 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5734 | if (gspca_dev->usb_err < 0) |
| 5735 | return 0; |
| 5736 | reg_w_i(gspca_dev, reg, 0x92); |
| 5737 | reg_w_i(gspca_dev, valL, 0x93); |
| 5738 | reg_w_i(gspca_dev, valH, 0x94); |
| 5739 | reg_w_i(gspca_dev, 0x01, 0x90); /* <- write command */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5740 | msleep(1); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5741 | retbyte = reg_r_i(gspca_dev, 0x0091); /* read status */ |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5742 | if (retbyte != 0x00) |
Joe Perches | 133a9fe | 2011-08-21 19:56:57 -0300 | [diff] [blame] | 5743 | pr_err("i2c_w status error %02x\n", retbyte); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 5744 | PDEBUG(D_USBO, "i2c w [%02x] = %02x%02x (%02x)", |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5745 | reg, valH, valL, retbyte); |
| 5746 | return retbyte; |
| 5747 | } |
| 5748 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5749 | static void usb_exchange(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5750 | const struct usb_action *action) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5751 | { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5752 | while (action->req) { |
| 5753 | switch (action->req) { |
| 5754 | case 0xa0: /* write register */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5755 | reg_w(gspca_dev, action->val, action->idx); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5756 | break; |
| 5757 | case 0xa1: /* read status */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5758 | reg_r(gspca_dev, action->idx); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5759 | break; |
| 5760 | case 0xaa: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5761 | i2c_write(gspca_dev, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5762 | action->val, /* reg */ |
| 5763 | action->idx & 0xff, /* valL */ |
| 5764 | action->idx >> 8); /* valH */ |
| 5765 | break; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 5766 | case 0xbb: |
| 5767 | i2c_write(gspca_dev, |
| 5768 | action->idx >> 8, /* reg */ |
| 5769 | action->idx & 0xff, /* valL */ |
| 5770 | action->val); /* valH */ |
| 5771 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5772 | default: |
| 5773 | /* case 0xdd: * delay */ |
Jean-François Moine | 7c45f2c | 2011-01-24 15:15:34 -0300 | [diff] [blame] | 5774 | msleep(action->idx); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5775 | break; |
| 5776 | } |
| 5777 | action++; |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 5778 | msleep(1); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5779 | } |
| 5780 | } |
| 5781 | |
| 5782 | static void setmatrix(struct gspca_dev *gspca_dev) |
| 5783 | { |
| 5784 | struct sd *sd = (struct sd *) gspca_dev; |
| 5785 | int i; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5786 | const u8 *matrix; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 5787 | static const u8 adcm2700_matrix[9] = |
Jean-Francois Moine | c675e79 | 2009-01-26 05:29:06 -0300 | [diff] [blame] | 5788 | /* {0x66, 0xed, 0xed, 0xed, 0x66, 0xed, 0xed, 0xed, 0x66}; */ |
| 5789 | /*ms-win*/ |
| 5790 | {0x74, 0xed, 0xed, 0xed, 0x74, 0xed, 0xed, 0xed, 0x74}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5791 | static const u8 gc0305_matrix[9] = |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5792 | {0x50, 0xf8, 0xf8, 0xf8, 0x50, 0xf8, 0xf8, 0xf8, 0x50}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5793 | static const u8 ov7620_matrix[9] = |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5794 | {0x58, 0xf4, 0xf4, 0xf4, 0x58, 0xf4, 0xf4, 0xf4, 0x58}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5795 | static const u8 pas202b_matrix[9] = |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 5796 | {0x4c, 0xf5, 0xff, 0xf9, 0x51, 0xf5, 0xfb, 0xed, 0x5f}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5797 | static const u8 po2030_matrix[9] = |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5798 | {0x60, 0xf0, 0xf0, 0xf0, 0x60, 0xf0, 0xf0, 0xf0, 0x60}; |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 5799 | static const u8 tas5130c_matrix[9] = |
| 5800 | {0x68, 0xec, 0xec, 0xec, 0x68, 0xec, 0xec, 0xec, 0x68}; |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 5801 | static const u8 gc0303_matrix[9] = |
Jean-François Moine | 885f3ca | 2011-11-30 06:48:38 -0300 | [diff] [blame] | 5802 | {0x6c, 0xea, 0xea, 0xea, 0x6c, 0xea, 0xea, 0xea, 0x6c}; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5803 | static const u8 *matrix_tb[SENSOR_MAX] = { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5804 | [SENSOR_ADCM2700] = adcm2700_matrix, |
| 5805 | [SENSOR_CS2102] = ov7620_matrix, |
| 5806 | [SENSOR_CS2102K] = NULL, |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 5807 | [SENSOR_GC0303] = gc0303_matrix, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5808 | [SENSOR_GC0305] = gc0305_matrix, |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 5809 | [SENSOR_HDCS2020] = NULL, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5810 | [SENSOR_HV7131B] = NULL, |
Jean-François Moine | 3d24406 | 2011-01-24 16:22:11 -0300 | [diff] [blame] | 5811 | [SENSOR_HV7131R] = po2030_matrix, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5812 | [SENSOR_ICM105A] = po2030_matrix, |
| 5813 | [SENSOR_MC501CB] = NULL, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 5814 | [SENSOR_MT9V111_1] = gc0305_matrix, |
| 5815 | [SENSOR_MT9V111_3] = gc0305_matrix, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5816 | [SENSOR_OV7620] = ov7620_matrix, |
| 5817 | [SENSOR_OV7630C] = NULL, |
| 5818 | [SENSOR_PAS106] = NULL, |
| 5819 | [SENSOR_PAS202B] = pas202b_matrix, |
| 5820 | [SENSOR_PB0330] = gc0305_matrix, |
| 5821 | [SENSOR_PO2030] = po2030_matrix, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5822 | [SENSOR_TAS5130C] = tas5130c_matrix, |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 5823 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5824 | |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 5825 | matrix = matrix_tb[sd->sensor]; |
| 5826 | if (matrix == NULL) |
| 5827 | return; /* matrix already loaded */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5828 | for (i = 0; i < ARRAY_SIZE(ov7620_matrix); i++) |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5829 | reg_w(gspca_dev, matrix[i], 0x010a + i); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5830 | } |
| 5831 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5832 | static void setsharpness(struct gspca_dev *gspca_dev) |
| 5833 | { |
| 5834 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5835 | int sharpness; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5836 | static const u8 sharpness_tb[][2] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5837 | {0x02, 0x03}, |
| 5838 | {0x04, 0x07}, |
| 5839 | {0x08, 0x0f}, |
| 5840 | {0x10, 0x1e} |
| 5841 | }; |
| 5842 | |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 5843 | sharpness = sd->ctrls[SHARPNESS].val; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5844 | reg_w(gspca_dev, sharpness_tb[sharpness][0], 0x01c6); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 5845 | reg_r(gspca_dev, 0x01c8); |
| 5846 | reg_r(gspca_dev, 0x01c9); |
| 5847 | reg_r(gspca_dev, 0x01ca); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5848 | reg_w(gspca_dev, sharpness_tb[sharpness][1], 0x01cb); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5849 | } |
| 5850 | |
| 5851 | static void setcontrast(struct gspca_dev *gspca_dev) |
| 5852 | { |
| 5853 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 5854 | const u8 *Tgamma; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5855 | int g, i, brightness, contrast, adj, gp1, gp2; |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5856 | u8 gr[16]; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5857 | static const u8 delta_b[16] = /* delta for brightness */ |
| 5858 | {0x50, 0x38, 0x2d, 0x28, 0x24, 0x21, 0x1e, 0x1d, |
| 5859 | 0x1d, 0x1b, 0x1b, 0x1b, 0x19, 0x18, 0x18, 0x18}; |
| 5860 | static const u8 delta_c[16] = /* delta for contrast */ |
Jean-François Moine | a856753 | 2010-04-25 15:25:42 -0300 | [diff] [blame] | 5861 | {0x2c, 0x1a, 0x12, 0x0c, 0x0a, 0x06, 0x06, 0x06, |
| 5862 | 0x04, 0x06, 0x04, 0x04, 0x03, 0x03, 0x02, 0x02}; |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5863 | static const u8 gamma_tb[6][16] = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5864 | {0x00, 0x00, 0x03, 0x0d, 0x1b, 0x2e, 0x45, 0x5f, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5865 | 0x79, 0x93, 0xab, 0xc1, 0xd4, 0xe5, 0xf3, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5866 | {0x01, 0x0c, 0x1f, 0x3a, 0x53, 0x6d, 0x85, 0x9c, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5867 | 0xb0, 0xc2, 0xd1, 0xde, 0xe9, 0xf2, 0xf9, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5868 | {0x04, 0x16, 0x30, 0x4e, 0x68, 0x81, 0x98, 0xac, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5869 | 0xbe, 0xcd, 0xda, 0xe4, 0xed, 0xf5, 0xfb, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5870 | {0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5871 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5872 | {0x20, 0x4b, 0x6e, 0x8d, 0xa3, 0xb5, 0xc5, 0xd2, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5873 | 0xdc, 0xe5, 0xec, 0xf2, 0xf6, 0xfa, 0xfd, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5874 | {0x24, 0x44, 0x64, 0x84, 0x9d, 0xb2, 0xc4, 0xd3, |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5875 | 0xe0, 0xeb, 0xf4, 0xff, 0xff, 0xff, 0xff, 0xff}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5876 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5877 | |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 5878 | Tgamma = gamma_tb[sd->ctrls[GAMMA].val - 1]; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5879 | |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 5880 | contrast = ((int) sd->ctrls[CONTRAST].val - 128); /* -128 / 127 */ |
| 5881 | brightness = ((int) sd->ctrls[BRIGHTNESS].val - 128); /* -128 / 92 */ |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5882 | adj = 0; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5883 | gp1 = gp2 = 0; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5884 | for (i = 0; i < 16; i++) { |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5885 | g = Tgamma[i] + delta_b[i] * brightness / 256 |
| 5886 | - delta_c[i] * contrast / 256 - adj / 2; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5887 | if (g > 0xff) |
| 5888 | g = 0xff; |
Jean-François Moine | a856753 | 2010-04-25 15:25:42 -0300 | [diff] [blame] | 5889 | else if (g < 0) |
| 5890 | g = 0; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5891 | reg_w(gspca_dev, g, 0x0120 + i); /* gamma */ |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5892 | if (contrast > 0) |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5893 | adj--; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5894 | else if (contrast < 0) |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5895 | adj++; |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5896 | if (i > 1) |
| 5897 | gr[i - 1] = (g - gp2) / 2; |
| 5898 | else if (i != 0) |
| 5899 | gr[0] = gp1 == 0 ? 0 : (g - gp1); |
| 5900 | gp2 = gp1; |
| 5901 | gp1 = g; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5902 | } |
Jean-François Moine | a9dfc01 | 2010-06-04 06:21:48 -0300 | [diff] [blame] | 5903 | gr[15] = (0xff - gp2) / 2; |
Jean-Francois Moine | fd18046 | 2010-01-04 15:54:59 -0300 | [diff] [blame] | 5904 | for (i = 0; i < 16; i++) |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5905 | reg_w(gspca_dev, gr[i], 0x0130 + i); /* gradient */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5906 | } |
| 5907 | |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 5908 | static void getexposure(struct gspca_dev *gspca_dev) |
| 5909 | { |
| 5910 | struct sd *sd = (struct sd *) gspca_dev; |
| 5911 | |
| 5912 | sd->ctrls[EXPOSURE].val = (i2c_read(gspca_dev, 0x25) << 9) |
| 5913 | | (i2c_read(gspca_dev, 0x26) << 1) |
| 5914 | | (i2c_read(gspca_dev, 0x27) >> 7); |
| 5915 | } |
| 5916 | |
| 5917 | static void setexposure(struct gspca_dev *gspca_dev) |
| 5918 | { |
| 5919 | struct sd *sd = (struct sd *) gspca_dev; |
| 5920 | int val; |
| 5921 | |
| 5922 | val = sd->ctrls[EXPOSURE].val; |
| 5923 | i2c_write(gspca_dev, 0x25, val >> 9, 0x00); |
| 5924 | i2c_write(gspca_dev, 0x26, val >> 1, 0x00); |
| 5925 | i2c_write(gspca_dev, 0x27, val << 7, 0x00); |
| 5926 | } |
| 5927 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5928 | static void setquality(struct gspca_dev *gspca_dev) |
| 5929 | { |
| 5930 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 5931 | s8 reg07; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5932 | |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 5933 | reg07 = 0; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5934 | switch (sd->sensor) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5935 | case SENSOR_OV7620: |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 5936 | reg07 = 0x30; |
| 5937 | break; |
Jean-François Moine | f180190 | 2012-02-27 07:48:32 -0300 | [diff] [blame^] | 5938 | case SENSOR_HV7131R: |
| 5939 | case SENSOR_PAS202B: |
| 5940 | return; /* done by work queue */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5941 | } |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 5942 | reg_w(gspca_dev, sd->reg08, ZC3XX_R008_CLOCKSETTING); |
| 5943 | if (reg07 != 0) |
| 5944 | reg_w(gspca_dev, reg07, 0x0007); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5945 | } |
| 5946 | |
| 5947 | /* Matches the sensor's internal frame rate to the lighting frequency. |
| 5948 | * Valid frequencies are: |
| 5949 | * 50Hz, for European and Asian lighting (default) |
| 5950 | * 60Hz, for American lighting |
| 5951 | * 0 = No Fliker (for outdoore usage) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5952 | */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 5953 | static void setlightfreq(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 5954 | { |
| 5955 | struct sd *sd = (struct sd *) gspca_dev; |
| 5956 | int i, mode; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 5957 | const struct usb_action *zc3_freq; |
| 5958 | static const struct usb_action *freq_tb[SENSOR_MAX][6] = { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5959 | [SENSOR_ADCM2700] = |
Jean-Francois Moine | c314b53 | 2009-01-20 10:02:35 -0300 | [diff] [blame] | 5960 | {adcm2700_NoFliker, adcm2700_NoFliker, |
| 5961 | adcm2700_50HZ, adcm2700_50HZ, |
| 5962 | adcm2700_60HZ, adcm2700_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5963 | [SENSOR_CS2102] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5964 | {cs2102_NoFliker, cs2102_NoFlikerScale, |
| 5965 | cs2102_50HZ, cs2102_50HZScale, |
| 5966 | cs2102_60HZ, cs2102_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5967 | [SENSOR_CS2102K] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5968 | {cs2102_NoFliker, cs2102_NoFlikerScale, |
Costantino Leandro | 5be8b73e | 2008-09-09 04:32:46 -0300 | [diff] [blame] | 5969 | NULL, NULL, /* currently disabled */ |
| 5970 | NULL, NULL}, |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 5971 | [SENSOR_GC0303] = |
| 5972 | {gc0303_NoFliker, gc0303_NoFlikerScale, |
| 5973 | gc0303_50HZ, gc0303_50HZScale, |
| 5974 | gc0303_60HZ, gc0303_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5975 | [SENSOR_GC0305] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5976 | {gc0305_NoFliker, gc0305_NoFliker, |
| 5977 | gc0305_50HZ, gc0305_50HZ, |
| 5978 | gc0305_60HZ, gc0305_60HZ}, |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 5979 | [SENSOR_HDCS2020] = |
| 5980 | {hdcs2020_NoFliker, hdcs2020_NoFliker, |
| 5981 | hdcs2020_50HZ, hdcs2020_50HZ, |
| 5982 | hdcs2020_60HZ, hdcs2020_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5983 | [SENSOR_HV7131B] = |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5984 | {hv7131b_NoFliker, hv7131b_NoFlikerScale, |
| 5985 | hv7131b_50HZ, hv7131b_50HZScale, |
| 5986 | hv7131b_60HZ, hv7131b_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5987 | [SENSOR_HV7131R] = |
Jean-François Moine | 2af0b4c | 2010-08-04 07:12:57 -0300 | [diff] [blame] | 5988 | {hv7131r_NoFliker, hv7131r_NoFlikerScale, |
| 5989 | hv7131r_50HZ, hv7131r_50HZScale, |
| 5990 | hv7131r_60HZ, hv7131r_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5991 | [SENSOR_ICM105A] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 5992 | {icm105a_NoFliker, icm105a_NoFlikerScale, |
| 5993 | icm105a_50HZ, icm105a_50HZScale, |
| 5994 | icm105a_60HZ, icm105a_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 5995 | [SENSOR_MC501CB] = |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 5996 | {mc501cb_NoFliker, mc501cb_NoFlikerScale, |
| 5997 | mc501cb_50HZ, mc501cb_50HZScale, |
| 5998 | mc501cb_60HZ, mc501cb_60HZScale}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 5999 | [SENSOR_MT9V111_1] = |
| 6000 | {mt9v111_1_AENoFliker, mt9v111_1_AENoFlikerScale, |
| 6001 | mt9v111_1_AE50HZ, mt9v111_1_AE50HZScale, |
| 6002 | mt9v111_1_AE60HZ, mt9v111_1_AE60HZScale}, |
| 6003 | [SENSOR_MT9V111_3] = |
| 6004 | {mt9v111_3_AENoFliker, mt9v111_3_AENoFlikerScale, |
| 6005 | mt9v111_3_AE50HZ, mt9v111_3_AE50HZScale, |
| 6006 | mt9v111_3_AE60HZ, mt9v111_3_AE60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6007 | [SENSOR_OV7620] = |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 6008 | {ov7620_NoFliker, ov7620_NoFliker, |
| 6009 | ov7620_50HZ, ov7620_50HZ, |
| 6010 | ov7620_60HZ, ov7620_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6011 | [SENSOR_OV7630C] = |
Harvey Harrison | efab821 | 2008-07-05 06:12:47 -0300 | [diff] [blame] | 6012 | {NULL, NULL, |
| 6013 | NULL, NULL, |
| 6014 | NULL, NULL}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6015 | [SENSOR_PAS106] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 6016 | {pas106b_NoFliker, pas106b_NoFliker, |
| 6017 | pas106b_50HZ, pas106b_50HZ, |
| 6018 | pas106b_60HZ, pas106b_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6019 | [SENSOR_PAS202B] = |
Jean-François Moine | a6a86f0d | 2010-04-25 14:57:10 -0300 | [diff] [blame] | 6020 | {pas202b_NoFliker, pas202b_NoFlikerScale, |
| 6021 | pas202b_50HZ, pas202b_50HZScale, |
| 6022 | pas202b_60HZ, pas202b_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6023 | [SENSOR_PB0330] = |
Jean-François Moine | a6a86f0d | 2010-04-25 14:57:10 -0300 | [diff] [blame] | 6024 | {pb0330_NoFliker, pb0330_NoFlikerScale, |
| 6025 | pb0330_50HZ, pb0330_50HZScale, |
| 6026 | pb0330_60HZ, pb0330_60HZScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6027 | [SENSOR_PO2030] = |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 6028 | {po2030_NoFliker, po2030_NoFliker, |
| 6029 | po2030_50HZ, po2030_50HZ, |
| 6030 | po2030_60HZ, po2030_60HZ}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6031 | [SENSOR_TAS5130C] = |
| 6032 | {tas5130c_NoFliker, tas5130c_NoFlikerScale, |
| 6033 | tas5130c_50HZ, tas5130c_50HZScale, |
| 6034 | tas5130c_60HZ, tas5130c_60HZScale}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6035 | }; |
| 6036 | |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 6037 | i = sd->ctrls[LIGHTFREQ].val * 2; |
| 6038 | mode = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv; |
Jean-Francois Moine | 1cb6d7b1 | 2010-01-08 07:06:06 -0300 | [diff] [blame] | 6039 | if (mode) |
| 6040 | i++; /* 320x240 */ |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6041 | zc3_freq = freq_tb[sd->sensor][i]; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6042 | if (zc3_freq == NULL) |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6043 | return; |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6044 | usb_exchange(gspca_dev, zc3_freq); |
| 6045 | switch (sd->sensor) { |
| 6046 | case SENSOR_GC0305: |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 6047 | if (mode /* if 320x240 */ |
| 6048 | && sd->ctrls[LIGHTFREQ].val == 1) /* and 50Hz */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6049 | reg_w(gspca_dev, 0x85, 0x018d); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6050 | /* win: 0x80, 0x018d */ |
| 6051 | break; |
| 6052 | case SENSOR_OV7620: |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 6053 | if (!mode) { /* if 640x480 */ |
| 6054 | if (sd->ctrls[LIGHTFREQ].val != 0) /* and filter */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6055 | reg_w(gspca_dev, 0x40, 0x0002); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6056 | else |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6057 | reg_w(gspca_dev, 0x44, 0x0002); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6058 | } |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6059 | break; |
| 6060 | case SENSOR_PAS202B: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6061 | reg_w(gspca_dev, 0x00, 0x01a7); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6062 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6063 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6064 | } |
| 6065 | |
| 6066 | static void setautogain(struct gspca_dev *gspca_dev) |
| 6067 | { |
| 6068 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6069 | u8 autoval; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6070 | |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 6071 | if (sd->ctrls[AUTOGAIN].val) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6072 | autoval = 0x42; |
| 6073 | else |
| 6074 | autoval = 0x02; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6075 | reg_w(gspca_dev, autoval, 0x0180); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6076 | } |
| 6077 | |
Jean-François Moine | f180190 | 2012-02-27 07:48:32 -0300 | [diff] [blame^] | 6078 | /* update the transfer parameters */ |
| 6079 | /* This function is executed from a work queue. */ |
| 6080 | /* The exact use of the bridge registers 07 and 08 is not known. |
| 6081 | * The following algorithm has been adapted from ms-win traces */ |
| 6082 | static void transfer_update(struct work_struct *work) |
| 6083 | { |
| 6084 | struct sd *sd = container_of(work, struct sd, work); |
| 6085 | struct gspca_dev *gspca_dev = &sd->gspca_dev; |
| 6086 | int change, good; |
| 6087 | u8 reg07, reg11; |
| 6088 | |
| 6089 | /* synchronize with the main driver and initialize the registers */ |
| 6090 | mutex_lock(&gspca_dev->usb_lock); |
| 6091 | reg07 = 0; /* max */ |
| 6092 | reg_w(gspca_dev, reg07, 0x0007); |
| 6093 | reg_w(gspca_dev, sd->reg08, ZC3XX_R008_CLOCKSETTING); |
| 6094 | mutex_unlock(&gspca_dev->usb_lock); |
| 6095 | |
| 6096 | good = 0; |
| 6097 | for (;;) { |
| 6098 | msleep(100); |
| 6099 | |
| 6100 | /* get the transfer status */ |
| 6101 | /* the bit 0 of the bridge register 11 indicates overflow */ |
| 6102 | mutex_lock(&gspca_dev->usb_lock); |
| 6103 | if (!gspca_dev->present || !gspca_dev->streaming) |
| 6104 | goto err; |
| 6105 | reg11 = reg_r(gspca_dev, 0x0011); |
| 6106 | if (gspca_dev->usb_err < 0 |
| 6107 | || !gspca_dev->present || !gspca_dev->streaming) |
| 6108 | goto err; |
| 6109 | |
| 6110 | change = reg11 & 0x01; |
| 6111 | if (change) { /* overflow */ |
| 6112 | switch (reg07) { |
| 6113 | case 0: /* max */ |
| 6114 | reg07 = sd->sensor == SENSOR_HV7131R |
| 6115 | ? 0x30 : 0x32; |
| 6116 | if (sd->reg08 != 0) { |
| 6117 | change = 3; |
| 6118 | sd->reg08--; |
| 6119 | } |
| 6120 | break; |
| 6121 | case 0x32: |
| 6122 | reg07 -= 4; |
| 6123 | break; |
| 6124 | default: |
| 6125 | reg07 -= 2; |
| 6126 | break; |
| 6127 | case 2: |
| 6128 | change = 0; /* already min */ |
| 6129 | break; |
| 6130 | } |
| 6131 | good = 0; |
| 6132 | } else { /* no overflow */ |
| 6133 | if (reg07 != 0) { /* if not max */ |
| 6134 | good++; |
| 6135 | if (good >= 10) { |
| 6136 | good = 0; |
| 6137 | change = 1; |
| 6138 | reg07 += 2; |
| 6139 | switch (reg07) { |
| 6140 | case 0x30: |
| 6141 | if (sd->sensor == SENSOR_PAS202B) |
| 6142 | reg07 += 2; |
| 6143 | break; |
| 6144 | case 0x32: |
| 6145 | case 0x34: |
| 6146 | reg07 = 0; |
| 6147 | break; |
| 6148 | } |
| 6149 | } |
| 6150 | } else { /* reg07 max */ |
| 6151 | if (sd->reg08 < sizeof jpeg_qual - 1) { |
| 6152 | good++; |
| 6153 | if (good > 10) { |
| 6154 | sd->reg08++; |
| 6155 | change = 2; |
| 6156 | } |
| 6157 | } |
| 6158 | } |
| 6159 | } |
| 6160 | if (change) { |
| 6161 | if (change & 1) { |
| 6162 | reg_w(gspca_dev, reg07, 0x0007); |
| 6163 | if (gspca_dev->usb_err < 0 |
| 6164 | || !gspca_dev->present |
| 6165 | || !gspca_dev->streaming) |
| 6166 | goto err; |
| 6167 | } |
| 6168 | if (change & 2) { |
| 6169 | reg_w(gspca_dev, sd->reg08, |
| 6170 | ZC3XX_R008_CLOCKSETTING); |
| 6171 | if (gspca_dev->usb_err < 0 |
| 6172 | || !gspca_dev->present |
| 6173 | || !gspca_dev->streaming) |
| 6174 | goto err; |
| 6175 | jpeg_set_qual(sd->jpeg_hdr, |
| 6176 | jpeg_qual[sd->reg08]); |
| 6177 | } |
| 6178 | } |
| 6179 | mutex_unlock(&gspca_dev->usb_lock); |
| 6180 | } |
| 6181 | return; |
| 6182 | err: |
| 6183 | mutex_unlock(&gspca_dev->usb_lock); |
| 6184 | } |
| 6185 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6186 | static void send_unknown(struct gspca_dev *gspca_dev, int sensor) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6187 | { |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 6188 | reg_w(gspca_dev, 0x01, 0x0000); /* bridge reset */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6189 | switch (sensor) { |
| 6190 | case SENSOR_PAS106: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6191 | reg_w(gspca_dev, 0x03, 0x003a); |
| 6192 | reg_w(gspca_dev, 0x0c, 0x003b); |
| 6193 | reg_w(gspca_dev, 0x08, 0x0038); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6194 | break; |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6195 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6196 | case SENSOR_GC0305: |
| 6197 | case SENSOR_OV7620: |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6198 | case SENSOR_MT9V111_1: |
| 6199 | case SENSOR_MT9V111_3: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6200 | case SENSOR_PB0330: |
| 6201 | case SENSOR_PO2030: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6202 | reg_w(gspca_dev, 0x0d, 0x003a); |
| 6203 | reg_w(gspca_dev, 0x02, 0x003b); |
| 6204 | reg_w(gspca_dev, 0x00, 0x0038); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6205 | break; |
Jean-François Moine | 3d24406 | 2011-01-24 16:22:11 -0300 | [diff] [blame] | 6206 | case SENSOR_HV7131R: |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6207 | case SENSOR_PAS202B: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6208 | reg_w(gspca_dev, 0x03, 0x003b); |
| 6209 | reg_w(gspca_dev, 0x0c, 0x003a); |
| 6210 | reg_w(gspca_dev, 0x0b, 0x0039); |
Jean-François Moine | 3d24406 | 2011-01-24 16:22:11 -0300 | [diff] [blame] | 6211 | if (sensor == SENSOR_PAS202B) |
| 6212 | reg_w(gspca_dev, 0x0b, 0x0038); |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6213 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6214 | } |
| 6215 | } |
| 6216 | |
| 6217 | /* start probe 2 wires */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6218 | static void start_2wr_probe(struct gspca_dev *gspca_dev, int sensor) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6219 | { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6220 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6221 | reg_w(gspca_dev, sensor, 0x0010); |
| 6222 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6223 | reg_w(gspca_dev, 0x03, 0x0012); |
| 6224 | reg_w(gspca_dev, 0x01, 0x0012); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6225 | /* msleep(2); */ |
| 6226 | } |
| 6227 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6228 | static int sif_probe(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6229 | { |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6230 | u16 checkword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6231 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6232 | start_2wr_probe(gspca_dev, 0x0f); /* PAS106 */ |
| 6233 | reg_w(gspca_dev, 0x08, 0x008d); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6234 | msleep(150); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6235 | checkword = ((i2c_read(gspca_dev, 0x00) & 0x0f) << 4) |
| 6236 | | ((i2c_read(gspca_dev, 0x01) & 0xf0) >> 4); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6237 | PDEBUG(D_PROBE, "probe sif 0x%04x", checkword); |
| 6238 | if (checkword == 0x0007) { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6239 | send_unknown(gspca_dev, SENSOR_PAS106); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6240 | return 0x0f; /* PAS106 */ |
| 6241 | } |
| 6242 | return -1; |
| 6243 | } |
| 6244 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6245 | static int vga_2wr_probe(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6246 | { |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6247 | u16 retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6248 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6249 | start_2wr_probe(gspca_dev, 0x00); /* HV7131B */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6250 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6251 | retword = i2c_read(gspca_dev, 0x01); |
| 6252 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6253 | return 0x00; /* HV7131B */ |
| 6254 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6255 | start_2wr_probe(gspca_dev, 0x04); /* CS2102 */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6256 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6257 | retword = i2c_read(gspca_dev, 0x01); |
| 6258 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6259 | return 0x04; /* CS2102 */ |
| 6260 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6261 | start_2wr_probe(gspca_dev, 0x06); /* OmniVision */ |
| 6262 | reg_w(gspca_dev, 0x08, 0x008d); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6263 | i2c_write(gspca_dev, 0x11, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6264 | retword = i2c_read(gspca_dev, 0x11); |
| 6265 | if (retword != 0) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6266 | /* (should have returned 0xaa) --> Omnivision? */ |
| 6267 | /* reg_r 0x10 -> 0x06 --> */ |
| 6268 | goto ov_check; |
| 6269 | } |
| 6270 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6271 | start_2wr_probe(gspca_dev, 0x08); /* HDCS2020 */ |
Jean-Francois Moine | 1eed40a | 2010-01-08 08:01:43 -0300 | [diff] [blame] | 6272 | i2c_write(gspca_dev, 0x1c, 0x00, 0x00); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6273 | i2c_write(gspca_dev, 0x15, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6274 | retword = i2c_read(gspca_dev, 0x15); |
| 6275 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6276 | return 0x08; /* HDCS2020 */ |
| 6277 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6278 | start_2wr_probe(gspca_dev, 0x0a); /* PB0330 */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6279 | i2c_write(gspca_dev, 0x07, 0xaa, 0xaa); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6280 | retword = i2c_read(gspca_dev, 0x07); |
| 6281 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6282 | return 0x0a; /* PB0330 */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6283 | retword = i2c_read(gspca_dev, 0x03); |
| 6284 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6285 | return 0x0a; /* PB0330 ?? */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6286 | retword = i2c_read(gspca_dev, 0x04); |
| 6287 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6288 | return 0x0a; /* PB0330 ?? */ |
| 6289 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6290 | start_2wr_probe(gspca_dev, 0x0c); /* ICM105A */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6291 | i2c_write(gspca_dev, 0x01, 0x11, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6292 | retword = i2c_read(gspca_dev, 0x01); |
| 6293 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6294 | return 0x0c; /* ICM105A */ |
| 6295 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6296 | start_2wr_probe(gspca_dev, 0x0e); /* PAS202BCB */ |
| 6297 | reg_w(gspca_dev, 0x08, 0x008d); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6298 | i2c_write(gspca_dev, 0x03, 0xaa, 0x00); |
Jean-Francois Moine | 721ecbc | 2009-10-20 05:25:16 -0300 | [diff] [blame] | 6299 | msleep(50); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6300 | retword = i2c_read(gspca_dev, 0x03); |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6301 | if (retword != 0) { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6302 | send_unknown(gspca_dev, SENSOR_PAS202B); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6303 | return 0x0e; /* PAS202BCB */ |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6304 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6305 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6306 | start_2wr_probe(gspca_dev, 0x02); /* TAS5130C */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6307 | i2c_write(gspca_dev, 0x01, 0xaa, 0x00); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6308 | retword = i2c_read(gspca_dev, 0x01); |
| 6309 | if (retword != 0) |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6310 | return 0x02; /* TAS5130C */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6311 | ov_check: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6312 | reg_r(gspca_dev, 0x0010); /* ?? */ |
| 6313 | reg_r(gspca_dev, 0x0010); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6314 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6315 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6316 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6317 | reg_w(gspca_dev, 0x06, 0x0010); /* OmniVision */ |
| 6318 | reg_w(gspca_dev, 0xa1, 0x008b); |
| 6319 | reg_w(gspca_dev, 0x08, 0x008d); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6320 | msleep(500); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6321 | reg_w(gspca_dev, 0x01, 0x0012); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6322 | i2c_write(gspca_dev, 0x12, 0x80, 0x00); /* sensor reset */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6323 | retword = i2c_read(gspca_dev, 0x0a) << 8; |
| 6324 | retword |= i2c_read(gspca_dev, 0x0b); |
| 6325 | PDEBUG(D_PROBE, "probe 2wr ov vga 0x%04x", retword); |
| 6326 | switch (retword) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6327 | case 0x7631: /* OV7630C */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6328 | reg_w(gspca_dev, 0x06, 0x0010); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6329 | break; |
| 6330 | case 0x7620: /* OV7620 */ |
| 6331 | case 0x7648: /* OV7648 */ |
| 6332 | break; |
| 6333 | default: |
| 6334 | return -1; /* not OmniVision */ |
| 6335 | } |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6336 | return retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6337 | } |
| 6338 | |
| 6339 | struct sensor_by_chipset_revision { |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6340 | u16 revision; |
| 6341 | u8 internal_sensor_id; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6342 | }; |
| 6343 | static const struct sensor_by_chipset_revision chipset_revision_sensor[] = { |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 6344 | {0xc000, 0x12}, /* TAS5130C */ |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6345 | {0xc001, 0x13}, /* MT9V111 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6346 | {0xe001, 0x13}, |
| 6347 | {0x8001, 0x13}, |
| 6348 | {0x8000, 0x14}, /* CS2102K */ |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6349 | {0x8400, 0x15}, /* MT9V111 */ |
Luis Maia | 658604e | 2009-12-15 13:40:44 -0300 | [diff] [blame] | 6350 | {0xe400, 0x15}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6351 | }; |
| 6352 | |
| 6353 | static int vga_3wr_probe(struct gspca_dev *gspca_dev) |
| 6354 | { |
| 6355 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6356 | int i; |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6357 | u16 retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6358 | |
| 6359 | /*fixme: lack of 8b=b3 (11,12)-> 10, 8b=e0 (14,15,16)-> 12 found in gspcav1*/ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6360 | reg_w(gspca_dev, 0x02, 0x0010); |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6361 | reg_r(gspca_dev, 0x0010); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6362 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6363 | reg_w(gspca_dev, 0x00, 0x0010); |
| 6364 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6365 | reg_w(gspca_dev, 0x91, 0x008b); |
| 6366 | reg_w(gspca_dev, 0x03, 0x0012); |
| 6367 | reg_w(gspca_dev, 0x01, 0x0012); |
| 6368 | reg_w(gspca_dev, 0x05, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6369 | retword = i2c_read(gspca_dev, 0x14); |
| 6370 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6371 | return 0x11; /* HV7131R */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6372 | retword = i2c_read(gspca_dev, 0x15); |
| 6373 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6374 | return 0x11; /* HV7131R */ |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6375 | retword = i2c_read(gspca_dev, 0x16); |
| 6376 | if (retword != 0) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6377 | return 0x11; /* HV7131R */ |
| 6378 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6379 | reg_w(gspca_dev, 0x02, 0x0010); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6380 | retword = reg_r(gspca_dev, 0x000b) << 8; |
| 6381 | retword |= reg_r(gspca_dev, 0x000a); |
| 6382 | PDEBUG(D_PROBE, "probe 3wr vga 1 0x%04x", retword); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6383 | reg_r(gspca_dev, 0x0010); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6384 | if ((retword & 0xff00) == 0x6400) |
| 6385 | return 0x02; /* TAS5130C */ |
| 6386 | for (i = 0; i < ARRAY_SIZE(chipset_revision_sensor); i++) { |
| 6387 | if (chipset_revision_sensor[i].revision == retword) { |
| 6388 | sd->chip_revision = retword; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6389 | send_unknown(gspca_dev, SENSOR_PB0330); |
Jean-François Moine | 780e312 | 2010-10-19 04:29:10 -0300 | [diff] [blame] | 6390 | return chipset_revision_sensor[i].internal_sensor_id; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6391 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6392 | } |
| 6393 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6394 | reg_w(gspca_dev, 0x01, 0x0000); /* check PB0330 */ |
| 6395 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6396 | reg_w(gspca_dev, 0xdd, 0x008b); |
| 6397 | reg_w(gspca_dev, 0x0a, 0x0010); |
| 6398 | reg_w(gspca_dev, 0x03, 0x0012); |
| 6399 | reg_w(gspca_dev, 0x01, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6400 | retword = i2c_read(gspca_dev, 0x00); |
| 6401 | if (retword != 0) { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6402 | PDEBUG(D_PROBE, "probe 3wr vga type 0a"); |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6403 | return 0x0a; /* PB0330 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6404 | } |
| 6405 | |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 6406 | /* probe gc0303 / gc0305 */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6407 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6408 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6409 | reg_w(gspca_dev, 0x98, 0x008b); |
| 6410 | reg_w(gspca_dev, 0x01, 0x0010); |
| 6411 | reg_w(gspca_dev, 0x03, 0x0012); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6412 | msleep(2); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6413 | reg_w(gspca_dev, 0x01, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6414 | retword = i2c_read(gspca_dev, 0x00); |
| 6415 | if (retword != 0) { |
| 6416 | PDEBUG(D_PROBE, "probe 3wr vga type %02x", retword); |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 6417 | if (retword == 0x0011) /* gc0303 */ |
| 6418 | return 0x0303; |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6419 | if (retword == 0x0029) /* gc0305 */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6420 | send_unknown(gspca_dev, SENSOR_GC0305); |
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 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6424 | reg_w(gspca_dev, 0x01, 0x0000); /* check OmniVision */ |
| 6425 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6426 | reg_w(gspca_dev, 0xa1, 0x008b); |
| 6427 | reg_w(gspca_dev, 0x08, 0x008d); |
| 6428 | reg_w(gspca_dev, 0x06, 0x0010); |
| 6429 | reg_w(gspca_dev, 0x01, 0x0012); |
| 6430 | reg_w(gspca_dev, 0x05, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6431 | if (i2c_read(gspca_dev, 0x1c) == 0x007f /* OV7610 - manufacturer ID */ |
| 6432 | && i2c_read(gspca_dev, 0x1d) == 0x00a2) { |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6433 | send_unknown(gspca_dev, SENSOR_OV7620); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6434 | return 0x06; /* OmniVision confirm ? */ |
| 6435 | } |
| 6436 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6437 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6438 | reg_w(gspca_dev, 0x00, 0x0002); |
| 6439 | reg_w(gspca_dev, 0x01, 0x0010); |
| 6440 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6441 | reg_w(gspca_dev, 0xee, 0x008b); |
| 6442 | reg_w(gspca_dev, 0x03, 0x0012); |
| 6443 | reg_w(gspca_dev, 0x01, 0x0012); |
| 6444 | reg_w(gspca_dev, 0x05, 0x0012); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6445 | retword = i2c_read(gspca_dev, 0x00) << 8; /* ID 0 */ |
| 6446 | retword |= i2c_read(gspca_dev, 0x01); /* ID 1 */ |
| 6447 | PDEBUG(D_PROBE, "probe 3wr vga 2 0x%04x", retword); |
| 6448 | if (retword == 0x2030) { |
Jean-François Moine | bd62bbc | 2011-05-17 05:08:59 -0300 | [diff] [blame] | 6449 | #ifdef GSPCA_DEBUG |
| 6450 | u8 retbyte; |
| 6451 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6452 | retbyte = i2c_read(gspca_dev, 0x02); /* revision number */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6453 | PDEBUG(D_PROBE, "sensor PO2030 rev 0x%02x", retbyte); |
Jean-François Moine | bd62bbc | 2011-05-17 05:08:59 -0300 | [diff] [blame] | 6454 | #endif |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6455 | send_unknown(gspca_dev, SENSOR_PO2030); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6456 | return retword; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6457 | } |
| 6458 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6459 | reg_w(gspca_dev, 0x01, 0x0000); |
| 6460 | reg_w(gspca_dev, 0x0a, 0x0010); |
| 6461 | reg_w(gspca_dev, 0xd3, 0x008b); |
| 6462 | reg_w(gspca_dev, 0x01, 0x0001); |
| 6463 | reg_w(gspca_dev, 0x03, 0x0012); |
| 6464 | reg_w(gspca_dev, 0x01, 0x0012); |
| 6465 | reg_w(gspca_dev, 0x05, 0x0012); |
| 6466 | reg_w(gspca_dev, 0xd3, 0x008b); |
Jean-Francois Moine | 3ab67ba | 2009-01-08 09:38:45 -0300 | [diff] [blame] | 6467 | retword = i2c_read(gspca_dev, 0x01); |
| 6468 | if (retword != 0) { |
| 6469 | PDEBUG(D_PROBE, "probe 3wr vga type 0a ? ret: %04x", retword); |
Jean-Francois Moine | 881cd41 | 2009-04-05 04:01:13 -0300 | [diff] [blame] | 6470 | return 0x16; /* adcm2700 (6100/6200) */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6471 | } |
| 6472 | return -1; |
| 6473 | } |
| 6474 | |
| 6475 | static int zcxx_probeSensor(struct gspca_dev *gspca_dev) |
| 6476 | { |
| 6477 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 603538a | 2009-02-19 15:38:31 -0300 | [diff] [blame] | 6478 | int sensor; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6479 | |
| 6480 | switch (sd->sensor) { |
| 6481 | case SENSOR_MC501CB: |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6482 | return -1; /* don't probe */ |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 6483 | case SENSOR_GC0303: |
Hans de Goede | 34662342 | 2008-09-03 16:47:28 -0300 | [diff] [blame] | 6484 | /* may probe but with no write in reg 0x0010 */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6485 | return -1; /* don't probe */ |
Hans de Goede | 34662342 | 2008-09-03 16:47:28 -0300 | [diff] [blame] | 6486 | case SENSOR_PAS106: |
| 6487 | sensor = sif_probe(gspca_dev); |
| 6488 | if (sensor >= 0) |
| 6489 | return sensor; |
| 6490 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6491 | } |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6492 | sensor = vga_2wr_probe(gspca_dev); |
Jean-Francois Moine | 603538a | 2009-02-19 15:38:31 -0300 | [diff] [blame] | 6493 | if (sensor >= 0) |
Hans de Goede | 34662342 | 2008-09-03 16:47:28 -0300 | [diff] [blame] | 6494 | return sensor; |
Jean-Francois Moine | 603538a | 2009-02-19 15:38:31 -0300 | [diff] [blame] | 6495 | return vga_3wr_probe(gspca_dev); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6496 | } |
| 6497 | |
| 6498 | /* this function is called at probe time */ |
| 6499 | static int sd_config(struct gspca_dev *gspca_dev, |
| 6500 | const struct usb_device_id *id) |
| 6501 | { |
| 6502 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-François Moine | c39da6a | 2010-08-04 06:07:23 -0300 | [diff] [blame] | 6503 | |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6504 | if (id->idProduct == 0x301b) |
| 6505 | sd->bridge = BRIDGE_ZC301; |
| 6506 | else |
| 6507 | sd->bridge = BRIDGE_ZC303; |
| 6508 | |
Jean-François Moine | c39da6a | 2010-08-04 06:07:23 -0300 | [diff] [blame] | 6509 | /* define some sensors from the vendor/product */ |
| 6510 | sd->sensor = id->driver_info; |
| 6511 | |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 6512 | gspca_dev->cam.ctrls = sd->ctrls; |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 6513 | sd->reg08 = REG08_DEF; |
Jean-François Moine | c39da6a | 2010-08-04 06:07:23 -0300 | [diff] [blame] | 6514 | |
Jean-François Moine | f180190 | 2012-02-27 07:48:32 -0300 | [diff] [blame^] | 6515 | INIT_WORK(&sd->work, transfer_update); |
| 6516 | |
Jean-François Moine | c39da6a | 2010-08-04 06:07:23 -0300 | [diff] [blame] | 6517 | return 0; |
| 6518 | } |
| 6519 | |
| 6520 | /* this function is called at probe and resume time */ |
| 6521 | static int sd_init(struct gspca_dev *gspca_dev) |
| 6522 | { |
| 6523 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6524 | struct cam *cam; |
| 6525 | int sensor; |
Jean-Francois Moine | 47c83392 | 2010-01-07 15:59:12 -0300 | [diff] [blame] | 6526 | static const u8 gamma[SENSOR_MAX] = { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6527 | [SENSOR_ADCM2700] = 4, |
| 6528 | [SENSOR_CS2102] = 4, |
| 6529 | [SENSOR_CS2102K] = 5, |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 6530 | [SENSOR_GC0303] = 3, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6531 | [SENSOR_GC0305] = 4, |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 6532 | [SENSOR_HDCS2020] = 4, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6533 | [SENSOR_HV7131B] = 4, |
| 6534 | [SENSOR_HV7131R] = 4, |
| 6535 | [SENSOR_ICM105A] = 4, |
| 6536 | [SENSOR_MC501CB] = 4, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6537 | [SENSOR_MT9V111_1] = 4, |
| 6538 | [SENSOR_MT9V111_3] = 4, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6539 | [SENSOR_OV7620] = 3, |
| 6540 | [SENSOR_OV7630C] = 4, |
| 6541 | [SENSOR_PAS106] = 4, |
| 6542 | [SENSOR_PAS202B] = 4, |
| 6543 | [SENSOR_PB0330] = 4, |
| 6544 | [SENSOR_PO2030] = 4, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6545 | [SENSOR_TAS5130C] = 3, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6546 | }; |
Hans de Goede | 9919fe8 | 2010-01-13 07:12:28 -0300 | [diff] [blame] | 6547 | static const u8 mode_tb[SENSOR_MAX] = { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6548 | [SENSOR_ADCM2700] = 2, |
| 6549 | [SENSOR_CS2102] = 1, |
| 6550 | [SENSOR_CS2102K] = 1, |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 6551 | [SENSOR_GC0303] = 1, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6552 | [SENSOR_GC0305] = 1, |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 6553 | [SENSOR_HDCS2020] = 1, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6554 | [SENSOR_HV7131B] = 1, |
| 6555 | [SENSOR_HV7131R] = 1, |
| 6556 | [SENSOR_ICM105A] = 1, |
| 6557 | [SENSOR_MC501CB] = 2, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6558 | [SENSOR_MT9V111_1] = 1, |
| 6559 | [SENSOR_MT9V111_3] = 1, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6560 | [SENSOR_OV7620] = 2, |
| 6561 | [SENSOR_OV7630C] = 1, |
| 6562 | [SENSOR_PAS106] = 0, |
| 6563 | [SENSOR_PAS202B] = 1, |
| 6564 | [SENSOR_PB0330] = 1, |
| 6565 | [SENSOR_PO2030] = 1, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6566 | [SENSOR_TAS5130C] = 1, |
Hans de Goede | 9919fe8 | 2010-01-13 07:12:28 -0300 | [diff] [blame] | 6567 | }; |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 6568 | static const u8 reg08_tb[SENSOR_MAX] = { |
| 6569 | [SENSOR_ADCM2700] = 1, |
| 6570 | [SENSOR_CS2102] = 3, |
| 6571 | /* [SENSOR_CS2102K] = 3, */ |
| 6572 | [SENSOR_GC0303] = 2, |
| 6573 | [SENSOR_GC0305] = 3, |
| 6574 | [SENSOR_HDCS2020] = 1, |
| 6575 | [SENSOR_HV7131B] = 3, |
| 6576 | [SENSOR_HV7131R] = 3, |
| 6577 | [SENSOR_ICM105A] = 3, |
| 6578 | [SENSOR_MC501CB] = 3, |
| 6579 | [SENSOR_MT9V111_1] = 3, |
| 6580 | [SENSOR_MT9V111_3] = 3, |
| 6581 | [SENSOR_OV7620] = 1, |
| 6582 | [SENSOR_OV7630C] = 3, |
| 6583 | [SENSOR_PAS106] = 3, |
| 6584 | [SENSOR_PAS202B] = 3, |
| 6585 | [SENSOR_PB0330] = 3, |
| 6586 | [SENSOR_PO2030] = 2, |
| 6587 | [SENSOR_TAS5130C] = 3, |
| 6588 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6589 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6590 | sensor = zcxx_probeSensor(gspca_dev); |
| 6591 | if (sensor >= 0) |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6592 | PDEBUG(D_PROBE, "probe sensor -> %04x", sensor); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6593 | if ((unsigned) force_sensor < SENSOR_MAX) { |
| 6594 | sd->sensor = force_sensor; |
| 6595 | PDEBUG(D_PROBE, "sensor forced to %d", force_sensor); |
| 6596 | } else { |
| 6597 | switch (sensor) { |
| 6598 | case -1: |
| 6599 | switch (sd->sensor) { |
| 6600 | case SENSOR_MC501CB: |
| 6601 | PDEBUG(D_PROBE, "Sensor MC501CB"); |
| 6602 | break; |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 6603 | case SENSOR_GC0303: |
| 6604 | PDEBUG(D_PROBE, "Sensor GC0303"); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6605 | break; |
| 6606 | default: |
Joe Perches | 133a9fe | 2011-08-21 19:56:57 -0300 | [diff] [blame] | 6607 | pr_warn("Unknown sensor - set to TAS5130C\n"); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6608 | sd->sensor = SENSOR_TAS5130C; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6609 | } |
| 6610 | break; |
| 6611 | case 0: |
Jean-Francois Moine | d754a6c | 2009-12-20 05:07:10 -0300 | [diff] [blame] | 6612 | /* check the sensor type */ |
| 6613 | sensor = i2c_read(gspca_dev, 0x00); |
| 6614 | PDEBUG(D_PROBE, "Sensor hv7131 type %d", sensor); |
| 6615 | switch (sensor) { |
| 6616 | case 0: /* hv7131b */ |
| 6617 | case 1: /* hv7131e */ |
| 6618 | PDEBUG(D_PROBE, "Find Sensor HV7131B"); |
| 6619 | sd->sensor = SENSOR_HV7131B; |
| 6620 | break; |
| 6621 | default: |
| 6622 | /* case 2: * hv7131r */ |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6623 | PDEBUG(D_PROBE, "Find Sensor HV7131R"); |
| 6624 | sd->sensor = SENSOR_HV7131R; |
Jean-Francois Moine | d754a6c | 2009-12-20 05:07:10 -0300 | [diff] [blame] | 6625 | break; |
| 6626 | } |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6627 | break; |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6628 | case 0x02: |
| 6629 | PDEBUG(D_PROBE, "Sensor TAS5130C"); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6630 | sd->sensor = SENSOR_TAS5130C; |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6631 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6632 | case 0x04: |
| 6633 | PDEBUG(D_PROBE, "Find Sensor CS2102"); |
| 6634 | sd->sensor = SENSOR_CS2102; |
| 6635 | break; |
| 6636 | case 0x08: |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 6637 | PDEBUG(D_PROBE, "Find Sensor HDCS2020"); |
| 6638 | sd->sensor = SENSOR_HDCS2020; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6639 | break; |
| 6640 | case 0x0a: |
| 6641 | PDEBUG(D_PROBE, |
| 6642 | "Find Sensor PB0330. Chip revision %x", |
| 6643 | sd->chip_revision); |
| 6644 | sd->sensor = SENSOR_PB0330; |
| 6645 | break; |
| 6646 | case 0x0c: |
| 6647 | PDEBUG(D_PROBE, "Find Sensor ICM105A"); |
| 6648 | sd->sensor = SENSOR_ICM105A; |
| 6649 | break; |
| 6650 | case 0x0e: |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6651 | PDEBUG(D_PROBE, "Find Sensor PAS202B"); |
| 6652 | sd->sensor = SENSOR_PAS202B; |
Jean-Francois Moine | 56af5ef | 2010-01-08 08:02:42 -0300 | [diff] [blame] | 6653 | /* sd->sharpness = 1; */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6654 | break; |
| 6655 | case 0x0f: |
| 6656 | PDEBUG(D_PROBE, "Find Sensor PAS106"); |
| 6657 | sd->sensor = SENSOR_PAS106; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6658 | break; |
| 6659 | case 0x10: |
| 6660 | case 0x12: |
Jean-Francois Moine | 013db75 | 2009-10-07 05:24:19 -0300 | [diff] [blame] | 6661 | PDEBUG(D_PROBE, "Find Sensor TAS5130C"); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6662 | sd->sensor = SENSOR_TAS5130C; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6663 | break; |
| 6664 | case 0x11: |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6665 | PDEBUG(D_PROBE, "Find Sensor HV7131R"); |
| 6666 | sd->sensor = SENSOR_HV7131R; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6667 | break; |
| 6668 | case 0x13: |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6669 | case 0x15: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6670 | PDEBUG(D_PROBE, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6671 | "Sensor MT9V111. Chip revision %04x", |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6672 | sd->chip_revision); |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6673 | sd->sensor = sd->bridge == BRIDGE_ZC301 |
| 6674 | ? SENSOR_MT9V111_1 |
| 6675 | : SENSOR_MT9V111_3; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6676 | break; |
| 6677 | case 0x14: |
| 6678 | PDEBUG(D_PROBE, |
| 6679 | "Find Sensor CS2102K?. Chip revision %x", |
| 6680 | sd->chip_revision); |
| 6681 | sd->sensor = SENSOR_CS2102K; |
| 6682 | break; |
Jean-Francois Moine | 5be2b09 | 2009-01-20 05:12:34 -0300 | [diff] [blame] | 6683 | case 0x16: |
| 6684 | PDEBUG(D_PROBE, "Find Sensor ADCM2700"); |
| 6685 | sd->sensor = SENSOR_ADCM2700; |
| 6686 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6687 | case 0x29: |
| 6688 | PDEBUG(D_PROBE, "Find Sensor GC0305"); |
| 6689 | sd->sensor = SENSOR_GC0305; |
| 6690 | break; |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 6691 | case 0x0303: |
| 6692 | PDEBUG(D_PROBE, "Sensor GC0303"); |
| 6693 | sd->sensor = SENSOR_GC0303; |
Jean-Francois Moine | 63fc4a0 | 2008-07-21 05:42:17 -0300 | [diff] [blame] | 6694 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6695 | case 0x2030: |
| 6696 | PDEBUG(D_PROBE, "Find Sensor PO2030"); |
| 6697 | sd->sensor = SENSOR_PO2030; |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 6698 | sd->ctrls[SHARPNESS].def = 0; /* from win traces */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6699 | break; |
| 6700 | case 0x7620: |
| 6701 | PDEBUG(D_PROBE, "Find Sensor OV7620"); |
| 6702 | sd->sensor = SENSOR_OV7620; |
| 6703 | break; |
Jean-Francois Moine | e2d750f | 2009-02-19 15:41:28 -0300 | [diff] [blame] | 6704 | case 0x7631: |
| 6705 | PDEBUG(D_PROBE, "Find Sensor OV7630C"); |
| 6706 | sd->sensor = SENSOR_OV7630C; |
| 6707 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6708 | case 0x7648: |
| 6709 | PDEBUG(D_PROBE, "Find Sensor OV7648"); |
| 6710 | sd->sensor = SENSOR_OV7620; /* same sensor (?) */ |
| 6711 | break; |
| 6712 | default: |
Joe Perches | 133a9fe | 2011-08-21 19:56:57 -0300 | [diff] [blame] | 6713 | pr_err("Unknown sensor %04x\n", sensor); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6714 | return -EINVAL; |
| 6715 | } |
| 6716 | } |
| 6717 | if (sensor < 0x20) { |
| 6718 | if (sensor == -1 || sensor == 0x10 || sensor == 0x12) |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6719 | reg_w(gspca_dev, 0x02, 0x0010); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6720 | reg_r(gspca_dev, 0x0010); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6721 | } |
| 6722 | |
| 6723 | cam = &gspca_dev->cam; |
Hans de Goede | 9919fe8 | 2010-01-13 07:12:28 -0300 | [diff] [blame] | 6724 | switch (mode_tb[sd->sensor]) { |
| 6725 | case 0: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6726 | cam->cam_mode = sif_mode; |
Jean-Francois Moine | c41492c | 2008-07-07 08:31:16 -0300 | [diff] [blame] | 6727 | cam->nmodes = ARRAY_SIZE(sif_mode); |
Hans de Goede | 9919fe8 | 2010-01-13 07:12:28 -0300 | [diff] [blame] | 6728 | break; |
| 6729 | case 1: |
| 6730 | cam->cam_mode = vga_mode; |
| 6731 | cam->nmodes = ARRAY_SIZE(vga_mode); |
| 6732 | break; |
| 6733 | default: |
| 6734 | /* case 2: */ |
| 6735 | cam->cam_mode = broken_vga_mode; |
| 6736 | cam->nmodes = ARRAY_SIZE(broken_vga_mode); |
| 6737 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6738 | } |
Jean-François Moine | 49fb5e6 | 2010-12-28 07:09:34 -0300 | [diff] [blame] | 6739 | |
| 6740 | sd->ctrls[GAMMA].def = gamma[sd->sensor]; |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 6741 | sd->reg08 = reg08_tb[sd->sensor]; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6742 | |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 6743 | switch (sd->sensor) { |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 6744 | case SENSOR_HV7131R: |
| 6745 | break; |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 6746 | case SENSOR_OV7630C: |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 6747 | gspca_dev->ctrl_dis = (1 << LIGHTFREQ) | (1 << EXPOSURE); |
| 6748 | break; |
| 6749 | default: |
| 6750 | gspca_dev->ctrl_dis = (1 << EXPOSURE); |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 6751 | break; |
| 6752 | } |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 6753 | #if AUTOGAIN_DEF |
| 6754 | if (sd->ctrls[AUTOGAIN].val) |
| 6755 | gspca_dev->ctrl_inac = (1 << EXPOSURE); |
| 6756 | #endif |
Jean-Francois Moine | f50ba1b | 2008-09-03 17:12:14 -0300 | [diff] [blame] | 6757 | |
Jean-Francois Moine | 77880ba3 | 2010-01-08 08:04:21 -0300 | [diff] [blame] | 6758 | /* switch off the led */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6759 | reg_w(gspca_dev, 0x01, 0x0000); |
Jean-François Moine | c39da6a | 2010-08-04 06:07:23 -0300 | [diff] [blame] | 6760 | return gspca_dev->usb_err; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6761 | } |
| 6762 | |
Jean-Francois Moine | 72ab97c | 2008-09-20 06:39:08 -0300 | [diff] [blame] | 6763 | static int sd_start(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6764 | { |
| 6765 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6766 | int mode; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 6767 | static const struct usb_action *init_tb[SENSOR_MAX][2] = { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6768 | [SENSOR_ADCM2700] = |
| 6769 | {adcm2700_Initial, adcm2700_InitialScale}, |
| 6770 | [SENSOR_CS2102] = |
| 6771 | {cs2102_Initial, cs2102_InitialScale}, |
| 6772 | [SENSOR_CS2102K] = |
| 6773 | {cs2102K_Initial, cs2102K_InitialScale}, |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 6774 | [SENSOR_GC0303] = |
| 6775 | {gc0303_Initial, gc0303_InitialScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6776 | [SENSOR_GC0305] = |
| 6777 | {gc0305_Initial, gc0305_InitialScale}, |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 6778 | [SENSOR_HDCS2020] = |
| 6779 | {hdcs2020_Initial, hdcs2020_InitialScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6780 | [SENSOR_HV7131B] = |
| 6781 | {hv7131b_Initial, hv7131b_InitialScale}, |
| 6782 | [SENSOR_HV7131R] = |
| 6783 | {hv7131r_Initial, hv7131r_InitialScale}, |
| 6784 | [SENSOR_ICM105A] = |
| 6785 | {icm105a_Initial, icm105a_InitialScale}, |
| 6786 | [SENSOR_MC501CB] = |
| 6787 | {mc501cb_Initial, mc501cb_InitialScale}, |
Jean-François Moine | a484dd9 | 2010-08-04 07:25:12 -0300 | [diff] [blame] | 6788 | [SENSOR_MT9V111_1] = |
| 6789 | {mt9v111_1_Initial, mt9v111_1_InitialScale}, |
| 6790 | [SENSOR_MT9V111_3] = |
| 6791 | {mt9v111_3_Initial, mt9v111_3_InitialScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6792 | [SENSOR_OV7620] = |
| 6793 | {ov7620_Initial, ov7620_InitialScale}, |
| 6794 | [SENSOR_OV7630C] = |
| 6795 | {ov7630c_Initial, ov7630c_InitialScale}, |
| 6796 | [SENSOR_PAS106] = |
| 6797 | {pas106b_Initial, pas106b_InitialScale}, |
| 6798 | [SENSOR_PAS202B] = |
| 6799 | {pas202b_Initial, pas202b_InitialScale}, |
| 6800 | [SENSOR_PB0330] = |
| 6801 | {pb0330_Initial, pb0330_InitialScale}, |
| 6802 | [SENSOR_PO2030] = |
| 6803 | {po2030_Initial, po2030_InitialScale}, |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6804 | [SENSOR_TAS5130C] = |
| 6805 | {tas5130c_Initial, tas5130c_InitialScale}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6806 | }; |
| 6807 | |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6808 | /* create the JPEG header */ |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6809 | jpeg_define(sd->jpeg_hdr, gspca_dev->height, gspca_dev->width, |
| 6810 | 0x21); /* JPEG 422 */ |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6811 | |
Jean-Francois Moine | 5092451 | 2010-01-08 08:08:12 -0300 | [diff] [blame] | 6812 | mode = gspca_dev->cam.cam_mode[gspca_dev->curr_mode].priv; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6813 | switch (sd->sensor) { |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6814 | case SENSOR_HV7131R: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6815 | zcxx_probeSensor(gspca_dev); |
| 6816 | break; |
| 6817 | case SENSOR_PAS106: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6818 | usb_exchange(gspca_dev, pas106b_Initial_com); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6819 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6820 | } |
Jean-Francois Moine | 5092451 | 2010-01-08 08:08:12 -0300 | [diff] [blame] | 6821 | usb_exchange(gspca_dev, init_tb[sd->sensor][mode]); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6822 | |
| 6823 | switch (sd->sensor) { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6824 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6825 | case SENSOR_GC0305: |
| 6826 | case SENSOR_OV7620: |
| 6827 | case SENSOR_PO2030: |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6828 | case SENSOR_TAS5130C: |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 6829 | case SENSOR_GC0303: |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6830 | /* msleep(100); * ?? */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6831 | reg_r(gspca_dev, 0x0002); /* --> 0x40 */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6832 | reg_w(gspca_dev, 0x09, 0x01ad); /* (from win traces) */ |
| 6833 | reg_w(gspca_dev, 0x15, 0x01ae); |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6834 | if (sd->sensor == SENSOR_TAS5130C) |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 6835 | break; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6836 | reg_w(gspca_dev, 0x0d, 0x003a); |
| 6837 | reg_w(gspca_dev, 0x02, 0x003b); |
| 6838 | reg_w(gspca_dev, 0x00, 0x0038); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6839 | break; |
Jean-François Moine | 3d24406 | 2011-01-24 16:22:11 -0300 | [diff] [blame] | 6840 | case SENSOR_HV7131R: |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6841 | case SENSOR_PAS202B: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6842 | reg_w(gspca_dev, 0x03, 0x003b); |
| 6843 | reg_w(gspca_dev, 0x0c, 0x003a); |
| 6844 | reg_w(gspca_dev, 0x0b, 0x0039); |
Jean-François Moine | 3d24406 | 2011-01-24 16:22:11 -0300 | [diff] [blame] | 6845 | if (sd->sensor == SENSOR_HV7131R) |
| 6846 | reg_w(gspca_dev, 0x50, ZC3XX_R11D_GLOBALGAIN); |
Jean-Francois Moine | 38719d4 | 2010-01-04 16:09:47 -0300 | [diff] [blame] | 6847 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6848 | } |
| 6849 | |
| 6850 | setmatrix(gspca_dev); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6851 | switch (sd->sensor) { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6852 | case SENSOR_ADCM2700: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6853 | case SENSOR_OV7620: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6854 | reg_r(gspca_dev, 0x0008); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6855 | reg_w(gspca_dev, 0x00, 0x0008); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6856 | break; |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6857 | case SENSOR_PAS202B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6858 | case SENSOR_GC0305: |
Jean-François Moine | 3d24406 | 2011-01-24 16:22:11 -0300 | [diff] [blame] | 6859 | case SENSOR_HV7131R: |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6860 | case SENSOR_TAS5130C: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6861 | reg_r(gspca_dev, 0x0008); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6862 | /* fall thru */ |
| 6863 | case SENSOR_PO2030: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6864 | reg_w(gspca_dev, 0x03, 0x0008); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6865 | break; |
| 6866 | } |
| 6867 | setsharpness(gspca_dev); |
| 6868 | |
| 6869 | /* set the gamma tables when not set */ |
| 6870 | switch (sd->sensor) { |
Jean-Francois Moine | 1d76331 | 2009-09-18 05:36:24 -0300 | [diff] [blame] | 6871 | case SENSOR_CS2102K: /* gamma set in xxx_Initial */ |
Jean-François Moine | 4e5144e | 2011-02-26 13:56:20 -0300 | [diff] [blame] | 6872 | case SENSOR_HDCS2020: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6873 | case SENSOR_OV7630C: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6874 | break; |
| 6875 | default: |
| 6876 | setcontrast(gspca_dev); |
| 6877 | break; |
| 6878 | } |
| 6879 | setmatrix(gspca_dev); /* one more time? */ |
| 6880 | switch (sd->sensor) { |
| 6881 | case SENSOR_OV7620: |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6882 | case SENSOR_PAS202B: |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6883 | reg_r(gspca_dev, 0x0180); /* from win */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6884 | reg_w(gspca_dev, 0x00, 0x0180); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6885 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6886 | } |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 6887 | setquality(gspca_dev); |
| 6888 | jpeg_set_qual(sd->jpeg_hdr, jpeg_qual[sd->reg08]); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6889 | setlightfreq(gspca_dev); |
| 6890 | |
| 6891 | switch (sd->sensor) { |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6892 | case SENSOR_ADCM2700: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6893 | reg_w(gspca_dev, 0x09, 0x01ad); /* (from win traces) */ |
| 6894 | reg_w(gspca_dev, 0x15, 0x01ae); |
| 6895 | reg_w(gspca_dev, 0x02, 0x0180); |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6896 | /* ms-win + */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6897 | reg_w(gspca_dev, 0x40, 0x0117); |
Jean-Francois Moine | 3d22118 | 2009-01-19 15:18:44 -0300 | [diff] [blame] | 6898 | break; |
Jean-François Moine | 3d24406 | 2011-01-24 16:22:11 -0300 | [diff] [blame] | 6899 | case SENSOR_HV7131R: |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 6900 | if (!sd->ctrls[AUTOGAIN].val) |
| 6901 | setexposure(gspca_dev); |
Jean-François Moine | 3d24406 | 2011-01-24 16:22:11 -0300 | [diff] [blame] | 6902 | reg_w(gspca_dev, 0x00, ZC3XX_R1A7_CALCGLOBALMEAN); |
| 6903 | break; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6904 | case SENSOR_GC0305: |
Jean-François Moine | 83d1aa3 | 2010-08-04 05:11:23 -0300 | [diff] [blame] | 6905 | case SENSOR_TAS5130C: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6906 | reg_w(gspca_dev, 0x09, 0x01ad); /* (from win traces) */ |
| 6907 | reg_w(gspca_dev, 0x15, 0x01ae); |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6908 | /* fall thru */ |
| 6909 | case SENSOR_PAS202B: |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6910 | case SENSOR_PO2030: |
Jean-François Moine | 780e312 | 2010-10-19 04:29:10 -0300 | [diff] [blame] | 6911 | /* reg_w(gspca_dev, 0x40, ZC3XX_R117_GGAIN); in win traces */ |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6912 | reg_r(gspca_dev, 0x0180); |
| 6913 | break; |
| 6914 | case SENSOR_OV7620: |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6915 | reg_w(gspca_dev, 0x09, 0x01ad); |
| 6916 | reg_w(gspca_dev, 0x15, 0x01ae); |
Jean-Francois Moine | 7320d6b | 2008-12-08 06:41:04 -0300 | [diff] [blame] | 6917 | i2c_read(gspca_dev, 0x13); /*fixme: returns 0xa3 */ |
| 6918 | i2c_write(gspca_dev, 0x13, 0xa3, 0x00); |
Jean-François Moine | 780e312 | 2010-10-19 04:29:10 -0300 | [diff] [blame] | 6919 | /*fixme: returned value to send? */ |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6920 | reg_w(gspca_dev, 0x40, 0x0117); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 6921 | reg_r(gspca_dev, 0x0180); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6922 | break; |
| 6923 | } |
| 6924 | |
| 6925 | setautogain(gspca_dev); |
Jean-François Moine | f180190 | 2012-02-27 07:48:32 -0300 | [diff] [blame^] | 6926 | |
| 6927 | /* start the transfer update thread if needed */ |
| 6928 | if (gspca_dev->usb_err >= 0) { |
| 6929 | switch (sd->sensor) { |
| 6930 | case SENSOR_HV7131R: |
| 6931 | case SENSOR_PAS202B: |
| 6932 | sd->work_thread = create_singlethread_workqueue(MODULE_NAME); |
| 6933 | queue_work(sd->work_thread, &sd->work); |
| 6934 | break; |
| 6935 | } |
| 6936 | } |
| 6937 | |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6938 | return gspca_dev->usb_err; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6939 | } |
| 6940 | |
Jean-Francois Moine | 98522a7 | 2008-11-18 06:33:08 -0300 | [diff] [blame] | 6941 | /* called on streamoff with alt 0 and on disconnect */ |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6942 | static void sd_stop0(struct gspca_dev *gspca_dev) |
| 6943 | { |
| 6944 | struct sd *sd = (struct sd *) gspca_dev; |
| 6945 | |
Jean-François Moine | f180190 | 2012-02-27 07:48:32 -0300 | [diff] [blame^] | 6946 | if (sd->work_thread != NULL) { |
| 6947 | mutex_unlock(&gspca_dev->usb_lock); |
| 6948 | destroy_workqueue(sd->work_thread); |
| 6949 | mutex_lock(&gspca_dev->usb_lock); |
| 6950 | sd->work_thread = NULL; |
| 6951 | } |
Jean-Francois Moine | 98522a7 | 2008-11-18 06:33:08 -0300 | [diff] [blame] | 6952 | if (!gspca_dev->present) |
| 6953 | return; |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 6954 | send_unknown(gspca_dev, sd->sensor); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6955 | } |
| 6956 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6957 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6958 | u8 *data, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6959 | int len) |
| 6960 | { |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6961 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6962 | |
Jean-François Moine | a5ecdfb | 2011-01-24 16:31:58 -0300 | [diff] [blame] | 6963 | /* check the JPEG end of frame */ |
| 6964 | if (len >= 3 |
| 6965 | && data[len - 3] == 0xff && data[len - 2] == 0xd9) { |
| 6966 | /*fixme: what does the last byte mean?*/ |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6967 | gspca_frame_add(gspca_dev, LAST_PACKET, |
Jean-François Moine | a5ecdfb | 2011-01-24 16:31:58 -0300 | [diff] [blame] | 6968 | data, len - 1); |
| 6969 | return; |
| 6970 | } |
| 6971 | |
| 6972 | /* check the JPEG start of a frame */ |
| 6973 | if (data[0] == 0xff && data[1] == 0xd8) { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6974 | /* put the JPEG header in the new frame */ |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6975 | gspca_frame_add(gspca_dev, FIRST_PACKET, |
Jean-Francois Moine | 71cb276 | 2009-03-03 05:33:41 -0300 | [diff] [blame] | 6976 | sd->jpeg_hdr, JPEG_HDR_SZ); |
| 6977 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6978 | /* remove the webcam's header: |
| 6979 | * ff d8 ff fe 00 0e 00 00 ss ss 00 01 ww ww hh hh pp pp |
| 6980 | * - 'ss ss' is the frame sequence number (BE) |
Jean-François Moine | 780e312 | 2010-10-19 04:29:10 -0300 | [diff] [blame] | 6981 | * - 'ww ww' and 'hh hh' are the window dimensions (BE) |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6982 | * - 'pp pp' is the packet sequence number (BE) |
| 6983 | */ |
| 6984 | data += 18; |
| 6985 | len -= 18; |
| 6986 | } |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 6987 | gspca_frame_add(gspca_dev, INTER_PACKET, data, len); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 6988 | } |
| 6989 | |
Jean-François Moine | 590f216 | 2011-03-22 06:47:56 -0300 | [diff] [blame] | 6990 | static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val) |
| 6991 | { |
| 6992 | struct sd *sd = (struct sd *) gspca_dev; |
| 6993 | |
| 6994 | sd->ctrls[AUTOGAIN].val = val; |
| 6995 | if (val) { |
| 6996 | gspca_dev->ctrl_inac |= (1 << EXPOSURE); |
| 6997 | } else { |
| 6998 | gspca_dev->ctrl_inac &= ~(1 << EXPOSURE); |
| 6999 | if (gspca_dev->streaming) |
| 7000 | getexposure(gspca_dev); |
| 7001 | } |
| 7002 | if (gspca_dev->streaming) |
| 7003 | setautogain(gspca_dev); |
| 7004 | return gspca_dev->usb_err; |
| 7005 | } |
| 7006 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7007 | static int sd_querymenu(struct gspca_dev *gspca_dev, |
| 7008 | struct v4l2_querymenu *menu) |
| 7009 | { |
| 7010 | switch (menu->id) { |
| 7011 | case V4L2_CID_POWER_LINE_FREQUENCY: |
| 7012 | switch (menu->index) { |
| 7013 | case 0: /* V4L2_CID_POWER_LINE_FREQUENCY_DISABLED */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7014 | strcpy((char *) menu->name, "NoFliker"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7015 | return 0; |
| 7016 | case 1: /* V4L2_CID_POWER_LINE_FREQUENCY_50HZ */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7017 | strcpy((char *) menu->name, "50 Hz"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7018 | return 0; |
| 7019 | case 2: /* V4L2_CID_POWER_LINE_FREQUENCY_60HZ */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7020 | strcpy((char *) menu->name, "60 Hz"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7021 | return 0; |
| 7022 | } |
| 7023 | break; |
| 7024 | } |
| 7025 | return -EINVAL; |
| 7026 | } |
| 7027 | |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 7028 | static int sd_set_jcomp(struct gspca_dev *gspca_dev, |
| 7029 | struct v4l2_jpegcompression *jcomp) |
| 7030 | { |
| 7031 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 7032 | int i; |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 7033 | |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 7034 | for (i = 0; i < ARRAY_SIZE(jpeg_qual) - 1; i++) { |
| 7035 | if (jcomp->quality <= jpeg_qual[i]) |
| 7036 | break; |
| 7037 | } |
| 7038 | if (i > 0 |
| 7039 | && i == sd->reg08 |
| 7040 | && jcomp->quality < jpeg_qual[sd->reg08]) |
| 7041 | i--; |
| 7042 | sd->reg08 = i; |
| 7043 | jcomp->quality = jpeg_qual[i]; |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 7044 | if (gspca_dev->streaming) |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 7045 | jpeg_set_qual(sd->jpeg_hdr, jcomp->quality); |
Jean-François Moine | 6d31450 | 2010-08-04 05:44:13 -0300 | [diff] [blame] | 7046 | return gspca_dev->usb_err; |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 7047 | } |
| 7048 | |
| 7049 | static int sd_get_jcomp(struct gspca_dev *gspca_dev, |
| 7050 | struct v4l2_jpegcompression *jcomp) |
| 7051 | { |
| 7052 | struct sd *sd = (struct sd *) gspca_dev; |
| 7053 | |
| 7054 | memset(jcomp, 0, sizeof *jcomp); |
Jean-François Moine | 30c73d4 | 2012-02-27 07:26:30 -0300 | [diff] [blame] | 7055 | jcomp->quality = jpeg_qual[sd->reg08]; |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 7056 | jcomp->jpeg_markers = V4L2_JPEG_MARKER_DHT |
| 7057 | | V4L2_JPEG_MARKER_DQT; |
| 7058 | return 0; |
| 7059 | } |
| 7060 | |
Jean-François Moine | 2856643 | 2010-10-01 07:33:26 -0300 | [diff] [blame] | 7061 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
Hans de Goede | 1a35102 | 2010-01-29 11:05:25 -0300 | [diff] [blame] | 7062 | static int sd_int_pkt_scan(struct gspca_dev *gspca_dev, |
| 7063 | u8 *data, /* interrupt packet data */ |
| 7064 | int len) /* interrput packet length */ |
| 7065 | { |
| 7066 | if (len == 8 && data[4] == 1) { |
| 7067 | input_report_key(gspca_dev->input_dev, KEY_CAMERA, 1); |
| 7068 | input_sync(gspca_dev->input_dev); |
| 7069 | input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0); |
| 7070 | input_sync(gspca_dev->input_dev); |
| 7071 | } |
| 7072 | |
| 7073 | return 0; |
| 7074 | } |
| 7075 | #endif |
| 7076 | |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 7077 | static const struct sd_desc sd_desc = { |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7078 | .name = MODULE_NAME, |
| 7079 | .ctrls = sd_ctrls, |
Mauro Carvalho Chehab | d6f76b9 | 2009-07-22 00:02:29 -0300 | [diff] [blame] | 7080 | .nctrls = ARRAY_SIZE(sd_ctrls), |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7081 | .config = sd_config, |
Jean-Francois Moine | 012d6b0 | 2008-09-03 17:12:16 -0300 | [diff] [blame] | 7082 | .init = sd_init, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7083 | .start = sd_start, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7084 | .stop0 = sd_stop0, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7085 | .pkt_scan = sd_pkt_scan, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7086 | .querymenu = sd_querymenu, |
Jean-Francois Moine | 77ac0ba | 2009-03-02 06:40:52 -0300 | [diff] [blame] | 7087 | .get_jcomp = sd_get_jcomp, |
| 7088 | .set_jcomp = sd_set_jcomp, |
Jean-François Moine | 2856643 | 2010-10-01 07:33:26 -0300 | [diff] [blame] | 7089 | #if defined(CONFIG_INPUT) || defined(CONFIG_INPUT_MODULE) |
Hans de Goede | 1a35102 | 2010-01-29 11:05:25 -0300 | [diff] [blame] | 7090 | .int_pkt_scan = sd_int_pkt_scan, |
| 7091 | #endif |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7092 | }; |
| 7093 | |
Jean-François Moine | 95c967c | 2011-01-13 05:20:29 -0300 | [diff] [blame] | 7094 | static const struct usb_device_id device_table[] = { |
Wolfram Sang | e177129 | 2011-09-23 04:47:58 -0300 | [diff] [blame] | 7095 | {USB_DEVICE(0x03f0, 0x1b07)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7096 | {USB_DEVICE(0x041e, 0x041e)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7097 | {USB_DEVICE(0x041e, 0x4017)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7098 | {USB_DEVICE(0x041e, 0x401c), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7099 | {USB_DEVICE(0x041e, 0x401e)}, |
| 7100 | {USB_DEVICE(0x041e, 0x401f)}, |
Hans de Goede | 222a07f | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 7101 | {USB_DEVICE(0x041e, 0x4022)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7102 | {USB_DEVICE(0x041e, 0x4029)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7103 | {USB_DEVICE(0x041e, 0x4034), .driver_info = SENSOR_PAS106}, |
| 7104 | {USB_DEVICE(0x041e, 0x4035), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7105 | {USB_DEVICE(0x041e, 0x4036)}, |
| 7106 | {USB_DEVICE(0x041e, 0x403a)}, |
Jean-François Moine | 7fbee99 | 2010-12-28 07:17:40 -0300 | [diff] [blame] | 7107 | {USB_DEVICE(0x041e, 0x4051), .driver_info = SENSOR_GC0303}, |
| 7108 | {USB_DEVICE(0x041e, 0x4053), .driver_info = SENSOR_GC0303}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7109 | {USB_DEVICE(0x0458, 0x7007)}, |
| 7110 | {USB_DEVICE(0x0458, 0x700c)}, |
| 7111 | {USB_DEVICE(0x0458, 0x700f)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7112 | {USB_DEVICE(0x0461, 0x0a00)}, |
Fabio Rossi | 88a40cf | 2008-12-26 14:41:48 -0300 | [diff] [blame] | 7113 | {USB_DEVICE(0x046d, 0x089d), .driver_info = SENSOR_MC501CB}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7114 | {USB_DEVICE(0x046d, 0x08a0)}, |
| 7115 | {USB_DEVICE(0x046d, 0x08a1)}, |
| 7116 | {USB_DEVICE(0x046d, 0x08a2)}, |
| 7117 | {USB_DEVICE(0x046d, 0x08a3)}, |
| 7118 | {USB_DEVICE(0x046d, 0x08a6)}, |
| 7119 | {USB_DEVICE(0x046d, 0x08a7)}, |
| 7120 | {USB_DEVICE(0x046d, 0x08a9)}, |
| 7121 | {USB_DEVICE(0x046d, 0x08aa)}, |
| 7122 | {USB_DEVICE(0x046d, 0x08ac)}, |
| 7123 | {USB_DEVICE(0x046d, 0x08ad)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7124 | {USB_DEVICE(0x046d, 0x08ae)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7125 | {USB_DEVICE(0x046d, 0x08af)}, |
| 7126 | {USB_DEVICE(0x046d, 0x08b9)}, |
| 7127 | {USB_DEVICE(0x046d, 0x08d7)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7128 | {USB_DEVICE(0x046d, 0x08d8)}, |
Jean-François Moine | 7d55a84 | 2010-12-28 07:02:32 -0300 | [diff] [blame] | 7129 | {USB_DEVICE(0x046d, 0x08d9)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7130 | {USB_DEVICE(0x046d, 0x08da)}, |
Hans de Goede | d6db35e | 2008-09-03 17:12:13 -0300 | [diff] [blame] | 7131 | {USB_DEVICE(0x046d, 0x08dd), .driver_info = SENSOR_MC501CB}, |
| 7132 | {USB_DEVICE(0x0471, 0x0325), .driver_info = SENSOR_PAS106}, |
| 7133 | {USB_DEVICE(0x0471, 0x0326), .driver_info = SENSOR_PAS106}, |
| 7134 | {USB_DEVICE(0x0471, 0x032d), .driver_info = SENSOR_PAS106}, |
| 7135 | {USB_DEVICE(0x0471, 0x032e), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7136 | {USB_DEVICE(0x055f, 0xc005)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7137 | {USB_DEVICE(0x055f, 0xd003)}, |
| 7138 | {USB_DEVICE(0x055f, 0xd004)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7139 | {USB_DEVICE(0x0698, 0x2003)}, |
Hans de Goede | 222a07f | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 7140 | {USB_DEVICE(0x0ac8, 0x0301), .driver_info = SENSOR_PAS106}, |
Douglas Schilling Landgraf | d99819d | 2009-03-26 05:10:55 -0300 | [diff] [blame] | 7141 | {USB_DEVICE(0x0ac8, 0x0302), .driver_info = SENSOR_PAS106}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7142 | {USB_DEVICE(0x0ac8, 0x301b)}, |
| 7143 | {USB_DEVICE(0x0ac8, 0x303b)}, |
Jean-Francois Moine | 7bd330b | 2009-12-02 06:06:03 -0300 | [diff] [blame] | 7144 | {USB_DEVICE(0x0ac8, 0x305b)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7145 | {USB_DEVICE(0x0ac8, 0x307b)}, |
| 7146 | {USB_DEVICE(0x10fd, 0x0128)}, |
Hans de Goede | 222a07f | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 7147 | {USB_DEVICE(0x10fd, 0x804d)}, |
Jean-Francois Moine | 9d64fdb | 2008-07-25 08:53:03 -0300 | [diff] [blame] | 7148 | {USB_DEVICE(0x10fd, 0x8050)}, |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7149 | {} /* end of entry */ |
| 7150 | }; |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7151 | MODULE_DEVICE_TABLE(usb, device_table); |
| 7152 | |
| 7153 | /* -- device connect -- */ |
| 7154 | static int sd_probe(struct usb_interface *intf, |
| 7155 | const struct usb_device_id *id) |
| 7156 | { |
| 7157 | return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd), |
| 7158 | THIS_MODULE); |
| 7159 | } |
| 7160 | |
| 7161 | /* USB driver */ |
| 7162 | static struct usb_driver sd_driver = { |
| 7163 | .name = MODULE_NAME, |
| 7164 | .id_table = device_table, |
| 7165 | .probe = sd_probe, |
| 7166 | .disconnect = gspca_disconnect, |
Jean-Francois Moine | 6a70974 | 2008-09-03 16:48:10 -0300 | [diff] [blame] | 7167 | #ifdef CONFIG_PM |
| 7168 | .suspend = gspca_suspend, |
| 7169 | .resume = gspca_resume, |
| 7170 | #endif |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7171 | }; |
| 7172 | |
Greg Kroah-Hartman | ecb3b2b | 2011-11-18 09:46:12 -0800 | [diff] [blame] | 7173 | module_usb_driver(sd_driver); |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7174 | |
Jean-Francois Moine | d43fa32 | 2008-06-12 10:58:58 -0300 | [diff] [blame] | 7175 | module_param(force_sensor, int, 0644); |
| 7176 | MODULE_PARM_DESC(force_sensor, |
| 7177 | "Force sensor. Only for experts!!!"); |