Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1 | /* |
Jean-François Moine | 27c6f9e | 2010-04-02 06:59:13 -0300 | [diff] [blame] | 2 | * Z-star vc0321 library |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3 | * |
Jean-François Moine | 27c6f9e | 2010-04-02 06:59:13 -0300 | [diff] [blame] | 4 | * Copyright (C) 2009-2010 Jean-François Moine <http://moinejf.free.fr> |
| 5 | * Copyright (C) 2006 Koninski Artur takeshi87@o2.pl |
| 6 | * Copyright (C) 2006 Michel Xhaard |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 21 | */ |
| 22 | |
| 23 | #define MODULE_NAME "vc032x" |
| 24 | |
| 25 | #include "gspca.h" |
| 26 | |
Jean-François Moine | 27c6f9e | 2010-04-02 06:59:13 -0300 | [diff] [blame] | 27 | MODULE_AUTHOR("Jean-François Moine <http://moinejf.free.fr>"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 28 | MODULE_DESCRIPTION("GSPCA/VC032X USB Camera Driver"); |
| 29 | MODULE_LICENSE("GPL"); |
| 30 | |
| 31 | /* specific webcam descriptor */ |
| 32 | struct sd { |
| 33 | struct gspca_dev gspca_dev; /* !! must be the first item */ |
| 34 | |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 35 | u8 brightness; |
| 36 | u8 contrast; |
| 37 | u8 colors; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 38 | u8 hflip; |
| 39 | u8 vflip; |
| 40 | u8 lightfreq; |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 41 | s8 sharpness; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 42 | |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 43 | u8 image_offset; |
| 44 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 45 | u8 bridge; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 46 | #define BRIDGE_VC0321 0 |
| 47 | #define BRIDGE_VC0323 1 |
Jean-Francois Moine | 49cb6b0 | 2009-04-25 13:29:01 -0300 | [diff] [blame] | 48 | u8 sensor; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 49 | #define SENSOR_HV7131R 0 |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 50 | #define SENSOR_MI0360 1 |
Jean-Francois Moine | db786a3 | 2009-03-23 06:03:52 -0300 | [diff] [blame] | 51 | #define SENSOR_MI1310_SOC 2 |
| 52 | #define SENSOR_MI1320 3 |
| 53 | #define SENSOR_MI1320_SOC 4 |
| 54 | #define SENSOR_OV7660 5 |
| 55 | #define SENSOR_OV7670 6 |
| 56 | #define SENSOR_PO1200 7 |
| 57 | #define SENSOR_PO3130NC 8 |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 58 | #define SENSOR_POxxxx 9 |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 59 | u8 flags; |
| 60 | #define FL_SAMSUNG 0x01 /* SamsungQ1 (2 sensors) */ |
| 61 | #define FL_HFLIP 0x02 /* mirrored by default */ |
| 62 | #define FL_VFLIP 0x04 /* vertical flipped by default */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 63 | }; |
| 64 | |
| 65 | /* V4L2 controls supported by the driver */ |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 66 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val); |
| 67 | static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val); |
| 68 | static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val); |
| 69 | static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val); |
| 70 | static int sd_setcolors(struct gspca_dev *gspca_dev, __s32 val); |
| 71 | static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 72 | static int sd_sethflip(struct gspca_dev *gspca_dev, __s32 val); |
| 73 | static int sd_gethflip(struct gspca_dev *gspca_dev, __s32 *val); |
| 74 | static int sd_setvflip(struct gspca_dev *gspca_dev, __s32 val); |
| 75 | static int sd_getvflip(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 76 | static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val); |
| 77 | static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 78 | static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val); |
| 79 | static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 80 | |
Marton Nemeth | 7e64dc4 | 2009-12-30 09:12:41 -0300 | [diff] [blame] | 81 | static const struct ctrl sd_ctrls[] = { |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 82 | #define BRIGHTNESS_IDX 0 |
| 83 | { |
| 84 | { |
| 85 | .id = V4L2_CID_BRIGHTNESS, |
| 86 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 87 | .name = "Brightness", |
| 88 | .minimum = 0, |
| 89 | .maximum = 255, |
| 90 | .step = 1, |
| 91 | #define BRIGHTNESS_DEF 128 |
| 92 | .default_value = BRIGHTNESS_DEF, |
| 93 | }, |
| 94 | .set = sd_setbrightness, |
| 95 | .get = sd_getbrightness, |
| 96 | }, |
| 97 | #define CONTRAST_IDX 1 |
| 98 | { |
| 99 | { |
| 100 | .id = V4L2_CID_CONTRAST, |
| 101 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 102 | .name = "Contrast", |
| 103 | .minimum = 0, |
| 104 | .maximum = 255, |
| 105 | .step = 1, |
| 106 | #define CONTRAST_DEF 127 |
| 107 | .default_value = CONTRAST_DEF, |
| 108 | }, |
| 109 | .set = sd_setcontrast, |
| 110 | .get = sd_getcontrast, |
| 111 | }, |
| 112 | #define COLORS_IDX 2 |
| 113 | { |
| 114 | { |
| 115 | .id = V4L2_CID_SATURATION, |
| 116 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 117 | .name = "Saturation", |
| 118 | .minimum = 1, |
| 119 | .maximum = 127, |
| 120 | .step = 1, |
| 121 | #define COLOR_DEF 63 |
| 122 | .default_value = COLOR_DEF, |
| 123 | }, |
| 124 | .set = sd_setcolors, |
| 125 | .get = sd_getcolors, |
| 126 | }, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 127 | /* next 2 controls work with some sensors only */ |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 128 | #define HFLIP_IDX 3 |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 129 | { |
| 130 | { |
| 131 | .id = V4L2_CID_HFLIP, |
| 132 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
| 133 | .name = "Mirror", |
| 134 | .minimum = 0, |
| 135 | .maximum = 1, |
| 136 | .step = 1, |
| 137 | #define HFLIP_DEF 0 |
| 138 | .default_value = HFLIP_DEF, |
| 139 | }, |
| 140 | .set = sd_sethflip, |
| 141 | .get = sd_gethflip, |
| 142 | }, |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 143 | #define VFLIP_IDX 4 |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 144 | { |
| 145 | { |
| 146 | .id = V4L2_CID_VFLIP, |
| 147 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
| 148 | .name = "Vflip", |
| 149 | .minimum = 0, |
| 150 | .maximum = 1, |
| 151 | .step = 1, |
| 152 | #define VFLIP_DEF 0 |
| 153 | .default_value = VFLIP_DEF, |
| 154 | }, |
| 155 | .set = sd_setvflip, |
| 156 | .get = sd_getvflip, |
| 157 | }, |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 158 | #define LIGHTFREQ_IDX 5 |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 159 | { |
| 160 | { |
| 161 | .id = V4L2_CID_POWER_LINE_FREQUENCY, |
| 162 | .type = V4L2_CTRL_TYPE_MENU, |
| 163 | .name = "Light frequency filter", |
| 164 | .minimum = 0, |
Jean-Francois Moine | d0d0e39 | 2008-07-10 07:06:44 -0300 | [diff] [blame] | 165 | .maximum = 2, /* 0: No, 1: 50Hz, 2:60Hz */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 166 | .step = 1, |
Jean-Francois Moine | d0d0e39 | 2008-07-10 07:06:44 -0300 | [diff] [blame] | 167 | #define FREQ_DEF 1 |
| 168 | .default_value = FREQ_DEF, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 169 | }, |
| 170 | .set = sd_setfreq, |
| 171 | .get = sd_getfreq, |
| 172 | }, |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 173 | #define SHARPNESS_IDX 6 |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 174 | { |
| 175 | { |
| 176 | .id = V4L2_CID_SHARPNESS, |
| 177 | .type = V4L2_CTRL_TYPE_INTEGER, |
| 178 | .name = "Sharpness", |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 179 | .minimum = -1, |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 180 | .maximum = 2, |
| 181 | .step = 1, |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 182 | #define SHARPNESS_DEF -1 |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 183 | .default_value = SHARPNESS_DEF, |
| 184 | }, |
| 185 | .set = sd_setsharpness, |
| 186 | .get = sd_getsharpness, |
| 187 | }, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 188 | }; |
| 189 | |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 190 | /* table of the disabled controls */ |
| 191 | static u32 ctrl_dis[] = { |
| 192 | /* SENSOR_HV7131R 0 */ |
| 193 | (1 << BRIGHTNESS_IDX) | (1 << CONTRAST_IDX) | (1 << COLORS_IDX) |
| 194 | | (1 << HFLIP_IDX) | (1 << VFLIP_IDX) | (1 << LIGHTFREQ_IDX) |
| 195 | | (1 << SHARPNESS_IDX), |
| 196 | /* SENSOR_MI0360 1 */ |
| 197 | (1 << BRIGHTNESS_IDX) | (1 << CONTRAST_IDX) | (1 << COLORS_IDX) |
| 198 | | (1 << HFLIP_IDX) | (1 << VFLIP_IDX) | (1 << LIGHTFREQ_IDX) |
| 199 | | (1 << SHARPNESS_IDX), |
| 200 | /* SENSOR_MI1310_SOC 2 */ |
| 201 | (1 << BRIGHTNESS_IDX) | (1 << CONTRAST_IDX) | (1 << COLORS_IDX) |
| 202 | | (1 << LIGHTFREQ_IDX) | (1 << SHARPNESS_IDX), |
| 203 | /* SENSOR_MI1320 3 */ |
| 204 | (1 << BRIGHTNESS_IDX) | (1 << CONTRAST_IDX) | (1 << COLORS_IDX) |
| 205 | | (1 << LIGHTFREQ_IDX) | (1 << SHARPNESS_IDX), |
| 206 | /* SENSOR_MI1320_SOC 4 */ |
| 207 | (1 << BRIGHTNESS_IDX) | (1 << CONTRAST_IDX) | (1 << COLORS_IDX) |
| 208 | | (1 << LIGHTFREQ_IDX) | (1 << SHARPNESS_IDX), |
| 209 | /* SENSOR_OV7660 5 */ |
| 210 | (1 << BRIGHTNESS_IDX) | (1 << CONTRAST_IDX) | (1 << COLORS_IDX) |
| 211 | | (1 << LIGHTFREQ_IDX) | (1 << SHARPNESS_IDX), |
| 212 | /* SENSOR_OV7670 6 */ |
| 213 | (1 << BRIGHTNESS_IDX) | (1 << CONTRAST_IDX) | (1 << COLORS_IDX) |
| 214 | | (1 << SHARPNESS_IDX), |
| 215 | /* SENSOR_PO1200 7 */ |
| 216 | (1 << BRIGHTNESS_IDX) | (1 << CONTRAST_IDX) | (1 << COLORS_IDX) |
| 217 | | (1 << LIGHTFREQ_IDX), |
| 218 | /* SENSOR_PO3130NC 8 */ |
| 219 | (1 << BRIGHTNESS_IDX) | (1 << CONTRAST_IDX) | (1 << COLORS_IDX) |
| 220 | | (1 << HFLIP_IDX) | (1 << VFLIP_IDX) | (1 << LIGHTFREQ_IDX) |
| 221 | | (1 << SHARPNESS_IDX), |
| 222 | /* SENSOR_POxxxx 9 */ |
| 223 | (1 << HFLIP_IDX) | (1 << VFLIP_IDX) | (1 << LIGHTFREQ_IDX), |
| 224 | }; |
| 225 | |
Jean-Francois Moine | cc611b8 | 2008-12-29 07:49:41 -0300 | [diff] [blame] | 226 | static const struct v4l2_pix_format vc0321_mode[] = { |
Jean-Francois Moine | 2012254 | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 227 | {320, 240, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, |
Jean-Francois Moine | 00b27ce | 2008-07-30 05:47:54 -0300 | [diff] [blame] | 228 | .bytesperline = 320, |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 229 | .sizeimage = 320 * 240 * 2, |
| 230 | .colorspace = V4L2_COLORSPACE_SRGB, |
| 231 | .priv = 1}, |
Jean-Francois Moine | 2012254 | 2008-09-03 17:12:20 -0300 | [diff] [blame] | 232 | {640, 480, V4L2_PIX_FMT_YVYU, V4L2_FIELD_NONE, |
Jean-Francois Moine | 00b27ce | 2008-07-30 05:47:54 -0300 | [diff] [blame] | 233 | .bytesperline = 640, |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 234 | .sizeimage = 640 * 480 * 2, |
| 235 | .colorspace = V4L2_COLORSPACE_SRGB, |
| 236 | .priv = 0}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 237 | }; |
Jean-Francois Moine | cc611b8 | 2008-12-29 07:49:41 -0300 | [diff] [blame] | 238 | static const struct v4l2_pix_format vc0323_mode[] = { |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 239 | {320, 240, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 240 | .bytesperline = 320, |
| 241 | .sizeimage = 320 * 240 * 3 / 8 + 590, |
| 242 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 243 | .priv = 1}, |
| 244 | {640, 480, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 245 | .bytesperline = 640, |
| 246 | .sizeimage = 640 * 480 * 3 / 8 + 590, |
| 247 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 248 | .priv = 0}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 249 | {1280, 960, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, /* mi1310_soc only */ |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 250 | .bytesperline = 1280, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 251 | .sizeimage = 1280 * 960 * 3 / 8 + 590, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 252 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 253 | .priv = 2}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 254 | }; |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 255 | static const struct v4l2_pix_format bi_mode[] = { |
Jean-Francois Moine | 2c95610 | 2009-05-05 04:59:45 -0300 | [diff] [blame] | 256 | {320, 240, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 257 | .bytesperline = 320, |
| 258 | .sizeimage = 320 * 240 * 2, |
| 259 | .colorspace = V4L2_COLORSPACE_SRGB, |
Jean-Francois Moine | 51412aa | 2009-03-26 06:03:28 -0300 | [diff] [blame] | 260 | .priv = 2}, |
Jean-Francois Moine | 2c95610 | 2009-05-05 04:59:45 -0300 | [diff] [blame] | 261 | {640, 480, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 262 | .bytesperline = 640, |
| 263 | .sizeimage = 640 * 480 * 2, |
| 264 | .colorspace = V4L2_COLORSPACE_SRGB, |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 265 | .priv = 1}, |
Jean-Francois Moine | 2c95610 | 2009-05-05 04:59:45 -0300 | [diff] [blame] | 266 | {1280, 1024, V4L2_PIX_FMT_YUYV, V4L2_FIELD_NONE, |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 267 | .bytesperline = 1280, |
| 268 | .sizeimage = 1280 * 1024 * 2, |
| 269 | .colorspace = V4L2_COLORSPACE_SRGB, |
| 270 | .priv = 0}, |
| 271 | }; |
Jean-Francois Moine | cc611b8 | 2008-12-29 07:49:41 -0300 | [diff] [blame] | 272 | static const struct v4l2_pix_format svga_mode[] = { |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 273 | {800, 600, V4L2_PIX_FMT_JPEG, V4L2_FIELD_NONE, |
| 274 | .bytesperline = 800, |
| 275 | .sizeimage = 800 * 600 * 1 / 4 + 590, |
| 276 | .colorspace = V4L2_COLORSPACE_JPEG, |
| 277 | .priv = 0}, |
| 278 | }; |
| 279 | |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 280 | /* OV7660/7670 registers */ |
| 281 | #define OV7660_REG_MVFP 0x1e |
| 282 | #define OV7660_MVFP_MIRROR 0x20 |
| 283 | #define OV7660_MVFP_VFLIP 0x10 |
| 284 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 285 | static const u8 mi0360_matrix[9] = { |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 286 | 0x50, 0xf8, 0xf8, 0xf5, 0x50, 0xfb, 0xff, 0xf1, 0x50 |
| 287 | }; |
| 288 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 289 | static const u8 mi0360_initVGA_JPG[][4] = { |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 290 | {0xb0, 0x03, 0x19, 0xcc}, |
| 291 | {0xb0, 0x04, 0x02, 0xcc}, |
| 292 | {0xb3, 0x00, 0x24, 0xcc}, |
| 293 | {0xb3, 0x00, 0x25, 0xcc}, |
| 294 | {0xb3, 0x08, 0x01, 0xcc}, |
| 295 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 296 | {0xb3, 0x05, 0x01, 0xcc}, |
| 297 | {0xb3, 0x06, 0x03, 0xcc}, |
| 298 | {0xb3, 0x03, 0x0a, 0xcc}, |
| 299 | {0xb3, 0x20, 0x00, 0xcc}, |
| 300 | {0xb3, 0x21, 0x00, 0xcc}, |
| 301 | {0xb3, 0x22, 0x01, 0xcc}, |
| 302 | {0xb3, 0x23, 0xe0, 0xcc}, |
| 303 | {0xb3, 0x04, 0x05, 0xcc}, |
| 304 | {0xb3, 0x14, 0x00, 0xcc}, |
| 305 | {0xb3, 0x15, 0x00, 0xcc}, |
| 306 | {0xb3, 0x16, 0x02, 0xcc}, |
| 307 | {0xb3, 0x17, 0x7f, 0xcc}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 308 | {0xb3, 0x35, 0xdd, 0xcc}, /* i2c add: 5d */ |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 309 | {0xb3, 0x34, 0x02, 0xcc}, |
| 310 | {0xb3, 0x00, 0x25, 0xcc}, |
| 311 | {0xbc, 0x00, 0x71, 0xcc}, |
| 312 | {0xb8, 0x00, 0x13, 0xcc}, |
| 313 | {0xb8, 0x27, 0x20, 0xcc}, |
| 314 | {0xb8, 0x2c, 0x50, 0xcc}, |
| 315 | {0xb8, 0x2d, 0xf8, 0xcc}, |
| 316 | {0xb8, 0x2e, 0xf8, 0xcc}, |
| 317 | {0xb8, 0x2f, 0xf8, 0xcc}, |
| 318 | {0xb8, 0x30, 0x50, 0xcc}, |
| 319 | {0xb8, 0x31, 0xf8, 0xcc}, |
| 320 | {0xb8, 0x32, 0xf8, 0xcc}, |
| 321 | {0xb8, 0x33, 0xf8, 0xcc}, |
| 322 | {0xb8, 0x34, 0x50, 0xcc}, |
| 323 | {0xb8, 0x35, 0x00, 0xcc}, |
| 324 | {0xb8, 0x36, 0x00, 0xcc}, |
| 325 | {0xb8, 0x37, 0x00, 0xcc}, |
| 326 | {0xb8, 0x01, 0x79, 0xcc}, |
| 327 | {0xb8, 0x08, 0xe0, 0xcc}, |
| 328 | {0xb3, 0x01, 0x41, 0xcc}, |
| 329 | {0xb8, 0x01, 0x79, 0xcc}, |
| 330 | {0xb8, 0x14, 0x18, 0xcc}, |
| 331 | {0xb8, 0xb2, 0x0a, 0xcc}, |
| 332 | {0xb8, 0xb4, 0x0a, 0xcc}, |
| 333 | {0xb8, 0xb5, 0x0a, 0xcc}, |
| 334 | {0xb8, 0xfe, 0x00, 0xcc}, |
| 335 | {0xb8, 0xff, 0x28, 0xcc}, |
| 336 | {0xb9, 0x00, 0x28, 0xcc}, |
| 337 | {0xb9, 0x01, 0x28, 0xcc}, |
| 338 | {0xb9, 0x02, 0x28, 0xcc}, |
| 339 | {0xb9, 0x03, 0x00, 0xcc}, |
| 340 | {0xb9, 0x04, 0x00, 0xcc}, |
| 341 | {0xb9, 0x05, 0x3c, 0xcc}, |
| 342 | {0xb9, 0x06, 0x3c, 0xcc}, |
| 343 | {0xb9, 0x07, 0x3c, 0xcc}, |
| 344 | {0xb9, 0x08, 0x3c, 0xcc}, |
| 345 | {0xb8, 0x8e, 0x00, 0xcc}, |
| 346 | {0xb8, 0x8f, 0xff, 0xcc}, |
| 347 | {0xb8, 0x81, 0x09, 0xcc}, |
| 348 | {0x31, 0x00, 0x00, 0xbb}, |
| 349 | {0x09, 0x01, 0xc7, 0xbb}, |
| 350 | {0x34, 0x01, 0x00, 0xbb}, |
| 351 | {0x2b, 0x00, 0x28, 0xbb}, |
| 352 | {0x2c, 0x00, 0x30, 0xbb}, |
| 353 | {0x2d, 0x00, 0x30, 0xbb}, |
| 354 | {0x2e, 0x00, 0x28, 0xbb}, |
| 355 | {0x62, 0x04, 0x11, 0xbb}, |
| 356 | {0x03, 0x01, 0xe0, 0xbb}, |
| 357 | {0x2c, 0x00, 0x2c, 0xbb}, |
| 358 | {0x20, 0xd0, 0x00, 0xbb}, |
| 359 | {0x01, 0x00, 0x08, 0xbb}, |
| 360 | {0x06, 0x00, 0x10, 0xbb}, |
| 361 | {0x05, 0x00, 0x20, 0xbb}, |
| 362 | {0x20, 0x00, 0x00, 0xbb}, |
| 363 | {0xb6, 0x00, 0x00, 0xcc}, |
| 364 | {0xb6, 0x03, 0x02, 0xcc}, |
| 365 | {0xb6, 0x02, 0x80, 0xcc}, |
| 366 | {0xb6, 0x05, 0x01, 0xcc}, |
| 367 | {0xb6, 0x04, 0xe0, 0xcc}, |
| 368 | {0xb6, 0x12, 0x78, 0xcc}, |
| 369 | {0xb6, 0x18, 0x02, 0xcc}, |
| 370 | {0xb6, 0x17, 0x58, 0xcc}, |
| 371 | {0xb6, 0x16, 0x00, 0xcc}, |
| 372 | {0xb6, 0x22, 0x12, 0xcc}, |
| 373 | {0xb6, 0x23, 0x0b, 0xcc}, |
| 374 | {0xb3, 0x02, 0x02, 0xcc}, |
| 375 | {0xbf, 0xc0, 0x39, 0xcc}, |
| 376 | {0xbf, 0xc1, 0x04, 0xcc}, |
| 377 | {0xbf, 0xcc, 0x10, 0xcc}, |
| 378 | {0xb9, 0x12, 0x00, 0xcc}, |
| 379 | {0xb9, 0x13, 0x0a, 0xcc}, |
| 380 | {0xb9, 0x14, 0x0a, 0xcc}, |
| 381 | {0xb9, 0x15, 0x0a, 0xcc}, |
| 382 | {0xb9, 0x16, 0x0a, 0xcc}, |
| 383 | {0xb9, 0x18, 0x00, 0xcc}, |
| 384 | {0xb9, 0x19, 0x0f, 0xcc}, |
| 385 | {0xb9, 0x1a, 0x0f, 0xcc}, |
| 386 | {0xb9, 0x1b, 0x0f, 0xcc}, |
| 387 | {0xb9, 0x1c, 0x0f, 0xcc}, |
| 388 | {0xb8, 0x8e, 0x00, 0xcc}, |
| 389 | {0xb8, 0x8f, 0xff, 0xcc}, |
| 390 | {0xb6, 0x12, 0xf8, 0xcc}, |
| 391 | {0xb8, 0x0c, 0x20, 0xcc}, |
| 392 | {0xb8, 0x0d, 0x70, 0xcc}, |
| 393 | {0xb6, 0x13, 0x13, 0xcc}, |
| 394 | {0x35, 0x00, 0x60, 0xbb}, |
| 395 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 396 | {} |
| 397 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 398 | static const u8 mi0360_initQVGA_JPG[][4] = { |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 399 | {0xb0, 0x03, 0x19, 0xcc}, |
| 400 | {0xb0, 0x04, 0x02, 0xcc}, |
| 401 | {0xb3, 0x00, 0x24, 0xcc}, |
| 402 | {0xb3, 0x00, 0x25, 0xcc}, |
| 403 | {0xb3, 0x08, 0x01, 0xcc}, |
| 404 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 405 | {0xb3, 0x05, 0x01, 0xcc}, |
| 406 | {0xb3, 0x06, 0x03, 0xcc}, |
| 407 | {0xb3, 0x03, 0x0a, 0xcc}, |
| 408 | {0xb3, 0x20, 0x00, 0xcc}, |
| 409 | {0xb3, 0x21, 0x00, 0xcc}, |
| 410 | {0xb3, 0x22, 0x01, 0xcc}, |
| 411 | {0xb3, 0x23, 0xe0, 0xcc}, |
| 412 | {0xb3, 0x04, 0x05, 0xcc}, |
| 413 | {0xb3, 0x14, 0x00, 0xcc}, |
| 414 | {0xb3, 0x15, 0x00, 0xcc}, |
| 415 | {0xb3, 0x16, 0x02, 0xcc}, |
| 416 | {0xb3, 0x17, 0x7f, 0xcc}, |
| 417 | {0xb3, 0x35, 0xdd, 0xcc}, |
| 418 | {0xb3, 0x34, 0x02, 0xcc}, |
| 419 | {0xb3, 0x00, 0x25, 0xcc}, |
| 420 | {0xbc, 0x00, 0xd1, 0xcc}, |
| 421 | {0xb8, 0x00, 0x13, 0xcc}, |
| 422 | {0xb8, 0x27, 0x20, 0xcc}, |
| 423 | {0xb8, 0x2c, 0x50, 0xcc}, |
| 424 | {0xb8, 0x2d, 0xf8, 0xcc}, |
| 425 | {0xb8, 0x2e, 0xf8, 0xcc}, |
| 426 | {0xb8, 0x2f, 0xf8, 0xcc}, |
| 427 | {0xb8, 0x30, 0x50, 0xcc}, |
| 428 | {0xb8, 0x31, 0xf8, 0xcc}, |
| 429 | {0xb8, 0x32, 0xf8, 0xcc}, |
| 430 | {0xb8, 0x33, 0xf8, 0xcc}, |
| 431 | {0xb8, 0x34, 0x50, 0xcc}, |
| 432 | {0xb8, 0x35, 0x00, 0xcc}, |
| 433 | {0xb8, 0x36, 0x00, 0xcc}, |
| 434 | {0xb8, 0x37, 0x00, 0xcc}, |
| 435 | {0xb8, 0x01, 0x79, 0xcc}, |
| 436 | {0xb8, 0x08, 0xe0, 0xcc}, |
| 437 | {0xb3, 0x01, 0x41, 0xcc}, |
| 438 | {0xb8, 0x01, 0x79, 0xcc}, |
| 439 | {0xb8, 0x14, 0x18, 0xcc}, |
| 440 | {0xb8, 0xb2, 0x0a, 0xcc}, |
| 441 | {0xb8, 0xb4, 0x0a, 0xcc}, |
| 442 | {0xb8, 0xb5, 0x0a, 0xcc}, |
| 443 | {0xb8, 0xfe, 0x00, 0xcc}, |
| 444 | {0xb8, 0xff, 0x28, 0xcc}, |
| 445 | {0xb9, 0x00, 0x28, 0xcc}, |
| 446 | {0xb9, 0x01, 0x28, 0xcc}, |
| 447 | {0xb9, 0x02, 0x28, 0xcc}, |
| 448 | {0xb9, 0x03, 0x00, 0xcc}, |
| 449 | {0xb9, 0x04, 0x00, 0xcc}, |
| 450 | {0xb9, 0x05, 0x3c, 0xcc}, |
| 451 | {0xb9, 0x06, 0x3c, 0xcc}, |
| 452 | {0xb9, 0x07, 0x3c, 0xcc}, |
| 453 | {0xb9, 0x08, 0x3c, 0xcc}, |
| 454 | {0xb8, 0x8e, 0x00, 0xcc}, |
| 455 | {0xb8, 0x8f, 0xff, 0xcc}, |
| 456 | {0xb8, 0x81, 0x09, 0xcc}, |
| 457 | {0x31, 0x00, 0x00, 0xbb}, |
| 458 | {0x09, 0x01, 0xc7, 0xbb}, |
| 459 | {0x34, 0x01, 0x00, 0xbb}, |
| 460 | {0x2b, 0x00, 0x28, 0xbb}, |
| 461 | {0x2c, 0x00, 0x30, 0xbb}, |
| 462 | {0x2d, 0x00, 0x30, 0xbb}, |
| 463 | {0x2e, 0x00, 0x28, 0xbb}, |
| 464 | {0x62, 0x04, 0x11, 0xbb}, |
| 465 | {0x03, 0x01, 0xe0, 0xbb}, |
| 466 | {0x2c, 0x00, 0x2c, 0xbb}, |
| 467 | {0x20, 0xd0, 0x00, 0xbb}, |
| 468 | {0x01, 0x00, 0x08, 0xbb}, |
| 469 | {0x06, 0x00, 0x10, 0xbb}, |
| 470 | {0x05, 0x00, 0x20, 0xbb}, |
| 471 | {0x20, 0x00, 0x00, 0xbb}, |
| 472 | {0xb6, 0x00, 0x00, 0xcc}, |
| 473 | {0xb6, 0x03, 0x01, 0xcc}, |
| 474 | {0xb6, 0x02, 0x40, 0xcc}, |
| 475 | {0xb6, 0x05, 0x00, 0xcc}, |
| 476 | {0xb6, 0x04, 0xf0, 0xcc}, |
| 477 | {0xb6, 0x12, 0x78, 0xcc}, |
| 478 | {0xb6, 0x18, 0x00, 0xcc}, |
| 479 | {0xb6, 0x17, 0x96, 0xcc}, |
| 480 | {0xb6, 0x16, 0x00, 0xcc}, |
| 481 | {0xb6, 0x22, 0x12, 0xcc}, |
| 482 | {0xb6, 0x23, 0x0b, 0xcc}, |
| 483 | {0xb3, 0x02, 0x02, 0xcc}, |
| 484 | {0xbf, 0xc0, 0x39, 0xcc}, |
| 485 | {0xbf, 0xc1, 0x04, 0xcc}, |
| 486 | {0xbf, 0xcc, 0x10, 0xcc}, |
| 487 | {0xb9, 0x12, 0x00, 0xcc}, |
| 488 | {0xb9, 0x13, 0x0a, 0xcc}, |
| 489 | {0xb9, 0x14, 0x0a, 0xcc}, |
| 490 | {0xb9, 0x15, 0x0a, 0xcc}, |
| 491 | {0xb9, 0x16, 0x0a, 0xcc}, |
| 492 | {0xb9, 0x18, 0x00, 0xcc}, |
| 493 | {0xb9, 0x19, 0x0f, 0xcc}, |
| 494 | {0xb9, 0x1a, 0x0f, 0xcc}, |
| 495 | {0xb9, 0x1b, 0x0f, 0xcc}, |
| 496 | {0xb9, 0x1c, 0x0f, 0xcc}, |
| 497 | {0xb8, 0x8e, 0x00, 0xcc}, |
| 498 | {0xb8, 0x8f, 0xff, 0xcc}, |
| 499 | {0xb6, 0x12, 0xf8, 0xcc}, |
| 500 | {0xb6, 0x13, 0x13, 0xcc}, |
| 501 | {0xbc, 0x02, 0x18, 0xcc}, |
| 502 | {0xbc, 0x03, 0x50, 0xcc}, |
| 503 | {0xbc, 0x04, 0x18, 0xcc}, |
| 504 | {0xbc, 0x05, 0x00, 0xcc}, |
| 505 | {0xbc, 0x06, 0x00, 0xcc}, |
| 506 | {0xbc, 0x08, 0x30, 0xcc}, |
| 507 | {0xbc, 0x09, 0x40, 0xcc}, |
| 508 | {0xbc, 0x0a, 0x10, 0xcc}, |
| 509 | {0xb8, 0x0c, 0x20, 0xcc}, |
| 510 | {0xb8, 0x0d, 0x70, 0xcc}, |
| 511 | {0xbc, 0x0b, 0x00, 0xcc}, |
| 512 | {0xbc, 0x0c, 0x00, 0xcc}, |
| 513 | {0x35, 0x00, 0xef, 0xbb}, |
| 514 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 515 | {} |
| 516 | }; |
| 517 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 518 | static const u8 mi1310_socinitVGA_JPG[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 519 | {0xb0, 0x03, 0x19, 0xcc}, |
| 520 | {0xb0, 0x04, 0x02, 0xcc}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 521 | {0xb3, 0x00, 0x64, 0xcc}, |
| 522 | {0xb3, 0x00, 0x65, 0xcc}, |
| 523 | {0xb3, 0x05, 0x00, 0xcc}, |
| 524 | {0xb3, 0x06, 0x00, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 525 | {0xb3, 0x08, 0x01, 0xcc}, |
| 526 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 527 | {0xb3, 0x34, 0x02, 0xcc}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 528 | {0xb3, 0x35, 0xdd, 0xcc}, /* i2c add: 5d */ |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 529 | {0xb3, 0x02, 0x00, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 530 | {0xb3, 0x03, 0x0a, 0xcc}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 531 | {0xb3, 0x04, 0x05, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 532 | {0xb3, 0x20, 0x00, 0xcc}, |
| 533 | {0xb3, 0x21, 0x00, 0xcc}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 534 | {0xb3, 0x22, 0x03, 0xcc}, |
| 535 | {0xb3, 0x23, 0xc0, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 536 | {0xb3, 0x14, 0x00, 0xcc}, |
| 537 | {0xb3, 0x15, 0x00, 0xcc}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 538 | {0xb3, 0x16, 0x04, 0xcc}, |
| 539 | {0xb3, 0x17, 0xff, 0xcc}, |
| 540 | {0xb3, 0x00, 0x65, 0xcc}, |
| 541 | {0xb8, 0x00, 0x00, 0xcc}, |
| 542 | {0xbc, 0x00, 0xd0, 0xcc}, |
| 543 | {0xbc, 0x01, 0x01, 0xcc}, |
| 544 | {0xf0, 0x00, 0x02, 0xbb}, |
| 545 | {0xc8, 0x9f, 0x0b, 0xbb}, |
| 546 | {0x5b, 0x00, 0x01, 0xbb}, |
| 547 | {0x2f, 0xde, 0x20, 0xbb}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 548 | {0xf0, 0x00, 0x00, 0xbb}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 549 | {0x20, 0x03, 0x02, 0xbb}, /* h/v flip */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 550 | {0xf0, 0x00, 0x01, 0xbb}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 551 | {0x05, 0x00, 0x07, 0xbb}, |
| 552 | {0x34, 0x00, 0x00, 0xbb}, |
| 553 | {0x35, 0xff, 0x00, 0xbb}, |
| 554 | {0xdc, 0x07, 0x02, 0xbb}, |
| 555 | {0xdd, 0x3c, 0x18, 0xbb}, |
| 556 | {0xde, 0x92, 0x6d, 0xbb}, |
| 557 | {0xdf, 0xcd, 0xb1, 0xbb}, |
| 558 | {0xe0, 0xff, 0xe7, 0xbb}, |
| 559 | {0x06, 0xf0, 0x0d, 0xbb}, |
| 560 | {0x06, 0x70, 0x0e, 0xbb}, |
| 561 | {0x4c, 0x00, 0x01, 0xbb}, |
| 562 | {0x4d, 0x00, 0x01, 0xbb}, |
| 563 | {0xf0, 0x00, 0x02, 0xbb}, |
| 564 | {0x2e, 0x0c, 0x55, 0xbb}, |
| 565 | {0x21, 0xb6, 0x6e, 0xbb}, |
| 566 | {0x36, 0x30, 0x10, 0xbb}, |
| 567 | {0x37, 0x00, 0xc1, 0xbb}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 568 | {0xf0, 0x00, 0x00, 0xbb}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 569 | {0x07, 0x00, 0x84, 0xbb}, |
| 570 | {0x08, 0x02, 0x4a, 0xbb}, |
| 571 | {0x05, 0x01, 0x10, 0xbb}, |
| 572 | {0x06, 0x00, 0x39, 0xbb}, |
| 573 | {0xf0, 0x00, 0x02, 0xbb}, |
| 574 | {0x58, 0x02, 0x67, 0xbb}, |
| 575 | {0x57, 0x02, 0x00, 0xbb}, |
| 576 | {0x5a, 0x02, 0x67, 0xbb}, |
| 577 | {0x59, 0x02, 0x00, 0xbb}, |
| 578 | {0x5c, 0x12, 0x0d, 0xbb}, |
| 579 | {0x5d, 0x16, 0x11, 0xbb}, |
| 580 | {0x39, 0x06, 0x18, 0xbb}, |
| 581 | {0x3a, 0x06, 0x18, 0xbb}, |
| 582 | {0x3b, 0x06, 0x18, 0xbb}, |
| 583 | {0x3c, 0x06, 0x18, 0xbb}, |
| 584 | {0x64, 0x7b, 0x5b, 0xbb}, |
| 585 | {0xf0, 0x00, 0x02, 0xbb}, |
| 586 | {0x36, 0x30, 0x10, 0xbb}, |
| 587 | {0x37, 0x00, 0xc0, 0xbb}, |
| 588 | {0xbc, 0x0e, 0x00, 0xcc}, |
| 589 | {0xbc, 0x0f, 0x05, 0xcc}, |
| 590 | {0xbc, 0x10, 0xc0, 0xcc}, |
| 591 | {0xbc, 0x11, 0x03, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 592 | {0xb6, 0x00, 0x00, 0xcc}, |
| 593 | {0xb6, 0x03, 0x02, 0xcc}, |
| 594 | {0xb6, 0x02, 0x80, 0xcc}, |
| 595 | {0xb6, 0x05, 0x01, 0xcc}, |
| 596 | {0xb6, 0x04, 0xe0, 0xcc}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 597 | {0xb6, 0x12, 0xf8, 0xcc}, |
| 598 | {0xb6, 0x13, 0x25, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 599 | {0xb6, 0x18, 0x02, 0xcc}, |
| 600 | {0xb6, 0x17, 0x58, 0xcc}, |
| 601 | {0xb6, 0x16, 0x00, 0xcc}, |
| 602 | {0xb6, 0x22, 0x12, 0xcc}, |
| 603 | {0xb6, 0x23, 0x0b, 0xcc}, |
| 604 | {0xbf, 0xc0, 0x39, 0xcc}, |
| 605 | {0xbf, 0xc1, 0x04, 0xcc}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 606 | {0xbf, 0xcc, 0x00, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 607 | {0xbc, 0x02, 0x18, 0xcc}, |
| 608 | {0xbc, 0x03, 0x50, 0xcc}, |
| 609 | {0xbc, 0x04, 0x18, 0xcc}, |
| 610 | {0xbc, 0x05, 0x00, 0xcc}, |
| 611 | {0xbc, 0x06, 0x00, 0xcc}, |
| 612 | {0xbc, 0x08, 0x30, 0xcc}, |
| 613 | {0xbc, 0x09, 0x40, 0xcc}, |
| 614 | {0xbc, 0x0a, 0x10, 0xcc}, |
| 615 | {0xbc, 0x0b, 0x00, 0xcc}, |
| 616 | {0xbc, 0x0c, 0x00, 0xcc}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 617 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 618 | {0xf0, 0x00, 0x01, 0xbb}, |
| 619 | {0x80, 0x00, 0x03, 0xbb}, |
| 620 | {0x81, 0xc7, 0x14, 0xbb}, |
| 621 | {0x82, 0xeb, 0xe8, 0xbb}, |
| 622 | {0x83, 0xfe, 0xf4, 0xbb}, |
| 623 | {0x84, 0xcd, 0x10, 0xbb}, |
| 624 | {0x85, 0xf3, 0xee, 0xbb}, |
| 625 | {0x86, 0xff, 0xf1, 0xbb}, |
| 626 | {0x87, 0xcd, 0x10, 0xbb}, |
| 627 | {0x88, 0xf3, 0xee, 0xbb}, |
| 628 | {0x89, 0x01, 0xf1, 0xbb}, |
| 629 | {0x8a, 0xe5, 0x17, 0xbb}, |
| 630 | {0x8b, 0xe8, 0xe2, 0xbb}, |
| 631 | {0x8c, 0xf7, 0xed, 0xbb}, |
| 632 | {0x8d, 0x00, 0xff, 0xbb}, |
| 633 | {0x8e, 0xec, 0x10, 0xbb}, |
| 634 | {0x8f, 0xf0, 0xed, 0xbb}, |
| 635 | {0x90, 0xf9, 0xf2, 0xbb}, |
| 636 | {0x91, 0x00, 0x00, 0xbb}, |
| 637 | {0x92, 0xe9, 0x0d, 0xbb}, |
| 638 | {0x93, 0xf4, 0xf2, 0xbb}, |
| 639 | {0x94, 0xfb, 0xf5, 0xbb}, |
| 640 | {0x95, 0x00, 0xff, 0xbb}, |
| 641 | {0xb6, 0x0f, 0x08, 0xbb}, |
| 642 | {0xb7, 0x3d, 0x16, 0xbb}, |
| 643 | {0xb8, 0x0c, 0x04, 0xbb}, |
| 644 | {0xb9, 0x1c, 0x07, 0xbb}, |
| 645 | {0xba, 0x0a, 0x03, 0xbb}, |
| 646 | {0xbb, 0x1b, 0x09, 0xbb}, |
| 647 | {0xbc, 0x17, 0x0d, 0xbb}, |
| 648 | {0xbd, 0x23, 0x1d, 0xbb}, |
| 649 | {0xbe, 0x00, 0x28, 0xbb}, |
| 650 | {0xbf, 0x11, 0x09, 0xbb}, |
| 651 | {0xc0, 0x16, 0x15, 0xbb}, |
| 652 | {0xc1, 0x00, 0x1b, 0xbb}, |
| 653 | {0xc2, 0x0e, 0x07, 0xbb}, |
| 654 | {0xc3, 0x14, 0x10, 0xbb}, |
| 655 | {0xc4, 0x00, 0x17, 0xbb}, |
| 656 | {0x06, 0x74, 0x8e, 0xbb}, |
| 657 | {0xf0, 0x00, 0x01, 0xbb}, |
| 658 | {0x06, 0xf4, 0x8e, 0xbb}, |
| 659 | {0x00, 0x00, 0x50, 0xdd}, |
| 660 | {0x06, 0x74, 0x8e, 0xbb}, |
| 661 | {0xf0, 0x00, 0x02, 0xbb}, |
| 662 | {0x24, 0x50, 0x20, 0xbb}, |
| 663 | {0xf0, 0x00, 0x02, 0xbb}, |
| 664 | {0x34, 0x0c, 0x50, 0xbb}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 665 | {0xb3, 0x01, 0x41, 0xcc}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 666 | {0xf0, 0x00, 0x00, 0xbb}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 667 | {0x03, 0x03, 0xc0, 0xbb}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 668 | {}, |
| 669 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 670 | static const u8 mi1310_socinitQVGA_JPG[][4] = { |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 671 | {0xb0, 0x03, 0x19, 0xcc}, {0xb0, 0x04, 0x02, 0xcc}, |
| 672 | {0xb3, 0x00, 0x64, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, |
| 673 | {0xb3, 0x05, 0x00, 0xcc}, {0xb3, 0x06, 0x00, 0xcc}, |
| 674 | {0xb3, 0x08, 0x01, 0xcc}, {0xb3, 0x09, 0x0c, 0xcc}, |
| 675 | {0xb3, 0x34, 0x02, 0xcc}, {0xb3, 0x35, 0xdd, 0xcc}, |
| 676 | {0xb3, 0x02, 0x00, 0xcc}, {0xb3, 0x03, 0x0a, 0xcc}, |
| 677 | {0xb3, 0x04, 0x05, 0xcc}, {0xb3, 0x20, 0x00, 0xcc}, |
| 678 | {0xb3, 0x21, 0x00, 0xcc}, {0xb3, 0x22, 0x03, 0xcc}, |
| 679 | {0xb3, 0x23, 0xc0, 0xcc}, {0xb3, 0x14, 0x00, 0xcc}, |
| 680 | {0xb3, 0x15, 0x00, 0xcc}, {0xb3, 0x16, 0x04, 0xcc}, |
| 681 | {0xb3, 0x17, 0xff, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, |
| 682 | {0xb8, 0x00, 0x00, 0xcc}, {0xbc, 0x00, 0xf0, 0xcc}, |
| 683 | {0xbc, 0x01, 0x01, 0xcc}, {0xf0, 0x00, 0x02, 0xbb}, |
| 684 | {0xc8, 0x9f, 0x0b, 0xbb}, {0x5b, 0x00, 0x01, 0xbb}, |
| 685 | {0x2f, 0xde, 0x20, 0xbb}, {0xf0, 0x00, 0x00, 0xbb}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 686 | {0x20, 0x03, 0x02, 0xbb}, /* h/v flip */ |
| 687 | {0xf0, 0x00, 0x01, 0xbb}, |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 688 | {0x05, 0x00, 0x07, 0xbb}, {0x34, 0x00, 0x00, 0xbb}, |
| 689 | {0x35, 0xff, 0x00, 0xbb}, {0xdc, 0x07, 0x02, 0xbb}, |
| 690 | {0xdd, 0x3c, 0x18, 0xbb}, {0xde, 0x92, 0x6d, 0xbb}, |
| 691 | {0xdf, 0xcd, 0xb1, 0xbb}, {0xe0, 0xff, 0xe7, 0xbb}, |
| 692 | {0x06, 0xf0, 0x0d, 0xbb}, {0x06, 0x70, 0x0e, 0xbb}, |
| 693 | {0x4c, 0x00, 0x01, 0xbb}, {0x4d, 0x00, 0x01, 0xbb}, |
| 694 | {0xf0, 0x00, 0x02, 0xbb}, {0x2e, 0x0c, 0x55, 0xbb}, |
| 695 | {0x21, 0xb6, 0x6e, 0xbb}, {0x36, 0x30, 0x10, 0xbb}, |
| 696 | {0x37, 0x00, 0xc1, 0xbb}, {0xf0, 0x00, 0x00, 0xbb}, |
| 697 | {0x07, 0x00, 0x84, 0xbb}, {0x08, 0x02, 0x4a, 0xbb}, |
| 698 | {0x05, 0x01, 0x10, 0xbb}, {0x06, 0x00, 0x39, 0xbb}, |
| 699 | {0xf0, 0x00, 0x02, 0xbb}, {0x58, 0x02, 0x67, 0xbb}, |
| 700 | {0x57, 0x02, 0x00, 0xbb}, {0x5a, 0x02, 0x67, 0xbb}, |
| 701 | {0x59, 0x02, 0x00, 0xbb}, {0x5c, 0x12, 0x0d, 0xbb}, |
| 702 | {0x5d, 0x16, 0x11, 0xbb}, {0x39, 0x06, 0x18, 0xbb}, |
| 703 | {0x3a, 0x06, 0x18, 0xbb}, {0x3b, 0x06, 0x18, 0xbb}, |
| 704 | {0x3c, 0x06, 0x18, 0xbb}, {0x64, 0x7b, 0x5b, 0xbb}, |
| 705 | {0xf0, 0x00, 0x02, 0xbb}, {0x36, 0x30, 0x10, 0xbb}, |
| 706 | {0x37, 0x00, 0xc0, 0xbb}, {0xbc, 0x0e, 0x00, 0xcc}, |
| 707 | {0xbc, 0x0f, 0x05, 0xcc}, {0xbc, 0x10, 0xc0, 0xcc}, |
| 708 | {0xbc, 0x11, 0x03, 0xcc}, {0xb6, 0x00, 0x00, 0xcc}, |
| 709 | {0xb6, 0x03, 0x01, 0xcc}, {0xb6, 0x02, 0x40, 0xcc}, |
| 710 | {0xb6, 0x05, 0x00, 0xcc}, {0xb6, 0x04, 0xf0, 0xcc}, |
| 711 | {0xb6, 0x12, 0xf8, 0xcc}, {0xb6, 0x13, 0x25, 0xcc}, |
| 712 | {0xb6, 0x18, 0x00, 0xcc}, {0xb6, 0x17, 0x96, 0xcc}, |
| 713 | {0xb6, 0x16, 0x00, 0xcc}, {0xb6, 0x22, 0x12, 0xcc}, |
| 714 | {0xb6, 0x23, 0x0b, 0xcc}, {0xbf, 0xc0, 0x39, 0xcc}, |
| 715 | {0xbf, 0xc1, 0x04, 0xcc}, {0xbf, 0xcc, 0x00, 0xcc}, |
| 716 | {0xb3, 0x5c, 0x01, 0xcc}, {0xf0, 0x00, 0x01, 0xbb}, |
| 717 | {0x80, 0x00, 0x03, 0xbb}, {0x81, 0xc7, 0x14, 0xbb}, |
| 718 | {0x82, 0xeb, 0xe8, 0xbb}, {0x83, 0xfe, 0xf4, 0xbb}, |
| 719 | {0x84, 0xcd, 0x10, 0xbb}, {0x85, 0xf3, 0xee, 0xbb}, |
| 720 | {0x86, 0xff, 0xf1, 0xbb}, {0x87, 0xcd, 0x10, 0xbb}, |
| 721 | {0x88, 0xf3, 0xee, 0xbb}, {0x89, 0x01, 0xf1, 0xbb}, |
| 722 | {0x8a, 0xe5, 0x17, 0xbb}, {0x8b, 0xe8, 0xe2, 0xbb}, |
| 723 | {0x8c, 0xf7, 0xed, 0xbb}, {0x8d, 0x00, 0xff, 0xbb}, |
| 724 | {0x8e, 0xec, 0x10, 0xbb}, {0x8f, 0xf0, 0xed, 0xbb}, |
| 725 | {0x90, 0xf9, 0xf2, 0xbb}, {0x91, 0x00, 0x00, 0xbb}, |
| 726 | {0x92, 0xe9, 0x0d, 0xbb}, {0x93, 0xf4, 0xf2, 0xbb}, |
| 727 | {0x94, 0xfb, 0xf5, 0xbb}, {0x95, 0x00, 0xff, 0xbb}, |
| 728 | {0xb6, 0x0f, 0x08, 0xbb}, {0xb7, 0x3d, 0x16, 0xbb}, |
| 729 | {0xb8, 0x0c, 0x04, 0xbb}, {0xb9, 0x1c, 0x07, 0xbb}, |
| 730 | {0xba, 0x0a, 0x03, 0xbb}, {0xbb, 0x1b, 0x09, 0xbb}, |
| 731 | {0xbc, 0x17, 0x0d, 0xbb}, {0xbd, 0x23, 0x1d, 0xbb}, |
| 732 | {0xbe, 0x00, 0x28, 0xbb}, {0xbf, 0x11, 0x09, 0xbb}, |
| 733 | {0xc0, 0x16, 0x15, 0xbb}, {0xc1, 0x00, 0x1b, 0xbb}, |
| 734 | {0xc2, 0x0e, 0x07, 0xbb}, {0xc3, 0x14, 0x10, 0xbb}, |
| 735 | {0xc4, 0x00, 0x17, 0xbb}, {0x06, 0x74, 0x8e, 0xbb}, |
| 736 | {0xf0, 0x00, 0x01, 0xbb}, {0x06, 0xf4, 0x8e, 0xbb}, |
| 737 | {0x00, 0x00, 0x50, 0xdd}, {0x06, 0x74, 0x8e, 0xbb}, |
| 738 | {0xf0, 0x00, 0x02, 0xbb}, {0x24, 0x50, 0x20, 0xbb}, |
| 739 | {0xf0, 0x00, 0x02, 0xbb}, {0x34, 0x0c, 0x50, 0xbb}, |
| 740 | {0xb3, 0x01, 0x41, 0xcc}, {0xf0, 0x00, 0x00, 0xbb}, |
| 741 | {0x03, 0x03, 0xc0, 0xbb}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 742 | {}, |
| 743 | }; |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 744 | static const u8 mi1310_soc_InitSXGA_JPG[][4] = { |
| 745 | {0xb0, 0x03, 0x19, 0xcc}, |
| 746 | {0xb0, 0x04, 0x02, 0xcc}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 747 | {0xb3, 0x00, 0x64, 0xcc}, |
| 748 | {0xb3, 0x00, 0x65, 0xcc}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 749 | {0xb3, 0x05, 0x00, 0xcc}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 750 | {0xb3, 0x06, 0x00, 0xcc}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 751 | {0xb3, 0x08, 0x01, 0xcc}, |
| 752 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 753 | {0xb3, 0x34, 0x02, 0xcc}, |
| 754 | {0xb3, 0x35, 0xdd, 0xcc}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 755 | {0xb3, 0x02, 0x00, 0xcc}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 756 | {0xb3, 0x03, 0x0a, 0xcc}, |
| 757 | {0xb3, 0x04, 0x0d, 0xcc}, |
| 758 | {0xb3, 0x20, 0x00, 0xcc}, |
| 759 | {0xb3, 0x21, 0x00, 0xcc}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 760 | {0xb3, 0x22, 0x03, 0xcc}, |
| 761 | {0xb3, 0x23, 0xc0, 0xcc}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 762 | {0xb3, 0x14, 0x00, 0xcc}, |
| 763 | {0xb3, 0x15, 0x00, 0xcc}, |
| 764 | {0xb3, 0x16, 0x04, 0xcc}, |
| 765 | {0xb3, 0x17, 0xff, 0xcc}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 766 | {0xb3, 0x00, 0x65, 0xcc}, |
| 767 | {0xb8, 0x00, 0x00, 0xcc}, |
| 768 | {0xbc, 0x00, 0x70, 0xcc}, |
| 769 | {0xbc, 0x01, 0x01, 0xcc}, |
| 770 | {0xf0, 0x00, 0x02, 0xbb}, |
| 771 | {0xc8, 0x9f, 0x0b, 0xbb}, |
| 772 | {0x5b, 0x00, 0x01, 0xbb}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 773 | {0xf0, 0x00, 0x00, 0xbb}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 774 | {0x20, 0x03, 0x02, 0xbb}, /* h/v flip */ |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 775 | {0xf0, 0x00, 0x01, 0xbb}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 776 | {0x05, 0x00, 0x07, 0xbb}, |
| 777 | {0x34, 0x00, 0x00, 0xbb}, |
| 778 | {0x35, 0xff, 0x00, 0xbb}, |
| 779 | {0xdc, 0x07, 0x02, 0xbb}, |
| 780 | {0xdd, 0x3c, 0x18, 0xbb}, |
| 781 | {0xde, 0x92, 0x6d, 0xbb}, |
| 782 | {0xdf, 0xcd, 0xb1, 0xbb}, |
| 783 | {0xe0, 0xff, 0xe7, 0xbb}, |
| 784 | {0x06, 0xf0, 0x0d, 0xbb}, |
| 785 | {0x06, 0x70, 0x0e, 0xbb}, |
| 786 | {0x4c, 0x00, 0x01, 0xbb}, |
| 787 | {0x4d, 0x00, 0x01, 0xbb}, |
| 788 | {0xf0, 0x00, 0x02, 0xbb}, |
| 789 | {0x2e, 0x0c, 0x60, 0xbb}, |
| 790 | {0x21, 0xb6, 0x6e, 0xbb}, |
| 791 | {0x37, 0x01, 0x40, 0xbb}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 792 | {0xf0, 0x00, 0x00, 0xbb}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 793 | {0x07, 0x00, 0x84, 0xbb}, |
| 794 | {0x08, 0x02, 0x4a, 0xbb}, |
| 795 | {0x05, 0x01, 0x10, 0xbb}, |
| 796 | {0x06, 0x00, 0x39, 0xbb}, |
| 797 | {0xf0, 0x00, 0x02, 0xbb}, |
| 798 | {0x58, 0x02, 0x67, 0xbb}, |
| 799 | {0x57, 0x02, 0x00, 0xbb}, |
| 800 | {0x5a, 0x02, 0x67, 0xbb}, |
| 801 | {0x59, 0x02, 0x00, 0xbb}, |
| 802 | {0x5c, 0x12, 0x0d, 0xbb}, |
| 803 | {0x5d, 0x16, 0x11, 0xbb}, |
| 804 | {0x39, 0x06, 0x18, 0xbb}, |
| 805 | {0x3a, 0x06, 0x18, 0xbb}, |
| 806 | {0x3b, 0x06, 0x18, 0xbb}, |
| 807 | {0x3c, 0x06, 0x18, 0xbb}, |
| 808 | {0x64, 0x7b, 0x5b, 0xbb}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 809 | {0xb6, 0x00, 0x00, 0xcc}, |
| 810 | {0xb6, 0x03, 0x05, 0xcc}, |
| 811 | {0xb6, 0x02, 0x00, 0xcc}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 812 | {0xb6, 0x05, 0x03, 0xcc}, |
| 813 | {0xb6, 0x04, 0xc0, 0xcc}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 814 | {0xb6, 0x12, 0xf8, 0xcc}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 815 | {0xb6, 0x13, 0x29, 0xcc}, |
| 816 | {0xb6, 0x18, 0x09, 0xcc}, |
| 817 | {0xb6, 0x17, 0x60, 0xcc}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 818 | {0xb6, 0x16, 0x00, 0xcc}, |
| 819 | {0xb6, 0x22, 0x12, 0xcc}, |
| 820 | {0xb6, 0x23, 0x0b, 0xcc}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 821 | {0xbf, 0xc0, 0x39, 0xcc}, |
| 822 | {0xbf, 0xc1, 0x04, 0xcc}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 823 | {0xbf, 0xcc, 0x00, 0xcc}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 824 | {0xb3, 0x01, 0x41, 0xcc}, |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 825 | {0x00, 0x00, 0x80, 0xdd}, |
| 826 | {0xf0, 0x00, 0x02, 0xbb}, |
| 827 | {0x00, 0x00, 0x10, 0xdd}, |
| 828 | {0x22, 0xa0, 0x78, 0xbb}, |
| 829 | {0x23, 0xa0, 0x78, 0xbb}, |
| 830 | {0x24, 0x7f, 0x00, 0xbb}, |
| 831 | {0x28, 0xea, 0x02, 0xbb}, |
| 832 | {0x29, 0x86, 0x7a, 0xbb}, |
| 833 | {0x5e, 0x52, 0x4c, 0xbb}, |
| 834 | {0x5f, 0x20, 0x24, 0xbb}, |
| 835 | {0x60, 0x00, 0x02, 0xbb}, |
| 836 | {0x02, 0x00, 0xee, 0xbb}, |
| 837 | {0x03, 0x39, 0x23, 0xbb}, |
| 838 | {0x04, 0x07, 0x24, 0xbb}, |
| 839 | {0x09, 0x00, 0xc0, 0xbb}, |
| 840 | {0x0a, 0x00, 0x79, 0xbb}, |
| 841 | {0x0b, 0x00, 0x04, 0xbb}, |
| 842 | {0x0c, 0x00, 0x5c, 0xbb}, |
| 843 | {0x0d, 0x00, 0xd9, 0xbb}, |
| 844 | {0x0e, 0x00, 0x53, 0xbb}, |
| 845 | {0x0f, 0x00, 0x21, 0xbb}, |
| 846 | {0x10, 0x00, 0xa4, 0xbb}, |
| 847 | {0x11, 0x00, 0xe5, 0xbb}, |
| 848 | {0x15, 0x00, 0x00, 0xbb}, |
| 849 | {0x16, 0x00, 0x00, 0xbb}, |
| 850 | {0x17, 0x00, 0x00, 0xbb}, |
| 851 | {0x18, 0x00, 0x00, 0xbb}, |
| 852 | {0x19, 0x00, 0x00, 0xbb}, |
| 853 | {0x1a, 0x00, 0x00, 0xbb}, |
| 854 | {0x1b, 0x00, 0x00, 0xbb}, |
| 855 | {0x1c, 0x00, 0x00, 0xbb}, |
| 856 | {0x1d, 0x00, 0x00, 0xbb}, |
| 857 | {0x1e, 0x00, 0x00, 0xbb}, |
| 858 | {0xf0, 0x00, 0x01, 0xbb}, |
| 859 | {0x00, 0x00, 0x20, 0xdd}, |
| 860 | {0x06, 0xf0, 0x8e, 0xbb}, |
| 861 | {0x00, 0x00, 0x80, 0xdd}, |
| 862 | {0x06, 0x70, 0x8e, 0xbb}, |
| 863 | {0xf0, 0x00, 0x02, 0xbb}, |
| 864 | {0x00, 0x00, 0x20, 0xdd}, |
| 865 | {0x5e, 0x6a, 0x53, 0xbb}, |
| 866 | {0x5f, 0x40, 0x2c, 0xbb}, |
| 867 | {0xf0, 0x00, 0x01, 0xbb}, |
| 868 | {0x00, 0x00, 0x20, 0xdd}, |
| 869 | {0x58, 0x00, 0x00, 0xbb}, |
| 870 | {0x53, 0x09, 0x03, 0xbb}, |
| 871 | {0x54, 0x31, 0x18, 0xbb}, |
| 872 | {0x55, 0x8b, 0x5f, 0xbb}, |
| 873 | {0x56, 0xc0, 0xa9, 0xbb}, |
| 874 | {0x57, 0xe0, 0xd2, 0xbb}, |
| 875 | {0xe1, 0x00, 0x00, 0xbb}, |
| 876 | {0xdc, 0x09, 0x03, 0xbb}, |
| 877 | {0xdd, 0x31, 0x18, 0xbb}, |
| 878 | {0xde, 0x8b, 0x5f, 0xbb}, |
| 879 | {0xdf, 0xc0, 0xa9, 0xbb}, |
| 880 | {0xe0, 0xe0, 0xd2, 0xbb}, |
| 881 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 882 | {0xf0, 0x00, 0x01, 0xbb}, |
| 883 | {0x06, 0xf0, 0x8e, 0xbb}, |
| 884 | {0xf0, 0x00, 0x02, 0xbb}, |
| 885 | {0x2f, 0xde, 0x20, 0xbb}, |
| 886 | {0xf0, 0x00, 0x02, 0xbb}, |
| 887 | {0x24, 0x50, 0x20, 0xbb}, |
| 888 | {0xbc, 0x0e, 0x00, 0xcc}, |
| 889 | {0xbc, 0x0f, 0x05, 0xcc}, |
| 890 | {0xbc, 0x10, 0xc0, 0xcc}, |
| 891 | {0xf0, 0x00, 0x02, 0xbb}, |
| 892 | {0x34, 0x0c, 0x50, 0xbb}, |
| 893 | {0xbc, 0x11, 0x03, 0xcc}, |
| 894 | {0xf0, 0x00, 0x01, 0xbb}, |
| 895 | {0x80, 0x00, 0x03, 0xbb}, |
| 896 | {0x81, 0xc7, 0x14, 0xbb}, |
| 897 | {0x82, 0xeb, 0xe8, 0xbb}, |
| 898 | {0x83, 0xfe, 0xf4, 0xbb}, |
| 899 | {0x84, 0xcd, 0x10, 0xbb}, |
| 900 | {0x85, 0xf3, 0xee, 0xbb}, |
| 901 | {0x86, 0xff, 0xf1, 0xbb}, |
| 902 | {0x87, 0xcd, 0x10, 0xbb}, |
| 903 | {0x88, 0xf3, 0xee, 0xbb}, |
| 904 | {0x89, 0x01, 0xf1, 0xbb}, |
| 905 | {0x8a, 0xe5, 0x17, 0xbb}, |
| 906 | {0x8b, 0xe8, 0xe2, 0xbb}, |
| 907 | {0x8c, 0xf7, 0xed, 0xbb}, |
| 908 | {0x8d, 0x00, 0xff, 0xbb}, |
| 909 | {0x8e, 0xec, 0x10, 0xbb}, |
| 910 | {0x8f, 0xf0, 0xed, 0xbb}, |
| 911 | {0x90, 0xf9, 0xf2, 0xbb}, |
| 912 | {0x91, 0x00, 0x00, 0xbb}, |
| 913 | {0x92, 0xe9, 0x0d, 0xbb}, |
| 914 | {0x93, 0xf4, 0xf2, 0xbb}, |
| 915 | {0x94, 0xfb, 0xf5, 0xbb}, |
| 916 | {0x95, 0x00, 0xff, 0xbb}, |
| 917 | {0xb6, 0x0f, 0x08, 0xbb}, |
| 918 | {0xb7, 0x3d, 0x16, 0xbb}, |
| 919 | {0xb8, 0x0c, 0x04, 0xbb}, |
| 920 | {0xb9, 0x1c, 0x07, 0xbb}, |
| 921 | {0xba, 0x0a, 0x03, 0xbb}, |
| 922 | {0xbb, 0x1b, 0x09, 0xbb}, |
| 923 | {0xbc, 0x17, 0x0d, 0xbb}, |
| 924 | {0xbd, 0x23, 0x1d, 0xbb}, |
| 925 | {0xbe, 0x00, 0x28, 0xbb}, |
| 926 | {0xbf, 0x11, 0x09, 0xbb}, |
| 927 | {0xc0, 0x16, 0x15, 0xbb}, |
| 928 | {0xc1, 0x00, 0x1b, 0xbb}, |
| 929 | {0xc2, 0x0e, 0x07, 0xbb}, |
| 930 | {0xc3, 0x14, 0x10, 0xbb}, |
| 931 | {0xc4, 0x00, 0x17, 0xbb}, |
| 932 | {0x06, 0x74, 0x8e, 0xbb}, |
| 933 | {0xf0, 0x00, 0x00, 0xbb}, |
| 934 | {0x03, 0x03, 0xc0, 0xbb}, |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 935 | {} |
| 936 | }; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 937 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 938 | static const u8 mi1320_gamma[17] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 939 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
| 940 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff |
| 941 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 942 | static const u8 mi1320_matrix[9] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 943 | 0x54, 0xda, 0x06, 0xf1, 0x50, 0xf4, 0xf7, 0xea, 0x52 |
| 944 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 945 | static const u8 mi1320_initVGA_data[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 946 | {0xb3, 0x01, 0x01, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
| 947 | {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
| 948 | {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
| 949 | {0xb3, 0x00, 0x64, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, |
| 950 | {0xb0, 0x16, 0x03, 0xcc}, {0xb3, 0x05, 0x00, 0xcc}, |
| 951 | {0xb3, 0x06, 0x00, 0xcc}, {0xb3, 0x08, 0x01, 0xcc}, |
| 952 | {0xb3, 0x09, 0x0c, 0xcc}, {0xb3, 0x34, 0x02, 0xcc}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 953 | {0xb3, 0x35, 0xc8, 0xcc}, /* i2c add: 48 */ |
| 954 | {0xb3, 0x02, 0x00, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 955 | {0xb3, 0x03, 0x0a, 0xcc}, {0xb3, 0x04, 0x05, 0xcc}, |
| 956 | {0xb3, 0x20, 0x00, 0xcc}, {0xb3, 0x21, 0x00, 0xcc}, |
| 957 | {0xb3, 0x22, 0x03, 0xcc}, {0xb3, 0x23, 0xc0, 0xcc}, |
| 958 | {0xb3, 0x14, 0x00, 0xcc}, {0xb3, 0x15, 0x00, 0xcc}, |
| 959 | {0xb3, 0x16, 0x04, 0xcc}, {0xb3, 0x17, 0xff, 0xcc}, |
| 960 | {0xb3, 0x00, 0x67, 0xcc}, {0xbc, 0x00, 0xd0, 0xcc}, |
| 961 | {0xbc, 0x01, 0x01, 0xcc}, {0xf0, 0x00, 0x00, 0xbb}, |
| 962 | {0x0d, 0x00, 0x09, 0xbb}, {0x00, 0x01, 0x00, 0xdd}, |
| 963 | {0x0d, 0x00, 0x08, 0xbb}, {0xf0, 0x00, 0x01, 0xbb}, |
| 964 | {0xa1, 0x05, 0x00, 0xbb}, {0xa4, 0x03, 0xc0, 0xbb}, |
| 965 | {0xf0, 0x00, 0x02, 0xbb}, {0x00, 0x00, 0x10, 0xdd}, |
| 966 | {0xc8, 0x9f, 0x0b, 0xbb}, {0x00, 0x00, 0x10, 0xdd}, |
| 967 | {0xf0, 0x00, 0x00, 0xbb}, {0x00, 0x00, 0x10, 0xdd}, |
| 968 | {0x20, 0x01, 0x00, 0xbb}, {0x00, 0x00, 0x10, 0xdd}, |
| 969 | {0xf0, 0x00, 0x01, 0xbb}, {0x9d, 0x3c, 0xa0, 0xbb}, |
| 970 | {0x47, 0x30, 0x30, 0xbb}, {0xf0, 0x00, 0x00, 0xbb}, |
| 971 | {0x0a, 0x80, 0x11, 0xbb}, {0x35, 0x00, 0x22, 0xbb}, |
| 972 | {0xf0, 0x00, 0x02, 0xbb}, {0x9d, 0xc5, 0x05, 0xbb}, |
| 973 | {0xdc, 0x0f, 0xfc, 0xbb}, {0xf0, 0x00, 0x01, 0xbb}, |
| 974 | {0x06, 0x74, 0x0e, 0xbb}, {0x80, 0x00, 0x06, 0xbb}, |
| 975 | {0x81, 0x04, 0x00, 0xbb}, {0x82, 0x01, 0x02, 0xbb}, |
| 976 | {0x83, 0x03, 0x02, 0xbb}, {0x84, 0x05, 0x00, 0xbb}, |
| 977 | {0x85, 0x01, 0x00, 0xbb}, {0x86, 0x03, 0x02, 0xbb}, |
| 978 | {0x87, 0x05, 0x00, 0xbb}, {0x88, 0x01, 0x00, 0xbb}, |
| 979 | {0x89, 0x02, 0x02, 0xbb}, {0x8a, 0xfd, 0x04, 0xbb}, |
| 980 | {0x8b, 0xfc, 0xfd, 0xbb}, {0x8c, 0xff, 0xfd, 0xbb}, |
| 981 | {0x8d, 0x00, 0x00, 0xbb}, {0x8e, 0xfe, 0x05, 0xbb}, |
| 982 | {0x8f, 0xfc, 0xfd, 0xbb}, {0x90, 0xfe, 0xfd, 0xbb}, |
| 983 | {0x91, 0x00, 0x00, 0xbb}, {0x92, 0xfe, 0x03, 0xbb}, |
| 984 | {0x93, 0xfd, 0xfe, 0xbb}, {0x94, 0xff, 0xfd, 0xbb}, |
| 985 | {0x95, 0x00, 0x00, 0xbb}, {0xb6, 0x07, 0x05, 0xbb}, |
| 986 | {0xb7, 0x13, 0x06, 0xbb}, {0xb8, 0x08, 0x06, 0xbb}, |
| 987 | {0xb9, 0x14, 0x08, 0xbb}, {0xba, 0x06, 0x05, 0xbb}, |
| 988 | {0xbb, 0x13, 0x06, 0xbb}, {0xbc, 0x03, 0x01, 0xbb}, |
| 989 | {0xbd, 0x03, 0x04, 0xbb}, {0xbe, 0x00, 0x02, 0xbb}, |
| 990 | {0xbf, 0x03, 0x01, 0xbb}, {0xc0, 0x02, 0x04, 0xbb}, |
| 991 | {0xc1, 0x00, 0x04, 0xbb}, {0xc2, 0x02, 0x01, 0xbb}, |
| 992 | {0xc3, 0x01, 0x03, 0xbb}, {0xc4, 0x00, 0x04, 0xbb}, |
| 993 | {0xf0, 0x00, 0x00, 0xbb}, {0x05, 0x01, 0x13, 0xbb}, |
| 994 | {0x06, 0x00, 0x11, 0xbb}, {0x07, 0x00, 0x85, 0xbb}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 995 | {0x08, 0x00, 0x27, 0xbb}, |
| 996 | {0x20, 0x01, 0x00, 0xbb}, /* h/v flips - was 03 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 997 | {0x21, 0x80, 0x00, 0xbb}, {0x22, 0x0d, 0x0f, 0xbb}, |
| 998 | {0x24, 0x80, 0x00, 0xbb}, {0x59, 0x00, 0xff, 0xbb}, |
| 999 | {0xf0, 0x00, 0x02, 0xbb}, {0x39, 0x03, 0x0d, 0xbb}, |
| 1000 | {0x3a, 0x06, 0x1b, 0xbb}, {0x3b, 0x00, 0x95, 0xbb}, |
| 1001 | {0x3c, 0x04, 0xdb, 0xbb}, {0x57, 0x02, 0x00, 0xbb}, |
| 1002 | {0x58, 0x02, 0x66, 0xbb}, {0x59, 0x00, 0xff, 0xbb}, |
| 1003 | {0x5a, 0x01, 0x33, 0xbb}, {0x5c, 0x12, 0x0d, 0xbb}, |
| 1004 | {0x5d, 0x16, 0x11, 0xbb}, {0x64, 0x5e, 0x1c, 0xbb}, |
| 1005 | {0xf0, 0x00, 0x02, 0xbb}, {0x2f, 0xd1, 0x00, 0xbb}, |
| 1006 | {0x5b, 0x00, 0x01, 0xbb}, {0xf0, 0x00, 0x02, 0xbb}, |
| 1007 | {0x36, 0x68, 0x10, 0xbb}, {0x00, 0x00, 0x30, 0xdd}, |
| 1008 | {0x37, 0x82, 0x00, 0xbb}, {0xbc, 0x0e, 0x00, 0xcc}, |
| 1009 | {0xbc, 0x0f, 0x05, 0xcc}, {0xbc, 0x10, 0xc0, 0xcc}, |
| 1010 | {0xbc, 0x11, 0x03, 0xcc}, {0xb6, 0x00, 0x00, 0xcc}, |
| 1011 | {0xb6, 0x03, 0x05, 0xcc}, {0xb6, 0x02, 0x00, 0xcc}, |
| 1012 | {0xb6, 0x05, 0x04, 0xcc}, {0xb6, 0x04, 0x00, 0xcc}, |
| 1013 | {0xb6, 0x12, 0xf8, 0xcc}, {0xb6, 0x13, 0x29, 0xcc}, |
| 1014 | {0xb6, 0x18, 0x0a, 0xcc}, {0xb6, 0x17, 0x00, 0xcc}, |
| 1015 | {0xb6, 0x16, 0x00, 0xcc}, {0xb6, 0x22, 0x12, 0xcc}, |
| 1016 | {0xb6, 0x23, 0x0b, 0xcc}, {0xbf, 0xc0, 0x26, 0xcc}, |
| 1017 | {0xbf, 0xc1, 0x02, 0xcc}, {0xbf, 0xcc, 0x04, 0xcc}, |
| 1018 | {0xbc, 0x02, 0x18, 0xcc}, {0xbc, 0x03, 0x50, 0xcc}, |
| 1019 | {0xbc, 0x04, 0x18, 0xcc}, {0xbc, 0x05, 0x00, 0xcc}, |
| 1020 | {0xbc, 0x06, 0x00, 0xcc}, {0xbc, 0x08, 0x30, 0xcc}, |
| 1021 | {0xbc, 0x09, 0x40, 0xcc}, {0xbc, 0x0a, 0x10, 0xcc}, |
| 1022 | {0xbc, 0x0b, 0x00, 0xcc}, {0xbc, 0x0c, 0x00, 0xcc}, |
| 1023 | {0xb3, 0x5c, 0x01, 0xcc}, {0xb3, 0x01, 0x41, 0xcc}, |
| 1024 | {} |
| 1025 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1026 | static const u8 mi1320_initQVGA_data[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1027 | {0xb3, 0x01, 0x01, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
| 1028 | {0xb0, 0x03, 0x19, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
| 1029 | {0xb0, 0x04, 0x02, 0xcc}, {0x00, 0x00, 0x33, 0xdd}, |
| 1030 | {0xb3, 0x00, 0x64, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, |
| 1031 | {0xb0, 0x16, 0x03, 0xcc}, {0xb3, 0x05, 0x01, 0xcc}, |
| 1032 | {0xb3, 0x06, 0x01, 0xcc}, {0xb3, 0x08, 0x01, 0xcc}, |
| 1033 | {0xb3, 0x09, 0x0c, 0xcc}, {0xb3, 0x34, 0x02, 0xcc}, |
| 1034 | {0xb3, 0x35, 0xc8, 0xcc}, {0xb3, 0x02, 0x00, 0xcc}, |
| 1035 | {0xb3, 0x03, 0x0a, 0xcc}, {0xb3, 0x04, 0x05, 0xcc}, |
| 1036 | {0xb3, 0x20, 0x00, 0xcc}, {0xb3, 0x21, 0x00, 0xcc}, |
| 1037 | {0xb3, 0x22, 0x01, 0xcc}, {0xb3, 0x23, 0xe0, 0xcc}, |
| 1038 | {0xb3, 0x14, 0x00, 0xcc}, {0xb3, 0x15, 0x00, 0xcc}, |
| 1039 | {0xb3, 0x16, 0x02, 0xcc}, {0xb3, 0x17, 0x7f, 0xcc}, |
| 1040 | {0xb3, 0x00, 0x65, 0xcc}, {0xb8, 0x00, 0x00, 0xcc}, |
| 1041 | {0xbc, 0x00, 0xd0, 0xcc}, {0xbc, 0x01, 0x01, 0xcc}, |
| 1042 | {0xf0, 0x00, 0x00, 0xbb}, {0x0d, 0x00, 0x09, 0xbb}, |
| 1043 | {0x00, 0x01, 0x00, 0xdd}, {0x0d, 0x00, 0x08, 0xbb}, |
| 1044 | {0xf0, 0x00, 0x00, 0xbb}, {0x02, 0x00, 0x64, 0xbb}, |
| 1045 | {0x05, 0x01, 0x78, 0xbb}, {0x06, 0x00, 0x11, 0xbb}, |
| 1046 | {0x07, 0x01, 0x42, 0xbb}, {0x08, 0x00, 0x11, 0xbb}, |
| 1047 | {0x20, 0x01, 0x00, 0xbb}, {0x21, 0x80, 0x00, 0xbb}, |
| 1048 | {0x22, 0x0d, 0x0f, 0xbb}, {0x24, 0x80, 0x00, 0xbb}, |
| 1049 | {0x59, 0x00, 0xff, 0xbb}, {0xf0, 0x00, 0x01, 0xbb}, |
| 1050 | {0x9d, 0x3c, 0xa0, 0xbb}, {0x47, 0x30, 0x30, 0xbb}, |
| 1051 | {0xf0, 0x00, 0x00, 0xbb}, {0x0a, 0x80, 0x11, 0xbb}, |
| 1052 | {0x35, 0x00, 0x22, 0xbb}, {0xf0, 0x00, 0x02, 0xbb}, |
| 1053 | {0x9d, 0xc5, 0x05, 0xbb}, {0xdc, 0x0f, 0xfc, 0xbb}, |
| 1054 | {0xf0, 0x00, 0x01, 0xbb}, {0x06, 0x74, 0x0e, 0xbb}, |
| 1055 | {0x80, 0x00, 0x06, 0xbb}, {0x81, 0x04, 0x00, 0xbb}, |
| 1056 | {0x82, 0x01, 0x02, 0xbb}, {0x83, 0x03, 0x02, 0xbb}, |
| 1057 | {0x84, 0x05, 0x00, 0xbb}, {0x85, 0x01, 0x00, 0xbb}, |
| 1058 | {0x86, 0x03, 0x02, 0xbb}, {0x87, 0x05, 0x00, 0xbb}, |
| 1059 | {0x88, 0x01, 0x00, 0xbb}, {0x89, 0x02, 0x02, 0xbb}, |
| 1060 | {0x8a, 0xfd, 0x04, 0xbb}, {0x8b, 0xfc, 0xfd, 0xbb}, |
| 1061 | {0x8c, 0xff, 0xfd, 0xbb}, {0x8d, 0x00, 0x00, 0xbb}, |
| 1062 | {0x8e, 0xfe, 0x05, 0xbb}, {0x8f, 0xfc, 0xfd, 0xbb}, |
| 1063 | {0x90, 0xfe, 0xfd, 0xbb}, {0x91, 0x00, 0x00, 0xbb}, |
| 1064 | {0x92, 0xfe, 0x03, 0xbb}, {0x93, 0xfd, 0xfe, 0xbb}, |
| 1065 | {0x94, 0xff, 0xfd, 0xbb}, {0x95, 0x00, 0x00, 0xbb}, |
| 1066 | {0xb6, 0x07, 0x05, 0xbb}, {0xb7, 0x13, 0x06, 0xbb}, |
| 1067 | {0xb8, 0x08, 0x06, 0xbb}, {0xb9, 0x14, 0x08, 0xbb}, |
| 1068 | {0xba, 0x06, 0x05, 0xbb}, {0xbb, 0x13, 0x06, 0xbb}, |
| 1069 | {0xbc, 0x03, 0x01, 0xbb}, {0xbd, 0x03, 0x04, 0xbb}, |
| 1070 | {0xbe, 0x00, 0x02, 0xbb}, {0xbf, 0x03, 0x01, 0xbb}, |
| 1071 | {0xc0, 0x02, 0x04, 0xbb}, {0xc1, 0x00, 0x04, 0xbb}, |
| 1072 | {0xc2, 0x02, 0x01, 0xbb}, {0xc3, 0x01, 0x03, 0xbb}, |
| 1073 | {0xc4, 0x00, 0x04, 0xbb}, {0xf0, 0x00, 0x02, 0xbb}, |
| 1074 | {0xc8, 0x00, 0x00, 0xbb}, {0x2e, 0x00, 0x00, 0xbb}, |
| 1075 | {0x2e, 0x0c, 0x5b, 0xbb}, {0x2f, 0xd1, 0x00, 0xbb}, |
| 1076 | {0x39, 0x03, 0xca, 0xbb}, {0x3a, 0x06, 0x80, 0xbb}, |
| 1077 | {0x3b, 0x01, 0x52, 0xbb}, {0x3c, 0x05, 0x40, 0xbb}, |
| 1078 | {0x57, 0x01, 0x9c, 0xbb}, {0x58, 0x01, 0xee, 0xbb}, |
| 1079 | {0x59, 0x00, 0xf0, 0xbb}, {0x5a, 0x01, 0x20, 0xbb}, |
| 1080 | {0x5c, 0x1d, 0x17, 0xbb}, {0x5d, 0x22, 0x1c, 0xbb}, |
| 1081 | {0x64, 0x1e, 0x1c, 0xbb}, {0x5b, 0x00, 0x01, 0xbb}, |
| 1082 | {0xf0, 0x00, 0x02, 0xbb}, {0x36, 0x68, 0x10, 0xbb}, |
| 1083 | {0x00, 0x00, 0x30, 0xdd}, {0x37, 0x81, 0x00, 0xbb}, |
| 1084 | {0xbc, 0x02, 0x18, 0xcc}, {0xbc, 0x03, 0x50, 0xcc}, |
| 1085 | {0xbc, 0x04, 0x18, 0xcc}, {0xbc, 0x05, 0x00, 0xcc}, |
| 1086 | {0xbc, 0x06, 0x00, 0xcc}, {0xbc, 0x08, 0x30, 0xcc}, |
| 1087 | {0xbc, 0x09, 0x40, 0xcc}, {0xbc, 0x0a, 0x10, 0xcc}, |
| 1088 | {0xbc, 0x0b, 0x00, 0xcc}, {0xbc, 0x0c, 0x00, 0xcc}, |
| 1089 | {0xbf, 0xc0, 0x26, 0xcc}, {0xbf, 0xc1, 0x02, 0xcc}, |
| 1090 | {0xbf, 0xcc, 0x04, 0xcc}, {0xb3, 0x5c, 0x01, 0xcc}, |
| 1091 | {0xb3, 0x01, 0x41, 0xcc}, |
| 1092 | {} |
| 1093 | }; |
| 1094 | |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1095 | static const u8 mi1320_soc_InitVGA[][4] = { |
| 1096 | {0xb3, 0x01, 0x01, 0xcc}, |
| 1097 | {0xb0, 0x03, 0x19, 0xcc}, |
| 1098 | {0xb0, 0x04, 0x02, 0xcc}, |
| 1099 | {0x00, 0x00, 0x30, 0xdd}, |
| 1100 | {0xb3, 0x00, 0x64, 0xcc}, |
| 1101 | {0xb3, 0x00, 0x67, 0xcc}, |
| 1102 | {0xb3, 0x05, 0x01, 0xcc}, |
| 1103 | {0xb3, 0x06, 0x01, 0xcc}, |
| 1104 | {0xb3, 0x08, 0x01, 0xcc}, |
| 1105 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 1106 | {0xb3, 0x34, 0x02, 0xcc}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 1107 | {0xb3, 0x35, 0xc8, 0xcc}, /* i2c add: 48 */ |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1108 | {0xb3, 0x02, 0x00, 0xcc}, |
| 1109 | {0xb3, 0x03, 0x0a, 0xcc}, |
| 1110 | {0xb3, 0x04, 0x05, 0xcc}, |
| 1111 | {0xb3, 0x20, 0x00, 0xcc}, |
| 1112 | {0xb3, 0x21, 0x00, 0xcc}, |
| 1113 | {0xb3, 0x22, 0x01, 0xcc}, |
| 1114 | {0xb3, 0x23, 0xe0, 0xcc}, |
| 1115 | {0xb3, 0x14, 0x00, 0xcc}, |
| 1116 | {0xb3, 0x15, 0x00, 0xcc}, |
| 1117 | {0xb3, 0x16, 0x02, 0xcc}, |
| 1118 | {0xb3, 0x17, 0x7f, 0xcc}, |
| 1119 | {0xb3, 0x00, 0x67, 0xcc}, |
| 1120 | {0xb8, 0x00, 0x00, 0xcc}, |
| 1121 | {0xbc, 0x00, 0x71, 0xcc}, |
| 1122 | {0xbc, 0x01, 0x01, 0xcc}, |
| 1123 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 1124 | {0xf0, 0x00, 0x02, 0xbb}, |
| 1125 | {0x00, 0x00, 0x10, 0xdd}, |
| 1126 | {0xc8, 0x00, 0x00, 0xbb}, |
| 1127 | {0x00, 0x00, 0x30, 0xdd}, |
| 1128 | {0xf0, 0x00, 0x00, 0xbb}, |
| 1129 | {0x00, 0x00, 0x10, 0xdd}, |
| 1130 | {0x07, 0x00, 0xe0, 0xbb}, |
| 1131 | {0x08, 0x00, 0x0b, 0xbb}, |
| 1132 | {0x21, 0x00, 0x0c, 0xbb}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 1133 | {0x20, 0x01, 0x03, 0xbb}, /* h/v flip */ |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1134 | {0xbf, 0xc0, 0x26, 0xcc}, |
| 1135 | {0xbf, 0xc1, 0x02, 0xcc}, |
| 1136 | {0xbf, 0xcc, 0x04, 0xcc}, |
| 1137 | {0xb3, 0x01, 0x41, 0xcc}, |
| 1138 | {0xf0, 0x00, 0x00, 0xbb}, |
| 1139 | {0x05, 0x01, 0x78, 0xbb}, |
| 1140 | {0x06, 0x00, 0x11, 0xbb}, |
| 1141 | {0x07, 0x01, 0x42, 0xbb}, |
| 1142 | {0x08, 0x00, 0x11, 0xbb}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 1143 | {0x20, 0x01, 0x03, 0xbb}, /* h/v flip */ |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1144 | {0x21, 0x80, 0x00, 0xbb}, |
| 1145 | {0x22, 0x0d, 0x0f, 0xbb}, |
| 1146 | {0x24, 0x80, 0x00, 0xbb}, |
| 1147 | {0x59, 0x00, 0xff, 0xbb}, |
| 1148 | {0xf0, 0x00, 0x02, 0xbb}, |
| 1149 | {0x39, 0x03, 0xca, 0xbb}, |
| 1150 | {0x3a, 0x06, 0x80, 0xbb}, |
| 1151 | {0x3b, 0x01, 0x52, 0xbb}, |
| 1152 | {0x3c, 0x05, 0x40, 0xbb}, |
| 1153 | {0x57, 0x01, 0x9c, 0xbb}, |
| 1154 | {0x58, 0x01, 0xee, 0xbb}, |
| 1155 | {0x59, 0x00, 0xf0, 0xbb}, |
| 1156 | {0x5a, 0x01, 0x20, 0xbb}, |
| 1157 | {0x5c, 0x1d, 0x17, 0xbb}, |
| 1158 | {0x5d, 0x22, 0x1c, 0xbb}, |
| 1159 | {0x64, 0x1e, 0x1c, 0xbb}, |
| 1160 | {0x5b, 0x00, 0x00, 0xbb}, |
| 1161 | {0xf0, 0x00, 0x02, 0xbb}, |
| 1162 | {0x22, 0xa0, 0x78, 0xbb}, |
| 1163 | {0x23, 0xa0, 0x78, 0xbb}, |
| 1164 | {0x24, 0x7f, 0x00, 0xbb}, |
| 1165 | {0x28, 0xea, 0x02, 0xbb}, |
| 1166 | {0x29, 0x86, 0x7a, 0xbb}, |
| 1167 | {0x5e, 0x52, 0x4c, 0xbb}, |
| 1168 | {0x5f, 0x20, 0x24, 0xbb}, |
| 1169 | {0x60, 0x00, 0x02, 0xbb}, |
| 1170 | {0x02, 0x00, 0xee, 0xbb}, |
| 1171 | {0x03, 0x39, 0x23, 0xbb}, |
| 1172 | {0x04, 0x07, 0x24, 0xbb}, |
| 1173 | {0x09, 0x00, 0xc0, 0xbb}, |
| 1174 | {0x0a, 0x00, 0x79, 0xbb}, |
| 1175 | {0x0b, 0x00, 0x04, 0xbb}, |
| 1176 | {0x0c, 0x00, 0x5c, 0xbb}, |
| 1177 | {0x0d, 0x00, 0xd9, 0xbb}, |
| 1178 | {0x0e, 0x00, 0x53, 0xbb}, |
| 1179 | {0x0f, 0x00, 0x21, 0xbb}, |
| 1180 | {0x10, 0x00, 0xa4, 0xbb}, |
| 1181 | {0x11, 0x00, 0xe5, 0xbb}, |
| 1182 | {0x15, 0x00, 0x00, 0xbb}, |
| 1183 | {0x16, 0x00, 0x00, 0xbb}, |
| 1184 | {0x17, 0x00, 0x00, 0xbb}, |
| 1185 | {0x18, 0x00, 0x00, 0xbb}, |
| 1186 | {0x19, 0x00, 0x00, 0xbb}, |
| 1187 | {0x1a, 0x00, 0x00, 0xbb}, |
| 1188 | {0x1b, 0x00, 0x00, 0xbb}, |
| 1189 | {0x1c, 0x00, 0x00, 0xbb}, |
| 1190 | {0x1d, 0x00, 0x00, 0xbb}, |
| 1191 | {0x1e, 0x00, 0x00, 0xbb}, |
| 1192 | {0xf0, 0x00, 0x01, 0xbb}, |
| 1193 | {0x06, 0xe0, 0x0e, 0xbb}, |
| 1194 | {0x06, 0x60, 0x0e, 0xbb}, |
| 1195 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 1196 | {} |
| 1197 | }; |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1198 | static const u8 mi1320_soc_InitQVGA[][4] = { |
| 1199 | {0xb3, 0x01, 0x01, 0xcc}, |
| 1200 | {0xb0, 0x03, 0x19, 0xcc}, |
| 1201 | {0xb0, 0x04, 0x02, 0xcc}, |
| 1202 | {0x00, 0x00, 0x30, 0xdd}, |
| 1203 | {0xb3, 0x00, 0x64, 0xcc}, |
| 1204 | {0xb3, 0x00, 0x67, 0xcc}, |
| 1205 | {0xb3, 0x05, 0x01, 0xcc}, |
| 1206 | {0xb3, 0x06, 0x01, 0xcc}, |
| 1207 | {0xb3, 0x08, 0x01, 0xcc}, |
| 1208 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 1209 | {0xb3, 0x34, 0x02, 0xcc}, |
| 1210 | {0xb3, 0x35, 0xc8, 0xcc}, |
| 1211 | {0xb3, 0x02, 0x00, 0xcc}, |
| 1212 | {0xb3, 0x03, 0x0a, 0xcc}, |
| 1213 | {0xb3, 0x04, 0x05, 0xcc}, |
| 1214 | {0xb3, 0x20, 0x00, 0xcc}, |
| 1215 | {0xb3, 0x21, 0x00, 0xcc}, |
| 1216 | {0xb3, 0x22, 0x01, 0xcc}, |
| 1217 | {0xb3, 0x23, 0xe0, 0xcc}, |
| 1218 | {0xb3, 0x14, 0x00, 0xcc}, |
| 1219 | {0xb3, 0x15, 0x00, 0xcc}, |
| 1220 | {0xb3, 0x16, 0x02, 0xcc}, |
| 1221 | {0xb3, 0x17, 0x7f, 0xcc}, |
| 1222 | {0xb3, 0x00, 0x67, 0xcc}, |
| 1223 | {0xb8, 0x00, 0x00, 0xcc}, |
| 1224 | {0xbc, 0x00, 0xd1, 0xcc}, |
| 1225 | {0xbc, 0x01, 0x01, 0xcc}, |
| 1226 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 1227 | {0xf0, 0x00, 0x02, 0xbb}, |
| 1228 | {0x00, 0x00, 0x10, 0xdd}, |
| 1229 | {0xc8, 0x00, 0x00, 0xbb}, |
| 1230 | {0x00, 0x00, 0x30, 0xdd}, |
| 1231 | {0xf0, 0x00, 0x00, 0xbb}, |
| 1232 | {0x00, 0x00, 0x10, 0xdd}, |
| 1233 | {0x07, 0x00, 0xe0, 0xbb}, |
| 1234 | {0x08, 0x00, 0x0b, 0xbb}, |
| 1235 | {0x21, 0x00, 0x0c, 0xbb}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 1236 | {0x20, 0x01, 0x03, 0xbb}, /* h/v flip */ |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1237 | {0xbf, 0xc0, 0x26, 0xcc}, |
| 1238 | {0xbf, 0xc1, 0x02, 0xcc}, |
| 1239 | {0xbf, 0xcc, 0x04, 0xcc}, |
| 1240 | {0xbc, 0x02, 0x18, 0xcc}, |
| 1241 | {0xbc, 0x03, 0x50, 0xcc}, |
| 1242 | {0xbc, 0x04, 0x18, 0xcc}, |
| 1243 | {0xbc, 0x05, 0x00, 0xcc}, |
| 1244 | {0xbc, 0x06, 0x00, 0xcc}, |
| 1245 | {0xbc, 0x08, 0x30, 0xcc}, |
| 1246 | {0xbc, 0x09, 0x40, 0xcc}, |
| 1247 | {0xbc, 0x0a, 0x10, 0xcc}, |
| 1248 | {0xbc, 0x0b, 0x00, 0xcc}, |
| 1249 | {0xbc, 0x0c, 0x00, 0xcc}, |
| 1250 | {0xb3, 0x01, 0x41, 0xcc}, |
| 1251 | {0xf0, 0x00, 0x00, 0xbb}, |
| 1252 | {0x05, 0x01, 0x78, 0xbb}, |
| 1253 | {0x06, 0x00, 0x11, 0xbb}, |
| 1254 | {0x07, 0x01, 0x42, 0xbb}, |
| 1255 | {0x08, 0x00, 0x11, 0xbb}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 1256 | {0x20, 0x01, 0x03, 0xbb}, /* h/v flip */ |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1257 | {0x21, 0x80, 0x00, 0xbb}, |
| 1258 | {0x22, 0x0d, 0x0f, 0xbb}, |
| 1259 | {0x24, 0x80, 0x00, 0xbb}, |
| 1260 | {0x59, 0x00, 0xff, 0xbb}, |
| 1261 | {0xf0, 0x00, 0x02, 0xbb}, |
| 1262 | {0x39, 0x03, 0xca, 0xbb}, |
| 1263 | {0x3a, 0x06, 0x80, 0xbb}, |
| 1264 | {0x3b, 0x01, 0x52, 0xbb}, |
| 1265 | {0x3c, 0x05, 0x40, 0xbb}, |
| 1266 | {0x57, 0x01, 0x9c, 0xbb}, |
| 1267 | {0x58, 0x01, 0xee, 0xbb}, |
| 1268 | {0x59, 0x00, 0xf0, 0xbb}, |
| 1269 | {0x5a, 0x01, 0x20, 0xbb}, |
| 1270 | {0x5c, 0x1d, 0x17, 0xbb}, |
| 1271 | {0x5d, 0x22, 0x1c, 0xbb}, |
| 1272 | {0x64, 0x1e, 0x1c, 0xbb}, |
| 1273 | {0x5b, 0x00, 0x00, 0xbb}, |
| 1274 | {0xf0, 0x00, 0x02, 0xbb}, |
| 1275 | {0x22, 0xa0, 0x78, 0xbb}, |
| 1276 | {0x23, 0xa0, 0x78, 0xbb}, |
| 1277 | {0x24, 0x7f, 0x00, 0xbb}, |
| 1278 | {0x28, 0xea, 0x02, 0xbb}, |
| 1279 | {0x29, 0x86, 0x7a, 0xbb}, |
| 1280 | {0x5e, 0x52, 0x4c, 0xbb}, |
| 1281 | {0x5f, 0x20, 0x24, 0xbb}, |
| 1282 | {0x60, 0x00, 0x02, 0xbb}, |
| 1283 | {0x02, 0x00, 0xee, 0xbb}, |
| 1284 | {0x03, 0x39, 0x23, 0xbb}, |
| 1285 | {0x04, 0x07, 0x24, 0xbb}, |
| 1286 | {0x09, 0x00, 0xc0, 0xbb}, |
| 1287 | {0x0a, 0x00, 0x79, 0xbb}, |
| 1288 | {0x0b, 0x00, 0x04, 0xbb}, |
| 1289 | {0x0c, 0x00, 0x5c, 0xbb}, |
| 1290 | {0x0d, 0x00, 0xd9, 0xbb}, |
| 1291 | {0x0e, 0x00, 0x53, 0xbb}, |
| 1292 | {0x0f, 0x00, 0x21, 0xbb}, |
| 1293 | {0x10, 0x00, 0xa4, 0xbb}, |
| 1294 | {0x11, 0x00, 0xe5, 0xbb}, |
| 1295 | {0x15, 0x00, 0x00, 0xbb}, |
| 1296 | {0x16, 0x00, 0x00, 0xbb}, |
| 1297 | {0x17, 0x00, 0x00, 0xbb}, |
| 1298 | {0x18, 0x00, 0x00, 0xbb}, |
| 1299 | {0x19, 0x00, 0x00, 0xbb}, |
| 1300 | {0x1a, 0x00, 0x00, 0xbb}, |
| 1301 | {0x1b, 0x00, 0x00, 0xbb}, |
| 1302 | {0x1c, 0x00, 0x00, 0xbb}, |
| 1303 | {0x1d, 0x00, 0x00, 0xbb}, |
| 1304 | {0x1e, 0x00, 0x00, 0xbb}, |
| 1305 | {0xf0, 0x00, 0x01, 0xbb}, |
| 1306 | {0x06, 0xe0, 0x0e, 0xbb}, |
| 1307 | {0x06, 0x60, 0x0e, 0xbb}, |
| 1308 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 1309 | {} |
| 1310 | }; |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1311 | static const u8 mi1320_soc_InitSXGA[][4] = { |
| 1312 | {0xb3, 0x01, 0x01, 0xcc}, |
| 1313 | {0xb0, 0x03, 0x19, 0xcc}, |
| 1314 | {0x00, 0x00, 0x30, 0xdd}, |
| 1315 | {0xb3, 0x00, 0x64, 0xcc}, |
| 1316 | {0xb3, 0x00, 0x67, 0xcc}, |
| 1317 | {0xb3, 0x05, 0x01, 0xcc}, |
| 1318 | {0xb3, 0x06, 0x01, 0xcc}, |
| 1319 | {0xb3, 0x08, 0x01, 0xcc}, |
| 1320 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 1321 | {0xb3, 0x34, 0x02, 0xcc}, |
| 1322 | {0xb3, 0x35, 0xc8, 0xcc}, |
| 1323 | {0xb3, 0x02, 0x00, 0xcc}, |
| 1324 | {0xb3, 0x03, 0x0a, 0xcc}, |
| 1325 | {0xb3, 0x04, 0x05, 0xcc}, |
| 1326 | {0xb3, 0x20, 0x00, 0xcc}, |
| 1327 | {0xb3, 0x21, 0x00, 0xcc}, |
| 1328 | {0xb3, 0x22, 0x04, 0xcc}, |
| 1329 | {0xb3, 0x23, 0x00, 0xcc}, |
| 1330 | {0xb3, 0x14, 0x00, 0xcc}, |
| 1331 | {0xb3, 0x15, 0x00, 0xcc}, |
| 1332 | {0xb3, 0x16, 0x04, 0xcc}, |
| 1333 | {0xb3, 0x17, 0xff, 0xcc}, |
| 1334 | {0xb3, 0x00, 0x67, 0xcc}, |
| 1335 | {0xbc, 0x00, 0x71, 0xcc}, |
| 1336 | {0xbc, 0x01, 0x01, 0xcc}, |
| 1337 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 1338 | {0xf0, 0x00, 0x02, 0xbb}, |
| 1339 | {0x00, 0x00, 0x30, 0xdd}, |
| 1340 | {0xc8, 0x9f, 0x0b, 0xbb}, |
| 1341 | {0x00, 0x00, 0x20, 0xdd}, |
| 1342 | {0x5b, 0x00, 0x01, 0xbb}, |
| 1343 | {0x00, 0x00, 0x20, 0xdd}, |
| 1344 | {0xf0, 0x00, 0x00, 0xbb}, |
| 1345 | {0x00, 0x00, 0x30, 0xdd}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 1346 | {0x20, 0x01, 0x03, 0xbb}, /* h/v flip */ |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1347 | {0x00, 0x00, 0x20, 0xdd}, |
| 1348 | {0xbf, 0xc0, 0x26, 0xcc}, |
| 1349 | {0xbf, 0xc1, 0x02, 0xcc}, |
| 1350 | {0xbf, 0xcc, 0x04, 0xcc}, |
| 1351 | {0xb3, 0x01, 0x41, 0xcc}, |
| 1352 | {0xf0, 0x00, 0x00, 0xbb}, |
| 1353 | {0x05, 0x01, 0x78, 0xbb}, |
| 1354 | {0x06, 0x00, 0x11, 0xbb}, |
| 1355 | {0x07, 0x01, 0x42, 0xbb}, |
| 1356 | {0x08, 0x00, 0x11, 0xbb}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 1357 | {0x20, 0x01, 0x03, 0xbb}, /* h/v flip */ |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1358 | {0x21, 0x80, 0x00, 0xbb}, |
| 1359 | {0x22, 0x0d, 0x0f, 0xbb}, |
| 1360 | {0x24, 0x80, 0x00, 0xbb}, |
| 1361 | {0x59, 0x00, 0xff, 0xbb}, |
| 1362 | {0xf0, 0x00, 0x02, 0xbb}, |
| 1363 | {0x39, 0x03, 0xca, 0xbb}, |
| 1364 | {0x3a, 0x06, 0x80, 0xbb}, |
| 1365 | {0x3b, 0x01, 0x52, 0xbb}, |
| 1366 | {0x3c, 0x05, 0x40, 0xbb}, |
| 1367 | {0x57, 0x01, 0x9c, 0xbb}, |
| 1368 | {0x58, 0x01, 0xee, 0xbb}, |
| 1369 | {0x59, 0x00, 0xf0, 0xbb}, |
| 1370 | {0x5a, 0x01, 0x20, 0xbb}, |
| 1371 | {0x5c, 0x1d, 0x17, 0xbb}, |
| 1372 | {0x5d, 0x22, 0x1c, 0xbb}, |
| 1373 | {0x64, 0x1e, 0x1c, 0xbb}, |
| 1374 | {0x5b, 0x00, 0x00, 0xbb}, |
| 1375 | {0xf0, 0x00, 0x02, 0xbb}, |
| 1376 | {0x22, 0xa0, 0x78, 0xbb}, |
| 1377 | {0x23, 0xa0, 0x78, 0xbb}, |
| 1378 | {0x24, 0x7f, 0x00, 0xbb}, |
| 1379 | {0x28, 0xea, 0x02, 0xbb}, |
| 1380 | {0x29, 0x86, 0x7a, 0xbb}, |
| 1381 | {0x5e, 0x52, 0x4c, 0xbb}, |
| 1382 | {0x5f, 0x20, 0x24, 0xbb}, |
| 1383 | {0x60, 0x00, 0x02, 0xbb}, |
| 1384 | {0x02, 0x00, 0xee, 0xbb}, |
| 1385 | {0x03, 0x39, 0x23, 0xbb}, |
| 1386 | {0x04, 0x07, 0x24, 0xbb}, |
| 1387 | {0x09, 0x00, 0xc0, 0xbb}, |
| 1388 | {0x0a, 0x00, 0x79, 0xbb}, |
| 1389 | {0x0b, 0x00, 0x04, 0xbb}, |
| 1390 | {0x0c, 0x00, 0x5c, 0xbb}, |
| 1391 | {0x0d, 0x00, 0xd9, 0xbb}, |
| 1392 | {0x0e, 0x00, 0x53, 0xbb}, |
| 1393 | {0x0f, 0x00, 0x21, 0xbb}, |
| 1394 | {0x10, 0x00, 0xa4, 0xbb}, |
| 1395 | {0x11, 0x00, 0xe5, 0xbb}, |
| 1396 | {0x15, 0x00, 0x00, 0xbb}, |
| 1397 | {0x16, 0x00, 0x00, 0xbb}, |
| 1398 | {0x17, 0x00, 0x00, 0xbb}, |
| 1399 | {0x18, 0x00, 0x00, 0xbb}, |
| 1400 | {0x19, 0x00, 0x00, 0xbb}, |
| 1401 | {0x1a, 0x00, 0x00, 0xbb}, |
| 1402 | {0x1b, 0x00, 0x00, 0xbb}, |
| 1403 | {0x1c, 0x00, 0x00, 0xbb}, |
| 1404 | {0x1d, 0x00, 0x00, 0xbb}, |
| 1405 | {0x1e, 0x00, 0x00, 0xbb}, |
| 1406 | {0xf0, 0x00, 0x01, 0xbb}, |
| 1407 | {0x06, 0xe0, 0x0e, 0xbb}, |
| 1408 | {0x06, 0x60, 0x0e, 0xbb}, |
| 1409 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 1410 | {0xf0, 0x00, 0x00, 0xbb}, |
| 1411 | {0x05, 0x01, 0x13, 0xbb}, |
| 1412 | {0x06, 0x00, 0x11, 0xbb}, |
| 1413 | {0x07, 0x00, 0x85, 0xbb}, |
| 1414 | {0x08, 0x00, 0x27, 0xbb}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 1415 | {0x20, 0x01, 0x03, 0xbb}, /* h/v flip */ |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 1416 | {0x21, 0x80, 0x00, 0xbb}, |
| 1417 | {0x22, 0x0d, 0x0f, 0xbb}, |
| 1418 | {0x24, 0x80, 0x00, 0xbb}, |
| 1419 | {0x59, 0x00, 0xff, 0xbb}, |
| 1420 | {0xf0, 0x00, 0x02, 0xbb}, |
| 1421 | {0x39, 0x03, 0x0d, 0xbb}, |
| 1422 | {0x3a, 0x06, 0x1b, 0xbb}, |
| 1423 | {0x3b, 0x00, 0x95, 0xbb}, |
| 1424 | {0x3c, 0x04, 0xdb, 0xbb}, |
| 1425 | {0x57, 0x02, 0x00, 0xbb}, |
| 1426 | {0x58, 0x02, 0x66, 0xbb}, |
| 1427 | {0x59, 0x00, 0xff, 0xbb}, |
| 1428 | {0x5a, 0x01, 0x33, 0xbb}, |
| 1429 | {0x5c, 0x12, 0x0d, 0xbb}, |
| 1430 | {0x5d, 0x16, 0x11, 0xbb}, |
| 1431 | {0x64, 0x5e, 0x1c, 0xbb}, |
| 1432 | {} |
| 1433 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1434 | static const u8 po3130_gamma[17] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1435 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
| 1436 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff |
| 1437 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1438 | static const u8 po3130_matrix[9] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1439 | 0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63 |
| 1440 | }; |
| 1441 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1442 | static const u8 po3130_initVGA_data[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1443 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, |
| 1444 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, |
| 1445 | {0xb3, 0x00, 0x04, 0xcc}, {0xb3, 0x00, 0x24, 0xcc}, |
| 1446 | {0xb3, 0x00, 0x25, 0xcc}, {0xb3, 0x08, 0x01, 0xcc}, |
| 1447 | {0xb3, 0x09, 0x0c, 0xcc}, {0xb3, 0x05, 0x00, 0xcc}, |
| 1448 | {0xb3, 0x06, 0x01, 0xcc}, {0xb3, 0x03, 0x1a, 0xcc}, |
| 1449 | {0xb3, 0x04, 0x15, 0xcc}, {0xb3, 0x20, 0x00, 0xcc}, |
| 1450 | {0xb3, 0x21, 0x00, 0xcc}, {0xb3, 0x22, 0x01, 0xcc}, |
| 1451 | {0xb3, 0x23, 0xe8, 0xcc}, {0xb8, 0x08, 0xe8, 0xcc}, |
| 1452 | {0xb3, 0x14, 0x00, 0xcc}, {0xb3, 0x15, 0x00, 0xcc}, |
| 1453 | {0xb3, 0x16, 0x02, 0xcc}, {0xb3, 0x17, 0x7f, 0xcc}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 1454 | {0xb3, 0x34, 0x01, 0xcc}, |
| 1455 | {0xb3, 0x35, 0xf6, 0xcc}, /* i2c add: 76 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1456 | {0xb3, 0x00, 0x27, 0xcc}, {0xbc, 0x00, 0x71, 0xcc}, |
| 1457 | {0xb8, 0x00, 0x21, 0xcc}, {0xb8, 0x27, 0x20, 0xcc}, |
| 1458 | {0xb8, 0x01, 0x79, 0xcc}, {0xb8, 0x81, 0x09, 0xcc}, |
| 1459 | {0xb8, 0x2c, 0x50, 0xcc}, {0xb8, 0x2d, 0xf8, 0xcc}, |
| 1460 | {0xb8, 0x2e, 0xf8, 0xcc}, {0xb8, 0x2f, 0xf8, 0xcc}, |
| 1461 | {0xb8, 0x30, 0x50, 0xcc}, {0xb8, 0x31, 0xf8, 0xcc}, |
| 1462 | {0xb8, 0x32, 0xf8, 0xcc}, {0xb8, 0x33, 0xf8, 0xcc}, |
| 1463 | {0xb8, 0x34, 0x50, 0xcc}, {0xb8, 0x35, 0x00, 0xcc}, |
| 1464 | {0xb8, 0x36, 0x00, 0xcc}, {0xb8, 0x37, 0x00, 0xcc}, |
| 1465 | {0x00, 0x1e, 0xc6, 0xaa}, {0x00, 0x20, 0x44, 0xaa}, |
| 1466 | {0x00, 0xad, 0x02, 0xaa}, {0x00, 0xae, 0x2c, 0xaa}, |
| 1467 | {0x00, 0x12, 0x08, 0xaa}, {0x00, 0x17, 0x41, 0xaa}, |
| 1468 | {0x00, 0x19, 0x41, 0xaa}, {0x00, 0x1e, 0x06, 0xaa}, |
| 1469 | {0x00, 0x21, 0x00, 0xaa}, {0x00, 0x36, 0xc0, 0xaa}, |
| 1470 | {0x00, 0x37, 0xc8, 0xaa}, {0x00, 0x3b, 0x36, 0xaa}, |
| 1471 | {0x00, 0x4b, 0xfe, 0xaa}, {0x00, 0x51, 0x1c, 0xaa}, |
| 1472 | {0x00, 0x52, 0x01, 0xaa}, {0x00, 0x55, 0x0a, 0xaa}, |
| 1473 | {0x00, 0x59, 0x02, 0xaa}, {0x00, 0x5a, 0x04, 0xaa}, |
| 1474 | {0x00, 0x5c, 0x10, 0xaa}, {0x00, 0x5d, 0x10, 0xaa}, |
| 1475 | {0x00, 0x5e, 0x10, 0xaa}, {0x00, 0x5f, 0x10, 0xaa}, |
| 1476 | {0x00, 0x61, 0x00, 0xaa}, {0x00, 0x62, 0x18, 0xaa}, |
| 1477 | {0x00, 0x63, 0x30, 0xaa}, {0x00, 0x70, 0x68, 0xaa}, |
| 1478 | {0x00, 0x80, 0x71, 0xaa}, {0x00, 0x81, 0x08, 0xaa}, |
| 1479 | {0x00, 0x82, 0x00, 0xaa}, {0x00, 0x83, 0x55, 0xaa}, |
| 1480 | {0x00, 0x84, 0x06, 0xaa}, {0x00, 0x85, 0x06, 0xaa}, |
| 1481 | {0x00, 0x86, 0x13, 0xaa}, {0x00, 0x87, 0x18, 0xaa}, |
| 1482 | {0x00, 0xaa, 0x3f, 0xaa}, {0x00, 0xab, 0x44, 0xaa}, |
| 1483 | {0x00, 0xb0, 0x68, 0xaa}, {0x00, 0xb5, 0x10, 0xaa}, |
| 1484 | {0x00, 0xb8, 0x20, 0xaa}, {0x00, 0xb9, 0xa0, 0xaa}, |
| 1485 | {0x00, 0xbc, 0x04, 0xaa}, {0x00, 0x8b, 0x40, 0xaa}, |
| 1486 | {0x00, 0x8c, 0x91, 0xaa}, {0x00, 0x8d, 0x8f, 0xaa}, |
| 1487 | {0x00, 0x8e, 0x91, 0xaa}, {0x00, 0x8f, 0x43, 0xaa}, |
| 1488 | {0x00, 0x90, 0x92, 0xaa}, {0x00, 0x91, 0x89, 0xaa}, |
| 1489 | {0x00, 0x92, 0x9d, 0xaa}, {0x00, 0x93, 0x46, 0xaa}, |
| 1490 | {0x00, 0xd6, 0x22, 0xaa}, {0x00, 0x73, 0x00, 0xaa}, |
| 1491 | {0x00, 0x74, 0x10, 0xaa}, {0x00, 0x75, 0x20, 0xaa}, |
| 1492 | {0x00, 0x76, 0x2b, 0xaa}, {0x00, 0x77, 0x36, 0xaa}, |
| 1493 | {0x00, 0x78, 0x49, 0xaa}, {0x00, 0x79, 0x5a, 0xaa}, |
| 1494 | {0x00, 0x7a, 0x7f, 0xaa}, {0x00, 0x7b, 0x9b, 0xaa}, |
| 1495 | {0x00, 0x7c, 0xba, 0xaa}, {0x00, 0x7d, 0xd4, 0xaa}, |
| 1496 | {0x00, 0x7e, 0xea, 0xaa}, {0x00, 0xd6, 0x62, 0xaa}, |
| 1497 | {0x00, 0x73, 0x00, 0xaa}, {0x00, 0x74, 0x10, 0xaa}, |
| 1498 | {0x00, 0x75, 0x20, 0xaa}, {0x00, 0x76, 0x2b, 0xaa}, |
| 1499 | {0x00, 0x77, 0x36, 0xaa}, {0x00, 0x78, 0x49, 0xaa}, |
| 1500 | {0x00, 0x79, 0x5a, 0xaa}, {0x00, 0x7a, 0x7f, 0xaa}, |
| 1501 | {0x00, 0x7b, 0x9b, 0xaa}, {0x00, 0x7c, 0xba, 0xaa}, |
| 1502 | {0x00, 0x7d, 0xd4, 0xaa}, {0x00, 0x7e, 0xea, 0xaa}, |
| 1503 | {0x00, 0xd6, 0xa2, 0xaa}, {0x00, 0x73, 0x00, 0xaa}, |
| 1504 | {0x00, 0x74, 0x10, 0xaa}, {0x00, 0x75, 0x20, 0xaa}, |
| 1505 | {0x00, 0x76, 0x2b, 0xaa}, {0x00, 0x77, 0x36, 0xaa}, |
| 1506 | {0x00, 0x78, 0x49, 0xaa}, {0x00, 0x79, 0x5a, 0xaa}, |
| 1507 | {0x00, 0x7a, 0x7f, 0xaa}, {0x00, 0x7b, 0x9b, 0xaa}, |
| 1508 | {0x00, 0x7c, 0xba, 0xaa}, {0x00, 0x7d, 0xd4, 0xaa}, |
| 1509 | {0x00, 0x7e, 0xea, 0xaa}, |
| 1510 | {0x00, 0x4c, 0x07, 0xaa}, |
| 1511 | {0x00, 0x4b, 0xe0, 0xaa}, {0x00, 0x4e, 0x77, 0xaa}, |
| 1512 | {0x00, 0x59, 0x02, 0xaa}, {0x00, 0x4d, 0x0a, 0xaa}, |
| 1513 | /* {0x00, 0xd1, 0x00, 0xaa}, {0x00, 0x20, 0xc4, 0xaa}, |
| 1514 | {0xb8, 0x8e, 0x00, 0xcc}, {0xb8, 0x8f, 0xff, 0xcc}, */ |
| 1515 | {0x00, 0xd1, 0x3c, 0xaa}, {0x00, 0x20, 0xc4, 0xaa}, |
| 1516 | {0xb8, 0x8e, 0x00, 0xcc}, {0xb8, 0x8f, 0xff, 0xcc}, |
| 1517 | {0xb8, 0xfe, 0x00, 0xcc}, {0xb8, 0xff, 0x28, 0xcc}, |
| 1518 | {0xb9, 0x00, 0x28, 0xcc}, {0xb9, 0x01, 0x28, 0xcc}, |
| 1519 | {0xb9, 0x02, 0x28, 0xcc}, {0xb9, 0x03, 0x00, 0xcc}, |
| 1520 | {0xb9, 0x04, 0x00, 0xcc}, {0xb9, 0x05, 0x3c, 0xcc}, |
| 1521 | {0xb9, 0x06, 0x3c, 0xcc}, {0xb9, 0x07, 0x3c, 0xcc}, |
| 1522 | {0xb9, 0x08, 0x3c, 0xcc}, {0x00, 0x05, 0x00, 0xaa}, |
| 1523 | {0xb3, 0x5c, 0x00, 0xcc}, {0xb3, 0x01, 0x41, 0xcc}, |
| 1524 | {} |
| 1525 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1526 | static const u8 po3130_rundata[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1527 | {0x00, 0x47, 0x45, 0xaa}, {0x00, 0x48, 0x9b, 0xaa}, |
| 1528 | {0x00, 0x49, 0x3a, 0xaa}, {0x00, 0x4a, 0x01, 0xaa}, |
| 1529 | {0x00, 0x44, 0x40, 0xaa}, |
| 1530 | /* {0x00, 0xd5, 0x7c, 0xaa}, */ |
| 1531 | {0x00, 0xad, 0x04, 0xaa}, {0x00, 0xae, 0x00, 0xaa}, |
| 1532 | {0x00, 0xb0, 0x78, 0xaa}, {0x00, 0x98, 0x02, 0xaa}, |
| 1533 | {0x00, 0x94, 0x25, 0xaa}, {0x00, 0x95, 0x25, 0xaa}, |
| 1534 | {0x00, 0x59, 0x68, 0xaa}, {0x00, 0x44, 0x20, 0xaa}, |
| 1535 | {0x00, 0x17, 0x50, 0xaa}, {0x00, 0x19, 0x50, 0xaa}, |
| 1536 | {0x00, 0xd1, 0x3c, 0xaa}, {0x00, 0xd1, 0x3c, 0xaa}, |
| 1537 | {0x00, 0x1e, 0x06, 0xaa}, {0x00, 0x1e, 0x06, 0xaa}, |
| 1538 | {} |
| 1539 | }; |
| 1540 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1541 | static const u8 po3130_initQVGA_data[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1542 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, |
| 1543 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x09, 0xcc}, |
| 1544 | {0xb3, 0x00, 0x04, 0xcc}, {0xb3, 0x00, 0x24, 0xcc}, |
| 1545 | {0xb3, 0x00, 0x25, 0xcc}, {0xb3, 0x08, 0x01, 0xcc}, |
| 1546 | {0xb3, 0x09, 0x0c, 0xcc}, {0xb3, 0x05, 0x00, 0xcc}, |
| 1547 | {0xb3, 0x06, 0x01, 0xcc}, {0xb3, 0x03, 0x1a, 0xcc}, |
| 1548 | {0xb3, 0x04, 0x15, 0xcc}, {0xb3, 0x20, 0x00, 0xcc}, |
| 1549 | {0xb3, 0x21, 0x00, 0xcc}, {0xb3, 0x22, 0x01, 0xcc}, |
| 1550 | {0xb3, 0x23, 0xe0, 0xcc}, {0xb8, 0x08, 0xe0, 0xcc}, |
| 1551 | {0xb3, 0x14, 0x00, 0xcc}, {0xb3, 0x15, 0x00, 0xcc}, |
| 1552 | {0xb3, 0x16, 0x02, 0xcc}, {0xb3, 0x17, 0x7f, 0xcc}, |
| 1553 | {0xb3, 0x34, 0x01, 0xcc}, {0xb3, 0x35, 0xf6, 0xcc}, |
| 1554 | {0xb3, 0x00, 0x27, 0xcc}, {0xbc, 0x00, 0xd1, 0xcc}, |
| 1555 | {0xb8, 0x00, 0x21, 0xcc}, {0xb8, 0x27, 0x20, 0xcc}, |
| 1556 | {0xb8, 0x01, 0x79, 0xcc}, {0xb8, 0x81, 0x09, 0xcc}, |
| 1557 | {0xb8, 0x2c, 0x50, 0xcc}, {0xb8, 0x2d, 0xf8, 0xcc}, |
| 1558 | {0xb8, 0x2e, 0xf8, 0xcc}, {0xb8, 0x2f, 0xf8, 0xcc}, |
| 1559 | {0xb8, 0x30, 0x50, 0xcc}, {0xb8, 0x31, 0xf8, 0xcc}, |
| 1560 | {0xb8, 0x32, 0xf8, 0xcc}, {0xb8, 0x33, 0xf8, 0xcc}, |
| 1561 | {0xb8, 0x34, 0x50, 0xcc}, {0xb8, 0x35, 0x00, 0xcc}, |
| 1562 | {0xb8, 0x36, 0x00, 0xcc}, {0xb8, 0x37, 0x00, 0xcc}, |
| 1563 | {0x00, 0x1e, 0xc6, 0xaa}, {0x00, 0x20, 0x44, 0xaa}, |
| 1564 | {0x00, 0xad, 0x02, 0xaa}, {0x00, 0xae, 0x2c, 0xaa}, |
| 1565 | {0x00, 0x12, 0x08, 0xaa}, {0x00, 0x17, 0x41, 0xaa}, |
| 1566 | {0x00, 0x19, 0x41, 0xaa}, {0x00, 0x1e, 0x06, 0xaa}, |
| 1567 | {0x00, 0x21, 0x00, 0xaa}, {0x00, 0x36, 0xc0, 0xaa}, |
| 1568 | {0x00, 0x37, 0xc8, 0xaa}, {0x00, 0x3b, 0x36, 0xaa}, |
| 1569 | {0x00, 0x4b, 0xfe, 0xaa}, {0x00, 0x51, 0x1c, 0xaa}, |
| 1570 | {0x00, 0x52, 0x01, 0xaa}, {0x00, 0x55, 0x0a, 0xaa}, |
| 1571 | {0x00, 0x59, 0x6f, 0xaa}, {0x00, 0x5a, 0x04, 0xaa}, |
| 1572 | {0x00, 0x5c, 0x10, 0xaa}, {0x00, 0x5d, 0x10, 0xaa}, |
| 1573 | {0x00, 0x5e, 0x10, 0xaa}, {0x00, 0x5f, 0x10, 0xaa}, |
| 1574 | {0x00, 0x61, 0x00, 0xaa}, {0x00, 0x62, 0x18, 0xaa}, |
| 1575 | {0x00, 0x63, 0x30, 0xaa}, {0x00, 0x70, 0x68, 0xaa}, |
| 1576 | {0x00, 0x80, 0x71, 0xaa}, {0x00, 0x81, 0x08, 0xaa}, |
| 1577 | {0x00, 0x82, 0x00, 0xaa}, {0x00, 0x83, 0x55, 0xaa}, |
| 1578 | {0x00, 0x84, 0x06, 0xaa}, {0x00, 0x85, 0x06, 0xaa}, |
| 1579 | {0x00, 0x86, 0x13, 0xaa}, {0x00, 0x87, 0x18, 0xaa}, |
| 1580 | {0x00, 0xaa, 0x3f, 0xaa}, {0x00, 0xab, 0x44, 0xaa}, |
| 1581 | {0x00, 0xb0, 0x68, 0xaa}, {0x00, 0xb5, 0x10, 0xaa}, |
| 1582 | {0x00, 0xb8, 0x20, 0xaa}, {0x00, 0xb9, 0xa0, 0xaa}, |
| 1583 | {0x00, 0xbc, 0x04, 0xaa}, {0x00, 0x8b, 0x40, 0xaa}, |
| 1584 | {0x00, 0x8c, 0x91, 0xaa}, {0x00, 0x8d, 0x8f, 0xaa}, |
| 1585 | {0x00, 0x8e, 0x91, 0xaa}, {0x00, 0x8f, 0x43, 0xaa}, |
| 1586 | {0x00, 0x90, 0x92, 0xaa}, {0x00, 0x91, 0x89, 0xaa}, |
| 1587 | {0x00, 0x92, 0x9d, 0xaa}, {0x00, 0x93, 0x46, 0xaa}, |
| 1588 | {0x00, 0xd6, 0x22, 0xaa}, {0x00, 0x73, 0x00, 0xaa}, |
| 1589 | {0x00, 0x74, 0x10, 0xaa}, {0x00, 0x75, 0x20, 0xaa}, |
| 1590 | {0x00, 0x76, 0x2b, 0xaa}, {0x00, 0x77, 0x36, 0xaa}, |
| 1591 | {0x00, 0x78, 0x49, 0xaa}, {0x00, 0x79, 0x5a, 0xaa}, |
| 1592 | {0x00, 0x7a, 0x7f, 0xaa}, {0x00, 0x7b, 0x9b, 0xaa}, |
| 1593 | {0x00, 0x7c, 0xba, 0xaa}, {0x00, 0x7d, 0xd4, 0xaa}, |
| 1594 | {0x00, 0x7e, 0xea, 0xaa}, {0x00, 0xd6, 0x62, 0xaa}, |
| 1595 | {0x00, 0x73, 0x00, 0xaa}, {0x00, 0x74, 0x10, 0xaa}, |
| 1596 | {0x00, 0x75, 0x20, 0xaa}, {0x00, 0x76, 0x2b, 0xaa}, |
| 1597 | {0x00, 0x77, 0x36, 0xaa}, {0x00, 0x78, 0x49, 0xaa}, |
| 1598 | {0x00, 0x79, 0x5a, 0xaa}, {0x00, 0x7a, 0x7f, 0xaa}, |
| 1599 | {0x00, 0x7b, 0x9b, 0xaa}, {0x00, 0x7c, 0xba, 0xaa}, |
| 1600 | {0x00, 0x7d, 0xd4, 0xaa}, {0x00, 0x7e, 0xea, 0xaa}, |
| 1601 | {0x00, 0xd6, 0xa2, 0xaa}, {0x00, 0x73, 0x00, 0xaa}, |
| 1602 | {0x00, 0x74, 0x10, 0xaa}, {0x00, 0x75, 0x20, 0xaa}, |
| 1603 | {0x00, 0x76, 0x2b, 0xaa}, {0x00, 0x77, 0x36, 0xaa}, |
| 1604 | {0x00, 0x78, 0x49, 0xaa}, {0x00, 0x79, 0x5a, 0xaa}, |
| 1605 | {0x00, 0x7a, 0x7f, 0xaa}, {0x00, 0x7b, 0x9b, 0xaa}, |
| 1606 | {0x00, 0x7c, 0xba, 0xaa}, {0x00, 0x7d, 0xd4, 0xaa}, |
| 1607 | {0x00, 0x7e, 0xea, 0xaa}, {0x00, 0x4c, 0x07, 0xaa}, |
| 1608 | {0x00, 0x4b, 0xe0, 0xaa}, {0x00, 0x4e, 0x77, 0xaa}, |
| 1609 | {0x00, 0x59, 0x66, 0xaa}, {0x00, 0x4d, 0x0a, 0xaa}, |
| 1610 | {0x00, 0xd1, 0x00, 0xaa}, {0x00, 0x20, 0xc4, 0xaa}, |
| 1611 | {0xb8, 0x8e, 0x00, 0xcc}, {0xb8, 0x8f, 0xff, 0xcc}, |
| 1612 | {0xb8, 0xfe, 0x00, 0xcc}, {0xb8, 0xff, 0x28, 0xcc}, |
| 1613 | {0xb9, 0x00, 0x28, 0xcc}, {0xb9, 0x01, 0x28, 0xcc}, |
| 1614 | {0xb9, 0x02, 0x28, 0xcc}, {0xb9, 0x03, 0x00, 0xcc}, |
| 1615 | {0xb9, 0x04, 0x00, 0xcc}, {0xb9, 0x05, 0x3c, 0xcc}, |
| 1616 | {0xb9, 0x06, 0x3c, 0xcc}, {0xb9, 0x07, 0x3c, 0xcc}, |
| 1617 | {0xb9, 0x08, 0x3c, 0xcc}, {0xbc, 0x02, 0x18, 0xcc}, |
| 1618 | {0xbc, 0x03, 0x50, 0xcc}, {0xbc, 0x04, 0x18, 0xcc}, |
| 1619 | {0xbc, 0x05, 0x00, 0xcc}, {0xbc, 0x06, 0x00, 0xcc}, |
| 1620 | {0xbc, 0x08, 0x30, 0xcc}, {0xbc, 0x09, 0x40, 0xcc}, |
| 1621 | {0xbc, 0x0a, 0x10, 0xcc}, {0xbc, 0x0b, 0x00, 0xcc}, |
| 1622 | {0xbc, 0x0c, 0x00, 0xcc}, {0x00, 0x05, 0x00, 0xaa}, |
| 1623 | {0xb3, 0x5c, 0x00, 0xcc}, {0xb3, 0x01, 0x41, 0xcc}, |
| 1624 | {} |
| 1625 | }; |
| 1626 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1627 | static const u8 hv7131r_gamma[17] = { |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1628 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
| 1629 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1630 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1631 | static const u8 hv7131r_matrix[9] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1632 | 0x5f, 0xec, 0xf5, 0xf1, 0x5a, 0xf5, 0xf1, 0xec, 0x63 |
| 1633 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1634 | static const u8 hv7131r_initVGA_data[][4] = { |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1635 | {0xb3, 0x01, 0x01, 0xcc}, |
| 1636 | {0xb0, 0x03, 0x19, 0xcc}, |
| 1637 | {0xb0, 0x04, 0x02, 0xcc}, |
| 1638 | {0x00, 0x00, 0x20, 0xdd}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1639 | {0xb3, 0x00, 0x24, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1640 | {0xb3, 0x00, 0x25, 0xcc}, |
| 1641 | {0xb3, 0x08, 0x01, 0xcc}, |
| 1642 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 1643 | {0xb3, 0x05, 0x01, 0xcc}, |
| 1644 | {0xb3, 0x06, 0x03, 0xcc}, |
| 1645 | {0xb3, 0x01, 0x45, 0xcc}, |
| 1646 | {0xb3, 0x03, 0x0b, 0xcc}, |
| 1647 | {0xb3, 0x04, 0x05, 0xcc}, |
| 1648 | {0xb3, 0x20, 0x00, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1649 | {0xb3, 0x21, 0x00, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1650 | {0xb3, 0x22, 0x01, 0xcc}, |
| 1651 | {0xb3, 0x23, 0xe0, 0xcc}, |
| 1652 | {0xb3, 0x14, 0x00, 0xcc}, |
| 1653 | {0xb3, 0x15, 0x02, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1654 | {0xb3, 0x16, 0x02, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1655 | {0xb3, 0x17, 0x7f, 0xcc}, |
| 1656 | {0xb3, 0x34, 0x01, 0xcc}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 1657 | {0xb3, 0x35, 0x91, 0xcc}, /* i2c add: 11 */ |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1658 | {0xb3, 0x00, 0x27, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1659 | {0xbc, 0x00, 0x73, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1660 | {0xb8, 0x00, 0x23, 0xcc}, |
| 1661 | {0xb8, 0x2c, 0x50, 0xcc}, |
| 1662 | {0xb8, 0x2d, 0xf8, 0xcc}, |
| 1663 | {0xb8, 0x2e, 0xf8, 0xcc}, |
| 1664 | {0xb8, 0x2f, 0xf8, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1665 | {0xb8, 0x30, 0x50, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1666 | {0xb8, 0x31, 0xf8, 0xcc}, |
| 1667 | {0xb8, 0x32, 0xf8, 0xcc}, |
| 1668 | {0xb8, 0x33, 0xf8, 0xcc}, |
| 1669 | {0xb8, 0x34, 0x58, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1670 | {0xb8, 0x35, 0x00, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1671 | {0xb8, 0x36, 0x00, 0xcc}, |
| 1672 | {0xb8, 0x37, 0x00, 0xcc}, |
| 1673 | {0xb8, 0x27, 0x20, 0xcc}, |
| 1674 | {0xb8, 0x01, 0x7d, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1675 | {0xb8, 0x81, 0x09, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1676 | {0xb3, 0x01, 0x41, 0xcc}, |
| 1677 | {0xb8, 0x8e, 0x00, 0xcc}, |
| 1678 | {0xb8, 0x8f, 0xff, 0xcc}, |
| 1679 | {0x00, 0x01, 0x0c, 0xaa}, |
| 1680 | {0x00, 0x14, 0x01, 0xaa}, |
| 1681 | {0x00, 0x15, 0xe6, 0xaa}, |
| 1682 | {0x00, 0x16, 0x02, 0xaa}, |
| 1683 | {0x00, 0x17, 0x86, 0xaa}, |
| 1684 | {0x00, 0x23, 0x00, 0xaa}, |
| 1685 | {0x00, 0x25, 0x03, 0xaa}, |
| 1686 | {0x00, 0x26, 0xa9, 0xaa}, |
| 1687 | {0x00, 0x27, 0x80, 0xaa}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1688 | {0x00, 0x30, 0x18, 0xaa}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1689 | {0xb6, 0x00, 0x00, 0xcc}, |
| 1690 | {0xb6, 0x03, 0x02, 0xcc}, |
| 1691 | {0xb6, 0x02, 0x80, 0xcc}, |
| 1692 | {0xb6, 0x05, 0x01, 0xcc}, |
| 1693 | {0xb6, 0x04, 0xe0, 0xcc}, |
| 1694 | {0xb6, 0x12, 0x78, 0xcc}, |
| 1695 | {0xb6, 0x18, 0x02, 0xcc}, |
| 1696 | {0xb6, 0x17, 0x58, 0xcc}, |
| 1697 | {0xb6, 0x16, 0x00, 0xcc}, |
| 1698 | {0xb6, 0x22, 0x12, 0xcc}, |
| 1699 | {0xb6, 0x23, 0x0b, 0xcc}, |
| 1700 | {0xb3, 0x02, 0x02, 0xcc}, |
| 1701 | {0xbf, 0xc0, 0x39, 0xcc}, |
| 1702 | {0xbf, 0xc1, 0x04, 0xcc}, |
| 1703 | {0xbf, 0xcc, 0x10, 0xcc}, |
| 1704 | {0xb6, 0x12, 0xf8, 0xcc}, |
| 1705 | {0xb6, 0x13, 0x13, 0xcc}, |
| 1706 | {0xb9, 0x12, 0x00, 0xcc}, |
| 1707 | {0xb9, 0x13, 0x0a, 0xcc}, |
| 1708 | {0xb9, 0x14, 0x0a, 0xcc}, |
| 1709 | {0xb9, 0x15, 0x0a, 0xcc}, |
| 1710 | {0xb9, 0x16, 0x0a, 0xcc}, |
| 1711 | {0xb8, 0x0c, 0x20, 0xcc}, |
| 1712 | {0xb8, 0x0d, 0x70, 0xcc}, |
| 1713 | {0xb9, 0x18, 0x00, 0xcc}, |
| 1714 | {0xb9, 0x19, 0x0f, 0xcc}, |
| 1715 | {0xb9, 0x1a, 0x0f, 0xcc}, |
| 1716 | {0xb9, 0x1b, 0x0f, 0xcc}, |
| 1717 | {0xb9, 0x1c, 0x0f, 0xcc}, |
| 1718 | {0xb3, 0x5c, 0x01, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1719 | {} |
| 1720 | }; |
| 1721 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1722 | static const u8 hv7131r_initQVGA_data[][4] = { |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1723 | {0xb3, 0x01, 0x01, 0xcc}, |
| 1724 | {0xb0, 0x03, 0x19, 0xcc}, |
| 1725 | {0xb0, 0x04, 0x02, 0xcc}, |
| 1726 | {0x00, 0x00, 0x20, 0xdd}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1727 | {0xb3, 0x00, 0x24, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1728 | {0xb3, 0x00, 0x25, 0xcc}, |
| 1729 | {0xb3, 0x08, 0x01, 0xcc}, |
| 1730 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 1731 | {0xb3, 0x05, 0x01, 0xcc}, |
| 1732 | {0xb3, 0x06, 0x03, 0xcc}, |
| 1733 | {0xb3, 0x01, 0x45, 0xcc}, |
| 1734 | {0xb3, 0x03, 0x0b, 0xcc}, |
| 1735 | {0xb3, 0x04, 0x05, 0xcc}, |
| 1736 | {0xb3, 0x20, 0x00, 0xcc}, |
| 1737 | {0xb3, 0x21, 0x00, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1738 | {0xb3, 0x22, 0x01, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1739 | {0xb3, 0x23, 0xe0, 0xcc}, |
| 1740 | {0xb3, 0x14, 0x00, 0xcc}, |
| 1741 | {0xb3, 0x15, 0x02, 0xcc}, |
| 1742 | {0xb3, 0x16, 0x02, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1743 | {0xb3, 0x17, 0x7f, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1744 | {0xb3, 0x34, 0x01, 0xcc}, |
| 1745 | {0xb3, 0x35, 0x91, 0xcc}, |
| 1746 | {0xb3, 0x00, 0x27, 0xcc}, |
| 1747 | {0xbc, 0x00, 0xd3, 0xcc}, |
| 1748 | {0xb8, 0x00, 0x23, 0xcc}, |
| 1749 | {0xb8, 0x2c, 0x50, 0xcc}, |
| 1750 | {0xb8, 0x2d, 0xf8, 0xcc}, |
| 1751 | {0xb8, 0x2e, 0xf8, 0xcc}, |
| 1752 | {0xb8, 0x2f, 0xf8, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1753 | {0xb8, 0x30, 0x50, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1754 | {0xb8, 0x31, 0xf8, 0xcc}, |
| 1755 | {0xb8, 0x32, 0xf8, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1756 | {0xb8, 0x33, 0xf8, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1757 | {0xb8, 0x34, 0x58, 0xcc}, |
| 1758 | {0xb8, 0x35, 0x00, 0xcc}, |
| 1759 | {0xb8, 0x36, 0x00, 0xcc}, |
| 1760 | {0xb8, 0x37, 0x00, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1761 | {0xb8, 0x27, 0x20, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1762 | {0xb8, 0x01, 0x7d, 0xcc}, |
| 1763 | {0xb8, 0x81, 0x09, 0xcc}, |
| 1764 | {0xb3, 0x01, 0x41, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1765 | {0xb8, 0x8e, 0x00, 0xcc}, |
Jean-Francois Moine | 0ee7e4d | 2009-09-01 13:49:05 -0300 | [diff] [blame] | 1766 | {0xb8, 0x8f, 0xff, 0xcc}, |
| 1767 | {0x00, 0x01, 0x0c, 0xaa}, |
| 1768 | {0x00, 0x14, 0x01, 0xaa}, |
| 1769 | {0x00, 0x15, 0xe6, 0xaa}, |
| 1770 | {0x00, 0x16, 0x02, 0xaa}, |
| 1771 | {0x00, 0x17, 0x86, 0xaa}, |
| 1772 | {0x00, 0x23, 0x00, 0xaa}, |
| 1773 | {0x00, 0x25, 0x03, 0xaa}, |
| 1774 | {0x00, 0x26, 0xa9, 0xaa}, |
| 1775 | {0x00, 0x27, 0x80, 0xaa}, |
| 1776 | {0x00, 0x30, 0x18, 0xaa}, |
| 1777 | {0xb6, 0x00, 0x00, 0xcc}, |
| 1778 | {0xb6, 0x03, 0x01, 0xcc}, |
| 1779 | {0xb6, 0x02, 0x40, 0xcc}, |
| 1780 | {0xb6, 0x05, 0x00, 0xcc}, |
| 1781 | {0xb6, 0x04, 0xf0, 0xcc}, |
| 1782 | {0xb6, 0x12, 0x78, 0xcc}, |
| 1783 | {0xb6, 0x18, 0x00, 0xcc}, |
| 1784 | {0xb6, 0x17, 0x96, 0xcc}, |
| 1785 | {0xb6, 0x16, 0x00, 0xcc}, |
| 1786 | {0xb6, 0x22, 0x12, 0xcc}, |
| 1787 | {0xb6, 0x23, 0x0b, 0xcc}, |
| 1788 | {0xb3, 0x02, 0x02, 0xcc}, |
| 1789 | {0xbf, 0xc0, 0x39, 0xcc}, |
| 1790 | {0xbf, 0xc1, 0x04, 0xcc}, |
| 1791 | {0xbf, 0xcc, 0x10, 0xcc}, |
| 1792 | {0xbc, 0x02, 0x18, 0xcc}, |
| 1793 | {0xbc, 0x03, 0x50, 0xcc}, |
| 1794 | {0xbc, 0x04, 0x18, 0xcc}, |
| 1795 | {0xbc, 0x05, 0x00, 0xcc}, |
| 1796 | {0xbc, 0x06, 0x00, 0xcc}, |
| 1797 | {0xbc, 0x08, 0x30, 0xcc}, |
| 1798 | {0xbc, 0x09, 0x40, 0xcc}, |
| 1799 | {0xbc, 0x0a, 0x10, 0xcc}, |
| 1800 | {0xbc, 0x0b, 0x00, 0xcc}, |
| 1801 | {0xbc, 0x0c, 0x00, 0xcc}, |
| 1802 | {0xb9, 0x12, 0x00, 0xcc}, |
| 1803 | {0xb9, 0x13, 0x0a, 0xcc}, |
| 1804 | {0xb9, 0x14, 0x0a, 0xcc}, |
| 1805 | {0xb9, 0x15, 0x0a, 0xcc}, |
| 1806 | {0xb9, 0x16, 0x0a, 0xcc}, |
| 1807 | {0xb9, 0x18, 0x00, 0xcc}, |
| 1808 | {0xb9, 0x19, 0x0f, 0xcc}, |
| 1809 | {0xb8, 0x0c, 0x20, 0xcc}, |
| 1810 | {0xb8, 0x0d, 0x70, 0xcc}, |
| 1811 | {0xb9, 0x1a, 0x0f, 0xcc}, |
| 1812 | {0xb9, 0x1b, 0x0f, 0xcc}, |
| 1813 | {0xb9, 0x1c, 0x0f, 0xcc}, |
| 1814 | {0xb6, 0x12, 0xf8, 0xcc}, |
| 1815 | {0xb6, 0x13, 0x13, 0xcc}, |
| 1816 | {0xb3, 0x5c, 0x01, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1817 | {} |
| 1818 | }; |
| 1819 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1820 | static const u8 ov7660_gamma[17] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1821 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
| 1822 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff |
| 1823 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1824 | static const u8 ov7660_matrix[9] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1825 | 0x5a, 0xf0, 0xf6, 0xf3, 0x57, 0xf6, 0xf3, 0xef, 0x62 |
| 1826 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1827 | static const u8 ov7660_initVGA_data[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1828 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, |
| 1829 | {0x00, 0x00, 0x50, 0xdd}, |
| 1830 | {0xb0, 0x03, 0x01, 0xcc}, |
| 1831 | {0xb3, 0x00, 0x21, 0xcc}, {0xb3, 0x00, 0x26, 0xcc}, |
| 1832 | {0xb3, 0x05, 0x01, 0xcc}, |
| 1833 | {0xb3, 0x06, 0x03, 0xcc}, |
| 1834 | {0xb3, 0x03, 0x1f, 0xcc}, {0xb3, 0x04, 0x05, 0xcc}, |
| 1835 | {0xb3, 0x05, 0x00, 0xcc}, |
| 1836 | {0xb3, 0x06, 0x01, 0xcc}, |
| 1837 | {0xb3, 0x15, 0x00, 0xcc},/* 0xb315 <-0 href startl */ |
| 1838 | {0xb3, 0x16, 0x02, 0xcc}, {0xb3, 0x17, 0x7f, 0xcc}, |
| 1839 | {0xb3, 0x21, 0x00, 0xcc}, |
| 1840 | {0xb3, 0x23, 0xe0, 0xcc}, {0xb3, 0x1d, 0x01, 0xcc}, |
| 1841 | {0xb3, 0x1f, 0x02, 0xcc}, |
| 1842 | {0xb3, 0x34, 0x01, 0xcc}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 1843 | {0xb3, 0x35, 0xa1, 0xcc}, /* i2c add: 21 */ |
| 1844 | {0xb3, 0x00, 0x26, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1845 | {0xb8, 0x00, 0x33, 0xcc}, /* 13 */ |
| 1846 | {0xb8, 0x01, 0x7d, 0xcc}, |
| 1847 | {0xbc, 0x00, 0x73, 0xcc}, {0xb8, 0x81, 0x09, 0xcc}, |
| 1848 | {0xb8, 0x27, 0x20, 0xcc}, |
| 1849 | {0xb8, 0x8f, 0x50, 0xcc}, |
| 1850 | {0x00, 0x01, 0x80, 0xaa}, {0x00, 0x02, 0x80, 0xaa}, |
| 1851 | {0x00, 0x12, 0x80, 0xaa}, |
| 1852 | {0x00, 0x12, 0x05, 0xaa}, |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 1853 | {0x00, 0x1e, 0x01, 0xaa}, /* MVFP */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1854 | {0x00, 0x3d, 0x40, 0xaa}, /* 0x3d <-40 gamma 01 */ |
| 1855 | {0x00, 0x41, 0x00, 0xaa}, /* edge 00 */ |
| 1856 | {0x00, 0x0d, 0x48, 0xaa}, {0x00, 0x0e, 0x04, 0xaa}, |
| 1857 | {0x00, 0x13, 0xa7, 0xaa}, |
| 1858 | {0x00, 0x40, 0xc1, 0xaa}, {0x00, 0x35, 0x00, 0xaa}, |
| 1859 | {0x00, 0x36, 0x00, 0xaa}, |
| 1860 | {0x00, 0x3c, 0x68, 0xaa}, {0x00, 0x1b, 0x05, 0xaa}, |
| 1861 | {0x00, 0x39, 0x43, 0xaa}, |
| 1862 | {0x00, 0x8d, 0xcf, 0xaa}, |
| 1863 | {0x00, 0x8b, 0xcc, 0xaa}, {0x00, 0x8c, 0xcc, 0xaa}, |
| 1864 | {0x00, 0x0f, 0x62, 0xaa}, |
| 1865 | {0x00, 0x35, 0x84, 0xaa}, |
| 1866 | {0x00, 0x3b, 0x08, 0xaa}, /* 0 * Nightframe 1/4 + 50Hz -> 0xC8 */ |
| 1867 | {0x00, 0x3a, 0x00, 0xaa}, /* mx change yuyv format 00, 04, 01; 08, 0c*/ |
| 1868 | {0x00, 0x14, 0x2a, 0xaa}, /* agc ampli */ |
| 1869 | {0x00, 0x9e, 0x40, 0xaa}, {0xb8, 0x8f, 0x50, 0xcc}, |
| 1870 | {0x00, 0x01, 0x80, 0xaa}, |
| 1871 | {0x00, 0x02, 0x80, 0xaa}, |
| 1872 | {0xb8, 0xfe, 0x00, 0xcc}, {0xb8, 0xff, 0x28, 0xcc}, |
| 1873 | {0xb9, 0x00, 0x28, 0xcc}, |
| 1874 | {0xb9, 0x01, 0x28, 0xcc}, {0xb9, 0x02, 0x28, 0xcc}, |
| 1875 | {0xb9, 0x03, 0x00, 0xcc}, |
| 1876 | {0xb9, 0x04, 0x00, 0xcc}, |
| 1877 | {0xb9, 0x05, 0x3c, 0xcc}, {0xb9, 0x06, 0x3c, 0xcc}, |
| 1878 | {0xb9, 0x07, 0x3c, 0xcc}, |
| 1879 | {0xb9, 0x08, 0x3c, 0xcc}, |
| 1880 | |
| 1881 | {0xb8, 0x8e, 0x00, 0xcc}, {0xb8, 0x8f, 0xff, 0xcc}, |
| 1882 | |
| 1883 | {0x00, 0x29, 0x3c, 0xaa}, {0xb3, 0x01, 0x45, 0xcc}, |
| 1884 | {} |
| 1885 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1886 | static const u8 ov7660_initQVGA_data[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1887 | {0xb0, 0x4d, 0x00, 0xcc}, {0xb3, 0x01, 0x01, 0xcc}, |
| 1888 | {0x00, 0x00, 0x50, 0xdd}, {0xb0, 0x03, 0x01, 0xcc}, |
| 1889 | {0xb3, 0x00, 0x21, 0xcc}, {0xb3, 0x00, 0x26, 0xcc}, |
| 1890 | {0xb3, 0x05, 0x01, 0xcc}, {0xb3, 0x06, 0x03, 0xcc}, |
| 1891 | {0xb3, 0x03, 0x1f, 0xcc}, {0xb3, 0x04, 0x05, 0xcc}, |
| 1892 | {0xb3, 0x05, 0x00, 0xcc}, {0xb3, 0x06, 0x01, 0xcc}, |
| 1893 | {0xb3, 0x15, 0x00, 0xcc},/* 0xb315 <-0 href startl */ |
| 1894 | {0xb3, 0x16, 0x02, 0xcc}, {0xb3, 0x17, 0x7f, 0xcc}, |
| 1895 | {0xb3, 0x21, 0x00, 0xcc}, |
| 1896 | {0xb3, 0x23, 0xe0, 0xcc}, {0xb3, 0x1d, 0x01, 0xcc}, |
| 1897 | {0xb3, 0x1f, 0x02, 0xcc}, {0xb3, 0x34, 0x01, 0xcc}, |
| 1898 | {0xb3, 0x35, 0xa1, 0xcc}, {0xb3, 0x00, 0x26, 0xcc}, |
| 1899 | {0xb8, 0x00, 0x33, 0xcc}, /* 13 */ |
| 1900 | {0xb8, 0x01, 0x7d, 0xcc}, |
| 1901 | /* sizer */ |
| 1902 | {0xbc, 0x00, 0xd3, 0xcc}, |
| 1903 | {0xb8, 0x81, 0x09, 0xcc}, {0xb8, 0x81, 0x09, 0xcc}, |
| 1904 | {0xb8, 0x27, 0x20, 0xcc}, {0xb8, 0x8f, 0x50, 0xcc}, |
| 1905 | {0x00, 0x01, 0x80, 0xaa}, {0x00, 0x02, 0x80, 0xaa}, |
| 1906 | {0x00, 0x12, 0x80, 0xaa}, {0x00, 0x12, 0x05, 0xaa}, |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 1907 | {0x00, 0x1e, 0x01, 0xaa}, /* MVFP */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1908 | {0x00, 0x3d, 0x40, 0xaa}, /* 0x3d <-40 gamma 01 */ |
| 1909 | {0x00, 0x41, 0x00, 0xaa}, /* edge 00 */ |
| 1910 | {0x00, 0x0d, 0x48, 0xaa}, {0x00, 0x0e, 0x04, 0xaa}, |
| 1911 | {0x00, 0x13, 0xa7, 0xaa}, |
| 1912 | {0x00, 0x40, 0xc1, 0xaa}, {0x00, 0x35, 0x00, 0xaa}, |
| 1913 | {0x00, 0x36, 0x00, 0xaa}, |
| 1914 | {0x00, 0x3c, 0x68, 0xaa}, {0x00, 0x1b, 0x05, 0xaa}, |
| 1915 | {0x00, 0x39, 0x43, 0xaa}, {0x00, 0x8d, 0xcf, 0xaa}, |
| 1916 | {0x00, 0x8b, 0xcc, 0xaa}, {0x00, 0x8c, 0xcc, 0xaa}, |
| 1917 | {0x00, 0x0f, 0x62, 0xaa}, {0x00, 0x35, 0x84, 0xaa}, |
| 1918 | {0x00, 0x3b, 0x08, 0xaa}, /* 0 * Nightframe 1/4 + 50Hz -> 0xC8 */ |
| 1919 | {0x00, 0x3a, 0x00, 0xaa}, /* mx change yuyv format 00, 04, 01; 08, 0c*/ |
| 1920 | {0x00, 0x14, 0x2a, 0xaa}, /* agc ampli */ |
| 1921 | {0x00, 0x9e, 0x40, 0xaa}, {0xb8, 0x8f, 0x50, 0xcc}, |
| 1922 | {0x00, 0x01, 0x80, 0xaa}, |
| 1923 | {0x00, 0x02, 0x80, 0xaa}, |
| 1924 | /* sizer filters */ |
| 1925 | {0xbc, 0x02, 0x08, 0xcc}, |
| 1926 | {0xbc, 0x03, 0x70, 0xcc}, |
| 1927 | {0xb8, 0x35, 0x00, 0xcc}, |
| 1928 | {0xb8, 0x36, 0x00, 0xcc}, |
| 1929 | {0xb8, 0x37, 0x00, 0xcc}, |
| 1930 | {0xbc, 0x04, 0x08, 0xcc}, |
| 1931 | {0xbc, 0x05, 0x00, 0xcc}, |
| 1932 | {0xbc, 0x06, 0x00, 0xcc}, |
| 1933 | {0xbc, 0x08, 0x3c, 0xcc}, |
| 1934 | {0xbc, 0x09, 0x40, 0xcc}, |
| 1935 | {0xbc, 0x0a, 0x04, 0xcc}, |
| 1936 | {0xbc, 0x0b, 0x00, 0xcc}, |
| 1937 | {0xbc, 0x0c, 0x00, 0xcc}, |
| 1938 | /* */ |
| 1939 | {0xb8, 0xfe, 0x00, 0xcc}, |
| 1940 | {0xb8, 0xff, 0x28, 0xcc}, |
| 1941 | /* */ |
| 1942 | {0xb9, 0x00, 0x28, 0xcc}, {0xb9, 0x01, 0x28, 0xcc}, |
| 1943 | {0xb9, 0x02, 0x28, 0xcc}, {0xb9, 0x03, 0x00, 0xcc}, |
| 1944 | {0xb9, 0x04, 0x00, 0xcc}, {0xb9, 0x05, 0x3c, 0xcc}, |
| 1945 | {0xb9, 0x06, 0x3c, 0xcc}, {0xb9, 0x07, 0x3c, 0xcc}, |
| 1946 | {0xb9, 0x08, 0x3c, 0xcc}, |
| 1947 | /* */ |
| 1948 | {0xb8, 0x8e, 0x00, 0xcc}, |
| 1949 | {0xb8, 0x8f, 0xff, 0xcc}, /* ff */ |
| 1950 | {0x00, 0x29, 0x3c, 0xaa}, |
| 1951 | {0xb3, 0x01, 0x45, 0xcc}, /* 45 */ |
Jean-Francois Moine | 1ff1e48 | 2008-07-17 09:37:57 -0300 | [diff] [blame] | 1952 | {} |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1953 | }; |
| 1954 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1955 | static const u8 ov7660_50HZ[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1956 | {0x00, 0x3b, 0x08, 0xaa}, |
| 1957 | {0x00, 0x9d, 0x40, 0xaa}, |
| 1958 | {0x00, 0x13, 0xa7, 0xaa}, |
Jean-Francois Moine | 1ff1e48 | 2008-07-17 09:37:57 -0300 | [diff] [blame] | 1959 | {} |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1960 | }; |
| 1961 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1962 | static const u8 ov7660_60HZ[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1963 | {0x00, 0x3b, 0x00, 0xaa}, |
| 1964 | {0x00, 0x9e, 0x40, 0xaa}, |
| 1965 | {0x00, 0x13, 0xa7, 0xaa}, |
| 1966 | {} |
| 1967 | }; |
| 1968 | |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 1969 | static const u8 ov7660_NoFliker[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1970 | {0x00, 0x13, 0x87, 0xaa}, |
| 1971 | {} |
| 1972 | }; |
| 1973 | |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 1974 | static const u8 ov7670_InitVGA[][4] = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1975 | {0xb3, 0x01, 0x05, 0xcc}, |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 1976 | {0x00, 0x00, 0x30, 0xdd}, |
| 1977 | {0xb0, 0x03, 0x19, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 1978 | {0x00, 0x00, 0x10, 0xdd}, |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 1979 | {0xb0, 0x04, 0x02, 0xcc}, |
| 1980 | {0x00, 0x00, 0x10, 0xdd}, |
| 1981 | {0xb3, 0x00, 0x66, 0xcc}, |
| 1982 | {0xb3, 0x00, 0x67, 0xcc}, |
| 1983 | {0xb0, 0x16, 0x01, 0xcc}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 1984 | {0xb3, 0x35, 0xa1, 0xcc}, /* i2c add: 21 */ |
| 1985 | {0xb3, 0x34, 0x01, 0xcc}, |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 1986 | {0xb3, 0x05, 0x01, 0xcc}, |
| 1987 | {0xb3, 0x06, 0x01, 0xcc}, |
| 1988 | {0xb3, 0x08, 0x01, 0xcc}, |
| 1989 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 1990 | {0xb3, 0x02, 0x02, 0xcc}, |
| 1991 | {0xb3, 0x03, 0x1f, 0xcc}, |
| 1992 | {0xb3, 0x14, 0x00, 0xcc}, |
| 1993 | {0xb3, 0x15, 0x00, 0xcc}, |
| 1994 | {0xb3, 0x16, 0x02, 0xcc}, |
| 1995 | {0xb3, 0x17, 0x7f, 0xcc}, |
| 1996 | {0xb3, 0x04, 0x05, 0xcc}, |
| 1997 | {0xb3, 0x20, 0x00, 0xcc}, |
| 1998 | {0xb3, 0x21, 0x00, 0xcc}, |
| 1999 | {0xb3, 0x22, 0x01, 0xcc}, |
| 2000 | {0xb3, 0x23, 0xe0, 0xcc}, |
| 2001 | {0xbc, 0x00, 0x41, 0xcc}, |
| 2002 | {0xbc, 0x01, 0x01, 0xcc}, |
| 2003 | {0x00, 0x12, 0x80, 0xaa}, |
| 2004 | {0x00, 0x00, 0x20, 0xdd}, |
| 2005 | {0x00, 0x12, 0x00, 0xaa}, |
| 2006 | {0x00, 0x11, 0x40, 0xaa}, |
| 2007 | {0x00, 0x6b, 0x0a, 0xaa}, |
| 2008 | {0x00, 0x3a, 0x04, 0xaa}, |
| 2009 | {0x00, 0x40, 0xc0, 0xaa}, |
| 2010 | {0x00, 0x8c, 0x00, 0xaa}, |
| 2011 | {0x00, 0x7a, 0x29, 0xaa}, |
| 2012 | {0x00, 0x7b, 0x0e, 0xaa}, |
| 2013 | {0x00, 0x7c, 0x1a, 0xaa}, |
| 2014 | {0x00, 0x7d, 0x31, 0xaa}, |
| 2015 | {0x00, 0x7e, 0x53, 0xaa}, |
| 2016 | {0x00, 0x7f, 0x60, 0xaa}, |
| 2017 | {0x00, 0x80, 0x6b, 0xaa}, |
| 2018 | {0x00, 0x81, 0x73, 0xaa}, |
| 2019 | {0x00, 0x82, 0x7b, 0xaa}, |
| 2020 | {0x00, 0x83, 0x82, 0xaa}, |
| 2021 | {0x00, 0x84, 0x89, 0xaa}, |
| 2022 | {0x00, 0x85, 0x96, 0xaa}, |
| 2023 | {0x00, 0x86, 0xa1, 0xaa}, |
| 2024 | {0x00, 0x87, 0xb7, 0xaa}, |
| 2025 | {0x00, 0x88, 0xcc, 0xaa}, |
| 2026 | {0x00, 0x89, 0xe1, 0xaa}, |
| 2027 | {0x00, 0x13, 0xe0, 0xaa}, |
| 2028 | {0x00, 0x00, 0x00, 0xaa}, |
| 2029 | {0x00, 0x10, 0x00, 0xaa}, |
| 2030 | {0x00, 0x0d, 0x40, 0xaa}, |
| 2031 | {0x00, 0x14, 0x28, 0xaa}, |
| 2032 | {0x00, 0xa5, 0x05, 0xaa}, |
| 2033 | {0x00, 0xab, 0x07, 0xaa}, |
| 2034 | {0x00, 0x24, 0x95, 0xaa}, |
| 2035 | {0x00, 0x25, 0x33, 0xaa}, |
| 2036 | {0x00, 0x26, 0xe3, 0xaa}, |
| 2037 | {0x00, 0x9f, 0x88, 0xaa}, |
| 2038 | {0x00, 0xa0, 0x78, 0xaa}, |
| 2039 | {0x00, 0x55, 0x90, 0xaa}, |
| 2040 | {0x00, 0xa1, 0x03, 0xaa}, |
| 2041 | {0x00, 0xa6, 0xe0, 0xaa}, |
| 2042 | {0x00, 0xa7, 0xd8, 0xaa}, |
| 2043 | {0x00, 0xa8, 0xf0, 0xaa}, |
| 2044 | {0x00, 0xa9, 0x90, 0xaa}, |
| 2045 | {0x00, 0xaa, 0x14, 0xaa}, |
| 2046 | {0x00, 0x13, 0xe5, 0xaa}, |
| 2047 | {0x00, 0x0e, 0x61, 0xaa}, |
| 2048 | {0x00, 0x0f, 0x4b, 0xaa}, |
| 2049 | {0x00, 0x16, 0x02, 0xaa}, |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 2050 | {0x00, 0x1e, 0x07, 0xaa}, /* MVFP */ |
| 2051 | {0x00, 0x21, 0x02, 0xaa}, |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 2052 | {0x00, 0x22, 0x91, 0xaa}, |
| 2053 | {0x00, 0x29, 0x07, 0xaa}, |
| 2054 | {0x00, 0x33, 0x0b, 0xaa}, |
| 2055 | {0x00, 0x35, 0x0b, 0xaa}, |
| 2056 | {0x00, 0x37, 0x1d, 0xaa}, |
| 2057 | {0x00, 0x38, 0x71, 0xaa}, |
| 2058 | {0x00, 0x39, 0x2a, 0xaa}, |
| 2059 | {0x00, 0x3c, 0x78, 0xaa}, |
| 2060 | {0x00, 0x4d, 0x40, 0xaa}, |
| 2061 | {0x00, 0x4e, 0x20, 0xaa}, |
| 2062 | {0x00, 0x74, 0x19, 0xaa}, |
| 2063 | {0x00, 0x8d, 0x4f, 0xaa}, |
| 2064 | {0x00, 0x8e, 0x00, 0xaa}, |
| 2065 | {0x00, 0x8f, 0x00, 0xaa}, |
| 2066 | {0x00, 0x90, 0x00, 0xaa}, |
| 2067 | {0x00, 0x91, 0x00, 0xaa}, |
| 2068 | {0x00, 0x96, 0x00, 0xaa}, |
| 2069 | {0x00, 0x9a, 0x80, 0xaa}, |
| 2070 | {0x00, 0xb0, 0x84, 0xaa}, |
| 2071 | {0x00, 0xb1, 0x0c, 0xaa}, |
| 2072 | {0x00, 0xb2, 0x0e, 0xaa}, |
| 2073 | {0x00, 0xb3, 0x82, 0xaa}, |
| 2074 | {0x00, 0xb8, 0x0a, 0xaa}, |
| 2075 | {0x00, 0x43, 0x14, 0xaa}, |
| 2076 | {0x00, 0x44, 0xf0, 0xaa}, |
| 2077 | {0x00, 0x45, 0x45, 0xaa}, |
| 2078 | {0x00, 0x46, 0x63, 0xaa}, |
| 2079 | {0x00, 0x47, 0x2d, 0xaa}, |
| 2080 | {0x00, 0x48, 0x46, 0xaa}, |
| 2081 | {0x00, 0x59, 0x88, 0xaa}, |
| 2082 | {0x00, 0x5a, 0xa0, 0xaa}, |
| 2083 | {0x00, 0x5b, 0xc6, 0xaa}, |
| 2084 | {0x00, 0x5c, 0x7d, 0xaa}, |
| 2085 | {0x00, 0x5d, 0x5f, 0xaa}, |
| 2086 | {0x00, 0x5e, 0x19, 0xaa}, |
| 2087 | {0x00, 0x6c, 0x0a, 0xaa}, |
| 2088 | {0x00, 0x6d, 0x55, 0xaa}, |
| 2089 | {0x00, 0x6e, 0x11, 0xaa}, |
| 2090 | {0x00, 0x6f, 0x9e, 0xaa}, |
| 2091 | {0x00, 0x69, 0x00, 0xaa}, |
| 2092 | {0x00, 0x6a, 0x40, 0xaa}, |
| 2093 | {0x00, 0x01, 0x40, 0xaa}, |
| 2094 | {0x00, 0x02, 0x40, 0xaa}, |
| 2095 | {0x00, 0x13, 0xe7, 0xaa}, |
| 2096 | {0x00, 0x5f, 0xf0, 0xaa}, |
| 2097 | {0x00, 0x60, 0xf0, 0xaa}, |
| 2098 | {0x00, 0x61, 0xf0, 0xaa}, |
| 2099 | {0x00, 0x27, 0xa0, 0xaa}, |
| 2100 | {0x00, 0x28, 0x80, 0xaa}, |
| 2101 | {0x00, 0x2c, 0x90, 0xaa}, |
| 2102 | {0x00, 0x4f, 0x66, 0xaa}, |
| 2103 | {0x00, 0x50, 0x66, 0xaa}, |
| 2104 | {0x00, 0x51, 0x00, 0xaa}, |
| 2105 | {0x00, 0x52, 0x22, 0xaa}, |
| 2106 | {0x00, 0x53, 0x5e, 0xaa}, |
| 2107 | {0x00, 0x54, 0x80, 0xaa}, |
| 2108 | {0x00, 0x58, 0x9e, 0xaa}, |
| 2109 | {0x00, 0x41, 0x08, 0xaa}, |
| 2110 | {0x00, 0x3f, 0x00, 0xaa}, |
| 2111 | {0x00, 0x75, 0x85, 0xaa}, |
| 2112 | {0x00, 0x76, 0xe1, 0xaa}, |
| 2113 | {0x00, 0x4c, 0x00, 0xaa}, |
| 2114 | {0x00, 0x77, 0x0a, 0xaa}, |
| 2115 | {0x00, 0x3d, 0x88, 0xaa}, |
| 2116 | {0x00, 0x4b, 0x09, 0xaa}, |
| 2117 | {0x00, 0xc9, 0x60, 0xaa}, |
| 2118 | {0x00, 0x41, 0x38, 0xaa}, |
| 2119 | {0x00, 0x62, 0x30, 0xaa}, |
| 2120 | {0x00, 0x63, 0x30, 0xaa}, |
| 2121 | {0x00, 0x64, 0x08, 0xaa}, |
| 2122 | {0x00, 0x94, 0x07, 0xaa}, |
| 2123 | {0x00, 0x95, 0x0b, 0xaa}, |
| 2124 | {0x00, 0x65, 0x00, 0xaa}, |
| 2125 | {0x00, 0x66, 0x05, 0xaa}, |
| 2126 | {0x00, 0x56, 0x50, 0xaa}, |
| 2127 | {0x00, 0x34, 0x11, 0xaa}, |
| 2128 | {0x00, 0xa4, 0x88, 0xaa}, |
| 2129 | {0x00, 0x96, 0x00, 0xaa}, |
| 2130 | {0x00, 0x97, 0x30, 0xaa}, |
| 2131 | {0x00, 0x98, 0x20, 0xaa}, |
| 2132 | {0x00, 0x99, 0x30, 0xaa}, |
| 2133 | {0x00, 0x9a, 0x84, 0xaa}, |
| 2134 | {0x00, 0x9b, 0x29, 0xaa}, |
| 2135 | {0x00, 0x9c, 0x03, 0xaa}, |
| 2136 | {0x00, 0x78, 0x04, 0xaa}, |
| 2137 | {0x00, 0x79, 0x01, 0xaa}, |
| 2138 | {0x00, 0xc8, 0xf0, 0xaa}, |
| 2139 | {0x00, 0x79, 0x0f, 0xaa}, |
| 2140 | {0x00, 0xc8, 0x00, 0xaa}, |
| 2141 | {0x00, 0x79, 0x10, 0xaa}, |
| 2142 | {0x00, 0xc8, 0x7e, 0xaa}, |
| 2143 | {0x00, 0x79, 0x0a, 0xaa}, |
| 2144 | {0x00, 0xc8, 0x80, 0xaa}, |
| 2145 | {0x00, 0x79, 0x0b, 0xaa}, |
| 2146 | {0x00, 0xc8, 0x01, 0xaa}, |
| 2147 | {0x00, 0x79, 0x0c, 0xaa}, |
| 2148 | {0x00, 0xc8, 0x0f, 0xaa}, |
| 2149 | {0x00, 0x79, 0x0d, 0xaa}, |
| 2150 | {0x00, 0xc8, 0x20, 0xaa}, |
| 2151 | {0x00, 0x79, 0x09, 0xaa}, |
| 2152 | {0x00, 0xc8, 0x80, 0xaa}, |
| 2153 | {0x00, 0x79, 0x02, 0xaa}, |
| 2154 | {0x00, 0xc8, 0xc0, 0xaa}, |
| 2155 | {0x00, 0x79, 0x03, 0xaa}, |
| 2156 | {0x00, 0xc8, 0x40, 0xaa}, |
| 2157 | {0x00, 0x79, 0x05, 0xaa}, |
| 2158 | {0x00, 0xc8, 0x30, 0xaa}, |
| 2159 | {0x00, 0x79, 0x26, 0xaa}, |
| 2160 | {0x00, 0x11, 0x40, 0xaa}, |
| 2161 | {0x00, 0x3a, 0x04, 0xaa}, |
| 2162 | {0x00, 0x12, 0x00, 0xaa}, |
| 2163 | {0x00, 0x40, 0xc0, 0xaa}, |
| 2164 | {0x00, 0x8c, 0x00, 0xaa}, |
| 2165 | {0x00, 0x17, 0x14, 0xaa}, |
| 2166 | {0x00, 0x18, 0x02, 0xaa}, |
| 2167 | {0x00, 0x32, 0x92, 0xaa}, |
| 2168 | {0x00, 0x19, 0x02, 0xaa}, |
| 2169 | {0x00, 0x1a, 0x7a, 0xaa}, |
| 2170 | {0x00, 0x03, 0x0a, 0xaa}, |
| 2171 | {0x00, 0x0c, 0x00, 0xaa}, |
| 2172 | {0x00, 0x3e, 0x00, 0xaa}, |
| 2173 | {0x00, 0x70, 0x3a, 0xaa}, |
| 2174 | {0x00, 0x71, 0x35, 0xaa}, |
| 2175 | {0x00, 0x72, 0x11, 0xaa}, |
| 2176 | {0x00, 0x73, 0xf0, 0xaa}, |
| 2177 | {0x00, 0xa2, 0x02, 0xaa}, |
| 2178 | {0x00, 0xb1, 0x00, 0xaa}, |
| 2179 | {0x00, 0xb1, 0x0c, 0xaa}, |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 2180 | {0x00, 0x1e, 0x37, 0xaa}, /* MVFP */ |
| 2181 | {0x00, 0xaa, 0x14, 0xaa}, |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 2182 | {0x00, 0x24, 0x80, 0xaa}, |
| 2183 | {0x00, 0x25, 0x74, 0xaa}, |
| 2184 | {0x00, 0x26, 0xd3, 0xaa}, |
| 2185 | {0x00, 0x0d, 0x00, 0xaa}, |
| 2186 | {0x00, 0x14, 0x18, 0xaa}, |
| 2187 | {0x00, 0x9d, 0x99, 0xaa}, |
| 2188 | {0x00, 0x9e, 0x7f, 0xaa}, |
| 2189 | {0x00, 0x64, 0x08, 0xaa}, |
| 2190 | {0x00, 0x94, 0x07, 0xaa}, |
| 2191 | {0x00, 0x95, 0x06, 0xaa}, |
| 2192 | {0x00, 0x66, 0x05, 0xaa}, |
| 2193 | {0x00, 0x41, 0x08, 0xaa}, |
| 2194 | {0x00, 0x3f, 0x00, 0xaa}, |
| 2195 | {0x00, 0x75, 0x07, 0xaa}, |
| 2196 | {0x00, 0x76, 0xe1, 0xaa}, |
| 2197 | {0x00, 0x4c, 0x00, 0xaa}, |
| 2198 | {0x00, 0x77, 0x00, 0xaa}, |
| 2199 | {0x00, 0x3d, 0xc2, 0xaa}, |
| 2200 | {0x00, 0x4b, 0x09, 0xaa}, |
| 2201 | {0x00, 0xc9, 0x60, 0xaa}, |
| 2202 | {0x00, 0x41, 0x38, 0xaa}, |
| 2203 | {0xbf, 0xc0, 0x26, 0xcc}, |
| 2204 | {0xbf, 0xc1, 0x02, 0xcc}, |
| 2205 | {0xbf, 0xcc, 0x04, 0xcc}, |
| 2206 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 2207 | {0xb3, 0x01, 0x45, 0xcc}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2208 | {0x00, 0x77, 0x05, 0xaa}, |
| 2209 | {}, |
| 2210 | }; |
| 2211 | |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 2212 | static const u8 ov7670_InitQVGA[][4] = { |
| 2213 | {0xb3, 0x01, 0x05, 0xcc}, |
| 2214 | {0x00, 0x00, 0x30, 0xdd}, |
| 2215 | {0xb0, 0x03, 0x19, 0xcc}, |
| 2216 | {0x00, 0x00, 0x10, 0xdd}, |
| 2217 | {0xb0, 0x04, 0x02, 0xcc}, |
| 2218 | {0x00, 0x00, 0x10, 0xdd}, |
| 2219 | {0xb3, 0x00, 0x66, 0xcc}, |
| 2220 | {0xb3, 0x00, 0x67, 0xcc}, |
| 2221 | {0xb0, 0x16, 0x01, 0xcc}, |
| 2222 | {0xb3, 0x35, 0xa1, 0xcc}, /* i2c add: 21 */ |
| 2223 | {0xb3, 0x34, 0x01, 0xcc}, |
| 2224 | {0xb3, 0x05, 0x01, 0xcc}, |
| 2225 | {0xb3, 0x06, 0x01, 0xcc}, |
| 2226 | {0xb3, 0x08, 0x01, 0xcc}, |
| 2227 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 2228 | {0xb3, 0x02, 0x02, 0xcc}, |
| 2229 | {0xb3, 0x03, 0x1f, 0xcc}, |
| 2230 | {0xb3, 0x14, 0x00, 0xcc}, |
| 2231 | {0xb3, 0x15, 0x00, 0xcc}, |
| 2232 | {0xb3, 0x16, 0x02, 0xcc}, |
| 2233 | {0xb3, 0x17, 0x7f, 0xcc}, |
| 2234 | {0xb3, 0x04, 0x05, 0xcc}, |
| 2235 | {0xb3, 0x20, 0x00, 0xcc}, |
| 2236 | {0xb3, 0x21, 0x00, 0xcc}, |
| 2237 | {0xb3, 0x22, 0x01, 0xcc}, |
| 2238 | {0xb3, 0x23, 0xe0, 0xcc}, |
| 2239 | {0xbc, 0x00, 0xd1, 0xcc}, |
| 2240 | {0xbc, 0x01, 0x01, 0xcc}, |
| 2241 | {0x00, 0x12, 0x80, 0xaa}, |
| 2242 | {0x00, 0x00, 0x20, 0xdd}, |
| 2243 | {0x00, 0x12, 0x00, 0xaa}, |
| 2244 | {0x00, 0x11, 0x40, 0xaa}, |
| 2245 | {0x00, 0x6b, 0x0a, 0xaa}, |
| 2246 | {0x00, 0x3a, 0x04, 0xaa}, |
| 2247 | {0x00, 0x40, 0xc0, 0xaa}, |
| 2248 | {0x00, 0x8c, 0x00, 0xaa}, |
| 2249 | {0x00, 0x7a, 0x29, 0xaa}, |
| 2250 | {0x00, 0x7b, 0x0e, 0xaa}, |
| 2251 | {0x00, 0x7c, 0x1a, 0xaa}, |
| 2252 | {0x00, 0x7d, 0x31, 0xaa}, |
| 2253 | {0x00, 0x7e, 0x53, 0xaa}, |
| 2254 | {0x00, 0x7f, 0x60, 0xaa}, |
| 2255 | {0x00, 0x80, 0x6b, 0xaa}, |
| 2256 | {0x00, 0x81, 0x73, 0xaa}, |
| 2257 | {0x00, 0x82, 0x7b, 0xaa}, |
| 2258 | {0x00, 0x83, 0x82, 0xaa}, |
| 2259 | {0x00, 0x84, 0x89, 0xaa}, |
| 2260 | {0x00, 0x85, 0x96, 0xaa}, |
| 2261 | {0x00, 0x86, 0xa1, 0xaa}, |
| 2262 | {0x00, 0x87, 0xb7, 0xaa}, |
| 2263 | {0x00, 0x88, 0xcc, 0xaa}, |
| 2264 | {0x00, 0x89, 0xe1, 0xaa}, |
| 2265 | {0x00, 0x13, 0xe0, 0xaa}, |
| 2266 | {0x00, 0x00, 0x00, 0xaa}, |
| 2267 | {0x00, 0x10, 0x00, 0xaa}, |
| 2268 | {0x00, 0x0d, 0x40, 0xaa}, |
| 2269 | {0x00, 0x14, 0x28, 0xaa}, |
| 2270 | {0x00, 0xa5, 0x05, 0xaa}, |
| 2271 | {0x00, 0xab, 0x07, 0xaa}, |
| 2272 | {0x00, 0x24, 0x95, 0xaa}, |
| 2273 | {0x00, 0x25, 0x33, 0xaa}, |
| 2274 | {0x00, 0x26, 0xe3, 0xaa}, |
| 2275 | {0x00, 0x9f, 0x88, 0xaa}, |
| 2276 | {0x00, 0xa0, 0x78, 0xaa}, |
| 2277 | {0x00, 0x55, 0x90, 0xaa}, |
| 2278 | {0x00, 0xa1, 0x03, 0xaa}, |
| 2279 | {0x00, 0xa6, 0xe0, 0xaa}, |
| 2280 | {0x00, 0xa7, 0xd8, 0xaa}, |
| 2281 | {0x00, 0xa8, 0xf0, 0xaa}, |
| 2282 | {0x00, 0xa9, 0x90, 0xaa}, |
| 2283 | {0x00, 0xaa, 0x14, 0xaa}, |
| 2284 | {0x00, 0x13, 0xe5, 0xaa}, |
| 2285 | {0x00, 0x0e, 0x61, 0xaa}, |
| 2286 | {0x00, 0x0f, 0x4b, 0xaa}, |
| 2287 | {0x00, 0x16, 0x02, 0xaa}, |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 2288 | {0x00, 0x1e, 0x07, 0xaa}, /* MVFP */ |
| 2289 | {0x00, 0x21, 0x02, 0xaa}, |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 2290 | {0x00, 0x22, 0x91, 0xaa}, |
| 2291 | {0x00, 0x29, 0x07, 0xaa}, |
| 2292 | {0x00, 0x33, 0x0b, 0xaa}, |
| 2293 | {0x00, 0x35, 0x0b, 0xaa}, |
| 2294 | {0x00, 0x37, 0x1d, 0xaa}, |
| 2295 | {0x00, 0x38, 0x71, 0xaa}, |
| 2296 | {0x00, 0x39, 0x2a, 0xaa}, |
| 2297 | {0x00, 0x3c, 0x78, 0xaa}, |
| 2298 | {0x00, 0x4d, 0x40, 0xaa}, |
| 2299 | {0x00, 0x4e, 0x20, 0xaa}, |
| 2300 | {0x00, 0x74, 0x19, 0xaa}, |
| 2301 | {0x00, 0x8d, 0x4f, 0xaa}, |
| 2302 | {0x00, 0x8e, 0x00, 0xaa}, |
| 2303 | {0x00, 0x8f, 0x00, 0xaa}, |
| 2304 | {0x00, 0x90, 0x00, 0xaa}, |
| 2305 | {0x00, 0x91, 0x00, 0xaa}, |
| 2306 | {0x00, 0x96, 0x00, 0xaa}, |
| 2307 | {0x00, 0x9a, 0x80, 0xaa}, |
| 2308 | {0x00, 0xb0, 0x84, 0xaa}, |
| 2309 | {0x00, 0xb1, 0x0c, 0xaa}, |
| 2310 | {0x00, 0xb2, 0x0e, 0xaa}, |
| 2311 | {0x00, 0xb3, 0x82, 0xaa}, |
| 2312 | {0x00, 0xb8, 0x0a, 0xaa}, |
| 2313 | {0x00, 0x43, 0x14, 0xaa}, |
| 2314 | {0x00, 0x44, 0xf0, 0xaa}, |
| 2315 | {0x00, 0x45, 0x45, 0xaa}, |
| 2316 | {0x00, 0x46, 0x63, 0xaa}, |
| 2317 | {0x00, 0x47, 0x2d, 0xaa}, |
| 2318 | {0x00, 0x48, 0x46, 0xaa}, |
| 2319 | {0x00, 0x59, 0x88, 0xaa}, |
| 2320 | {0x00, 0x5a, 0xa0, 0xaa}, |
| 2321 | {0x00, 0x5b, 0xc6, 0xaa}, |
| 2322 | {0x00, 0x5c, 0x7d, 0xaa}, |
| 2323 | {0x00, 0x5d, 0x5f, 0xaa}, |
| 2324 | {0x00, 0x5e, 0x19, 0xaa}, |
| 2325 | {0x00, 0x6c, 0x0a, 0xaa}, |
| 2326 | {0x00, 0x6d, 0x55, 0xaa}, |
| 2327 | {0x00, 0x6e, 0x11, 0xaa}, |
| 2328 | {0x00, 0x6f, 0x9e, 0xaa}, |
| 2329 | {0x00, 0x69, 0x00, 0xaa}, |
| 2330 | {0x00, 0x6a, 0x40, 0xaa}, |
| 2331 | {0x00, 0x01, 0x40, 0xaa}, |
| 2332 | {0x00, 0x02, 0x40, 0xaa}, |
| 2333 | {0x00, 0x13, 0xe7, 0xaa}, |
| 2334 | {0x00, 0x5f, 0xf0, 0xaa}, |
| 2335 | {0x00, 0x60, 0xf0, 0xaa}, |
| 2336 | {0x00, 0x61, 0xf0, 0xaa}, |
| 2337 | {0x00, 0x27, 0xa0, 0xaa}, |
| 2338 | {0x00, 0x28, 0x80, 0xaa}, |
| 2339 | {0x00, 0x2c, 0x90, 0xaa}, |
| 2340 | {0x00, 0x4f, 0x66, 0xaa}, |
| 2341 | {0x00, 0x50, 0x66, 0xaa}, |
| 2342 | {0x00, 0x51, 0x00, 0xaa}, |
| 2343 | {0x00, 0x52, 0x22, 0xaa}, |
| 2344 | {0x00, 0x53, 0x5e, 0xaa}, |
| 2345 | {0x00, 0x54, 0x80, 0xaa}, |
| 2346 | {0x00, 0x58, 0x9e, 0xaa}, |
| 2347 | {0x00, 0x41, 0x08, 0xaa}, |
| 2348 | {0x00, 0x3f, 0x00, 0xaa}, |
| 2349 | {0x00, 0x75, 0x85, 0xaa}, |
| 2350 | {0x00, 0x76, 0xe1, 0xaa}, |
| 2351 | {0x00, 0x4c, 0x00, 0xaa}, |
| 2352 | {0x00, 0x77, 0x0a, 0xaa}, |
| 2353 | {0x00, 0x3d, 0x88, 0xaa}, |
| 2354 | {0x00, 0x4b, 0x09, 0xaa}, |
| 2355 | {0x00, 0xc9, 0x60, 0xaa}, |
| 2356 | {0x00, 0x41, 0x38, 0xaa}, |
| 2357 | {0x00, 0x62, 0x30, 0xaa}, |
| 2358 | {0x00, 0x63, 0x30, 0xaa}, |
| 2359 | {0x00, 0x64, 0x08, 0xaa}, |
| 2360 | {0x00, 0x94, 0x07, 0xaa}, |
| 2361 | {0x00, 0x95, 0x0b, 0xaa}, |
| 2362 | {0x00, 0x65, 0x00, 0xaa}, |
| 2363 | {0x00, 0x66, 0x05, 0xaa}, |
| 2364 | {0x00, 0x56, 0x50, 0xaa}, |
| 2365 | {0x00, 0x34, 0x11, 0xaa}, |
| 2366 | {0x00, 0xa4, 0x88, 0xaa}, |
| 2367 | {0x00, 0x96, 0x00, 0xaa}, |
| 2368 | {0x00, 0x97, 0x30, 0xaa}, |
| 2369 | {0x00, 0x98, 0x20, 0xaa}, |
| 2370 | {0x00, 0x99, 0x30, 0xaa}, |
| 2371 | {0x00, 0x9a, 0x84, 0xaa}, |
| 2372 | {0x00, 0x9b, 0x29, 0xaa}, |
| 2373 | {0x00, 0x9c, 0x03, 0xaa}, |
| 2374 | {0x00, 0x78, 0x04, 0xaa}, |
| 2375 | {0x00, 0x79, 0x01, 0xaa}, |
| 2376 | {0x00, 0xc8, 0xf0, 0xaa}, |
| 2377 | {0x00, 0x79, 0x0f, 0xaa}, |
| 2378 | {0x00, 0xc8, 0x00, 0xaa}, |
| 2379 | {0x00, 0x79, 0x10, 0xaa}, |
| 2380 | {0x00, 0xc8, 0x7e, 0xaa}, |
| 2381 | {0x00, 0x79, 0x0a, 0xaa}, |
| 2382 | {0x00, 0xc8, 0x80, 0xaa}, |
| 2383 | {0x00, 0x79, 0x0b, 0xaa}, |
| 2384 | {0x00, 0xc8, 0x01, 0xaa}, |
| 2385 | {0x00, 0x79, 0x0c, 0xaa}, |
| 2386 | {0x00, 0xc8, 0x0f, 0xaa}, |
| 2387 | {0x00, 0x79, 0x0d, 0xaa}, |
| 2388 | {0x00, 0xc8, 0x20, 0xaa}, |
| 2389 | {0x00, 0x79, 0x09, 0xaa}, |
| 2390 | {0x00, 0xc8, 0x80, 0xaa}, |
| 2391 | {0x00, 0x79, 0x02, 0xaa}, |
| 2392 | {0x00, 0xc8, 0xc0, 0xaa}, |
| 2393 | {0x00, 0x79, 0x03, 0xaa}, |
| 2394 | {0x00, 0xc8, 0x40, 0xaa}, |
| 2395 | {0x00, 0x79, 0x05, 0xaa}, |
| 2396 | {0x00, 0xc8, 0x30, 0xaa}, |
| 2397 | {0x00, 0x79, 0x26, 0xaa}, |
| 2398 | {0x00, 0x11, 0x40, 0xaa}, |
| 2399 | {0x00, 0x3a, 0x04, 0xaa}, |
| 2400 | {0x00, 0x12, 0x00, 0xaa}, |
| 2401 | {0x00, 0x40, 0xc0, 0xaa}, |
| 2402 | {0x00, 0x8c, 0x00, 0xaa}, |
| 2403 | {0x00, 0x17, 0x14, 0xaa}, |
| 2404 | {0x00, 0x18, 0x02, 0xaa}, |
| 2405 | {0x00, 0x32, 0x92, 0xaa}, |
| 2406 | {0x00, 0x19, 0x02, 0xaa}, |
| 2407 | {0x00, 0x1a, 0x7a, 0xaa}, |
| 2408 | {0x00, 0x03, 0x0a, 0xaa}, |
| 2409 | {0x00, 0x0c, 0x00, 0xaa}, |
| 2410 | {0x00, 0x3e, 0x00, 0xaa}, |
| 2411 | {0x00, 0x70, 0x3a, 0xaa}, |
| 2412 | {0x00, 0x71, 0x35, 0xaa}, |
| 2413 | {0x00, 0x72, 0x11, 0xaa}, |
| 2414 | {0x00, 0x73, 0xf0, 0xaa}, |
| 2415 | {0x00, 0xa2, 0x02, 0xaa}, |
| 2416 | {0x00, 0xb1, 0x00, 0xaa}, |
| 2417 | {0x00, 0xb1, 0x0c, 0xaa}, |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 2418 | {0x00, 0x1e, 0x37, 0xaa}, /* MVFP */ |
| 2419 | {0x00, 0xaa, 0x14, 0xaa}, |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 2420 | {0x00, 0x24, 0x80, 0xaa}, |
| 2421 | {0x00, 0x25, 0x74, 0xaa}, |
| 2422 | {0x00, 0x26, 0xd3, 0xaa}, |
| 2423 | {0x00, 0x0d, 0x00, 0xaa}, |
| 2424 | {0x00, 0x14, 0x18, 0xaa}, |
| 2425 | {0x00, 0x9d, 0x99, 0xaa}, |
| 2426 | {0x00, 0x9e, 0x7f, 0xaa}, |
| 2427 | {0x00, 0x64, 0x08, 0xaa}, |
| 2428 | {0x00, 0x94, 0x07, 0xaa}, |
| 2429 | {0x00, 0x95, 0x06, 0xaa}, |
| 2430 | {0x00, 0x66, 0x05, 0xaa}, |
| 2431 | {0x00, 0x41, 0x08, 0xaa}, |
| 2432 | {0x00, 0x3f, 0x00, 0xaa}, |
| 2433 | {0x00, 0x75, 0x07, 0xaa}, |
| 2434 | {0x00, 0x76, 0xe1, 0xaa}, |
| 2435 | {0x00, 0x4c, 0x00, 0xaa}, |
| 2436 | {0x00, 0x77, 0x00, 0xaa}, |
| 2437 | {0x00, 0x3d, 0xc2, 0xaa}, |
| 2438 | {0x00, 0x4b, 0x09, 0xaa}, |
| 2439 | {0x00, 0xc9, 0x60, 0xaa}, |
| 2440 | {0x00, 0x41, 0x38, 0xaa}, |
| 2441 | {0xbc, 0x02, 0x18, 0xcc}, |
| 2442 | {0xbc, 0x03, 0x50, 0xcc}, |
| 2443 | {0xbc, 0x04, 0x18, 0xcc}, |
| 2444 | {0xbc, 0x05, 0x00, 0xcc}, |
| 2445 | {0xbc, 0x06, 0x00, 0xcc}, |
| 2446 | {0xbc, 0x08, 0x30, 0xcc}, |
| 2447 | {0xbc, 0x09, 0x40, 0xcc}, |
| 2448 | {0xbc, 0x0a, 0x10, 0xcc}, |
| 2449 | {0xbc, 0x0b, 0x00, 0xcc}, |
| 2450 | {0xbc, 0x0c, 0x00, 0xcc}, |
| 2451 | {0xbf, 0xc0, 0x26, 0xcc}, |
| 2452 | {0xbf, 0xc1, 0x02, 0xcc}, |
| 2453 | {0xbf, 0xcc, 0x04, 0xcc}, |
| 2454 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 2455 | {0xb3, 0x01, 0x45, 0xcc}, |
| 2456 | {0x00, 0x77, 0x05, 0xaa}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2457 | {}, |
| 2458 | }; |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2459 | |
| 2460 | /* PO1200 - values from usbvm326.inf and ms-win trace */ |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 2461 | static const u8 po1200_gamma[17] = { |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2462 | 0x00, 0x13, 0x38, 0x59, 0x79, 0x92, 0xa7, 0xb9, 0xc8, |
| 2463 | 0xd4, 0xdf, 0xe7, 0xee, 0xf4, 0xf9, 0xfc, 0xff |
| 2464 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 2465 | static const u8 po1200_matrix[9] = { |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2466 | 0x60, 0xf9, 0xe5, 0xe7, 0x50, 0x05, 0xf3, 0xe6, 0x5e |
| 2467 | }; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 2468 | static const u8 po1200_initVGA_data[][4] = { |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2469 | {0xb0, 0x03, 0x19, 0xcc}, /* reset? */ |
| 2470 | {0xb0, 0x03, 0x19, 0xcc}, |
| 2471 | /* {0x00, 0x00, 0x33, 0xdd}, */ |
| 2472 | {0xb0, 0x04, 0x02, 0xcc}, |
| 2473 | {0xb0, 0x02, 0x02, 0xcc}, |
| 2474 | {0xb3, 0x5d, 0x00, 0xcc}, |
| 2475 | {0xb3, 0x01, 0x01, 0xcc}, |
| 2476 | {0xb3, 0x00, 0x64, 0xcc}, |
| 2477 | {0xb3, 0x00, 0x65, 0xcc}, |
| 2478 | {0xb3, 0x05, 0x01, 0xcc}, |
| 2479 | {0xb3, 0x06, 0x01, 0xcc}, |
| 2480 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 2481 | {0xb3, 0x08, 0x01, 0xcc}, |
| 2482 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 2483 | {0xb3, 0x00, 0x67, 0xcc}, |
| 2484 | {0xb3, 0x02, 0xb2, 0xcc}, |
| 2485 | {0xb3, 0x03, 0x18, 0xcc}, |
| 2486 | {0xb3, 0x04, 0x15, 0xcc}, |
| 2487 | {0xb3, 0x20, 0x00, 0xcc}, |
| 2488 | {0xb3, 0x21, 0x00, 0xcc}, |
| 2489 | {0xb3, 0x22, 0x02, 0xcc}, |
| 2490 | {0xb3, 0x23, 0x58, 0xcc}, |
| 2491 | {0xb3, 0x14, 0x00, 0xcc}, |
| 2492 | {0xb3, 0x15, 0x00, 0xcc}, |
| 2493 | {0xb3, 0x16, 0x03, 0xcc}, |
| 2494 | {0xb3, 0x17, 0x1f, 0xcc}, |
| 2495 | {0xbc, 0x00, 0x71, 0xcc}, |
| 2496 | {0xbc, 0x01, 0x01, 0xcc}, |
| 2497 | {0xb0, 0x54, 0x13, 0xcc}, |
| 2498 | {0xb3, 0x00, 0x67, 0xcc}, |
| 2499 | {0xb3, 0x34, 0x01, 0xcc}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 2500 | {0xb3, 0x35, 0xdc, 0xcc}, /* i2c add: 5c */ |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2501 | {0x00, 0x03, 0x00, 0xaa}, |
| 2502 | {0x00, 0x12, 0x05, 0xaa}, |
| 2503 | {0x00, 0x13, 0x02, 0xaa}, |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 2504 | {0x00, 0x1e, 0xc6, 0xaa}, /* h/v flip */ |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2505 | {0x00, 0x21, 0x00, 0xaa}, |
| 2506 | {0x00, 0x25, 0x02, 0xaa}, |
| 2507 | {0x00, 0x3c, 0x4f, 0xaa}, |
| 2508 | {0x00, 0x3f, 0xe0, 0xaa}, |
| 2509 | {0x00, 0x42, 0xff, 0xaa}, |
| 2510 | {0x00, 0x45, 0x34, 0xaa}, |
| 2511 | {0x00, 0x55, 0xfe, 0xaa}, |
| 2512 | {0x00, 0x59, 0xd3, 0xaa}, |
| 2513 | {0x00, 0x5e, 0x04, 0xaa}, |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 2514 | {0x00, 0x61, 0xb8, 0xaa}, /* sharpness */ |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2515 | {0x00, 0x62, 0x02, 0xaa}, |
| 2516 | {0x00, 0xa7, 0x31, 0xaa}, |
| 2517 | {0x00, 0xa9, 0x66, 0xaa}, |
| 2518 | {0x00, 0xb0, 0x00, 0xaa}, |
| 2519 | {0x00, 0xb1, 0x00, 0xaa}, |
| 2520 | {0x00, 0xb3, 0x11, 0xaa}, |
| 2521 | {0x00, 0xb6, 0x26, 0xaa}, |
| 2522 | {0x00, 0xb7, 0x20, 0xaa}, |
| 2523 | {0x00, 0xba, 0x04, 0xaa}, |
| 2524 | {0x00, 0x88, 0x42, 0xaa}, |
| 2525 | {0x00, 0x89, 0x9a, 0xaa}, |
| 2526 | {0x00, 0x8a, 0x88, 0xaa}, |
| 2527 | {0x00, 0x8b, 0x8e, 0xaa}, |
| 2528 | {0x00, 0x8c, 0x3e, 0xaa}, |
| 2529 | {0x00, 0x8d, 0x90, 0xaa}, |
| 2530 | {0x00, 0x8e, 0x87, 0xaa}, |
| 2531 | {0x00, 0x8f, 0x96, 0xaa}, |
| 2532 | {0x00, 0x90, 0x3d, 0xaa}, |
| 2533 | {0x00, 0x64, 0x00, 0xaa}, |
| 2534 | {0x00, 0x65, 0x10, 0xaa}, |
| 2535 | {0x00, 0x66, 0x20, 0xaa}, |
| 2536 | {0x00, 0x67, 0x2b, 0xaa}, |
| 2537 | {0x00, 0x68, 0x36, 0xaa}, |
| 2538 | {0x00, 0x69, 0x49, 0xaa}, |
| 2539 | {0x00, 0x6a, 0x5a, 0xaa}, |
| 2540 | {0x00, 0x6b, 0x7f, 0xaa}, |
| 2541 | {0x00, 0x6c, 0x9b, 0xaa}, |
| 2542 | {0x00, 0x6d, 0xba, 0xaa}, |
| 2543 | {0x00, 0x6e, 0xd4, 0xaa}, |
| 2544 | {0x00, 0x6f, 0xea, 0xaa}, |
| 2545 | {0x00, 0x70, 0x00, 0xaa}, |
| 2546 | {0x00, 0x71, 0x10, 0xaa}, |
| 2547 | {0x00, 0x72, 0x20, 0xaa}, |
| 2548 | {0x00, 0x73, 0x2b, 0xaa}, |
| 2549 | {0x00, 0x74, 0x36, 0xaa}, |
| 2550 | {0x00, 0x75, 0x49, 0xaa}, |
| 2551 | {0x00, 0x76, 0x5a, 0xaa}, |
| 2552 | {0x00, 0x77, 0x7f, 0xaa}, |
| 2553 | {0x00, 0x78, 0x9b, 0xaa}, |
| 2554 | {0x00, 0x79, 0xba, 0xaa}, |
| 2555 | {0x00, 0x7a, 0xd4, 0xaa}, |
| 2556 | {0x00, 0x7b, 0xea, 0xaa}, |
| 2557 | {0x00, 0x7c, 0x00, 0xaa}, |
| 2558 | {0x00, 0x7d, 0x10, 0xaa}, |
| 2559 | {0x00, 0x7e, 0x20, 0xaa}, |
| 2560 | {0x00, 0x7f, 0x2b, 0xaa}, |
| 2561 | {0x00, 0x80, 0x36, 0xaa}, |
| 2562 | {0x00, 0x81, 0x49, 0xaa}, |
| 2563 | {0x00, 0x82, 0x5a, 0xaa}, |
| 2564 | {0x00, 0x83, 0x7f, 0xaa}, |
| 2565 | {0x00, 0x84, 0x9b, 0xaa}, |
| 2566 | {0x00, 0x85, 0xba, 0xaa}, |
| 2567 | {0x00, 0x86, 0xd4, 0xaa}, |
| 2568 | {0x00, 0x87, 0xea, 0xaa}, |
| 2569 | {0x00, 0x57, 0x2a, 0xaa}, |
| 2570 | {0x00, 0x03, 0x01, 0xaa}, |
| 2571 | {0x00, 0x04, 0x10, 0xaa}, |
| 2572 | {0x00, 0x05, 0x10, 0xaa}, |
| 2573 | {0x00, 0x06, 0x10, 0xaa}, |
| 2574 | {0x00, 0x07, 0x10, 0xaa}, |
| 2575 | {0x00, 0x08, 0x13, 0xaa}, |
| 2576 | {0x00, 0x0a, 0x00, 0xaa}, |
| 2577 | {0x00, 0x0b, 0x10, 0xaa}, |
| 2578 | {0x00, 0x0c, 0x20, 0xaa}, |
| 2579 | {0x00, 0x0d, 0x18, 0xaa}, |
| 2580 | {0x00, 0x22, 0x01, 0xaa}, |
| 2581 | {0x00, 0x23, 0x60, 0xaa}, |
| 2582 | {0x00, 0x25, 0x08, 0xaa}, |
| 2583 | {0x00, 0x26, 0x82, 0xaa}, |
| 2584 | {0x00, 0x2e, 0x0f, 0xaa}, |
| 2585 | {0x00, 0x2f, 0x1e, 0xaa}, |
| 2586 | {0x00, 0x30, 0x2d, 0xaa}, |
| 2587 | {0x00, 0x31, 0x3c, 0xaa}, |
| 2588 | {0x00, 0x32, 0x4b, 0xaa}, |
| 2589 | {0x00, 0x33, 0x5a, 0xaa}, |
| 2590 | {0x00, 0x34, 0x69, 0xaa}, |
| 2591 | {0x00, 0x35, 0x78, 0xaa}, |
| 2592 | {0x00, 0x36, 0x87, 0xaa}, |
| 2593 | {0x00, 0x37, 0x96, 0xaa}, |
| 2594 | {0x00, 0x38, 0xa5, 0xaa}, |
| 2595 | {0x00, 0x39, 0xb4, 0xaa}, |
| 2596 | {0x00, 0x3a, 0xc3, 0xaa}, |
| 2597 | {0x00, 0x3b, 0xd2, 0xaa}, |
| 2598 | {0x00, 0x3c, 0xe1, 0xaa}, |
| 2599 | {0x00, 0x3e, 0xff, 0xaa}, |
| 2600 | {0x00, 0x3f, 0xff, 0xaa}, |
| 2601 | {0x00, 0x40, 0xff, 0xaa}, |
| 2602 | {0x00, 0x41, 0xff, 0xaa}, |
| 2603 | {0x00, 0x42, 0xff, 0xaa}, |
| 2604 | {0x00, 0x43, 0xff, 0xaa}, |
| 2605 | {0x00, 0x03, 0x00, 0xaa}, |
| 2606 | {0x00, 0x03, 0x00, 0xaa}, |
| 2607 | {0x00, 0x20, 0xc4, 0xaa}, |
| 2608 | {0x00, 0x13, 0x03, 0xaa}, |
| 2609 | {0x00, 0x3c, 0x50, 0xaa}, |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 2610 | {0x00, 0x61, 0x6a, 0xaa}, /* sharpness? */ |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2611 | {0x00, 0x51, 0x5b, 0xaa}, |
| 2612 | {0x00, 0x52, 0x91, 0xaa}, |
| 2613 | {0x00, 0x53, 0x4c, 0xaa}, |
| 2614 | {0x00, 0x54, 0x50, 0xaa}, |
| 2615 | {0x00, 0x56, 0x02, 0xaa}, |
| 2616 | {0xb6, 0x00, 0x00, 0xcc}, |
| 2617 | {0xb6, 0x03, 0x03, 0xcc}, |
| 2618 | {0xb6, 0x02, 0x20, 0xcc}, |
| 2619 | {0xb6, 0x05, 0x02, 0xcc}, |
| 2620 | {0xb6, 0x04, 0x58, 0xcc}, |
| 2621 | {0xb6, 0x12, 0xf8, 0xcc}, |
| 2622 | {0xb6, 0x13, 0x21, 0xcc}, |
| 2623 | {0xb6, 0x18, 0x03, 0xcc}, |
| 2624 | {0xb6, 0x17, 0xa9, 0xcc}, |
| 2625 | {0xb6, 0x16, 0x80, 0xcc}, |
| 2626 | {0xb6, 0x22, 0x12, 0xcc}, |
| 2627 | {0xb6, 0x23, 0x0b, 0xcc}, |
| 2628 | {0xbf, 0xc0, 0x39, 0xcc}, |
| 2629 | {0xbf, 0xc1, 0x04, 0xcc}, |
| 2630 | {0xbf, 0xcc, 0x00, 0xcc}, |
| 2631 | {0xb8, 0x06, 0x20, 0xcc}, |
| 2632 | {0xb8, 0x07, 0x03, 0xcc}, |
| 2633 | {0xb8, 0x08, 0x58, 0xcc}, |
| 2634 | {0xb8, 0x09, 0x02, 0xcc}, |
| 2635 | {0xb3, 0x01, 0x41, 0xcc}, |
| 2636 | {0x00, 0x03, 0x00, 0xaa}, |
| 2637 | {0x00, 0xd9, 0x0f, 0xaa}, |
| 2638 | {0x00, 0xda, 0xaa, 0xaa}, |
| 2639 | {0x00, 0xd9, 0x10, 0xaa}, |
| 2640 | {0x00, 0xda, 0xaa, 0xaa}, |
| 2641 | {0x00, 0xd9, 0x11, 0xaa}, |
| 2642 | {0x00, 0xda, 0x00, 0xaa}, |
| 2643 | {0x00, 0xd9, 0x12, 0xaa}, |
| 2644 | {0x00, 0xda, 0xff, 0xaa}, |
| 2645 | {0x00, 0xd9, 0x13, 0xaa}, |
| 2646 | {0x00, 0xda, 0xff, 0xaa}, |
| 2647 | {0x00, 0xe8, 0x11, 0xaa}, |
| 2648 | {0x00, 0xe9, 0x12, 0xaa}, |
| 2649 | {0x00, 0xea, 0x5c, 0xaa}, |
| 2650 | {0x00, 0xeb, 0xff, 0xaa}, |
| 2651 | {0x00, 0xd8, 0x80, 0xaa}, |
| 2652 | {0x00, 0xe6, 0x02, 0xaa}, |
| 2653 | {0x00, 0xd6, 0x40, 0xaa}, |
| 2654 | {0x00, 0xe3, 0x05, 0xaa}, |
| 2655 | {0x00, 0xe0, 0x40, 0xaa}, |
| 2656 | {0x00, 0xde, 0x03, 0xaa}, |
| 2657 | {0x00, 0xdf, 0x03, 0xaa}, |
| 2658 | {0x00, 0xdb, 0x02, 0xaa}, |
| 2659 | {0x00, 0xdc, 0x00, 0xaa}, |
| 2660 | {0x00, 0xdd, 0x03, 0xaa}, |
| 2661 | {0x00, 0xe1, 0x08, 0xaa}, |
| 2662 | {0x00, 0xe2, 0x01, 0xaa}, |
| 2663 | {0x00, 0xd6, 0x40, 0xaa}, |
| 2664 | {0x00, 0xe4, 0x40, 0xaa}, |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 2665 | {0x00, 0xa8, 0x8f, 0xaa}, |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2666 | {0x00, 0xb4, 0x16, 0xaa}, |
| 2667 | {0xb0, 0x02, 0x06, 0xcc}, |
| 2668 | {0xb0, 0x18, 0x06, 0xcc}, |
| 2669 | {0xb0, 0x19, 0x06, 0xcc}, |
| 2670 | {0xb3, 0x5d, 0x18, 0xcc}, |
| 2671 | {0xb3, 0x05, 0x00, 0xcc}, |
| 2672 | {0xb3, 0x06, 0x00, 0xcc}, |
| 2673 | {0x00, 0xb4, 0x0e, 0xaa}, |
| 2674 | {0x00, 0xb5, 0x49, 0xaa}, |
| 2675 | {0x00, 0xb6, 0x1c, 0xaa}, |
| 2676 | {0x00, 0xb7, 0x96, 0xaa}, |
| 2677 | /* end of usbvm326.inf - start of ms-win trace */ |
| 2678 | {0xb6, 0x12, 0xf8, 0xcc}, |
| 2679 | {0xb6, 0x13, 0x3d, 0xcc}, |
| 2680 | /*read b306*/ |
| 2681 | {0x00, 0x03, 0x00, 0xaa}, |
| 2682 | {0x00, 0x1a, 0x09, 0xaa}, |
| 2683 | {0x00, 0x1b, 0x8a, 0xaa}, |
| 2684 | /*read b827*/ |
| 2685 | {0xb8, 0x27, 0x00, 0xcc}, |
| 2686 | {0xb8, 0x26, 0x60, 0xcc}, |
| 2687 | {0xb8, 0x26, 0x60, 0xcc}, |
| 2688 | /*gamma - to do?*/ |
| 2689 | {0x00, 0x03, 0x00, 0xaa}, |
| 2690 | {0x00, 0xae, 0x84, 0xaa}, |
| 2691 | /*gamma again*/ |
| 2692 | {0x00, 0x03, 0x00, 0xaa}, |
| 2693 | {0x00, 0x96, 0xa0, 0xaa}, |
| 2694 | /*matrix*/ |
| 2695 | {0x00, 0x03, 0x00, 0xaa}, |
| 2696 | {0x00, 0x91, 0x35, 0xaa}, |
| 2697 | {0x00, 0x92, 0x22, 0xaa}, |
| 2698 | /*gamma*/ |
| 2699 | {0x00, 0x03, 0x00, 0xaa}, |
| 2700 | {0x00, 0x95, 0x85, 0xaa}, |
| 2701 | /*matrix*/ |
| 2702 | {0x00, 0x03, 0x00, 0xaa}, |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2703 | {0x00, 0x4d, 0x20, 0xaa}, |
| 2704 | {0xb8, 0x22, 0x40, 0xcc}, |
| 2705 | {0xb8, 0x23, 0x40, 0xcc}, |
| 2706 | {0xb8, 0x24, 0x40, 0xcc}, |
| 2707 | {0xb8, 0x81, 0x09, 0xcc}, |
| 2708 | {0x00, 0x00, 0x64, 0xdd}, |
| 2709 | {0x00, 0x03, 0x01, 0xaa}, |
| 2710 | /*read 46*/ |
| 2711 | {0x00, 0x46, 0x3c, 0xaa}, |
| 2712 | {0x00, 0x03, 0x00, 0xaa}, |
| 2713 | {0x00, 0x16, 0x40, 0xaa}, |
| 2714 | {0x00, 0x17, 0x40, 0xaa}, |
| 2715 | {0x00, 0x18, 0x40, 0xaa}, |
| 2716 | {0x00, 0x19, 0x41, 0xaa}, |
| 2717 | {0x00, 0x03, 0x01, 0xaa}, |
| 2718 | {0x00, 0x46, 0x3c, 0xaa}, |
| 2719 | {0x00, 0x00, 0x18, 0xdd}, |
| 2720 | /*read bfff*/ |
| 2721 | {0x00, 0x03, 0x00, 0xaa}, |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2722 | {0x00, 0xb4, 0x1c, 0xaa}, |
| 2723 | {0x00, 0xb5, 0x92, 0xaa}, |
| 2724 | {0x00, 0xb6, 0x39, 0xaa}, |
| 2725 | {0x00, 0xb7, 0x24, 0xaa}, |
| 2726 | /*write 89 0400 1415*/ |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 2727 | {} |
| 2728 | }; |
| 2729 | |
| 2730 | static const u8 poxxxx_init_common[][4] = { |
| 2731 | {0xb3, 0x00, 0x04, 0xcc}, |
| 2732 | {0x00, 0x00, 0x10, 0xdd}, |
| 2733 | {0xb3, 0x00, 0x64, 0xcc}, |
| 2734 | {0x00, 0x00, 0x10, 0xdd}, |
| 2735 | {0xb3, 0x00, 0x65, 0xcc}, |
| 2736 | {0x00, 0x00, 0x10, 0xdd}, |
| 2737 | {0xb3, 0x00, 0x67, 0xcc}, |
| 2738 | {0xb0, 0x03, 0x09, 0xcc}, |
| 2739 | {0xb3, 0x05, 0x00, 0xcc}, |
| 2740 | {0xb3, 0x06, 0x00, 0xcc}, |
| 2741 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 2742 | {0xb3, 0x08, 0x01, 0xcc}, |
| 2743 | {0xb3, 0x09, 0x0c, 0xcc}, |
| 2744 | {0xb3, 0x34, 0x01, 0xcc}, |
| 2745 | {0xb3, 0x35, 0xf6, 0xcc}, /* i2c add: 76 */ |
| 2746 | {0xb3, 0x02, 0xb0, 0xcc}, |
| 2747 | {0xb3, 0x03, 0x18, 0xcc}, |
| 2748 | {0xb3, 0x04, 0x15, 0xcc}, |
| 2749 | {0xb3, 0x20, 0x00, 0xcc}, |
| 2750 | {0xb3, 0x21, 0x00, 0xcc}, |
| 2751 | {0xb3, 0x22, 0x04, 0xcc}, |
| 2752 | {0xb3, 0x23, 0x00, 0xcc}, |
| 2753 | {0xb3, 0x14, 0x00, 0xcc}, |
| 2754 | {0xb3, 0x15, 0x00, 0xcc}, |
| 2755 | {0xb3, 0x16, 0x04, 0xcc}, |
| 2756 | {0xb3, 0x17, 0xff, 0xcc}, |
| 2757 | {0xb3, 0x2c, 0x03, 0xcc}, |
| 2758 | {0xb3, 0x2d, 0x56, 0xcc}, |
| 2759 | {0xb3, 0x2e, 0x02, 0xcc}, |
| 2760 | {0xb3, 0x2f, 0x0a, 0xcc}, |
| 2761 | {0xb3, 0x40, 0x00, 0xcc}, |
| 2762 | {0xb3, 0x41, 0x34, 0xcc}, |
| 2763 | {0xb3, 0x42, 0x01, 0xcc}, |
| 2764 | {0xb3, 0x43, 0xe0, 0xcc}, |
| 2765 | {0xbc, 0x00, 0x71, 0xcc}, |
| 2766 | {0xbc, 0x01, 0x01, 0xcc}, |
| 2767 | {0xb3, 0x01, 0x41, 0xcc}, |
| 2768 | {0xb3, 0x4d, 0x00, 0xcc}, |
| 2769 | {0x00, 0x0b, 0x2a, 0xaa}, |
| 2770 | {0x00, 0x0e, 0x03, 0xaa}, |
| 2771 | {0x00, 0x0f, 0xea, 0xaa}, |
| 2772 | {0x00, 0x12, 0x08, 0xaa}, |
| 2773 | {0x00, 0x1e, 0x06, 0xaa}, |
| 2774 | {0x00, 0x21, 0x00, 0xaa}, |
| 2775 | {0x00, 0x31, 0x1f, 0xaa}, |
| 2776 | {0x00, 0x33, 0x38, 0xaa}, |
| 2777 | {0x00, 0x36, 0xc0, 0xaa}, |
| 2778 | {0x00, 0x37, 0xc8, 0xaa}, |
| 2779 | {0x00, 0x3b, 0x36, 0xaa}, |
| 2780 | {0x00, 0x4b, 0xfe, 0xaa}, |
| 2781 | {0x00, 0x4d, 0x2e, 0xaa}, |
| 2782 | {0x00, 0x51, 0x1c, 0xaa}, |
| 2783 | {0x00, 0x52, 0x01, 0xaa}, |
| 2784 | {0x00, 0x55, 0x0a, 0xaa}, |
| 2785 | {0x00, 0x56, 0x0a, 0xaa}, |
| 2786 | {0x00, 0x57, 0x07, 0xaa}, |
| 2787 | {0x00, 0x58, 0x07, 0xaa}, |
| 2788 | {0x00, 0x59, 0x04, 0xaa}, |
| 2789 | {0x00, 0x70, 0x68, 0xaa}, |
| 2790 | {0x00, 0x71, 0x04, 0xaa}, |
| 2791 | {0x00, 0x72, 0x10, 0xaa}, |
| 2792 | {0x00, 0x80, 0x71, 0xaa}, |
| 2793 | {0x00, 0x81, 0x08, 0xaa}, |
| 2794 | {0x00, 0x82, 0x00, 0xaa}, |
| 2795 | {0x00, 0x83, 0x55, 0xaa}, |
| 2796 | {0x00, 0x84, 0x06, 0xaa}, |
| 2797 | {0x00, 0x85, 0x06, 0xaa}, |
| 2798 | {0x00, 0x8b, 0x25, 0xaa}, |
| 2799 | {0x00, 0x8c, 0x00, 0xaa}, |
| 2800 | {0x00, 0x8d, 0x86, 0xaa}, |
| 2801 | {0x00, 0x8e, 0x82, 0xaa}, |
| 2802 | {0x00, 0x8f, 0x2d, 0xaa}, |
| 2803 | {0x00, 0x90, 0x8b, 0xaa}, |
| 2804 | {0x00, 0x91, 0x81, 0xaa}, |
| 2805 | {0x00, 0x92, 0x81, 0xaa}, |
| 2806 | {0x00, 0x93, 0x23, 0xaa}, |
| 2807 | {0x00, 0xa3, 0x2a, 0xaa}, |
| 2808 | {0x00, 0xa4, 0x03, 0xaa}, |
| 2809 | {0x00, 0xa5, 0xea, 0xaa}, |
| 2810 | {0x00, 0xb0, 0x68, 0xaa}, |
| 2811 | {0x00, 0xbc, 0x04, 0xaa}, |
| 2812 | {0x00, 0xbe, 0x3b, 0xaa}, |
| 2813 | {0x00, 0x4e, 0x40, 0xaa}, |
| 2814 | {0x00, 0x06, 0x04, 0xaa}, |
| 2815 | {0x00, 0x07, 0x03, 0xaa}, |
| 2816 | {0x00, 0xcd, 0x18, 0xaa}, |
| 2817 | {0x00, 0x28, 0x03, 0xaa}, |
| 2818 | {0x00, 0x29, 0xef, 0xaa}, |
| 2819 | /* reinit on alt 2 (qvga) or alt7 (vga) */ |
| 2820 | {0xb3, 0x05, 0x00, 0xcc}, |
| 2821 | {0xb3, 0x06, 0x00, 0xcc}, |
| 2822 | {0xb8, 0x00, 0x01, 0xcc}, |
| 2823 | |
| 2824 | {0x00, 0x1d, 0x85, 0xaa}, |
| 2825 | {0x00, 0x1e, 0xc6, 0xaa}, |
| 2826 | {0x00, 0x00, 0x40, 0xdd}, |
| 2827 | {0x00, 0x1d, 0x05, 0xaa}, |
| 2828 | |
| 2829 | {0x00, 0xd6, 0x22, 0xaa}, /* gamma 0 */ |
| 2830 | {0x00, 0x73, 0x00, 0xaa}, |
| 2831 | {0x00, 0x74, 0x0a, 0xaa}, |
| 2832 | {0x00, 0x75, 0x16, 0xaa}, |
| 2833 | {0x00, 0x76, 0x25, 0xaa}, |
| 2834 | {0x00, 0x77, 0x34, 0xaa}, |
| 2835 | {0x00, 0x78, 0x49, 0xaa}, |
| 2836 | {0x00, 0x79, 0x5a, 0xaa}, |
| 2837 | {0x00, 0x7a, 0x7f, 0xaa}, |
| 2838 | {0x00, 0x7b, 0x9b, 0xaa}, |
| 2839 | {0x00, 0x7c, 0xba, 0xaa}, |
| 2840 | {0x00, 0x7d, 0xd4, 0xaa}, |
| 2841 | {0x00, 0x7e, 0xea, 0xaa}, |
| 2842 | |
| 2843 | {0x00, 0xd6, 0x62, 0xaa}, /* gamma 1 */ |
| 2844 | {0x00, 0x73, 0x00, 0xaa}, |
| 2845 | {0x00, 0x74, 0x0a, 0xaa}, |
| 2846 | {0x00, 0x75, 0x16, 0xaa}, |
| 2847 | {0x00, 0x76, 0x25, 0xaa}, |
| 2848 | {0x00, 0x77, 0x34, 0xaa}, |
| 2849 | {0x00, 0x78, 0x49, 0xaa}, |
| 2850 | {0x00, 0x79, 0x5a, 0xaa}, |
| 2851 | {0x00, 0x7a, 0x7f, 0xaa}, |
| 2852 | {0x00, 0x7b, 0x9b, 0xaa}, |
| 2853 | {0x00, 0x7c, 0xba, 0xaa}, |
| 2854 | {0x00, 0x7d, 0xd4, 0xaa}, |
| 2855 | {0x00, 0x7e, 0xea, 0xaa}, |
| 2856 | |
| 2857 | {0x00, 0xd6, 0xa2, 0xaa}, /* gamma 2 */ |
| 2858 | {0x00, 0x73, 0x00, 0xaa}, |
| 2859 | {0x00, 0x74, 0x0a, 0xaa}, |
| 2860 | {0x00, 0x75, 0x16, 0xaa}, |
| 2861 | {0x00, 0x76, 0x25, 0xaa}, |
| 2862 | {0x00, 0x77, 0x34, 0xaa}, |
| 2863 | {0x00, 0x78, 0x49, 0xaa}, |
| 2864 | {0x00, 0x79, 0x5a, 0xaa}, |
| 2865 | {0x00, 0x7a, 0x7f, 0xaa}, |
| 2866 | {0x00, 0x7b, 0x9b, 0xaa}, |
| 2867 | {0x00, 0x7c, 0xba, 0xaa}, |
| 2868 | {0x00, 0x7d, 0xd4, 0xaa}, |
| 2869 | {0x00, 0x7e, 0xea, 0xaa}, |
| 2870 | |
| 2871 | {0x00, 0xaa, 0xff, 0xaa}, /* back light comp */ |
| 2872 | {0x00, 0xc4, 0x03, 0xaa}, |
| 2873 | {0x00, 0xc5, 0x19, 0xaa}, |
| 2874 | {0x00, 0xc6, 0x03, 0xaa}, |
| 2875 | {0x00, 0xc7, 0x91, 0xaa}, |
| 2876 | {0x00, 0xc8, 0x01, 0xaa}, |
| 2877 | {0x00, 0xc9, 0xdd, 0xaa}, |
| 2878 | {0x00, 0xca, 0x02, 0xaa}, |
| 2879 | {0x00, 0xcb, 0x37, 0xaa}, |
| 2880 | |
| 2881 | /* read d1 */ |
| 2882 | {0x00, 0xd1, 0x3c, 0xaa}, |
| 2883 | {0x00, 0xb8, 0x28, 0xaa}, |
| 2884 | {0x00, 0xb9, 0x1e, 0xaa}, |
| 2885 | {0x00, 0xb6, 0x14, 0xaa}, |
| 2886 | {0x00, 0xb7, 0x0f, 0xaa}, |
| 2887 | {0x00, 0x5c, 0x10, 0xaa}, |
| 2888 | {0x00, 0x5d, 0x18, 0xaa}, |
| 2889 | {0x00, 0x5e, 0x24, 0xaa}, |
| 2890 | {0x00, 0x5f, 0x24, 0xaa}, |
| 2891 | {0x00, 0x86, 0x1a, 0xaa}, |
| 2892 | {0x00, 0x60, 0x00, 0xaa}, |
| 2893 | {0x00, 0x61, 0x1b, 0xaa}, |
| 2894 | {0x00, 0x62, 0x30, 0xaa}, |
| 2895 | {0x00, 0x63, 0x40, 0xaa}, |
| 2896 | {0x00, 0x87, 0x1a, 0xaa}, |
| 2897 | {0x00, 0x64, 0x00, 0xaa}, |
| 2898 | {0x00, 0x65, 0x08, 0xaa}, |
| 2899 | {0x00, 0x66, 0x10, 0xaa}, |
| 2900 | {0x00, 0x67, 0x20, 0xaa}, |
| 2901 | {0x00, 0x88, 0x10, 0xaa}, |
| 2902 | {0x00, 0x68, 0x00, 0xaa}, |
| 2903 | {0x00, 0x69, 0x08, 0xaa}, |
| 2904 | {0x00, 0x6a, 0x0f, 0xaa}, |
| 2905 | {0x00, 0x6b, 0x0f, 0xaa}, |
| 2906 | {0x00, 0x89, 0x07, 0xaa}, |
| 2907 | {0x00, 0xd5, 0x4c, 0xaa}, |
| 2908 | {0x00, 0x0a, 0x00, 0xaa}, |
| 2909 | {0x00, 0x0b, 0x2a, 0xaa}, |
| 2910 | {0x00, 0x0e, 0x03, 0xaa}, |
| 2911 | {0x00, 0x0f, 0xea, 0xaa}, |
| 2912 | {0x00, 0xa2, 0x00, 0xaa}, |
| 2913 | {0x00, 0xa3, 0x2a, 0xaa}, |
| 2914 | {0x00, 0xa4, 0x03, 0xaa}, |
| 2915 | {0x00, 0xa5, 0xea, 0xaa}, |
| 2916 | {} |
| 2917 | }; |
| 2918 | static const u8 poxxxx_initVGA[][4] = { |
| 2919 | {0x00, 0x20, 0x11, 0xaa}, |
| 2920 | {0x00, 0x33, 0x38, 0xaa}, |
| 2921 | {0x00, 0xbb, 0x0d, 0xaa}, |
| 2922 | {0xb3, 0x22, 0x01, 0xcc}, |
| 2923 | {0xb3, 0x23, 0xe0, 0xcc}, |
| 2924 | {0xb3, 0x16, 0x02, 0xcc}, |
| 2925 | {0xb3, 0x17, 0x7f, 0xcc}, |
| 2926 | {0xb3, 0x02, 0xb0, 0xcc}, |
| 2927 | {0xb3, 0x06, 0x00, 0xcc}, |
| 2928 | {0xb3, 0x5c, 0x01, 0xcc}, |
| 2929 | {0x00, 0x04, 0x06, 0xaa}, |
| 2930 | {0x00, 0x05, 0x3f, 0xaa}, |
| 2931 | {0x00, 0x04, 0x00, 0xdd}, /* delay 1s */ |
| 2932 | {} |
| 2933 | }; |
| 2934 | static const u8 poxxxx_initQVGA[][4] = { |
| 2935 | {0x00, 0x20, 0x33, 0xaa}, |
| 2936 | {0x00, 0x33, 0x38, 0xaa}, |
| 2937 | {0x00, 0xbb, 0x0d, 0xaa}, |
| 2938 | {0xb3, 0x22, 0x00, 0xcc}, |
| 2939 | {0xb3, 0x23, 0xf0, 0xcc}, |
| 2940 | {0xb3, 0x16, 0x01, 0xcc}, |
| 2941 | {0xb3, 0x17, 0x3f, 0xcc}, |
| 2942 | {0xb3, 0x02, 0xb0, 0xcc}, |
| 2943 | {0xb3, 0x06, 0x01, 0xcc}, |
| 2944 | {0xb3, 0x5c, 0x00, 0xcc}, |
| 2945 | {0x00, 0x04, 0x06, 0xaa}, |
| 2946 | {0x00, 0x05, 0x3f, 0xaa}, |
| 2947 | {0x00, 0x04, 0x00, 0xdd}, /* delay 1s */ |
| 2948 | {} |
| 2949 | }; |
| 2950 | static const u8 poxxxx_init_end_1[][4] = { |
| 2951 | {0x00, 0x47, 0x25, 0xaa}, |
| 2952 | {0x00, 0x48, 0x80, 0xaa}, |
| 2953 | {0x00, 0x49, 0x1f, 0xaa}, |
| 2954 | {0x00, 0x4a, 0x40, 0xaa}, |
| 2955 | {0x00, 0x44, 0x40, 0xaa}, |
| 2956 | {0x00, 0xab, 0x4a, 0xaa}, |
| 2957 | {0x00, 0xb1, 0x00, 0xaa}, |
| 2958 | {0x00, 0xb2, 0x04, 0xaa}, |
| 2959 | {0x00, 0xb3, 0x08, 0xaa}, |
| 2960 | {0x00, 0xb4, 0x0b, 0xaa}, |
| 2961 | {0x00, 0xb5, 0x0d, 0xaa}, |
| 2962 | {0x00, 0x59, 0x7e, 0xaa}, /* sharpness */ |
| 2963 | {0x00, 0x16, 0x00, 0xaa}, /* white balance */ |
| 2964 | {0x00, 0x18, 0x00, 0xaa}, |
| 2965 | {} |
| 2966 | }; |
| 2967 | static const u8 poxxxx_init_end_2[][4] = { |
| 2968 | {0x00, 0x1d, 0x85, 0xaa}, |
| 2969 | {0x00, 0x1e, 0x06, 0xaa}, |
| 2970 | {0x00, 0x1d, 0x05, 0xaa}, |
| 2971 | {} |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 2972 | }; |
| 2973 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2974 | struct sensor_info { |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 2975 | s8 sensorId; |
| 2976 | u8 I2cAdd; |
| 2977 | u8 IdAdd; |
| 2978 | u16 VpId; |
| 2979 | u8 m1; |
| 2980 | u8 m2; |
| 2981 | u8 op; |
| 2982 | }; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 2983 | |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 2984 | /* probe values */ |
| 2985 | static const struct sensor_info vc0321_probe_data[] = { |
| 2986 | /* sensorId, I2cAdd, IdAdd, VpId, m1, m2, op */ |
| 2987 | /* 0 OV9640 */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 2988 | {-1, 0x80 | 0x30, 0x0a, 0x0000, 0x25, 0x24, 0x05}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 2989 | /* 1 ICM108T (may respond on IdAdd == 0x83 - tested in vc032x_probe_sensor) */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 2990 | {-1, 0x80 | 0x20, 0x82, 0x0000, 0x24, 0x25, 0x01}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 2991 | /* 2 PO2130 (may detect PO3130NC - tested in vc032x_probe_sensor)*/ |
| 2992 | {-1, 0x80 | 0x76, 0x00, 0x0000, 0x24, 0x25, 0x01}, |
| 2993 | /* 3 MI1310 */ |
| 2994 | {-1, 0x80 | 0x5d, 0x00, 0x0000, 0x24, 0x25, 0x01}, |
| 2995 | /* 4 MI360 - tested in vc032x_probe_sensor */ |
Jean-Francois Moine | e18fd01 | 2008-12-08 04:48:21 -0300 | [diff] [blame] | 2996 | /* {SENSOR_MI0360, 0x80 | 0x5d, 0x00, 0x8243, 0x24, 0x25, 0x01}, */ |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 2997 | /* 5 7131R */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 2998 | {SENSOR_HV7131R, 0x80 | 0x11, 0x00, 0x0209, 0x24, 0x25, 0x01}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 2999 | /* 6 OV7649 */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3000 | {-1, 0x80 | 0x21, 0x0a, 0x0000, 0x21, 0x20, 0x05}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3001 | /* 7 PAS302BCW */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3002 | {-1, 0x80 | 0x40, 0x00, 0x0000, 0x20, 0x22, 0x05}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3003 | /* 8 OV7660 */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3004 | {SENSOR_OV7660, 0x80 | 0x21, 0x0a, 0x7660, 0x26, 0x26, 0x05}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3005 | /* 9 PO3130NC - (tested in vc032x_probe_sensor) */ |
| 3006 | /* {SENSOR_PO3130NC, 0x80 | 0x76, 0x00, 0x3130, 0x24, 0x25, 0x01}, */ |
| 3007 | /* 10 PO1030KC */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3008 | {-1, 0x80 | 0x6e, 0x00, 0x0000, 0x24, 0x25, 0x01}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3009 | /* 11 MI1310_SOC */ |
| 3010 | {SENSOR_MI1310_SOC, 0x80 | 0x5d, 0x00, 0x143a, 0x24, 0x25, 0x01}, |
| 3011 | /* 12 OV9650 */ |
| 3012 | {-1, 0x80 | 0x30, 0x0a, 0x0000, 0x25, 0x24, 0x05}, |
| 3013 | /* 13 S5K532 */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3014 | {-1, 0x80 | 0x11, 0x39, 0x0000, 0x24, 0x25, 0x01}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3015 | /* 14 MI360_SOC - ??? */ |
| 3016 | /* 15 PO1200N */ |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 3017 | {SENSOR_PO1200, 0x80 | 0x5c, 0x00, 0x1200, 0x67, 0x67, 0x01}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3018 | /* 16 PO3030K */ |
| 3019 | {-1, 0x80 | 0x18, 0x00, 0x0000, 0x24, 0x25, 0x01}, |
| 3020 | /* 17 PO2030 */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3021 | {-1, 0x80 | 0x6e, 0x00, 0x0000, 0x24, 0x25, 0x01}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3022 | /* ?? */ |
| 3023 | {-1, 0x80 | 0x56, 0x01, 0x0000, 0x64, 0x67, 0x01}, |
| 3024 | {SENSOR_MI1320, 0x80 | 0x48, 0x00, 0x148c, 0x64, 0x65, 0x01}, |
| 3025 | }; |
| 3026 | static const struct sensor_info vc0323_probe_data[] = { |
| 3027 | /* sensorId, I2cAdd, IdAdd, VpId, m1, m2, op */ |
| 3028 | /* 0 OV9640 */ |
| 3029 | {-1, 0x80 | 0x30, 0x0a, 0x0000, 0x25, 0x24, 0x05}, |
| 3030 | /* 1 ICM108T (may respond on IdAdd == 0x83 - tested in vc032x_probe_sensor) */ |
| 3031 | {-1, 0x80 | 0x20, 0x82, 0x0000, 0x24, 0x25, 0x01}, |
| 3032 | /* 2 PO2130 (may detect PO3130NC - tested in vc032x_probe_sensor)*/ |
| 3033 | {-1, 0x80 | 0x76, 0x00, 0x0000, 0x24, 0x25, 0x01}, |
| 3034 | /* 3 MI1310 */ |
| 3035 | {-1, 0x80 | 0x5d, 0x00, 0x0000, 0x24, 0x25, 0x01}, |
| 3036 | /* 4 MI360 - tested in vc032x_probe_sensor */ |
| 3037 | /* {SENSOR_MI0360, 0x80 | 0x5d, 0x00, 0x8243, 0x24, 0x25, 0x01}, */ |
| 3038 | /* 5 7131R */ |
| 3039 | {SENSOR_HV7131R, 0x80 | 0x11, 0x00, 0x0209, 0x24, 0x25, 0x01}, |
| 3040 | /* 6 OV7649 */ |
| 3041 | {-1, 0x80 | 0x21, 0x0a, 0x0000, 0x21, 0x20, 0x05}, |
| 3042 | /* 7 PAS302BCW */ |
| 3043 | {-1, 0x80 | 0x40, 0x00, 0x0000, 0x20, 0x22, 0x05}, |
| 3044 | /* 8 OV7660 */ |
| 3045 | {SENSOR_OV7660, 0x80 | 0x21, 0x0a, 0x7660, 0x26, 0x26, 0x05}, |
| 3046 | /* 9 PO3130NC - (tested in vc032x_probe_sensor) */ |
| 3047 | /* {SENSOR_PO3130NC, 0x80 | 0x76, 0x00, 0x3130, 0x24, 0x25, 0x01}, */ |
| 3048 | /* 10 PO1030KC */ |
| 3049 | {-1, 0x80 | 0x6e, 0x00, 0x0000, 0x24, 0x25, 0x01}, |
| 3050 | /* 11 MI1310_SOC */ |
| 3051 | {SENSOR_MI1310_SOC, 0x80 | 0x5d, 0x00, 0x143a, 0x24, 0x25, 0x01}, |
| 3052 | /* 12 OV9650 */ |
| 3053 | {-1, 0x80 | 0x30, 0x0a, 0x0000, 0x25, 0x24, 0x05}, |
| 3054 | /* 13 S5K532 */ |
| 3055 | {-1, 0x80 | 0x11, 0x39, 0x0000, 0x24, 0x25, 0x01}, |
| 3056 | /* 14 MI360_SOC - ??? */ |
| 3057 | /* 15 PO1200N */ |
| 3058 | {SENSOR_PO1200, 0x80 | 0x5c, 0x00, 0x1200, 0x67, 0x67, 0x01}, |
| 3059 | /* 16 ?? */ |
| 3060 | {-1, 0x80 | 0x2d, 0x00, 0x0000, 0x65, 0x67, 0x01}, |
| 3061 | /* 17 PO2030 */ |
| 3062 | {-1, 0x80 | 0x6e, 0x00, 0x0000, 0x24, 0x25, 0x01}, |
| 3063 | /* ?? */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3064 | {-1, 0x80 | 0x56, 0x01, 0x0000, 0x64, 0x67, 0x01}, |
Jean-Francois Moine | db786a3 | 2009-03-23 06:03:52 -0300 | [diff] [blame] | 3065 | {SENSOR_MI1320_SOC, 0x80 | 0x48, 0x00, 0x148c, 0x64, 0x67, 0x01}, |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3066 | /*fixme: not in the ms-win probe - may be found before? */ |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3067 | {SENSOR_OV7670, 0x80 | 0x21, 0x0a, 0x7673, 0x66, 0x67, 0x05}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3068 | }; |
| 3069 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3070 | /* read 'len' bytes in gspca_dev->usb_buf */ |
| 3071 | static void reg_r(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3072 | u16 req, |
| 3073 | u16 index, |
| 3074 | u16 len) |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3075 | { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3076 | usb_control_msg(gspca_dev->dev, |
| 3077 | usb_rcvctrlpipe(gspca_dev->dev, 0), |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3078 | req, |
| 3079 | USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
| 3080 | 1, /* value */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3081 | index, gspca_dev->usb_buf, len, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3082 | 500); |
| 3083 | } |
| 3084 | |
| 3085 | static void reg_w(struct usb_device *dev, |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3086 | u16 req, |
| 3087 | u16 value, |
| 3088 | u16 index) |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3089 | { |
| 3090 | usb_control_msg(dev, |
| 3091 | usb_sndctrlpipe(dev, 0), |
| 3092 | req, |
| 3093 | USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, |
| 3094 | value, index, NULL, 0, |
| 3095 | 500); |
| 3096 | } |
| 3097 | |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3098 | static u16 read_sensor_register(struct gspca_dev *gspca_dev, |
| 3099 | u16 address) |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3100 | { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3101 | struct usb_device *dev = gspca_dev->dev; |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3102 | u8 ldata, mdata, hdata; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3103 | int retry = 50; |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3104 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3105 | reg_r(gspca_dev, 0xa1, 0xb33f, 1); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3106 | if (!(gspca_dev->usb_buf[0] & 0x02)) { |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3107 | PDEBUG(D_ERR, "I2c Bus Busy Wait %02x", |
| 3108 | gspca_dev->usb_buf[0]); |
| 3109 | return 0; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3110 | } |
| 3111 | reg_w(dev, 0xa0, address, 0xb33a); |
| 3112 | reg_w(dev, 0xa0, 0x02, 0xb339); |
| 3113 | |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3114 | do { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3115 | reg_r(gspca_dev, 0xa1, 0xb33b, 1); |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3116 | if (gspca_dev->usb_buf[0] == 0x00) |
| 3117 | break; |
| 3118 | msleep(40); |
| 3119 | } while (--retry >= 0); |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3120 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3121 | reg_r(gspca_dev, 0xa1, 0xb33e, 1); |
Jean-Francois Moine | e18fd01 | 2008-12-08 04:48:21 -0300 | [diff] [blame] | 3122 | ldata = gspca_dev->usb_buf[0]; |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3123 | reg_r(gspca_dev, 0xa1, 0xb33d, 1); |
| 3124 | mdata = gspca_dev->usb_buf[0]; |
| 3125 | reg_r(gspca_dev, 0xa1, 0xb33c, 1); |
Jean-Francois Moine | e18fd01 | 2008-12-08 04:48:21 -0300 | [diff] [blame] | 3126 | hdata = gspca_dev->usb_buf[0]; |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3127 | if (hdata != 0 && mdata != 0 && ldata != 0) |
| 3128 | PDEBUG(D_PROBE, "Read Sensor %02x%02x %02x", |
| 3129 | hdata, mdata, ldata); |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3130 | reg_r(gspca_dev, 0xa1, 0xb334, 1); |
| 3131 | if (gspca_dev->usb_buf[0] == 0x02) |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3132 | return (hdata << 8) + mdata; |
| 3133 | return hdata; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3134 | } |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3135 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3136 | static int vc032x_probe_sensor(struct gspca_dev *gspca_dev) |
| 3137 | { |
Jean-Francois Moine | 1852e75 | 2009-06-27 05:33:48 -0300 | [diff] [blame] | 3138 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3139 | struct usb_device *dev = gspca_dev->dev; |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3140 | int i, n; |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3141 | u16 value; |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3142 | const struct sensor_info *ptsensor_info; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3143 | |
Jean-Francois Moine | 1852e75 | 2009-06-27 05:33:48 -0300 | [diff] [blame] | 3144 | /*fixme: should also check the other sensor (back mi1320_soc, front mc501cb)*/ |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3145 | if (sd->flags & FL_SAMSUNG) { |
Jean-Francois Moine | 1852e75 | 2009-06-27 05:33:48 -0300 | [diff] [blame] | 3146 | reg_w(dev, 0xa0, 0x01, 0xb301); |
| 3147 | reg_w(dev, 0x89, 0xf0ff, 0xffff); /* select the back sensor */ |
| 3148 | } |
| 3149 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3150 | reg_r(gspca_dev, 0xa1, 0xbfcf, 1); |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3151 | PDEBUG(D_PROBE, "vc032%d check sensor header %02x", |
| 3152 | sd->bridge == BRIDGE_VC0321 ? 1 : 3, gspca_dev->usb_buf[0]); |
| 3153 | if (sd->bridge == BRIDGE_VC0321) { |
| 3154 | ptsensor_info = vc0321_probe_data; |
| 3155 | n = ARRAY_SIZE(vc0321_probe_data); |
| 3156 | } else { |
| 3157 | ptsensor_info = vc0323_probe_data; |
| 3158 | n = ARRAY_SIZE(vc0323_probe_data); |
| 3159 | } |
| 3160 | for (i = 0; i < n; i++) { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3161 | reg_w(dev, 0xa0, 0x02, 0xb334); |
| 3162 | reg_w(dev, 0xa0, ptsensor_info->m1, 0xb300); |
| 3163 | reg_w(dev, 0xa0, ptsensor_info->m2, 0xb300); |
| 3164 | reg_w(dev, 0xa0, 0x01, 0xb308); |
| 3165 | reg_w(dev, 0xa0, 0x0c, 0xb309); |
| 3166 | reg_w(dev, 0xa0, ptsensor_info->I2cAdd, 0xb335); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3167 | reg_w(dev, 0xa0, ptsensor_info->op, 0xb301); |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3168 | value = read_sensor_register(gspca_dev, ptsensor_info->IdAdd); |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3169 | if (value == 0 && ptsensor_info->IdAdd == 0x82) |
| 3170 | value = read_sensor_register(gspca_dev, 0x83); |
| 3171 | if (value != 0) { |
| 3172 | PDEBUG(D_ERR|D_PROBE, "Sensor ID %04x (%d)", |
| 3173 | value, i); |
| 3174 | if (value == ptsensor_info->VpId) |
| 3175 | return ptsensor_info->sensorId; |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 3176 | |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3177 | switch (value) { |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3178 | case 0x3130: |
| 3179 | return SENSOR_PO3130NC; |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3180 | case 0x7673: |
| 3181 | return SENSOR_OV7670; |
| 3182 | case 0x8243: |
| 3183 | return SENSOR_MI0360; |
| 3184 | } |
Jean-Francois Moine | 235d0ff | 2009-03-22 16:33:47 -0300 | [diff] [blame] | 3185 | } |
Jean-Francois Moine | ff1cf40 | 2009-12-26 15:18:02 -0300 | [diff] [blame] | 3186 | ptsensor_info++; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3187 | } |
| 3188 | return -1; |
| 3189 | } |
| 3190 | |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3191 | static void i2c_write(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 33f5b07 | 2009-03-25 07:04:11 -0300 | [diff] [blame] | 3192 | u8 reg, const u8 *val, |
| 3193 | u8 size) /* 1 or 2 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3194 | { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3195 | struct usb_device *dev = gspca_dev->dev; |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3196 | int retry; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3197 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3198 | reg_r(gspca_dev, 0xa1, 0xb33f, 1); |
Jean-Francois Moine | 33f5b07 | 2009-03-25 07:04:11 -0300 | [diff] [blame] | 3199 | /*fixme:should check if (!(gspca_dev->usb_buf[0] & 0x02)) error*/ |
Jean-Francois Moine | c41492c | 2008-07-07 08:31:16 -0300 | [diff] [blame] | 3200 | reg_w(dev, 0xa0, size, 0xb334); |
| 3201 | reg_w(dev, 0xa0, reg, 0xb33a); |
Jean-Francois Moine | 33f5b07 | 2009-03-25 07:04:11 -0300 | [diff] [blame] | 3202 | reg_w(dev, 0xa0, val[0], 0xb336); |
| 3203 | if (size > 1) |
Jean-Francois Moine | c41492c | 2008-07-07 08:31:16 -0300 | [diff] [blame] | 3204 | reg_w(dev, 0xa0, val[1], 0xb337); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3205 | reg_w(dev, 0xa0, 0x01, 0xb339); |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3206 | retry = 4; |
| 3207 | do { |
| 3208 | reg_r(gspca_dev, 0xa1, 0xb33b, 1); |
| 3209 | if (gspca_dev->usb_buf[0] == 0) |
| 3210 | break; |
| 3211 | msleep(20); |
| 3212 | } while (--retry > 0); |
| 3213 | if (retry <= 0) |
| 3214 | PDEBUG(D_ERR, "i2c_write failed"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3215 | } |
| 3216 | |
| 3217 | static void put_tab_to_reg(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3218 | const u8 *tab, u8 tabsize, u16 addr) |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3219 | { |
| 3220 | int j; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3221 | u16 ad = addr; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3222 | |
| 3223 | for (j = 0; j < tabsize; j++) |
| 3224 | reg_w(gspca_dev->dev, 0xa0, tab[j], ad++); |
| 3225 | } |
| 3226 | |
| 3227 | static void usb_exchange(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3228 | const u8 data[][4]) |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3229 | { |
| 3230 | struct usb_device *dev = gspca_dev->dev; |
| 3231 | int i = 0; |
| 3232 | |
| 3233 | for (;;) { |
| 3234 | switch (data[i][3]) { |
| 3235 | default: |
| 3236 | return; |
| 3237 | case 0xcc: /* normal write */ |
| 3238 | reg_w(dev, 0xa0, data[i][2], |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3239 | (data[i][0]) << 8 | data[i][1]); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3240 | break; |
| 3241 | case 0xaa: /* i2c op */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3242 | i2c_write(gspca_dev, data[i][1], &data[i][2], 1); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3243 | break; |
| 3244 | case 0xbb: /* i2c op */ |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3245 | i2c_write(gspca_dev, data[i][0], &data[i][1], 2); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3246 | break; |
| 3247 | case 0xdd: |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3248 | msleep(data[i][1] * 256 + data[i][2] + 10); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3249 | break; |
| 3250 | } |
| 3251 | i++; |
| 3252 | } |
| 3253 | /*not reached*/ |
| 3254 | } |
| 3255 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3256 | |
| 3257 | /* this function is called at probe time */ |
| 3258 | static int sd_config(struct gspca_dev *gspca_dev, |
| 3259 | const struct usb_device_id *id) |
| 3260 | { |
| 3261 | struct sd *sd = (struct sd *) gspca_dev; |
| 3262 | struct usb_device *dev = gspca_dev->dev; |
| 3263 | struct cam *cam; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3264 | int sensor; |
Jean-Francois Moine | 49cb6b0 | 2009-04-25 13:29:01 -0300 | [diff] [blame] | 3265 | static u8 npkt[] = { /* number of packets per ISOC message */ |
| 3266 | 64, /* HV7131R 0 */ |
| 3267 | 32, /* MI0360 1 */ |
| 3268 | 32, /* MI1310_SOC 2 */ |
| 3269 | 64, /* MI1320 3 */ |
| 3270 | 128, /* MI1320_SOC 4 */ |
| 3271 | 32, /* OV7660 5 */ |
| 3272 | 64, /* OV7670 6 */ |
| 3273 | 128, /* PO1200 7 */ |
| 3274 | 128, /* PO3130NC 8 */ |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3275 | 128, /* POxxxx 9 */ |
Jean-Francois Moine | 49cb6b0 | 2009-04-25 13:29:01 -0300 | [diff] [blame] | 3276 | }; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3277 | |
| 3278 | cam = &gspca_dev->cam; |
Jean-Francois Moine | 1852e75 | 2009-06-27 05:33:48 -0300 | [diff] [blame] | 3279 | sd->bridge = id->driver_info >> 8; |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3280 | sd->flags = id->driver_info & 0xff; |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3281 | if (id->idVendor == 0x046d && |
| 3282 | (id->idProduct == 0x0892 || id->idProduct == 0x0896)) |
| 3283 | sensor = SENSOR_POxxxx; |
| 3284 | else |
| 3285 | sensor = vc032x_probe_sensor(gspca_dev); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3286 | switch (sensor) { |
| 3287 | case -1: |
| 3288 | PDEBUG(D_PROBE, "Unknown sensor..."); |
| 3289 | return -EINVAL; |
| 3290 | case SENSOR_HV7131R: |
| 3291 | PDEBUG(D_PROBE, "Find Sensor HV7131R"); |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 3292 | break; |
| 3293 | case SENSOR_MI0360: |
| 3294 | PDEBUG(D_PROBE, "Find Sensor MI0360"); |
| 3295 | sd->bridge = BRIDGE_VC0323; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3296 | break; |
| 3297 | case SENSOR_MI1310_SOC: |
| 3298 | PDEBUG(D_PROBE, "Find Sensor MI1310_SOC"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3299 | break; |
| 3300 | case SENSOR_MI1320: |
| 3301 | PDEBUG(D_PROBE, "Find Sensor MI1320"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3302 | break; |
Jean-Francois Moine | db786a3 | 2009-03-23 06:03:52 -0300 | [diff] [blame] | 3303 | case SENSOR_MI1320_SOC: |
| 3304 | PDEBUG(D_PROBE, "Find Sensor MI1320_SOC"); |
| 3305 | break; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3306 | case SENSOR_OV7660: |
| 3307 | PDEBUG(D_PROBE, "Find Sensor OV7660"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3308 | break; |
| 3309 | case SENSOR_OV7670: |
| 3310 | PDEBUG(D_PROBE, "Find Sensor OV7670"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3311 | break; |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 3312 | case SENSOR_PO1200: |
| 3313 | PDEBUG(D_PROBE, "Find Sensor PO1200"); |
| 3314 | break; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3315 | case SENSOR_PO3130NC: |
| 3316 | PDEBUG(D_PROBE, "Find Sensor PO3130NC"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3317 | break; |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3318 | case SENSOR_POxxxx: |
| 3319 | PDEBUG(D_PROBE, "Sensor POxxxx"); |
| 3320 | break; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3321 | } |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 3322 | sd->sensor = sensor; |
| 3323 | |
| 3324 | if (sd->bridge == BRIDGE_VC0321) { |
| 3325 | cam->cam_mode = vc0321_mode; |
| 3326 | cam->nmodes = ARRAY_SIZE(vc0321_mode); |
| 3327 | } else { |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3328 | switch (sensor) { |
| 3329 | case SENSOR_PO1200: |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 3330 | cam->cam_mode = svga_mode; |
| 3331 | cam->nmodes = ARRAY_SIZE(svga_mode); |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3332 | break; |
| 3333 | case SENSOR_MI1310_SOC: |
| 3334 | cam->cam_mode = vc0323_mode; |
Jean-Francois Moine | 111815e | 2009-07-27 05:52:27 -0300 | [diff] [blame] | 3335 | cam->nmodes = ARRAY_SIZE(vc0323_mode); |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3336 | break; |
| 3337 | case SENSOR_MI1320_SOC: |
| 3338 | cam->cam_mode = bi_mode; |
| 3339 | cam->nmodes = ARRAY_SIZE(bi_mode); |
| 3340 | break; |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 3341 | case SENSOR_OV7670: |
| 3342 | cam->cam_mode = bi_mode; |
| 3343 | cam->nmodes = ARRAY_SIZE(bi_mode) - 1; |
| 3344 | break; |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3345 | default: |
| 3346 | cam->cam_mode = vc0323_mode; |
| 3347 | cam->nmodes = ARRAY_SIZE(vc0323_mode) - 1; |
| 3348 | break; |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 3349 | } |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 3350 | } |
Jean-Francois Moine | 49cb6b0 | 2009-04-25 13:29:01 -0300 | [diff] [blame] | 3351 | cam->npkt = npkt[sd->sensor]; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3352 | |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3353 | sd->brightness = BRIGHTNESS_DEF; |
| 3354 | sd->contrast = CONTRAST_DEF; |
| 3355 | sd->colors = COLOR_DEF; |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 3356 | sd->hflip = HFLIP_DEF; |
| 3357 | sd->vflip = VFLIP_DEF; |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3358 | sd->lightfreq = FREQ_DEF; |
| 3359 | sd->sharpness = SHARPNESS_DEF; |
| 3360 | |
| 3361 | gspca_dev->ctrl_dis = ctrl_dis[sd->sensor]; |
| 3362 | |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3363 | if (sd->sensor == SENSOR_OV7670) |
| 3364 | sd->flags |= FL_HFLIP | FL_VFLIP; |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 3365 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3366 | if (sd->bridge == BRIDGE_VC0321) { |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3367 | reg_r(gspca_dev, 0x8a, 0, 3); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3368 | reg_w(dev, 0x87, 0x00, 0x0f0f); |
| 3369 | |
Jean-Francois Moine | 739570b | 2008-07-14 09:38:29 -0300 | [diff] [blame] | 3370 | reg_r(gspca_dev, 0x8b, 0, 3); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3371 | reg_w(dev, 0x88, 0x00, 0x0202); |
| 3372 | } |
| 3373 | return 0; |
| 3374 | } |
| 3375 | |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3376 | /* this function is called at probe and resume time */ |
Jean-Francois Moine | 012d6b0 | 2008-09-03 17:12:16 -0300 | [diff] [blame] | 3377 | static int sd_init(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3378 | { |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3379 | struct sd *sd = (struct sd *) gspca_dev; |
| 3380 | |
| 3381 | if (sd->sensor == SENSOR_POxxxx) { |
| 3382 | reg_r(gspca_dev, 0xa1, 0xb300, 1); |
| 3383 | if (gspca_dev->usb_buf[0] != 0) { |
| 3384 | reg_w(gspca_dev->dev, 0xa0, 0x26, 0xb300); |
| 3385 | reg_w(gspca_dev->dev, 0xa0, 0x04, 0xb300); |
| 3386 | reg_w(gspca_dev->dev, 0xa0, 0x00, 0xb300); |
| 3387 | } |
| 3388 | } |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3389 | return 0; |
| 3390 | } |
| 3391 | |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3392 | static void setbrightness(struct gspca_dev *gspca_dev) |
| 3393 | { |
| 3394 | struct sd *sd = (struct sd *) gspca_dev; |
| 3395 | u8 data; |
| 3396 | |
| 3397 | if (gspca_dev->ctrl_dis & (1 << BRIGHTNESS_IDX)) |
| 3398 | return; |
| 3399 | data = sd->brightness; |
| 3400 | if (data >= 0x80) |
| 3401 | data &= 0x7f; |
| 3402 | else |
| 3403 | data = 0xff ^ data; |
| 3404 | i2c_write(gspca_dev, 0x98, &data, 1); |
| 3405 | } |
| 3406 | |
| 3407 | static void setcontrast(struct gspca_dev *gspca_dev) |
| 3408 | { |
| 3409 | struct sd *sd = (struct sd *) gspca_dev; |
| 3410 | |
| 3411 | if (gspca_dev->ctrl_dis & (1 << CONTRAST_IDX)) |
| 3412 | return; |
| 3413 | i2c_write(gspca_dev, 0x99, &sd->contrast, 1); |
| 3414 | } |
| 3415 | |
| 3416 | static void setcolors(struct gspca_dev *gspca_dev) |
| 3417 | { |
| 3418 | struct sd *sd = (struct sd *) gspca_dev; |
| 3419 | u8 data; |
| 3420 | |
| 3421 | if (gspca_dev->ctrl_dis & (1 << COLORS_IDX)) |
| 3422 | return; |
| 3423 | data = sd->colors - (sd->colors >> 3) - 1; |
| 3424 | i2c_write(gspca_dev, 0x94, &data, 1); |
| 3425 | i2c_write(gspca_dev, 0x95, &sd->colors, 1); |
| 3426 | } |
| 3427 | |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 3428 | static void sethvflip(struct gspca_dev *gspca_dev) |
| 3429 | { |
| 3430 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3431 | u8 data[2], hflip, vflip; |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 3432 | |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3433 | hflip = sd->hflip; |
| 3434 | if (sd->flags & FL_HFLIP) |
Jean-Francois Moine | bb2c818 | 2009-08-02 06:56:47 -0300 | [diff] [blame] | 3435 | hflip = !hflip; |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3436 | vflip = sd->vflip; |
| 3437 | if (sd->flags & FL_VFLIP) |
Jean-Francois Moine | bb2c818 | 2009-08-02 06:56:47 -0300 | [diff] [blame] | 3438 | vflip = !vflip; |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 3439 | switch (sd->sensor) { |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3440 | case SENSOR_MI1310_SOC: |
Jean-Francois Moine | 219f3027 | 2009-12-26 15:21:57 -0300 | [diff] [blame] | 3441 | case SENSOR_MI1320: |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3442 | case SENSOR_MI1320_SOC: |
| 3443 | data[0] = data[1] = 0; /* select page 0 */ |
| 3444 | i2c_write(gspca_dev, 0xf0, data, 2); |
| 3445 | data[0] = sd->sensor == SENSOR_MI1310_SOC ? 0x03 : 0x01; |
| 3446 | data[1] = 0x02 * hflip |
| 3447 | | 0x01 * vflip; |
| 3448 | i2c_write(gspca_dev, 0x20, data, 2); |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 3449 | break; |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3450 | case SENSOR_OV7660: |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 3451 | case SENSOR_OV7670: |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3452 | data[0] = sd->sensor == SENSOR_OV7660 ? 0x01 : 0x07; |
| 3453 | data[0] |= OV7660_MVFP_MIRROR * hflip |
| 3454 | | OV7660_MVFP_VFLIP * vflip; |
| 3455 | i2c_write(gspca_dev, OV7660_REG_MVFP, data, 1); |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 3456 | break; |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 3457 | case SENSOR_PO1200: |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3458 | data[0] = 0; |
| 3459 | i2c_write(gspca_dev, 0x03, data, 1); |
| 3460 | data[0] = 0x80 * hflip |
| 3461 | | 0x40 * vflip |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 3462 | | 0x06; |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3463 | i2c_write(gspca_dev, 0x1e, data, 1); |
| 3464 | break; |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 3465 | } |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 3466 | } |
| 3467 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3468 | static void setlightfreq(struct gspca_dev *gspca_dev) |
| 3469 | { |
| 3470 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3471 | static const u8 (*ov7660_freq_tb[3])[4] = |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3472 | {ov7660_NoFliker, ov7660_50HZ, ov7660_60HZ}; |
| 3473 | |
| 3474 | if (sd->sensor != SENSOR_OV7660) |
| 3475 | return; |
| 3476 | usb_exchange(gspca_dev, ov7660_freq_tb[sd->lightfreq]); |
| 3477 | } |
| 3478 | |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 3479 | static void setsharpness(struct gspca_dev *gspca_dev) |
| 3480 | { |
| 3481 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3482 | u8 data; |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 3483 | |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3484 | switch (sd->sensor) { |
| 3485 | case SENSOR_PO1200: |
| 3486 | data = 0; |
| 3487 | i2c_write(gspca_dev, 0x03, &data, 1); |
| 3488 | if (sd->sharpness < 0) |
| 3489 | data = 0x6a; |
| 3490 | else |
| 3491 | data = 0xb5 + sd->sharpness * 3; |
| 3492 | i2c_write(gspca_dev, 0x61, &data, 1); |
| 3493 | break; |
| 3494 | case SENSOR_POxxxx: |
| 3495 | if (sd->sharpness < 0) |
| 3496 | data = 0x7e; /* def = max */ |
| 3497 | else |
| 3498 | data = 0x60 + sd->sharpness * 0x0f; |
| 3499 | i2c_write(gspca_dev, 0x59, &data, 1); |
| 3500 | break; |
| 3501 | } |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 3502 | } |
| 3503 | |
Jean-Francois Moine | 72ab97c | 2008-09-20 06:39:08 -0300 | [diff] [blame] | 3504 | static int sd_start(struct gspca_dev *gspca_dev) |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3505 | { |
| 3506 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3507 | const u8 (*init)[4]; |
| 3508 | const u8 *GammaT = NULL; |
| 3509 | const u8 *MatrixT = NULL; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3510 | int mode; |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3511 | static const u8 (*mi1320_soc_init[])[4] = { |
| 3512 | mi1320_soc_InitSXGA, |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3513 | mi1320_soc_InitVGA, |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3514 | mi1320_soc_InitQVGA, |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3515 | }; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3516 | |
Jean-Francois Moine | 1852e75 | 2009-06-27 05:33:48 -0300 | [diff] [blame] | 3517 | /*fixme: back sensor only*/ |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3518 | if (sd->flags & FL_SAMSUNG) { |
Jean-Francois Moine | 1852e75 | 2009-06-27 05:33:48 -0300 | [diff] [blame] | 3519 | reg_w(gspca_dev->dev, 0x89, 0xf0ff, 0xffff); |
| 3520 | reg_w(gspca_dev->dev, 0xa9, 0x8348, 0x000e); |
| 3521 | reg_w(gspca_dev->dev, 0xa9, 0x0000, 0x001a); |
| 3522 | } |
| 3523 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3524 | /* Assume start use the good resolution from gspca_dev->mode */ |
| 3525 | if (sd->bridge == BRIDGE_VC0321) { |
| 3526 | reg_w(gspca_dev->dev, 0xa0, 0xff, 0xbfec); |
| 3527 | reg_w(gspca_dev->dev, 0xa0, 0xff, 0xbfed); |
| 3528 | reg_w(gspca_dev->dev, 0xa0, 0xff, 0xbfee); |
| 3529 | reg_w(gspca_dev->dev, 0xa0, 0xff, 0xbfef); |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3530 | sd->image_offset = 46; |
| 3531 | } else { |
| 3532 | if (gspca_dev->cam.cam_mode[gspca_dev->curr_mode].pixelformat |
| 3533 | == V4L2_PIX_FMT_JPEG) |
| 3534 | sd->image_offset = 0; |
| 3535 | else |
| 3536 | sd->image_offset = 32; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3537 | } |
| 3538 | |
Jean-Francois Moine | c2446b3 | 2008-07-05 11:49:20 -0300 | [diff] [blame] | 3539 | mode = gspca_dev->cam.cam_mode[(int) gspca_dev->curr_mode].priv; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3540 | switch (sd->sensor) { |
| 3541 | case SENSOR_HV7131R: |
| 3542 | GammaT = hv7131r_gamma; |
| 3543 | MatrixT = hv7131r_matrix; |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 3544 | if (mode) |
| 3545 | init = hv7131r_initQVGA_data; /* 320x240 */ |
| 3546 | else |
| 3547 | init = hv7131r_initVGA_data; /* 640x480 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3548 | break; |
| 3549 | case SENSOR_OV7660: |
| 3550 | GammaT = ov7660_gamma; |
| 3551 | MatrixT = ov7660_matrix; |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 3552 | if (mode) |
| 3553 | init = ov7660_initQVGA_data; /* 320x240 */ |
| 3554 | else |
| 3555 | init = ov7660_initVGA_data; /* 640x480 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3556 | break; |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 3557 | case SENSOR_MI0360: |
| 3558 | GammaT = mi1320_gamma; |
| 3559 | MatrixT = mi0360_matrix; |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 3560 | if (mode) |
| 3561 | init = mi0360_initQVGA_JPG; /* 320x240 */ |
| 3562 | else |
| 3563 | init = mi0360_initVGA_JPG; /* 640x480 */ |
Jean-Francois Moine | cbb0554 | 2008-11-26 16:17:13 -0300 | [diff] [blame] | 3564 | break; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3565 | case SENSOR_MI1310_SOC: |
Jean-Francois Moine | a92e906 | 2009-01-29 05:32:23 -0300 | [diff] [blame] | 3566 | GammaT = mi1320_gamma; |
Jean-Francois Moine | f985c70 | 2009-02-28 08:23:25 -0300 | [diff] [blame] | 3567 | MatrixT = mi1320_matrix; |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 3568 | switch (mode) { |
| 3569 | case 1: |
| 3570 | init = mi1310_socinitQVGA_JPG; /* 320x240 */ |
| 3571 | break; |
| 3572 | case 0: |
| 3573 | init = mi1310_socinitVGA_JPG; /* 640x480 */ |
| 3574 | break; |
| 3575 | default: |
Jean-Francois Moine | db786a3 | 2009-03-23 06:03:52 -0300 | [diff] [blame] | 3576 | init = mi1310_soc_InitSXGA_JPG; /* 1280x1024 */ |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 3577 | break; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3578 | } |
| 3579 | break; |
| 3580 | case SENSOR_MI1320: |
| 3581 | GammaT = mi1320_gamma; |
| 3582 | MatrixT = mi1320_matrix; |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 3583 | if (mode) |
| 3584 | init = mi1320_initQVGA_data; /* 320x240 */ |
| 3585 | else |
| 3586 | init = mi1320_initVGA_data; /* 640x480 */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3587 | break; |
Jean-Francois Moine | db786a3 | 2009-03-23 06:03:52 -0300 | [diff] [blame] | 3588 | case SENSOR_MI1320_SOC: |
| 3589 | GammaT = mi1320_gamma; |
| 3590 | MatrixT = mi1320_matrix; |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3591 | init = mi1320_soc_init[mode]; |
Jean-Francois Moine | db786a3 | 2009-03-23 06:03:52 -0300 | [diff] [blame] | 3592 | break; |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 3593 | case SENSOR_OV7670: |
| 3594 | init = mode == 1 ? ov7670_InitVGA : ov7670_InitQVGA; |
| 3595 | break; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3596 | case SENSOR_PO3130NC: |
| 3597 | GammaT = po3130_gamma; |
| 3598 | MatrixT = po3130_matrix; |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 3599 | if (mode) |
| 3600 | init = po3130_initQVGA_data; /* 320x240 */ |
| 3601 | else |
| 3602 | init = po3130_initVGA_data; /* 640x480 */ |
| 3603 | usb_exchange(gspca_dev, init); |
| 3604 | init = po3130_rundata; |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 3605 | break; |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3606 | case SENSOR_PO1200: |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 3607 | GammaT = po1200_gamma; |
| 3608 | MatrixT = po1200_matrix; |
| 3609 | init = po1200_initVGA_data; |
| 3610 | break; |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3611 | default: |
| 3612 | /* case SENSOR_POxxxx: */ |
| 3613 | usb_exchange(gspca_dev, poxxxx_init_common); |
| 3614 | if (mode) |
| 3615 | init = poxxxx_initQVGA; |
| 3616 | else |
| 3617 | init = poxxxx_initVGA; |
| 3618 | usb_exchange(gspca_dev, init); |
| 3619 | reg_r(gspca_dev, 0x8c, 0x0000, 3); |
| 3620 | reg_w(gspca_dev->dev, 0xa0, |
| 3621 | gspca_dev->usb_buf[2] & 1 ? 0 : 1, |
| 3622 | 0xb35c); |
| 3623 | msleep(300); |
| 3624 | /*fixme: i2c read 04 and 05*/ |
| 3625 | init = poxxxx_init_end_1; |
| 3626 | break; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3627 | } |
Jean-Francois Moine | 6af4e7a | 2009-01-29 16:34:25 -0300 | [diff] [blame] | 3628 | usb_exchange(gspca_dev, init); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3629 | if (GammaT && MatrixT) { |
| 3630 | put_tab_to_reg(gspca_dev, GammaT, 17, 0xb84a); |
| 3631 | put_tab_to_reg(gspca_dev, GammaT, 17, 0xb85b); |
| 3632 | put_tab_to_reg(gspca_dev, GammaT, 17, 0xb86c); |
| 3633 | put_tab_to_reg(gspca_dev, MatrixT, 9, 0xb82c); |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3634 | |
Jean-Francois Moine | ae310ee | 2009-09-01 14:02:22 -0300 | [diff] [blame] | 3635 | switch (sd->sensor) { |
| 3636 | case SENSOR_PO1200: |
| 3637 | case SENSOR_HV7131R: |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 3638 | reg_w(gspca_dev->dev, 0x89, 0x0400, 0x1415); |
Jean-Francois Moine | ae310ee | 2009-09-01 14:02:22 -0300 | [diff] [blame] | 3639 | break; |
| 3640 | case SENSOR_MI1310_SOC: |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 3641 | reg_w(gspca_dev->dev, 0x89, 0x058c, 0x0000); |
Jean-Francois Moine | ae310ee | 2009-09-01 14:02:22 -0300 | [diff] [blame] | 3642 | break; |
Jean-Francois Moine | 8852153 | 2008-12-10 05:06:13 -0300 | [diff] [blame] | 3643 | } |
Jean-Francois Moine | ae310ee | 2009-09-01 14:02:22 -0300 | [diff] [blame] | 3644 | msleep(100); |
| 3645 | setsharpness(gspca_dev); |
| 3646 | sethvflip(gspca_dev); |
| 3647 | setlightfreq(gspca_dev); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3648 | } |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 3649 | switch (sd->sensor) { |
| 3650 | case SENSOR_OV7670: |
| 3651 | reg_w(gspca_dev->dev, 0x87, 0xffff, 0xffff); |
| 3652 | reg_w(gspca_dev->dev, 0x88, 0xff00, 0xf0f1); |
| 3653 | reg_w(gspca_dev->dev, 0xa0, 0x0000, 0xbfff); |
| 3654 | break; |
| 3655 | case SENSOR_POxxxx: |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3656 | setcolors(gspca_dev); |
| 3657 | setbrightness(gspca_dev); |
| 3658 | setcontrast(gspca_dev); |
| 3659 | |
| 3660 | /* led on */ |
| 3661 | msleep(80); |
| 3662 | reg_w(gspca_dev->dev, 0x89, 0xffff, 0xfdff); |
| 3663 | usb_exchange(gspca_dev, poxxxx_init_end_2); |
Jean-François Moine | 5624c64 | 2010-04-02 07:12:42 -0300 | [diff] [blame] | 3664 | break; |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3665 | } |
Jean-Francois Moine | 72ab97c | 2008-09-20 06:39:08 -0300 | [diff] [blame] | 3666 | return 0; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3667 | } |
| 3668 | |
| 3669 | static void sd_stopN(struct gspca_dev *gspca_dev) |
| 3670 | { |
| 3671 | struct usb_device *dev = gspca_dev->dev; |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 3672 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3673 | |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3674 | switch (sd->sensor) { |
| 3675 | case SENSOR_MI1310_SOC: |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 3676 | reg_w(dev, 0x89, 0x058c, 0x00ff); |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3677 | break; |
| 3678 | case SENSOR_POxxxx: |
| 3679 | return; |
| 3680 | default: |
| 3681 | if (!(sd->flags & FL_SAMSUNG)) |
| 3682 | reg_w(dev, 0x89, 0xffff, 0xffff); |
| 3683 | break; |
| 3684 | } |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3685 | reg_w(dev, 0xa0, 0x01, 0xb301); |
| 3686 | reg_w(dev, 0xa0, 0x09, 0xb003); |
| 3687 | } |
| 3688 | |
Jean-Francois Moine | 98522a7 | 2008-11-18 06:33:08 -0300 | [diff] [blame] | 3689 | /* called on streamoff with alt 0 and on disconnect */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3690 | static void sd_stop0(struct gspca_dev *gspca_dev) |
| 3691 | { |
| 3692 | struct usb_device *dev = gspca_dev->dev; |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 3693 | struct sd *sd = (struct sd *) gspca_dev; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3694 | |
Jean-Francois Moine | 98522a7 | 2008-11-18 06:33:08 -0300 | [diff] [blame] | 3695 | if (!gspca_dev->present) |
| 3696 | return; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3697 | /*fixme: is this useful?*/ |
| 3698 | if (sd->sensor == SENSOR_MI1310_SOC) |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 3699 | reg_w(dev, 0x89, 0x058c, 0x00ff); |
Jean-Francois Moine | ba624ce | 2009-09-03 13:46:59 -0300 | [diff] [blame] | 3700 | else if (!(sd->flags & FL_SAMSUNG)) |
AceLan Kao | 4041f6b | 2009-07-27 05:43:55 -0300 | [diff] [blame] | 3701 | reg_w(dev, 0x89, 0xffff, 0xffff); |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3702 | |
| 3703 | if (sd->sensor == SENSOR_POxxxx) { |
| 3704 | reg_w(dev, 0xa0, 0x26, 0xb300); |
| 3705 | reg_w(dev, 0xa0, 0x04, 0xb300); |
| 3706 | reg_w(dev, 0xa0, 0x00, 0xb300); |
| 3707 | } |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3708 | } |
| 3709 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3710 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3711 | u8 *data, /* isoc packet */ |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3712 | int len) /* iso pkt length */ |
| 3713 | { |
| 3714 | struct sd *sd = (struct sd *) gspca_dev; |
| 3715 | |
| 3716 | if (data[0] == 0xff && data[1] == 0xd8) { |
| 3717 | PDEBUG(D_PACK, |
| 3718 | "vc032x header packet found len %d", len); |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 3719 | gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); |
Jean-Francois Moine | 58e2ded | 2009-03-25 07:06:29 -0300 | [diff] [blame] | 3720 | data += sd->image_offset; |
| 3721 | len -= sd->image_offset; |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 3722 | gspca_frame_add(gspca_dev, FIRST_PACKET, data, len); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3723 | return; |
| 3724 | } |
Hans de Goede | d473a00 | 2008-12-11 05:02:18 -0300 | [diff] [blame] | 3725 | |
| 3726 | /* The vc0321 sends some additional data after sending the complete |
| 3727 | * frame, we ignore this. */ |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 3728 | if (sd->bridge == BRIDGE_VC0321) { |
| 3729 | struct gspca_frame *frame; |
| 3730 | int l; |
| 3731 | |
| 3732 | frame = gspca_get_i_frame(gspca_dev); |
Jean-Francois Moine | 9501843 | 2009-12-26 08:41:17 -0300 | [diff] [blame] | 3733 | if (frame == NULL) { |
| 3734 | gspca_dev->last_packet_type = DISCARD_PACKET; |
| 3735 | return; |
| 3736 | } |
Jean-Francois Moine | 76dd272 | 2009-11-13 09:21:03 -0300 | [diff] [blame] | 3737 | l = frame->data_end - frame->data; |
| 3738 | if (len > frame->v4l2_buf.length - l) |
| 3739 | len = frame->v4l2_buf.length - l; |
| 3740 | } |
| 3741 | gspca_frame_add(gspca_dev, INTER_PACKET, data, len); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3742 | } |
| 3743 | |
Jean-Francois Moine | 83c94a1 | 2009-12-26 16:07:24 -0300 | [diff] [blame] | 3744 | static int sd_setbrightness(struct gspca_dev *gspca_dev, __s32 val) |
| 3745 | { |
| 3746 | struct sd *sd = (struct sd *) gspca_dev; |
| 3747 | |
| 3748 | sd->brightness = val; |
| 3749 | if (gspca_dev->streaming) |
| 3750 | setbrightness(gspca_dev); |
| 3751 | return 0; |
| 3752 | } |
| 3753 | |
| 3754 | static int sd_getbrightness(struct gspca_dev *gspca_dev, __s32 *val) |
| 3755 | { |
| 3756 | struct sd *sd = (struct sd *) gspca_dev; |
| 3757 | |
| 3758 | *val = sd->brightness; |
| 3759 | return 0; |
| 3760 | } |
| 3761 | |
| 3762 | static int sd_setcontrast(struct gspca_dev *gspca_dev, __s32 val) |
| 3763 | { |
| 3764 | struct sd *sd = (struct sd *) gspca_dev; |
| 3765 | |
| 3766 | sd->contrast = val; |
| 3767 | if (gspca_dev->streaming) |
| 3768 | setcontrast(gspca_dev); |
| 3769 | return 0; |
| 3770 | } |
| 3771 | |
| 3772 | static int sd_getcontrast(struct gspca_dev *gspca_dev, __s32 *val) |
| 3773 | { |
| 3774 | struct sd *sd = (struct sd *) gspca_dev; |
| 3775 | |
| 3776 | *val = sd->contrast; |
| 3777 | return 0; |
| 3778 | } |
| 3779 | |
| 3780 | static int sd_setcolors(struct gspca_dev *gspca_dev, __s32 val) |
| 3781 | { |
| 3782 | struct sd *sd = (struct sd *) gspca_dev; |
| 3783 | |
| 3784 | sd->colors = val; |
| 3785 | if (gspca_dev->streaming) |
| 3786 | setcolors(gspca_dev); |
| 3787 | return 0; |
| 3788 | } |
| 3789 | |
| 3790 | static int sd_getcolors(struct gspca_dev *gspca_dev, __s32 *val) |
| 3791 | { |
| 3792 | struct sd *sd = (struct sd *) gspca_dev; |
| 3793 | |
| 3794 | *val = sd->colors; |
| 3795 | return 0; |
| 3796 | } |
| 3797 | |
Jean-Francois Moine | 7dc7ad3 | 2008-12-08 05:13:53 -0300 | [diff] [blame] | 3798 | static int sd_sethflip(struct gspca_dev *gspca_dev, __s32 val) |
| 3799 | { |
| 3800 | struct sd *sd = (struct sd *) gspca_dev; |
| 3801 | |
| 3802 | sd->hflip = val; |
| 3803 | if (gspca_dev->streaming) |
| 3804 | sethvflip(gspca_dev); |
| 3805 | return 0; |
| 3806 | } |
| 3807 | |
| 3808 | static int sd_gethflip(struct gspca_dev *gspca_dev, __s32 *val) |
| 3809 | { |
| 3810 | struct sd *sd = (struct sd *) gspca_dev; |
| 3811 | |
| 3812 | *val = sd->hflip; |
| 3813 | return 0; |
| 3814 | } |
| 3815 | |
| 3816 | static int sd_setvflip(struct gspca_dev *gspca_dev, __s32 val) |
| 3817 | { |
| 3818 | struct sd *sd = (struct sd *) gspca_dev; |
| 3819 | |
| 3820 | sd->vflip = val; |
| 3821 | if (gspca_dev->streaming) |
| 3822 | sethvflip(gspca_dev); |
| 3823 | return 0; |
| 3824 | } |
| 3825 | |
| 3826 | static int sd_getvflip(struct gspca_dev *gspca_dev, __s32 *val) |
| 3827 | { |
| 3828 | struct sd *sd = (struct sd *) gspca_dev; |
| 3829 | |
| 3830 | *val = sd->vflip; |
| 3831 | return 0; |
| 3832 | } |
| 3833 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3834 | static int sd_setfreq(struct gspca_dev *gspca_dev, __s32 val) |
| 3835 | { |
| 3836 | struct sd *sd = (struct sd *) gspca_dev; |
| 3837 | |
| 3838 | sd->lightfreq = val; |
| 3839 | if (gspca_dev->streaming) |
| 3840 | setlightfreq(gspca_dev); |
| 3841 | return 0; |
| 3842 | } |
| 3843 | |
| 3844 | static int sd_getfreq(struct gspca_dev *gspca_dev, __s32 *val) |
| 3845 | { |
| 3846 | struct sd *sd = (struct sd *) gspca_dev; |
| 3847 | |
| 3848 | *val = sd->lightfreq; |
| 3849 | return 0; |
| 3850 | } |
| 3851 | |
Jean-Francois Moine | 47a42b0 | 2008-12-13 07:45:34 -0300 | [diff] [blame] | 3852 | static int sd_setsharpness(struct gspca_dev *gspca_dev, __s32 val) |
| 3853 | { |
| 3854 | struct sd *sd = (struct sd *) gspca_dev; |
| 3855 | |
| 3856 | sd->sharpness = val; |
| 3857 | if (gspca_dev->streaming) |
| 3858 | setsharpness(gspca_dev); |
| 3859 | return 0; |
| 3860 | } |
| 3861 | |
| 3862 | static int sd_getsharpness(struct gspca_dev *gspca_dev, __s32 *val) |
| 3863 | { |
| 3864 | struct sd *sd = (struct sd *) gspca_dev; |
| 3865 | |
| 3866 | *val = sd->sharpness; |
| 3867 | return 0; |
| 3868 | } |
| 3869 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3870 | static int sd_querymenu(struct gspca_dev *gspca_dev, |
| 3871 | struct v4l2_querymenu *menu) |
| 3872 | { |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3873 | static const char *freq_nm[3] = {"NoFliker", "50 Hz", "60 Hz"}; |
| 3874 | |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3875 | switch (menu->id) { |
| 3876 | case V4L2_CID_POWER_LINE_FREQUENCY: |
Jean-Francois Moine | 6afd2aa | 2009-11-24 06:13:28 -0300 | [diff] [blame] | 3877 | if (menu->index >= ARRAY_SIZE(freq_nm)) |
| 3878 | break; |
Jean-Francois Moine | 8b605f1 | 2009-07-27 06:28:37 -0300 | [diff] [blame] | 3879 | strcpy((char *) menu->name, freq_nm[menu->index]); |
| 3880 | return 0; |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3881 | } |
| 3882 | return -EINVAL; |
| 3883 | } |
| 3884 | |
| 3885 | /* sub-driver description */ |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3886 | static const struct sd_desc sd_desc = { |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3887 | .name = MODULE_NAME, |
| 3888 | .ctrls = sd_ctrls, |
| 3889 | .nctrls = ARRAY_SIZE(sd_ctrls), |
| 3890 | .config = sd_config, |
Jean-Francois Moine | 012d6b0 | 2008-09-03 17:12:16 -0300 | [diff] [blame] | 3891 | .init = sd_init, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3892 | .start = sd_start, |
| 3893 | .stopN = sd_stopN, |
| 3894 | .stop0 = sd_stop0, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3895 | .pkt_scan = sd_pkt_scan, |
| 3896 | .querymenu = sd_querymenu, |
| 3897 | }; |
| 3898 | |
| 3899 | /* -- module initialisation -- */ |
Jean-Francois Moine | 1852e75 | 2009-06-27 05:33:48 -0300 | [diff] [blame] | 3900 | #define BF(bridge, flags) \ |
| 3901 | .driver_info = (BRIDGE_ ## bridge << 8) \ |
| 3902 | | (flags) |
Jean-Francois Moine | a5ae206 | 2008-07-04 11:16:16 -0300 | [diff] [blame] | 3903 | static const __devinitdata struct usb_device_id device_table[] = { |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3904 | {USB_DEVICE(0x041e, 0x405b), BF(VC0323, FL_VFLIP)}, |
Jean-Francois Moine | 1852e75 | 2009-06-27 05:33:48 -0300 | [diff] [blame] | 3905 | {USB_DEVICE(0x046d, 0x0892), BF(VC0321, 0)}, |
| 3906 | {USB_DEVICE(0x046d, 0x0896), BF(VC0321, 0)}, |
| 3907 | {USB_DEVICE(0x046d, 0x0897), BF(VC0321, 0)}, |
| 3908 | {USB_DEVICE(0x0ac8, 0x0321), BF(VC0321, 0)}, |
| 3909 | {USB_DEVICE(0x0ac8, 0x0323), BF(VC0323, 0)}, |
| 3910 | {USB_DEVICE(0x0ac8, 0x0328), BF(VC0321, 0)}, |
| 3911 | {USB_DEVICE(0x0ac8, 0xc001), BF(VC0321, 0)}, |
| 3912 | {USB_DEVICE(0x0ac8, 0xc002), BF(VC0321, 0)}, |
Jean-Francois Moine | e27188e | 2009-07-27 06:00:03 -0300 | [diff] [blame] | 3913 | {USB_DEVICE(0x0ac8, 0xc301), BF(VC0323, FL_SAMSUNG)}, |
Jean-Francois Moine | 1852e75 | 2009-06-27 05:33:48 -0300 | [diff] [blame] | 3914 | {USB_DEVICE(0x15b8, 0x6001), BF(VC0323, 0)}, |
| 3915 | {USB_DEVICE(0x15b8, 0x6002), BF(VC0323, 0)}, |
| 3916 | {USB_DEVICE(0x17ef, 0x4802), BF(VC0323, 0)}, |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3917 | {} |
| 3918 | }; |
| 3919 | MODULE_DEVICE_TABLE(usb, device_table); |
| 3920 | |
| 3921 | /* -- device connect -- */ |
| 3922 | static int sd_probe(struct usb_interface *intf, |
| 3923 | const struct usb_device_id *id) |
| 3924 | { |
| 3925 | return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd), |
| 3926 | THIS_MODULE); |
| 3927 | } |
| 3928 | |
| 3929 | static struct usb_driver sd_driver = { |
| 3930 | .name = MODULE_NAME, |
| 3931 | .id_table = device_table, |
| 3932 | .probe = sd_probe, |
| 3933 | .disconnect = gspca_disconnect, |
Jean-Francois Moine | 6a70974 | 2008-09-03 16:48:10 -0300 | [diff] [blame] | 3934 | #ifdef CONFIG_PM |
| 3935 | .suspend = gspca_suspend, |
| 3936 | .resume = gspca_resume, |
| 3937 | #endif |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3938 | }; |
| 3939 | |
| 3940 | /* -- module insert / remove -- */ |
| 3941 | static int __init sd_mod_init(void) |
| 3942 | { |
Alexey Klimov | f69e952 | 2009-01-01 13:02:07 -0300 | [diff] [blame] | 3943 | int ret; |
Jean-Francois Moine | 49796e4 | 2009-02-02 06:33:31 -0300 | [diff] [blame] | 3944 | |
Alexey Klimov | f69e952 | 2009-01-01 13:02:07 -0300 | [diff] [blame] | 3945 | ret = usb_register(&sd_driver); |
| 3946 | if (ret < 0) |
Alexey Klimov | e6b1484 | 2009-01-01 13:04:58 -0300 | [diff] [blame] | 3947 | return ret; |
Jean-Francois Moine | 10b0e96 | 2008-07-22 05:35:10 -0300 | [diff] [blame] | 3948 | PDEBUG(D_PROBE, "registered"); |
Jean-Francois Moine | 6a7eba2 | 2008-06-30 15:50:11 -0300 | [diff] [blame] | 3949 | return 0; |
| 3950 | } |
| 3951 | static void __exit sd_mod_exit(void) |
| 3952 | { |
| 3953 | usb_deregister(&sd_driver); |
| 3954 | PDEBUG(D_PROBE, "deregistered"); |
| 3955 | } |
| 3956 | |
| 3957 | module_init(sd_mod_init); |
| 3958 | module_exit(sd_mod_exit); |