ARM64: DTS: Add rk3399-firefly uart4 device, node as /dev/ttyS1
[firefly-linux-kernel-4.4.55.git] / drivers / media / video / hm5065.c
1  #include "generic_sensor.h"
2
3 /*
4 *      Driver Version Note
5 *v0.0.1: this driver is compatible with generic_sensor
6 *v0.1.1:
7 *        add sensor_focus_af_const_pause_usr_cb;
8 */
9 static int version = KERNEL_VERSION(0,1,1);
10 module_param(version, int, S_IRUGO);
11
12
13 static int debug=1;
14 module_param(debug, int, S_IRUGO|S_IWUSR);
15
16 #define dprintk(level, fmt, arg...) do {                        \
17         if (debug >= level)                                     \
18         printk(KERN_WARNING fmt , ## arg); } while (0)
19
20 /* Sensor Driver Configuration Begin */
21 #define SENSOR_NAME RK29_CAM_SENSOR_HM5065
22 #define SENSOR_V4L2_IDENT V4L2_IDENT_HM5065
23 #define SENSOR_ID 0x039E
24 #define SENSOR_BUS_PARAM                     (V4L2_MBUS_MASTER |\
25                                                                                                                          V4L2_MBUS_PCLK_SAMPLE_RISING|V4L2_MBUS_HSYNC_ACTIVE_HIGH| V4L2_MBUS_VSYNC_ACTIVE_LOW|\
26                                                                                                                          V4L2_MBUS_DATA_ACTIVE_HIGH  |SOCAM_MCLK_24MHZ)
27 #define SENSOR_PREVIEW_W                                        1280 //800
28 #define SENSOR_PREVIEW_H                                         960//600
29 #define SENSOR_PREVIEW_FPS                                       15000     // 15fps 
30 #define SENSOR_FULLRES_L_FPS                             7500      // 7.5fps
31 #define SENSOR_FULLRES_H_FPS                             7500      // 7.5fps
32 #define SENSOR_720P_FPS                                          30000
33 #define SENSOR_1080P_FPS                                         15000
34
35 #define SENSOR_REGISTER_LEN                              2                 // sensor register address bytes
36 #define SENSOR_VALUE_LEN                                         1                 // sensor register value bytes
37
38 #define  SENSOR_AF_CONFIG     1
39
40 #ifdef  SENSOR_AF_CONFIG                                                                
41 static unsigned int SensorConfiguration = (CFG_WhiteBalance|CFG_Effect
42                                            |CFG_Scene|CFG_Focus|CFG_FocusContinues
43                                            |CFG_FocusZone);
44
45 #else
46 static unsigned int SensorConfiguration = (CFG_WhiteBalance|CFG_Effect
47                                            |CFG_Scene);
48 #endif
49
50 static unsigned int SensorChipID[] = {SENSOR_ID};
51 /* Sensor Driver Configuration End */
52
53
54 #define SENSOR_NAME_STRING(a) STR(CONS(SENSOR_NAME, a))
55 #define SENSOR_NAME_VARFUN(a) CONS(SENSOR_NAME, a)
56
57 #define SensorRegVal(a,b) CONS4(SensorReg,SENSOR_REGISTER_LEN,Val,SENSOR_VALUE_LEN)(a,b)
58 #define sensor_write(client,reg,v) CONS4(sensor_write_reg,SENSOR_REGISTER_LEN,val,SENSOR_VALUE_LEN)(client,(reg),(v))
59 #define sensor_read(client,reg,v) CONS4(sensor_read_reg,SENSOR_REGISTER_LEN,val,SENSOR_VALUE_LEN)(client,(reg),(v))
60 #define sensor_write_array generic_sensor_write_array
61
62
63 /* hm5065 VCM Command and Status Registers */
64 #define AF_TARGETPOS_REG_H         0x0700
65 #define AF_TARGETPOS_REG_L         0x0701
66
67 #define AF_MODES_REG               0x070A
68 #define AF_AUTOCMDS_REG            0x070b
69 #define AF_LENSPOS_REG_H           0x06F0
70 #define AF_LENSPOS_REG_L           0x06F1
71 #define AF_MANUCMDS_REG            0x070c
72 #define AF_FINISHCHK_REG           0x07ae   //[0]: false    [1] : true
73
74 #define FACE_LC                    0x0714   //[0] : focus , [1] : AE Â\93\84Ó
75 #define FACE_START_XH              0x0715
76 #define FACE_START_XL              0x0716
77 #define FACE_SIZE_XH               0x0717
78 #define FACE_SIZE_XL               0x0718
79 #define FACE_START_YH              0x0719
80 #define FACE_START_YL              0x071A
81 #define FACE_SIZE_YH               0x071B
82 #define FACE_SIZE_YL               0x071C
83
84
85 #define AF_ZONE0_WEIGHT            0x0808
86 #define AF_ZONE1_WEIGHT            0x0809
87 #define AF_ZONE2_WEIGHT            0x080A
88 #define AF_ZONE3_WEIGHT            0x080B
89 #define AF_ZONE4_WEIGHT            0x080C
90 #define AF_ZONE5_WEIGHT            0x080D
91 #define AF_ZONE6_WEIGHT            0x080E
92
93
94 struct sensor_parameter
95 {
96     int af_pos[2];
97 };
98
99 struct specific_sensor{
100         struct generic_sensor common_sensor;
101         //define user data below
102         struct sensor_parameter parameter;
103
104 };
105
106 /*
107 *  The follow setting need been filled.
108 *  
109 *  Must Filled:
110 *  sensor_init_data :                           Sensor initial setting;
111 *  sensor_fullres_lowfps_data :         Sensor full resolution setting with best auality, recommand for video;
112 *  sensor_preview_data :                        Sensor preview resolution setting, recommand it is vga or svga;
113 *  sensor_softreset_data :                      Sensor software reset register;
114 *  sensor_check_id_data :                       Sensir chip id register;
115 *
116 *  Optional filled:
117 *  sensor_fullres_highfps_data:         Sensor full resolution setting with high framerate, recommand for video;
118 *  sensor_720p:                                         Sensor 720p setting, it is for video;
119 *  sensor_1080p:                                        Sensor 1080p setting, it is for video;
120 *
121 *  :::::WARNING:::::
122 *  The SensorEnd which is the setting end flag must be filled int the last of each setting;
123 */
124
125 /* Sensor initial setting */
126 static struct rk_sensor_reg sensor_init_data[] = {
127
128         {0xffff,0x01},    // 2013-03-01 Start new patch 
129         {0x9000,0x03}, 
130         {0xA000,0x90}, 
131         {0xA001,0x0C}, 
132         {0xA002,0x56}, 
133         {0xA003,0xE0}, 
134         {0xA004,0xFE}, 
135         {0xA005,0xA3}, 
136         {0xA006,0xE0}, 
137         {0xA007,0xFF}, 
138         {0xA008,0x12}, 
139         {0xA009,0x42}, 
140         {0xA00A,0x85}, 
141         {0xA00B,0x90}, 
142         {0xA00C,0x01}, 
143         {0xA00D,0xB7}, 
144         {0xA00E,0xEE}, 
145         {0xA00F,0xF0}, 
146         {0xA010,0xFC}, 
147         {0xA011,0xA3}, 
148         {0xA012,0xEF}, 
149         {0xA013,0xF0}, 
150         {0xA014,0xFD}, 
151         {0xA015,0x90}, 
152         {0xA016,0x06}, 
153         {0xA017,0x05}, 
154         {0xA018,0xE0}, 
155         {0xA019,0x75}, 
156         {0xA01A,0xF0}, 
157         {0xA01B,0x02}, 
158         {0xA01C,0xA4}, 
159         {0xA01D,0x2D}, 
160         {0xA01E,0xFF}, 
161         {0xA01F,0xE5}, 
162         {0xA020,0xF0}, 
163         {0xA021,0x3C}, 
164         {0xA022,0xFE}, 
165         {0xA023,0xAB}, 
166         {0xA024,0x07}, 
167         {0xA025,0xFA}, 
168         {0xA026,0x33}, 
169         {0xA027,0x95}, 
170         {0xA028,0xE0}, 
171         {0xA029,0xF9}, 
172         {0xA02A,0xF8}, 
173         {0xA02B,0x90}, 
174         {0xA02C,0x0B}, 
175         {0xA02D,0x4B}, 
176         {0xA02E,0xE0}, 
177         {0xA02F,0xFE}, 
178         {0xA030,0xA3}, 
179         {0xA031,0xE0}, 
180         {0xA032,0xFF}, 
181         {0xA033,0xEE}, 
182         {0xA034,0x33}, 
183         {0xA035,0x95}, 
184         {0xA036,0xE0}, 
185         {0xA037,0xFD}, 
186         {0xA038,0xFC}, 
187         {0xA039,0x12}, 
188         {0xA03A,0x0C}, 
189         {0xA03B,0x7B}, 
190         {0xA03C,0x90}, 
191         {0xA03D,0x01}, 
192         {0xA03E,0xB9}, 
193         {0xA03F,0x12}, 
194         {0xA040,0x0E}, 
195         {0xA041,0x05}, 
196         {0xA042,0x90}, 
197         {0xA043,0x01}, 
198         {0xA044,0xB9}, 
199         {0xA045,0xE0}, 
200         {0xA046,0xFC}, 
201         {0xA047,0xA3}, 
202         {0xA048,0xE0}, 
203         {0xA049,0xFD}, 
204         {0xA04A,0xA3}, 
205         {0xA04B,0xE0}, 
206         {0xA04C,0xFE}, 
207         {0xA04D,0xA3}, 
208         {0xA04E,0xE0}, 
209         {0xA04F,0xFF}, 
210         {0xA050,0x78}, 
211         {0xA051,0x08}, 
212         {0xA052,0x12}, 
213         {0xA053,0x0D}, 
214         {0xA054,0xBF}, 
215         {0xA055,0xA8}, 
216         {0xA056,0x04}, 
217         {0xA057,0xA9}, 
218         {0xA058,0x05}, 
219         {0xA059,0xAA}, 
220         {0xA05A,0x06}, 
221         {0xA05B,0xAB}, 
222         {0xA05C,0x07}, 
223         {0xA05D,0x90}, 
224         {0xA05E,0x0B}, 
225         {0xA05F,0x49}, 
226         {0xA060,0xE0}, 
227         {0xA061,0xFE}, 
228         {0xA062,0xA3}, 
229         {0xA063,0xE0}, 
230         {0xA064,0xFF}, 
231         {0xA065,0xEE}, 
232         {0xA066,0x33}, 
233         {0xA067,0x95}, 
234         {0xA068,0xE0}, 
235         {0xA069,0xFD}, 
236         {0xA06A,0xFC}, 
237         {0xA06B,0xC3}, 
238         {0xA06C,0xEF}, 
239         {0xA06D,0x9B}, 
240         {0xA06E,0xFF}, 
241         {0xA06F,0xEE}, 
242         {0xA070,0x9A}, 
243         {0xA071,0xFE}, 
244         {0xA072,0xED}, 
245         {0xA073,0x99}, 
246         {0xA074,0xFD}, 
247         {0xA075,0xEC}, 
248         {0xA076,0x98}, 
249         {0xA077,0xFC}, 
250         {0xA078,0x78}, 
251         {0xA079,0x01}, 
252         {0xA07A,0x12}, 
253         {0xA07B,0x0D}, 
254         {0xA07C,0xBF}, 
255         {0xA07D,0x90}, 
256         {0xA07E,0x0C}, 
257         {0xA07F,0x4A}, 
258         {0xA080,0xE0}, 
259         {0xA081,0xFC}, 
260         {0xA082,0xA3}, 
261         {0xA083,0xE0}, 
262         {0xA084,0xF5}, 
263         {0xA085,0x82}, 
264         {0xA086,0x8C}, 
265         {0xA087,0x83}, 
266         {0xA088,0xC0}, 
267         {0xA089,0x83}, 
268         {0xA08A,0xC0}, 
269         {0xA08B,0x82}, 
270         {0xA08C,0x90}, 
271         {0xA08D,0x0B}, 
272         {0xA08E,0x48}, 
273         {0xA08F,0xE0}, 
274         {0xA090,0xD0}, 
275         {0xA091,0x82}, 
276         {0xA092,0xD0}, 
277         {0xA093,0x83}, 
278         {0xA094,0x75}, 
279         {0xA095,0xF0}, 
280         {0xA096,0x02}, 
281         {0xA097,0x12}, 
282         {0xA098,0x0E}, 
283         {0xA099,0x45}, 
284         {0xA09A,0xEE}, 
285         {0xA09B,0xF0}, 
286         {0xA09C,0xA3}, 
287         {0xA09D,0xEF}, 
288         {0xA09E,0xF0}, 
289         {0xA09F,0x02}, 
290         {0xA0A0,0xBA}, 
291         {0xA0A1,0xD8}, 
292         {0xA0A2,0x90}, 
293         {0xA0A3,0x30}, 
294         {0xA0A4,0x18}, 
295         {0xA0A5,0xe4}, 
296         {0xA0A6,0xf0}, 
297         {0xA0A7,0x74}, 
298         {0xA0A8,0x3f}, 
299         {0xA0A9,0xf0}, 
300         {0xA0AA,0x22}, 
301         {0xA0BF,0x90}, 
302         {0xA0C0,0x00}, 
303         {0xA0C1,0x5E}, 
304         {0xA0C2,0xE0}, 
305         {0xA0C3,0xFF}, 
306         {0xA0C4,0x70}, 
307         {0xA0C5,0x20}, 
308         {0xA0C6,0x90}, 
309         {0xA0C7,0x47}, 
310         {0xA0C8,0x04}, 
311         {0xA0C9,0x74}, 
312         {0xA0CA,0x0A}, 
313         {0xA0CB,0xF0}, 
314         {0xA0CC,0xA3}, 
315         {0xA0CD,0x74}, 
316         {0xA0CE,0x30}, 
317         {0xA0CF,0xF0}, 
318         {0xA0D0,0x90}, 
319         {0xA0D1,0x47}, 
320         {0xA0D2,0x0C}, 
321         {0xA0D3,0x74}, 
322         {0xA0D4,0x07}, 
323         {0xA0D5,0xF0}, 
324         {0xA0D6,0xA3}, 
325         {0xA0D7,0x74}, 
326         {0xA0D8,0xA8}, 
327         {0xA0D9,0xF0}, 
328         {0xA0DA,0x90}, 
329         {0xA0DB,0x47}, 
330         {0xA0DC,0xA4}, 
331         {0xA0DD,0x74}, 
332         {0xA0DE,0x01}, 
333         {0xA0DF,0xF0}, 
334         {0xA0E0,0x90}, 
335         {0xA0E1,0x47}, 
336         {0xA0E2,0xA8}, 
337         {0xA0E3,0xF0}, 
338         {0xA0E4,0x80}, 
339         {0xA0E5,0x50}, 
340         {0xA0E6,0xEF}, 
341         {0xA0E7,0x64}, 
342         {0xA0E8,0x01}, 
343         {0xA0E9,0x60}, 
344         {0xA0EA,0x04}, 
345         {0xA0EB,0xEF}, 
346         {0xA0EC,0xB4}, 
347         {0xA0ED,0x03}, 
348         {0xA0EE,0x20}, 
349         {0xA0EF,0x90}, 
350         {0xA0F0,0x47}, 
351         {0xA0F1,0x04}, 
352         {0xA0F2,0x74}, 
353         {0xA0F3,0x05}, 
354         {0xA0F4,0xF0}, 
355         {0xA0F5,0xA3}, 
356         {0xA0F6,0x74}, 
357         {0xA0F7,0x18}, 
358         {0xA0F8,0xF0}, 
359         {0xA0F9,0x90}, 
360         {0xA0FA,0x47}, 
361         {0xA0FB,0x0C}, 
362         {0xA0FC,0x74}, 
363         {0xA0FD,0x03}, 
364         {0xA0FE,0xF0}, 
365         {0xA0FF,0xA3}, 
366         {0xA100,0x74}, 
367         {0xA101,0xD4}, 
368         {0xA102,0xF0}, 
369         {0xA103,0x90}, 
370         {0xA104,0x47}, 
371         {0xA105,0xA4}, 
372         {0xA106,0x74}, 
373         {0xA107,0x02}, 
374         {0xA108,0xF0}, 
375         {0xA109,0x90}, 
376         {0xA10A,0x47}, 
377         {0xA10B,0xA8}, 
378         {0xA10C,0xF0}, 
379         {0xA10D,0x80}, 
380         {0xA10E,0x27}, 
381         {0xA10F,0xEF}, 
382         {0xA110,0x64}, 
383         {0xA111,0x02}, 
384         {0xA112,0x60}, 
385         {0xA113,0x04}, 
386         {0xA114,0xEF}, 
387         {0xA115,0xB4}, 
388         {0xA116,0x04}, 
389         {0xA117,0x1E}, 
390         {0xA118,0x90}, 
391         {0xA119,0x47}, 
392         {0xA11A,0x04}, 
393         {0xA11B,0x74}, 
394         {0xA11C,0x02}, 
395         {0xA11D,0xF0}, 
396         {0xA11E,0xA3}, 
397         {0xA11F,0x74}, 
398         {0xA120,0x8C}, 
399         {0xA121,0xF0}, 
400         {0xA122,0x90}, 
401         {0xA123,0x47}, 
402         {0xA124,0x0C}, 
403         {0xA125,0x74}, 
404         {0xA126,0x01}, 
405         {0xA127,0xF0}, 
406         {0xA128,0xA3}, 
407         {0xA129,0x74}, 
408         {0xA12A,0xEA}, 
409         {0xA12B,0xF0}, 
410         {0xA12C,0x90}, 
411         {0xA12D,0x47}, 
412         {0xA12E,0xA4}, 
413         {0xA12F,0x74}, 
414         {0xA130,0x04}, 
415         {0xA131,0xF0}, 
416         {0xA132,0x90}, 
417         {0xA133,0x47}, 
418         {0xA134,0xA8}, 
419         {0xA135,0xF0}, 
420         {0xA136,0x22}, 
421         {0xA137,0x74}, 
422         {0xA138,0x04}, 
423         {0xA139,0xF0}, 
424         {0xA13A,0xA3}, 
425         {0xA13B,0x74}, 
426         {0xA13C,0x20}, 
427         {0xA13D,0xF0}, 
428         {0xA13E,0xE4}, 
429         {0xA13F,0xF5}, 
430         {0xA140,0x22}, 
431         {0xA141,0xE5}, 
432         {0xA142,0x22}, 
433         {0xA143,0xC3}, 
434         {0xA144,0x94}, 
435         {0xA145,0x40}, 
436         {0xA146,0x40}, 
437         {0xA147,0x03}, 
438         {0xA148,0x02}, 
439         {0xA149,0xF1}, 
440         {0xA14A,0xFD}, 
441         {0xA14B,0x90}, 
442         {0xA14C,0x0A}, 
443         {0xA14D,0xBA}, 
444         {0xA14E,0xE0}, 
445         {0xA14F,0xFE}, 
446         {0xA150,0xA3}, 
447         {0xA151,0xE0}, 
448         {0xA152,0xFF}, 
449         {0xA153,0xF5}, 
450         {0xA154,0x82}, 
451         {0xA155,0x8E}, 
452         {0xA156,0x83}, 
453         {0xA157,0xE0}, 
454         {0xA158,0x54}, 
455         {0xA159,0x70}, 
456         {0xA15A,0xFD}, 
457         {0xA15B,0xC4}, 
458         {0xA15C,0x54}, 
459         {0xA15D,0x0F}, 
460         {0xA15E,0xFD}, 
461         {0xA15F,0x90}, 
462         {0xA160,0x0A}, 
463         {0xA161,0xBC}, 
464         {0xA162,0xE0}, 
465         {0xA163,0xFA}, 
466         {0xA164,0xA3}, 
467         {0xA165,0xE0}, 
468         {0xA166,0xF5}, 
469         {0xA167,0x82}, 
470         {0xA168,0x8A}, 
471         {0xA169,0x83}, 
472         {0xA16A,0xED}, 
473         {0xA16B,0xF0}, 
474         {0xA16C,0x90}, 
475         {0xA16D,0x0A}, 
476         {0xA16E,0xBD}, 
477         {0xA16F,0xE0}, 
478         {0xA170,0x04}, 
479         {0xA171,0xF0}, 
480         {0xA172,0x70}, 
481         {0xA173,0x06}, 
482         {0xA174,0x90}, 
483         {0xA175,0x0A}, 
484         {0xA176,0xBC}, 
485         {0xA177,0xE0}, 
486         {0xA178,0x04}, 
487         {0xA179,0xF0}, 
488         {0xA17A,0x8F}, 
489         {0xA17B,0x82}, 
490         {0xA17C,0x8E}, 
491         {0xA17D,0x83}, 
492         {0xA17E,0xA3}, 
493         {0xA17F,0xE0}, 
494         {0xA180,0xFF}, 
495         {0xA181,0x90}, 
496         {0xA182,0x0A}, 
497         {0xA183,0xBC}, 
498         {0xA184,0xE0}, 
499         {0xA185,0xFC}, 
500         {0xA186,0xA3}, 
501         {0xA187,0xE0}, 
502         {0xA188,0xF5}, 
503         {0xA189,0x82}, 
504         {0xA18A,0x8C}, 
505         {0xA18B,0x83}, 
506         {0xA18C,0xEF}, 
507         {0xA18D,0xF0}, 
508         {0xA18E,0x90}, 
509         {0xA18F,0x0A}, 
510         {0xA190,0xBD}, 
511         {0xA191,0xE0}, 
512         {0xA192,0x04}, 
513         {0xA193,0xF0}, 
514         {0xA194,0x70}, 
515         {0xA195,0x06}, 
516         {0xA196,0x90}, 
517         {0xA197,0x0A}, 
518         {0xA198,0xBC}, 
519         {0xA199,0xE0}, 
520         {0xA19A,0x04}, 
521         {0xA19B,0xF0}, 
522         {0xA19C,0x90}, 
523         {0xA19D,0x0A}, 
524         {0xA19E,0xBA}, 
525         {0xA19F,0xE0}, 
526         {0xA1A0,0xFE}, 
527         {0xA1A1,0xA3}, 
528         {0xA1A2,0xE0}, 
529         {0xA1A3,0xFF}, 
530         {0xA1A4,0xF5}, 
531         {0xA1A5,0x82}, 
532         {0xA1A6,0x8E}, 
533         {0xA1A7,0x83}, 
534         {0xA1A8,0xE0}, 
535         {0xA1A9,0x54}, 
536         {0xA1AA,0x07}, 
537         {0xA1AB,0xFD}, 
538         {0xA1AC,0x90}, 
539         {0xA1AD,0x0A}, 
540         {0xA1AE,0xBC}, 
541         {0xA1AF,0xE0}, 
542         {0xA1B0,0xFA}, 
543         {0xA1B1,0xA3}, 
544         {0xA1B2,0xE0}, 
545         {0xA1B3,0xF5}, 
546         {0xA1B4,0x82}, 
547         {0xA1B5,0x8A}, 
548         {0xA1B6,0x83}, 
549         {0xA1B7,0xED}, 
550         {0xA1B8,0xF0}, 
551         {0xA1B9,0x90}, 
552         {0xA1BA,0x0A}, 
553         {0xA1BB,0xBD}, 
554         {0xA1BC,0xE0}, 
555         {0xA1BD,0x04}, 
556         {0xA1BE,0xF0}, 
557         {0xA1BF,0x70}, 
558         {0xA1C0,0x06}, 
559         {0xA1C1,0x90}, 
560         {0xA1C2,0x0A}, 
561         {0xA1C3,0xBC}, 
562         {0xA1C4,0xE0}, 
563         {0xA1C5,0x04}, 
564         {0xA1C6,0xF0}, 
565         {0xA1C7,0x8F}, 
566         {0xA1C8,0x82}, 
567         {0xA1C9,0x8E}, 
568         {0xA1CA,0x83}, 
569         {0xA1CB,0xA3}, 
570         {0xA1CC,0xA3}, 
571         {0xA1CD,0xE0}, 
572         {0xA1CE,0xFF}, 
573         {0xA1CF,0x90}, 
574         {0xA1D0,0x0A}, 
575         {0xA1D1,0xBC}, 
576         {0xA1D2,0xE0}, 
577         {0xA1D3,0xFC}, 
578         {0xA1D4,0xA3}, 
579         {0xA1D5,0xE0}, 
580         {0xA1D6,0xF5}, 
581         {0xA1D7,0x82}, 
582         {0xA1D8,0x8C}, 
583         {0xA1D9,0x83}, 
584         {0xA1DA,0xEF}, 
585         {0xA1DB,0xF0}, 
586         {0xA1DC,0x90}, 
587         {0xA1DD,0x0A}, 
588         {0xA1DE,0xBD}, 
589         {0xA1DF,0xE0}, 
590         {0xA1E0,0x04}, 
591         {0xA1E1,0xF0}, 
592         {0xA1E2,0x70}, 
593         {0xA1E3,0x06}, 
594         {0xA1E4,0x90}, 
595         {0xA1E5,0x0A}, 
596         {0xA1E6,0xBC}, 
597         {0xA1E7,0xE0}, 
598         {0xA1E8,0x04}, 
599         {0xA1E9,0xF0}, 
600         {0xA1EA,0x90}, 
601         {0xA1EB,0x0A}, 
602         {0xA1EC,0xBB}, 
603         {0xA1ED,0xE0}, 
604         {0xA1EE,0x24}, 
605         {0xA1EF,0x03}, 
606         {0xA1F0,0xF0}, 
607         {0xA1F1,0x90}, 
608         {0xA1F2,0x0A}, 
609         {0xA1F3,0xBA}, 
610         {0xA1F4,0xE0}, 
611         {0xA1F5,0x34}, 
612         {0xA1F6,0x00}, 
613         {0xA1F7,0xF0}, 
614         {0xA1F8,0x05}, 
615         {0xA1F9,0x22}, 
616         {0xA1FA,0x02}, 
617         {0xA1FB,0xF1}, 
618         {0xA1FC,0x41}, 
619         {0xA1FD,0x90}, 
620         {0xA1FE,0x0A}, 
621         {0xA1FF,0xBA}, 
622         {0xA200,0x74}, 
623         {0xA201,0x0E}, 
624         {0xA202,0xF0}, 
625         {0xA203,0xA3}, 
626         {0xA204,0x74}, 
627         {0xA205,0xDC}, 
628         {0xA206,0xF0}, 
629         {0xA207,0xA3}, 
630         {0xA208,0x74}, 
631         {0xA209,0x05}, 
632         {0xA20A,0xF0}, 
633         {0xA20B,0xA3}, 
634         {0xA20C,0x74}, 
635         {0xA20D,0x61}, 
636         {0xA20E,0xF0}, 
637         {0xA20F,0x90}, 
638         {0xA210,0x0A}, 
639         {0xA211,0xBA}, 
640         {0xA212,0xE0}, 
641         {0xA213,0xFE}, 
642         {0xA214,0xA3}, 
643         {0xA215,0xE0}, 
644         {0xA216,0xAA}, 
645         {0xA217,0x06}, 
646         {0xA218,0xF9}, 
647         {0xA219,0x7B}, 
648         {0xA21A,0x01}, 
649         {0xA21B,0xC0}, 
650         {0xA21C,0x02}, 
651         {0xA21D,0xA3}, 
652         {0xA21E,0xE0}, 
653         {0xA21F,0xFE}, 
654         {0xA220,0xA3}, 
655         {0xA221,0xE0}, 
656         {0xA222,0xAA}, 
657         {0xA223,0x06}, 
658         {0xA224,0xF8}, 
659         {0xA225,0xAC}, 
660         {0xA226,0x02}, 
661         {0xA227,0x7D}, 
662         {0xA228,0x01}, 
663         {0xA229,0xD0}, 
664         {0xA22A,0x02}, 
665         {0xA22B,0x7E}, 
666         {0xA22C,0x00}, 
667         {0xA22D,0x7F}, 
668         {0xA22E,0x04}, 
669         {0xA22F,0x12}, 
670         {0xA230,0x0F}, 
671         {0xA231,0x6F}, 
672         {0xA232,0x02}, 
673         {0xA233,0x66}, 
674         {0xA234,0xD9}, 
675         {0xA235,0x90}, 
676         {0xA236,0x07}, 
677         {0xA237,0xD0}, 
678         {0xA238,0x02}, 
679         {0xA239,0xA2}, 
680         {0xA23A,0x69}, 
681         {0xA240,0x02}, 
682         {0xA241,0x21}, 
683         {0xA242,0x7F}, 
684         {0xA243,0x02}, 
685         {0xA244,0x21}, 
686         {0xA245,0xF4}, 
687         {0xA246,0x02}, 
688         {0xA247,0xA6}, 
689         {0xA248,0x15}, 
690         {0xA249,0x60}, 
691         {0xA24A,0x0A}, 
692         {0xA24B,0xEF}, 
693         {0xA24C,0xB4}, 
694         {0xA24D,0x01}, 
695         {0xA24E,0x16}, 
696         {0xA24F,0x90}, 
697         {0xA250,0x00}, 
698         {0xA251,0x5D}, 
699         {0xA252,0xE0}, 
700         {0xA253,0x70}, 
701         {0xA254,0x10}, 
702         {0xA255,0x12}, 
703         {0xA256,0x26}, 
704         {0xA257,0xC8}, 
705         {0xA258,0x90}, 
706         {0xA259,0x00}, 
707         {0xA25A,0x11}, 
708         {0xA25B,0x74}, 
709         {0xA25C,0x30}, 
710         {0xA25D,0xF0}, 
711         {0xA25E,0x90}, 
712         {0xA25F,0x00}, 
713         {0xA260,0x10}, 
714         {0xA261,0x74}, 
715         {0xA262,0x01}, 
716         {0xA263,0xF0}, 
717         {0xA264,0x22}, 
718         {0xA265,0x12}, 
719         {0xA266,0x25}, 
720         {0xA267,0xA8}, 
721         {0xA268,0x02}, 
722         {0xA269,0x29}, 
723         {0xA26A,0xFC}, 
724         {0xA26B,0x44}, 
725         {0xA26C,0x18}, 
726         {0xA26D,0xF0}, 
727         {0xA26E,0x90}, 
728         {0xA26F,0x72}, 
729         {0xA270,0x18}, 
730         {0xA271,0xE0}, 
731         {0xA272,0x44}, 
732         {0xA273,0x18}, 
733         {0xA274,0xF0}, 
734         {0xA275,0x00}, 
735         {0xA276,0x00}, 
736         {0xA277,0x00}, 
737         {0xA278,0x00}, 
738         {0xA279,0x00}, 
739         {0xA27A,0x00}, 
740         {0xA27B,0x90}, 
741         {0xA27C,0x72}, 
742         {0xA27D,0x08}, 
743         {0xA27E,0xE0}, 
744         {0xA27F,0x44}, 
745         {0xA280,0x10}, 
746         {0xA281,0xF0}, 
747         {0xA282,0x90}, 
748         {0xA283,0x72}, 
749         {0xA284,0x14}, 
750         {0xA285,0xE0}, 
751         {0xA286,0x54}, 
752         {0xA287,0xFD}, 
753         {0xA288,0xF0}, 
754         {0xA289,0x22}, 
755         {0xA29B,0xF0}, 
756         {0xA29C,0xD3}, 
757         {0xA29D,0x90}, 
758         {0xA29E,0x07}, 
759         {0xA29F,0x91}, 
760         {0xA2A0,0xE0}, 
761         {0xA2A1,0x94}, 
762         {0xA2A2,0x21}, 
763         {0xA2A3,0x90}, 
764         {0xA2A4,0x07}, 
765         {0xA2A5,0x90}, 
766         {0xA2A6,0xE0}, 
767         {0xA2A7,0x64}, 
768         {0xA2A8,0x80}, 
769         {0xA2A9,0x94}, 
770         {0xA2AA,0x81}, 
771         {0xA2AB,0x40}, 
772         {0xA2AC,0x08}, 
773         {0xA2AD,0x90}, 
774         {0xA2AE,0x07}, 
775         {0xA2AF,0xCB}, 
776         {0xA2B0,0x74}, 
777         {0xA2B1,0xFF}, 
778         {0xA2B2,0xF0}, 
779         {0xA2B3,0x80}, 
780         {0xA2B4,0x06}, 
781         {0xA2B5,0x90}, 
782         {0xA2B6,0x07}, 
783         {0xA2B7,0xCB}, 
784         {0xA2B8,0x74}, 
785         {0xA2B9,0x01}, 
786         {0xA2BA,0xF0}, 
787         {0xA2BB,0x02}, 
788         {0xA2BC,0xB5}, 
789         {0xA2BD,0xC3}, 
790         {0xA2BE,0x90}, 
791         {0xA2BF,0x08}, 
792         {0xA2C0,0x34}, 
793         {0xA2C1,0xE0}, 
794         {0xA2C2,0xFC}, 
795         {0xA2C3,0xA3}, 
796         {0xA2C4,0xE0}, 
797         {0xA2C5,0xFD}, 
798         {0xA2C6,0xA3}, 
799         {0xA2C7,0xE0}, 
800         {0xA2C8,0xFE}, 
801         {0xA2C9,0xA3}, 
802         {0xA2CA,0xE0}, 
803         {0xA2CB,0xFF}, 
804         {0xA2CC,0x90}, 
805         {0xA2CD,0x07}, 
806         {0xA2CE,0xD0}, 
807         {0xA2CF,0xE0}, 
808         {0xA2D0,0xF8}, 
809         {0xA2D1,0xA3}, 
810         {0xA2D2,0xE0}, 
811         {0xA2D3,0xF9}, 
812         {0xA2D4,0xA3}, 
813         {0xA2D5,0xE0}, 
814         {0xA2D6,0xFA}, 
815         {0xA2D7,0xA3}, 
816         {0xA2D8,0xE0}, 
817         {0xA2D9,0xFB}, 
818         {0xA2DA,0xD3}, 
819         {0xA2DB,0x12}, 
820         {0xA2DC,0x0D}, 
821         {0xA2DD,0xAE}, 
822         {0xA2DE,0x40}, 
823         {0xA2DF,0x0B}, 
824         {0xA2E0,0x12}, 
825         {0xA2E1,0xB5}, 
826         {0xA2E2,0x49}, 
827         {0xA2E3,0x90}, 
828         {0xA2E4,0x07}, 
829         {0xA2E5,0xA4}, 
830         {0xA2E6,0x74}, 
831         {0xA2E7,0x02}, 
832         {0xA2E8,0xF0}, 
833         {0xA2E9,0x80}, 
834         {0xA2EA,0x09}, 
835         {0xA2EB,0x12}, 
836         {0xA2EC,0xB7}, 
837         {0xA2ED,0x51}, 
838         {0xA2EE,0x90}, 
839         {0xA2EF,0x07}, 
840         {0xA2F0,0xA4}, 
841         {0xA2F1,0x74}, 
842         {0xA2F2,0x05}, 
843         {0xA2F3,0xF0}, 
844         {0xA2F4,0x02}, 
845         {0xA2F5,0xA2}, 
846         {0xA2F6,0xDA}, 
847         {0xA2F7,0x90}, 
848         {0xA2F8,0x0E}, 
849         {0xA2F9,0xE0}, 
850         {0xA2FA,0xE0}, 
851         {0xA2FB,0xFD}, 
852         {0xA2FC,0xA3}, 
853         {0xA2FD,0xE0}, 
854         {0xA2FE,0x90}, 
855         {0xA2FF,0x02}, 
856         {0xA300,0xA2}, 
857         {0xA301,0xCD}, 
858         {0xA302,0xF0}, 
859         {0xA303,0xA3}, 
860         {0xA304,0xED}, 
861         {0xA305,0xF0}, 
862         {0xA306,0x90}, 
863         {0xA307,0x0E}, 
864         {0xA308,0xE2}, 
865         {0xA309,0xE0}, 
866         {0xA30A,0xFD}, 
867         {0xA30B,0xA3}, 
868         {0xA30C,0xE0}, 
869         {0xA30D,0x90}, 
870         {0xA30E,0x02}, 
871         {0xA30F,0xA8}, 
872         {0xA310,0xCD}, 
873         {0xA311,0xF0}, 
874         {0xA312,0xA3}, 
875         {0xA313,0xED}, 
876         {0xA314,0xF0}, 
877         {0xA315,0xE4}, 
878         {0xA316,0x90}, 
879         {0xA317,0x06}, 
880         {0xA318,0x38}, 
881         {0xA319,0xF0}, 
882         {0xA31A,0x02}, 
883         {0xA31B,0x67}, 
884         {0xA31C,0x63}, 
885         {0xA31D,0x90}, 
886         {0xA31E,0x0E}, 
887         {0xA31F,0xE8}, 
888         {0xA320,0xE0}, 
889         {0xA321,0x90}, 
890         {0xA322,0x02}, 
891         {0xA323,0x62}, 
892         {0xA324,0xF0}, 
893         {0xA325,0x90}, 
894         {0xA326,0x0E}, 
895         {0xA327,0xE9}, 
896         {0xA328,0xE0}, 
897         {0xA329,0x90}, 
898         {0xA32A,0x02}, 
899         {0xA32B,0x63}, 
900         {0xA32C,0xF0}, 
901         {0xA32D,0x02}, 
902         {0xA32E,0x67}, 
903         {0xA32F,0x1F}, 
904         {0xA33B,0x90}, 
905         {0xA33C,0x0E}, 
906         {0xA33D,0x14}, 
907         {0xA33E,0xE0}, 
908         {0xA33F,0xFE}, 
909         {0xA340,0xA3}, 
910         {0xA341,0xE0}, 
911         {0xA342,0xFF}, 
912         {0xA343,0x90}, 
913         {0xA344,0x06}, 
914         {0xA345,0xD9}, 
915         {0xA346,0xEE}, 
916         {0xA347,0xF0}, 
917         {0xA348,0xA3}, 
918         {0xA349,0xEF}, 
919         {0xA34A,0xF0}, 
920         {0xA34B,0x90}, 
921         {0xA34C,0x0E}, 
922         {0xA34D,0x18}, 
923         {0xA34E,0xE0}, 
924         {0xA34F,0xFD}, 
925         {0xA350,0x7C}, 
926         {0xA351,0x00}, 
927         {0xA352,0xC3}, 
928         {0xA353,0xEF}, 
929         {0xA354,0x9D}, 
930         {0xA355,0xEE}, 
931         {0xA356,0x9C}, 
932         {0xA357,0x50}, 
933         {0xA358,0x09}, 
934         {0xA359,0xE4}, 
935         {0xA35A,0x90}, 
936         {0xA35B,0x06}, 
937         {0xA35C,0xD7}, 
938         {0xA35D,0xF0}, 
939         {0xA35E,0xA3}, 
940         {0xA35F,0xF0}, 
941         {0xA360,0x80}, 
942         {0xA361,0x13}, 
943         {0xA362,0xC3}, 
944         {0xA363,0x90}, 
945         {0xA364,0x06}, 
946         {0xA365,0xDA}, 
947         {0xA366,0xE0}, 
948         {0xA367,0x9D}, 
949         {0xA368,0xFE}, 
950         {0xA369,0x90}, 
951         {0xA36A,0x06}, 
952         {0xA36B,0xD9}, 
953         {0xA36C,0xE0}, 
954         {0xA36D,0x9C}, 
955         {0xA36E,0x90}, 
956         {0xA36F,0x06}, 
957         {0xA370,0xD7}, 
958         {0xA371,0xF0}, 
959         {0xA372,0xA3}, 
960         {0xA373,0xCE}, 
961         {0xA374,0xF0}, 
962         {0xA375,0x90}, 
963         {0xA376,0x0E}, 
964         {0xA377,0x18}, 
965         {0xA378,0xE0}, 
966         {0xA379,0xF9}, 
967         {0xA37A,0xFF}, 
968         {0xA37B,0x90}, 
969         {0xA37C,0x06}, 
970         {0xA37D,0xC2}, 
971         {0xA37E,0xE0}, 
972         {0xA37F,0xFC}, 
973         {0xA380,0xA3}, 
974         {0xA381,0xE0}, 
975         {0xA382,0xFD}, 
976         {0xA383,0xC3}, 
977         {0xA384,0x9F}, 
978         {0xA385,0xFF}, 
979         {0xA386,0xEC}, 
980         {0xA387,0x94}, 
981         {0xA388,0x00}, 
982         {0xA389,0xFE}, 
983         {0xA38A,0x90}, 
984         {0xA38B,0x0E}, 
985         {0xA38C,0x16}, 
986         {0xA38D,0xE0}, 
987         {0xA38E,0xFA}, 
988         {0xA38F,0xA3}, 
989         {0xA390,0xE0}, 
990         {0xA391,0xFB}, 
991         {0xA392,0xD3}, 
992         {0xA393,0x9F}, 
993         {0xA394,0xEA}, 
994         {0xA395,0x9E}, 
995         {0xA396,0x40}, 
996         {0xA397,0x0A}, 
997         {0xA398,0x90}, 
998         {0xA399,0x06}, 
999         {0xA39A,0xD5}, 
1000         {0xA39B,0xEC}, 
1001         {0xA39C,0xF0}, 
1002         {0xA39D,0xA3}, 
1003         {0xA39E,0xED}, 
1004         {0xA39F,0xF0}, 
1005         {0xA3A0,0x80}, 
1006         {0xA3A1,0x0E}, 
1007         {0xA3A2,0xE9}, 
1008         {0xA3A3,0x7E}, 
1009         {0xA3A4,0x00}, 
1010         {0xA3A5,0x2B}, 
1011         {0xA3A6,0xFF}, 
1012         {0xA3A7,0xEE}, 
1013         {0xA3A8,0x3A}, 
1014         {0xA3A9,0x90}, 
1015         {0xA3AA,0x06}, 
1016         {0xA3AB,0xD5}, 
1017         {0xA3AC,0xF0}, 
1018         {0xA3AD,0xA3}, 
1019         {0xA3AE,0xEF}, 
1020         {0xA3AF,0xF0}, 
1021         {0xA3B0,0xE9}, 
1022         {0xA3B1,0xFB}, 
1023         {0xA3B2,0x7A}, 
1024         {0xA3B3,0x00}, 
1025         {0xA3B4,0x90}, 
1026         {0xA3B5,0x0E}, 
1027         {0xA3B6,0x15}, 
1028         {0xA3B7,0xE0}, 
1029         {0xA3B8,0x2B}, 
1030         {0xA3B9,0xFE}, 
1031         {0xA3BA,0x90}, 
1032         {0xA3BB,0x0E}, 
1033         {0xA3BC,0x14}, 
1034         {0xA3BD,0xE0}, 
1035         {0xA3BE,0x3A}, 
1036         {0xA3BF,0x90}, 
1037         {0xA3C0,0x06}, 
1038         {0xA3C1,0xE1}, 
1039         {0xA3C2,0xF0}, 
1040         {0xA3C3,0xA3}, 
1041         {0xA3C4,0xCE}, 
1042         {0xA3C5,0xF0}, 
1043         {0xA3C6,0xC3}, 
1044         {0xA3C7,0x90}, 
1045         {0xA3C8,0x0E}, 
1046         {0xA3C9,0x17}, 
1047         {0xA3CA,0xE0}, 
1048         {0xA3CB,0x9B}, 
1049         {0xA3CC,0xFE}, 
1050         {0xA3CD,0x90}, 
1051         {0xA3CE,0x0E}, 
1052         {0xA3CF,0x16}, 
1053         {0xA3D0,0x02}, 
1054         {0xA3D1,0x20}, 
1055         {0xA3D2,0xD5}, 
1056         {0xA3D3,0x90}, 
1057         {0xA3d4,0x0E}, 
1058         {0xA3d5,0xE4}, 
1059         {0xA3d6,0xE0}, 
1060         {0xA3d7,0x90}, 
1061         {0xA3d8,0x02}, 
1062         {0xA3d9,0x66}, 
1063         {0xA3da,0xF0}, 
1064         {0xA3DB,0x90}, 
1065         {0xA3dc,0x0E}, 
1066         {0xA3dd,0xE5}, 
1067         {0xA3de,0xE0}, 
1068         {0xA3df,0x90}, 
1069         {0xA3e0,0x02}, 
1070         {0xA3e1,0x64}, 
1071         {0xA3e2,0xF0}, 
1072         {0xA3e3,0x90}, 
1073         {0xA3e4,0x0E}, 
1074         {0xA3e5,0xE6}, 
1075         {0xA3e6,0xE0}, 
1076         {0xA3e7,0x90}, 
1077         {0xA3e8,0x02}, 
1078         {0xA3e9,0x65}, 
1079         {0xA3ea,0xF0}, 
1080         {0xA3eb,0x02}, 
1081         {0xA3ec,0x67}, 
1082         {0xA3ed,0xA5}, 
1083         {0xA3f0,0x12}, 
1084         {0xA3f1,0x47}, 
1085         {0xA3f2,0x59}, 
1086         {0xA3f3,0x90}, 
1087         {0xA3f4,0x00}, 
1088         {0xA3f5,0xB5}, 
1089         {0xA3f6,0xE0}, 
1090         {0xA3f7,0xB4}, 
1091         {0xA3f8,0x02}, 
1092         {0xA3f9,0x03}, 
1093         {0xA3fa,0x12}, 
1094         {0xA3fb,0x47}, 
1095         {0xA3fc,0x59}, 
1096         {0xA3fd,0x02}, 
1097         {0xA3fe,0xC5}, 
1098         {0xA3ff,0xC3}, 
1099         {0xA400,0x90}, 
1100         {0xA401,0x00}, 
1101         {0xA402,0x3D}, 
1102         {0xA403,0xF0}, 
1103         {0xA404,0x90}, 
1104         {0xA405,0x00}, 
1105         {0xA406,0x84}, 
1106         {0xA407,0xE0}, 
1107         {0xA408,0xFE}, 
1108         {0xA409,0x90}, 
1109         {0xA40A,0x00}, 
1110         {0xA40B,0x3E}, 
1111         {0xA40C,0xF0}, 
1112         {0xA40D,0xEF}, 
1113         {0xA40E,0x70}, 
1114         {0xA40F,0x03}, 
1115         {0xA410,0xEE}, 
1116         {0xA411,0x60}, 
1117         {0xA412,0x04}, 
1118         {0xA413,0x7F}, 
1119         {0xA414,0x01}, 
1120         {0xA415,0x80}, 
1121         {0xA416,0x02}, 
1122         {0xA417,0x7F}, 
1123         {0xA418,0x00}, 
1124         {0xA419,0x90}, 
1125         {0xA41A,0x00}, 
1126         {0xA41B,0x3F}, 
1127         {0xA41C,0xEF}, 
1128         {0xA41D,0xF0}, 
1129         {0xA41E,0x02}, 
1130         {0xA41F,0x89}, 
1131         {0xA420,0xD3}, 
1132         {0xA421,0x90}, 
1133         {0xA422,0x00}, 
1134         {0xA423,0x12}, 
1135         {0xA424,0xE0}, 
1136         {0xA425,0xFF}, 
1137         {0xA426,0x70}, 
1138         {0xA427,0x0C}, 
1139         {0xA428,0x90}, 
1140         {0xA429,0x00}, 
1141         {0xA42A,0x46}, 
1142         {0xA42B,0xE0}, 
1143         {0xA42C,0xC3}, 
1144         {0xA42D,0x94}, 
1145         {0xA42E,0x07}, 
1146         {0xA42F,0x40}, 
1147         {0xA430,0x03}, 
1148         {0xA431,0x75}, 
1149         {0xA432,0x2E}, 
1150         {0xA433,0x02}, 
1151         {0xA434,0xEF}, 
1152         {0xA435,0xB4}, 
1153         {0xA436,0x01}, 
1154         {0xA437,0x0C}, 
1155         {0xA438,0x90}, 
1156         {0xA439,0x00}, 
1157         {0xA43A,0x66}, 
1158         {0xA43B,0xE0}, 
1159         {0xA43C,0xC3}, 
1160         {0xA43D,0x94}, 
1161         {0xA43E,0x07}, 
1162         {0xA43F,0x40}, 
1163         {0xA440,0x03}, 
1164         {0xA441,0x75}, 
1165         {0xA442,0x2E}, 
1166         {0xA443,0x02}, 
1167         {0xA444,0x02}, 
1168         {0xA445,0xA7}, 
1169         {0xA446,0x9E}, 
1170         {0xA447,0xC3}, 
1171         {0xA448,0x90}, 
1172         {0xA449,0x0B}, 
1173         {0xA44A,0x8F}, 
1174         {0xA44B,0xE0}, 
1175         {0xA44C,0x94}, 
1176         {0xA44D,0x00}, 
1177         {0xA44E,0x90}, 
1178         {0xA44F,0x0B}, 
1179         {0xA450,0x8E}, 
1180         {0xA451,0xE0}, 
1181         {0xA452,0x94}, 
1182         {0xA453,0x41}, 
1183         {0xA454,0x40}, 
1184         {0xA455,0x22}, 
1185         {0xA456,0x90}, 
1186         {0xA457,0x0B}, 
1187         {0xA458,0x91}, 
1188         {0xA459,0xE0}, 
1189         {0xA45A,0x94}, 
1190         {0xA45B,0x00}, 
1191         {0xA45C,0x90}, 
1192         {0xA45D,0x0B}, 
1193         {0xA45E,0x90}, 
1194         {0xA45F,0xE0}, 
1195         {0xA460,0x94}, 
1196         {0xA461,0x41}, 
1197         {0xA462,0x40}, 
1198         {0xA463,0x14}, 
1199         {0xA464,0x90}, 
1200         {0xA465,0x0B}, 
1201         {0xA466,0x93}, 
1202         {0xA467,0xE0}, 
1203         {0xA468,0x94}, 
1204         {0xA469,0x00}, 
1205         {0xA46A,0x90}, 
1206         {0xA46B,0x0B}, 
1207         {0xA46C,0x92}, 
1208         {0xA46D,0xE0}, 
1209         {0xA46E,0x94}, 
1210         {0xA46F,0x41}, 
1211         {0xA470,0x40}, 
1212         {0xA471,0x06}, 
1213         {0xA472,0x90}, 
1214         {0xA473,0x01}, 
1215         {0xA474,0xA4}, 
1216         {0xA475,0x02}, 
1217         {0xA476,0x86}, 
1218         {0xA477,0x57}, 
1219         {0xA478,0x02}, 
1220         {0xA479,0x86}, 
1221         {0xA47A,0x5C}, 
1222         {0xA500,0xF5}, 
1223         {0xA501,0x3B}, 
1224         {0xA502,0x90}, 
1225         {0xA503,0x06}, 
1226         {0xA504,0x6C}, 
1227         {0xA505,0xE0}, 
1228         {0xA506,0xFF}, 
1229         {0xA507,0xE5}, 
1230         {0xA508,0x3B}, 
1231         {0xA509,0xC3}, 
1232         {0xA50A,0x9F}, 
1233         {0xA50B,0x40}, 
1234         {0xA50C,0x03}, 
1235         {0xA50D,0x02}, 
1236         {0xA50E,0xF6}, 
1237         {0xA50F,0x0E}, 
1238         {0xA510,0x90}, 
1239         {0xA511,0x0B}, 
1240         {0xA512,0xC6}, 
1241         {0xA513,0xE0}, 
1242         {0xA514,0x14}, 
1243         {0xA515,0x60}, 
1244         {0xA516,0x3C}, 
1245         {0xA517,0x14}, 
1246         {0xA518,0x60}, 
1247         {0xA519,0x6B}, 
1248         {0xA51A,0x24}, 
1249         {0xA51B,0x02}, 
1250         {0xA51C,0x60}, 
1251         {0xA51D,0x03}, 
1252         {0xA51E,0x02}, 
1253         {0xA51F,0xF5}, 
1254         {0xA520,0xB5}, 
1255         {0xA521,0x90}, 
1256         {0xA522,0x0A}, 
1257         {0xA523,0x9A}, 
1258         {0xA524,0xE0}, 
1259         {0xA525,0xFB}, 
1260         {0xA526,0xA3}, 
1261         {0xA527,0xE0}, 
1262         {0xA528,0xFA}, 
1263         {0xA529,0xA3}, 
1264         {0xA52A,0xE0}, 
1265         {0xA52B,0xF9}, 
1266         {0xA52C,0x85}, 
1267         {0xA52D,0x3B}, 
1268         {0xA52E,0x82}, 
1269         {0xA52F,0x75}, 
1270         {0xA530,0x83}, 
1271         {0xA531,0x00}, 
1272         {0xA532,0x12}, 
1273         {0xA533,0x0A}, 
1274         {0xA534,0xB8}, 
1275         {0xA535,0xFF}, 
1276         {0xA536,0x74}, 
1277         {0xA537,0xAB}, 
1278         {0xA538,0x25}, 
1279         {0xA539,0x3B}, 
1280         {0xA53A,0xF5}, 
1281         {0xA53B,0x82}, 
1282         {0xA53C,0xE4}, 
1283         {0xA53D,0x34}, 
1284         {0xA53E,0x0A}, 
1285         {0xA53F,0xF5}, 
1286         {0xA540,0x83}, 
1287         {0xA541,0xE0}, 
1288         {0xA542,0xFD}, 
1289         {0xA543,0xC3}, 
1290         {0xA544,0xEF}, 
1291         {0xA545,0x9D}, 
1292         {0xA546,0xFE}, 
1293         {0xA547,0xE4}, 
1294         {0xA548,0x94}, 
1295         {0xA549,0x00}, 
1296         {0xA54A,0x90}, 
1297         {0xA54B,0x0B}, 
1298         {0xA54C,0xCA}, 
1299         {0xA54D,0xF0}, 
1300         {0xA54E,0xA3}, 
1301         {0xA54F,0xCE}, 
1302         {0xA550,0xF0}, 
1303         {0xA551,0x80}, 
1304         {0xA552,0x62}, 
1305         {0xA553,0x90}, 
1306         {0xA554,0x0A}, 
1307         {0xA555,0x9A}, 
1308         {0xA556,0xE0}, 
1309         {0xA557,0xFB}, 
1310         {0xA558,0xA3}, 
1311         {0xA559,0xE0}, 
1312         {0xA55A,0xFA}, 
1313         {0xA55B,0xA3}, 
1314         {0xA55C,0xE0}, 
1315         {0xA55D,0xF9}, 
1316         {0xA55E,0x85}, 
1317         {0xA55F,0x3B}, 
1318         {0xA560,0x82}, 
1319         {0xA561,0x75}, 
1320         {0xA562,0x83}, 
1321         {0xA563,0x00}, 
1322         {0xA564,0x12}, 
1323         {0xA565,0x0A}, 
1324         {0xA566,0xB8}, 
1325         {0xA567,0xFF}, 
1326         {0xA568,0x74}, 
1327         {0xA569,0x9D}, 
1328         {0xA56A,0x25}, 
1329         {0xA56B,0x3B}, 
1330         {0xA56C,0xF5}, 
1331         {0xA56D,0x82}, 
1332         {0xA56E,0xE4}, 
1333         {0xA56F,0x34}, 
1334         {0xA570,0x0A}, 
1335         {0xA571,0xF5}, 
1336         {0xA572,0x83}, 
1337         {0xA573,0xE0}, 
1338         {0xA574,0xFD}, 
1339         {0xA575,0xC3}, 
1340         {0xA576,0xEF}, 
1341         {0xA577,0x9D}, 
1342         {0xA578,0xFE}, 
1343         {0xA579,0xE4}, 
1344         {0xA57A,0x94}, 
1345         {0xA57B,0x00}, 
1346         {0xA57C,0x90}, 
1347         {0xA57D,0x0B}, 
1348         {0xA57E,0xCA}, 
1349         {0xA57F,0xF0}, 
1350         {0xA580,0xA3}, 
1351         {0xA581,0xCE}, 
1352         {0xA582,0xF0}, 
1353         {0xA583,0x80}, 
1354         {0xA584,0x30}, 
1355         {0xA585,0x90}, 
1356         {0xA586,0x0A}, 
1357         {0xA587,0x9A}, 
1358         {0xA588,0xE0}, 
1359         {0xA589,0xFB}, 
1360         {0xA58A,0xA3}, 
1361         {0xA58B,0xE0}, 
1362         {0xA58C,0xFA}, 
1363         {0xA58D,0xA3}, 
1364         {0xA58E,0xE0}, 
1365         {0xA58F,0xF9}, 
1366         {0xA590,0x85}, 
1367         {0xA591,0x3B}, 
1368         {0xA592,0x82}, 
1369         {0xA593,0x75}, 
1370         {0xA594,0x83}, 
1371         {0xA595,0x00}, 
1372         {0xA596,0x12}, 
1373         {0xA597,0x0A}, 
1374         {0xA598,0xB8}, 
1375         {0xA599,0xFF}, 
1376         {0xA59A,0x74}, 
1377         {0xA59B,0xA4}, 
1378         {0xA59C,0x25}, 
1379         {0xA59D,0x3B}, 
1380         {0xA59E,0xF5}, 
1381         {0xA59F,0x82}, 
1382         {0xA5A0,0xE4}, 
1383         {0xA5A1,0x34}, 
1384         {0xA5A2,0x0A}, 
1385         {0xA5A3,0xF5}, 
1386         {0xA5A4,0x83}, 
1387         {0xA5A5,0xE0}, 
1388         {0xA5A6,0xFD}, 
1389         {0xA5A7,0xC3}, 
1390         {0xA5A8,0xEF}, 
1391         {0xA5A9,0x9D}, 
1392         {0xA5AA,0xFE}, 
1393         {0xA5AB,0xE4}, 
1394         {0xA5AC,0x94}, 
1395         {0xA5AD,0x00}, 
1396         {0xA5AE,0x90}, 
1397         {0xA5AF,0x0B}, 
1398         {0xA5B0,0xCA}, 
1399         {0xA5B1,0xF0}, 
1400         {0xA5B2,0xA3}, 
1401         {0xA5B3,0xCE}, 
1402         {0xA5B4,0xF0}, 
1403         {0xA5B5,0x90}, 
1404         {0xA5B6,0x07}, 
1405         {0xA5B7,0x83}, 
1406         {0xA5B8,0xE0}, 
1407         {0xA5B9,0xFF}, 
1408         {0xA5BA,0x7E}, 
1409         {0xA5BB,0x00}, 
1410         {0xA5BC,0x90}, 
1411         {0xA5BD,0x0D}, 
1412         {0xA5BE,0xF6}, 
1413         {0xA5BF,0xEE}, 
1414         {0xA5C0,0xF0}, 
1415         {0xA5C1,0xA3}, 
1416         {0xA5C2,0xEF}, 
1417         {0xA5C3,0xF0}, 
1418         {0xA5C4,0x90}, 
1419         {0xA5C5,0x0B}, 
1420         {0xA5C6,0xCA}, 
1421         {0xA5C7,0xE0}, 
1422         {0xA5C8,0xFC}, 
1423         {0xA5C9,0xA3}, 
1424         {0xA5CA,0xE0}, 
1425         {0xA5CB,0xFD}, 
1426         {0xA5CC,0xD3}, 
1427         {0xA5CD,0x9F}, 
1428         {0xA5CE,0x74}, 
1429         {0xA5CF,0x80}, 
1430         {0xA5D0,0xF8}, 
1431         {0xA5D1,0xEC}, 
1432         {0xA5D2,0x64}, 
1433         {0xA5D3,0x80}, 
1434         {0xA5D4,0x98}, 
1435         {0xA5D5,0x40}, 
1436         {0xA5D6,0x0C}, 
1437         {0xA5D7,0x90}, 
1438         {0xA5D8,0x0B}, 
1439         {0xA5D9,0xC8}, 
1440         {0xA5DA,0xE0}, 
1441         {0xA5DB,0x04}, 
1442         {0xA5DC,0xF0}, 
1443         {0xA5DD,0xA3}, 
1444         {0xA5DE,0xE0}, 
1445         {0xA5DF,0x04}, 
1446         {0xA5E0,0xF0}, 
1447         {0xA5E1,0x80}, 
1448         {0xA5E2,0x26}, 
1449         {0xA5E3,0x90}, 
1450         {0xA5E4,0x0D}, 
1451         {0xA5E5,0xF6}, 
1452         {0xA5E6,0xE0}, 
1453         {0xA5E7,0xFE}, 
1454         {0xA5E8,0xA3}, 
1455         {0xA5E9,0xE0}, 
1456         {0xA5EA,0xFF}, 
1457         {0xA5EB,0xC3}, 
1458         {0xA5EC,0xE4}, 
1459         {0xA5ED,0x9F}, 
1460         {0xA5EE,0xFF}, 
1461         {0xA5EF,0xE4}, 
1462         {0xA5F0,0x9E}, 
1463         {0xA5F1,0xFE}, 
1464         {0xA5F2,0xC3}, 
1465         {0xA5F3,0xED}, 
1466         {0xA5F4,0x9F}, 
1467         {0xA5F5,0xEE}, 
1468         {0xA5F6,0x64}, 
1469         {0xA5F7,0x80}, 
1470         {0xA5F8,0xF8}, 
1471         {0xA5F9,0xEC}, 
1472         {0xA5FA,0x64}, 
1473         {0xA5FB,0x80}, 
1474         {0xA5FC,0x98}, 
1475         {0xA5FD,0x50}, 
1476         {0xA5FE,0x0A}, 
1477         {0xA5FF,0x90}, 
1478         {0xA600,0x0B}, 
1479         {0xA601,0xC8}, 
1480         {0xA602,0xE0}, 
1481         {0xA603,0x14}, 
1482         {0xA604,0xF0}, 
1483         {0xA605,0xA3}, 
1484         {0xA606,0xE0}, 
1485         {0xA607,0x04}, 
1486         {0xA608,0xF0}, 
1487         {0xA609,0x05}, 
1488         {0xA60A,0x3B}, 
1489         {0xA60B,0x02}, 
1490         {0xA60C,0xF5}, 
1491         {0xA60D,0x02}, 
1492         {0xA60E,0x90}, 
1493         {0xA60F,0x08}, 
1494         {0xA610,0x58}, 
1495         {0xA611,0x02}, 
1496         {0xA612,0x9D}, 
1497         {0xA613,0x50}, 
1498         {0x9006,0xBA}, 
1499         {0x9007,0x75}, 
1500         {0x9008,0x00}, 
1501         {0x9009,0x00}, 
1502         {0x900A,0x02}, 
1503         {0x900D,0x01}, 
1504         {0x900E,0xA2}, 
1505         {0x900F,0x8F}, 
1506         {0x9010,0x00}, 
1507         {0x9011,0xCB}, 
1508         {0x9012,0x03}, 
1509         {0x9016,0xE6}, 
1510         {0x9017,0x6B}, 
1511         {0x9018,0x02}, 
1512         {0x9019,0x6B}, 
1513         {0x901A,0x02}, 
1514         {0x901D,0x01}, 
1515         {0x901E,0xAC}, 
1516         {0x901F,0x70}, 
1517         {0x9020,0x00}, 
1518         {0x9021,0xC5}, 
1519         {0x9022,0x03}, 
1520         {0x9026,0x9C}, 
1521         {0x9027,0x5B}, 
1522         {0x9028,0x00}, 
1523         {0x9029,0xBF}, 
1524         {0x902A,0x02}, 
1525         {0x902E,0x60}, 
1526         {0x902F,0x1C}, 
1527         {0x9030,0x01}, 
1528         {0x9031,0x37}, 
1529         {0x9032,0x02}, 
1530         {0x9035,0x01}, 
1531         {0x9036,0xBA}, 
1532         {0x9037,0x70}, 
1533         {0x9038,0x00}, 
1534         {0x9039,0x00}, 
1535         {0x903A,0x03}, 
1536         {0x903E,0x21}, 
1537         {0x903F,0x3F}, 
1538         {0x9040,0x02}, 
1539         {0x9041,0x40}, 
1540         {0x9042,0x02}, 
1541         {0x9046,0x21}, 
1542         {0x9047,0xEA}, 
1543         {0x9048,0x02}, 
1544         {0x9049,0x43}, 
1545         {0x904A,0x02}, 
1546         {0x904E,0xA6}, 
1547         {0x904F,0x12}, 
1548         {0x9050,0x02}, 
1549         {0x9051,0x46}, 
1550         {0x9052,0x02}, 
1551         {0x9056,0x29}, 
1552         {0x9057,0xE3}, 
1553         {0x9058,0x02}, 
1554         {0x9059,0x49}, 
1555         {0x905A,0x02}, 
1556         {0x905D,0x01}, 
1557         {0x905E,0x9C}, 
1558         {0x905F,0x6E}, 
1559         {0x9060,0x05}, 
1560         {0x9061,0x00}, 
1561         {0x9062,0x02}, 
1562         {0x9065,0x01}, 
1563         {0x9066,0xA2}, 
1564         {0x9067,0x66}, 
1565         {0x9068,0x02}, 
1566         {0x9069,0x35}, 
1567         {0x906A,0x02}, 
1568         {0x906D,0x01}, 
1569         {0x906E,0xB5}, 
1570         {0x906F,0xC2}, 
1571         {0x9070,0x02}, 
1572         {0x9071,0x9B}, 
1573         {0x9072,0x02}, 
1574         {0x9075,0x01}, 
1575         {0x9076,0xA2}, 
1576         {0x9077,0xD4}, 
1577         {0x9078,0x02}, 
1578         {0x9079,0xBE}, 
1579         {0x907A,0x02}, 
1580         {0x907D,0x01}, 
1581         {0x907E,0xB7}, 
1582         {0x907F,0xEA}, 
1583         {0x9080,0x00}, 
1584         {0x9081,0x02}, 
1585         {0x9082,0x03}, 
1586         {0x9086,0x67}, 
1587         {0x9087,0x31}, 
1588         {0x9088,0x02}, 
1589         {0x9089,0xF7}, 
1590         {0x908A,0x02}, 
1591         {0x908E,0x66}, 
1592         {0x908F,0xED}, 
1593         {0x9090,0x03}, 
1594         {0x9091,0x1D}, 
1595         {0x9092,0x02}, 
1596         {0x9096,0x67}, 
1597         {0x9097,0x73}, 
1598         {0x9098,0x03}, 
1599         {0x9099,0xD3}, 
1600         {0x909A,0x02}, 
1601         {0x909E,0x20}, 
1602         {0x909F,0x40}, 
1603         {0x90A0,0x03}, 
1604         {0x90A1,0x3B}, 
1605         {0x90A2,0x02}, 
1606         {0x90A6,0xC5}, 
1607         {0x90A7,0xC0}, 
1608         {0x90A8,0x03}, 
1609         {0x90A9,0xF0}, 
1610         {0x90AA,0x02}, 
1611         {0x90AE,0x41}, 
1612         {0x90AF,0xB3}, 
1613         {0x90B0,0x00}, 
1614         {0x90B1,0xA2}, 
1615         {0x90B2,0x02}, 
1616         {0x90B6,0x44}, 
1617         {0x90B7,0xBA}, 
1618         {0x90B8,0x00}, 
1619         {0x90B9,0xF0}, 
1620         {0x90BA,0x03}, 
1621         {0x90BE,0x89}, 
1622         {0x90BF,0x99}, 
1623         {0x90C0,0x04}, 
1624         {0x90C1,0x00}, 
1625         {0x90C2,0x02}, 
1626         {0x90C6,0xA7}, 
1627         {0x90C7,0x91}, 
1628         {0x90C8,0x04}, 
1629         {0x90C9,0x21}, 
1630         {0x90CA,0x02}, 
1631         {0x90CE,0x3A}, 
1632         {0x90CF,0x51}, 
1633         {0x90D0,0x00}, 
1634         {0x90D1,0xA2}, 
1635         {0x90D2,0x02}, 
1636         {0x90D6,0x86}, 
1637         {0x90D7,0x54}, 
1638         {0x90D8,0x04}, 
1639         {0x90D9,0x47}, 
1640         {0x90DA,0x02}, 
1641         {0x9000,0x01}, 
1642         {0xffff,0x00},   // 2013-03-01 end
1643         SensorWaitMs(200),
1644     {0x0009,0x16}, //10
1645     {0x0085,0x00}, 
1646     {0x0040,0x00},
1647     {0x0016,0x00},
1648     {0x0046,0x00},
1649     {0x0041,0x00},
1650    // {0x00B5,0x02},
1651     {0x7101,0x44},
1652     {0x00ED,0x0d},
1653     {0x00EE,0x1E},
1654     //{0x00B3,0x80},
1655     {0x7104,0x00},
1656     {0x7105,0x80},
1657     {0x019C,0x4B},
1658     {0x019D,0x20},
1659     {0x0129,0x02},
1660     {0x0130,0x00},
1661     {0x0083,0x00},
1662     {0x0084,0x00},
1663     {0x01A1,0x80},
1664     {0x01A2,0x80},
1665     {0x01A3,0x80},
1666     {0x01A0,0x01},
1667     {0x0021,0x00},
1668     {0x0022,0x01},
1669
1670     {0x0040,0x00}, //00
1671     {0x0060,0x00},
1672     {0x0013,0x00},
1673     {0x0041,0x00},//00:5M 03:SVGA
1674
1675     {0x0061,0x00},
1676     {0x0046,0x02},
1677     {0x0066,0x02},
1678     {0x0012,0x00},
1679     {0x7102,0x09},
1680     {0x7103,0x00},
1681     {0x7158,0x00},
1682     {0x00E8,0x01},
1683     {0x7000,0x2C},
1684     {0x5200,0x01},
1685     {0x7000,0x0C},
1686     {0x0143,0x5F},
1687     {0x0144,0x0D},
1688     {0x02C2,0x00},
1689     {0x02C3,0xc0},
1690     {0x015E,0x40},
1691     {0x015F,0x00},
1692     {0x0390,0x01},
1693     {0x0391,0x00},
1694     {0x0392,0x00},
1695     {0x03A0,0x14},
1696     {0x03A1,0x00},
1697     {0x03A2,0x5A},
1698     {0x03A3,0xEE},
1699     {0x03A4,0x69},
1700     {0x03A5,0x49},
1701     {0x03A6,0x3E},
1702     {0x03A7,0x00},
1703     {0x03A8,0x39},
1704     {0x03A9,0x33},
1705     {0x03B0,0x60},
1706     {0x03B1,0x00},
1707     {0x03B2,0x5A},
1708     {0x03B3,0xEE},
1709     {0x03B4,0x69},
1710     {0x03B5,0x49},
1711     {0x03B6,0x3E},
1712     {0x03B7,0x00},
1713     {0x03B8,0x3D},
1714     {0x03B9,0x20},
1715     {0x03C0,0x10},
1716     {0x03C1,0x00},
1717     {0x03C2,0x5A},
1718     {0x03C3,0xEE},
1719     {0x03C4,0x69},
1720     {0x03C5,0x49},
1721     {0x03C6,0x3A},
1722     {0x03C7,0x80},
1723     {0x03D0,0x64},
1724     {0x03D1,0x00},
1725     {0x03D2,0x5A},
1726     {0x03D3,0xEE},
1727     {0x03D4,0x69},
1728     {0x03D5,0x49},
1729     {0x03D6,0x34},
1730     {0x03D7,0xD1},
1731     {0x004C,0x0D},//enoch
1732     {0x006C,0x08},
1733     {0x0350,0x00},
1734     {0x0351,0x5A},
1735     {0x0352,0xEE},
1736     {0x0353,0x69},
1737     {0x0354,0x49},
1738     {0x0355,0x39},
1739     {0x0356,0x6D},
1740     {0x0357,0x3c},
1741     {0x0358,0x00},
1742     {0x0359,0x3C},
1743     {0x035A,0x5A},
1744     {0x035B,0xEE},
1745     {0x035C,0x69},
1746     {0x035D,0x49},
1747     {0x035E,0x39},
1748     {0x035F,0x85},
1749         {0x0049,0x14},  // PipeSetupBank0 bGammaGain 
1750         {0x004A,0x0E},  // PipeSetupBank0 bGammaInterpolationGain
1751         {0x0069,0x14},  // PipeSetupBank1 bGammaGain 
1752         {0x006A,0x0E},  // PipeSetupBank1 bGammaInterpolationGain
1753         {0x0090,0x5A},  // GammaGainDamperControl fpX1 {MSB}   //24000
1754         {0x0091,0xEE},  // GammaGainDamperControl fpX1 {LSB}
1755         {0x0092,0x3E},  // GammaGainDamperControl fpY1 {MSB}   //1
1756         {0x0093,0x00},  // GammaGainDamperControl fpY1 {LSB}
1757         {0x0094,0x69},  // GammaGainDamperControl fpX2 {MSB}   //3444736
1758         {0x0095,0x49},  // GammaGainDamperControl fpX2 {LSB}
1759         {0x0096,0x39},  // GammaGainDamperControl fpY2 {MSB}   //0.238
1760         {0x0097,0xCF},  // GammaGainDamperControl fpY2 {LSB}
1761         {0x0098,0x01},  // GammaGainDamperControl fDisable
1762         {0x00A0,0x5A},  // GammaInterpolationDamperControl fpX1 {MSB}   //24000 
1763         {0x00A1,0xEE},  // GammaInterpolationDamperControl fpX1 {LSB} 
1764         {0x00A2,0x3E},  // GammaInterpolationDamperControl fpY1 {MSB}   //1 
1765         {0x00A3,0x00},  // GammaInterpolationDamperControl fpY1 {LSB} 
1766         {0x00A4,0x69},  // GammaInterpolationDamperControl fpX2 {MSB}   //3444736 
1767         {0x00A5,0x49},  // GammaInterpolationDamperControl fpX2 {LSB} 
1768         {0x00A6,0x3B},  // GammaInterpolationDamperControl fpY2 {MSB}   //0.4375 
1769         {0x00A7,0x80},  // GammaInterpolationDamperControl fpY2 {LSB} 
1770         {0x00A8,0x01},  // GammaInterpolationDamperControl fDisable
1771 #if 0   
1772     {0x0420,0x00},     //new LSC start - 0306
1773     {0x0421,0x26},
1774     {0x0422,0xff},
1775     {0x0423,0x03},
1776     {0x0424,0x00},
1777     {0x0425,0x63},
1778     {0x0426,0x00},
1779     {0x0427,0x8e},
1780     {0x0428,0xff},
1781     {0x0429,0xf3},
1782     {0x042A,0x00},
1783     {0x042B,0x26},
1784     {0x042C,0xff},
1785     {0x042D,0xc8},
1786     {0x042E,0xff},
1787     {0x042F,0x5f},
1788     {0x0430,0x00},
1789     {0x0431,0x10}, 
1790     {0x0432,0xfe},
1791     {0x0433,0xcf}, 
1792     {0x0434,0x00},
1793     {0x0435,0xc2}, 
1794     {0x0436,0x00},
1795     {0x0437,0xf2}, 
1796     {0x0438,0xff},
1797     {0x0439,0xd0}, 
1798     {0x043A,0x00},
1799     {0x043B,0xa1}, 
1800     {0x043C,0x00},
1801     {0x043D,0x2f}, 
1802     {0x043E,0xfe},
1803     {0x043F,0xdc},
1804     {0x0450,0x00},
1805     {0x0451,0x36},  
1806     {0x0452,0xff},
1807     {0x0453,0x60},  
1808     {0x0454,0x00},
1809     {0x0455,0x43},  
1810     {0x0456,0x00},
1811     {0x0457,0x6b},  
1812     {0x0458,0xff},
1813     {0x0459,0xdf},  
1814     {0x045A,0x00},
1815     {0x045B,0x83},  
1816     {0x045C,0xff},
1817     {0x045D,0xeb},  
1818     {0x045E,0xff},
1819     {0x045F,0x5f},
1820     {0x0440,0x00},
1821     {0x0441,0x36},        
1822     {0x0442,0xff},
1823     {0x0443,0x3e},        
1824     {0x0444,0x00},
1825     {0x0445,0x6d},        
1826     {0x0446,0x00},
1827     {0x0447,0x87},        
1828     {0x0448,0x00},
1829     {0x0449,0x0f},        
1830     {0x044A,0xff},
1831     {0x044B,0xd3},        
1832     {0x044C,0x00},
1833     {0x044D,0x18},        
1834     {0x044E,0xff},
1835     {0x044F,0x4f},
1836     {0x0561,0x08},
1837     {0x0460,0x00},
1838     {0x0461,0x22},
1839     {0x0462,0xff},
1840     {0x0463,0x0a},
1841     {0x0464,0x00},
1842     {0x0465,0x63},
1843     {0x0466,0x00},
1844     {0x0467,0x8b},
1845     {0x0468,0xff},
1846     {0x0469,0xf9},
1847     {0x046A,0x00},
1848     {0x046B,0x17},
1849     {0x046C,0xff},
1850     {0x046D,0xbd},
1851     {0x046E,0xff},
1852     {0x046F,0x65},
1853     {0x0470,0x00},
1854     {0x0471,0x15}, 
1855     {0x0472,0xfe},
1856     {0x0473,0xd7}, 
1857     {0x0474,0x00},
1858     {0x0475,0xb6}, 
1859     {0x0476,0x00},
1860     {0x0477,0xe5}, 
1861     {0x0478,0xff},
1862     {0x0479,0xd0}, 
1863     {0x047A,0x00},
1864     {0x047B,0xb2}, 
1865     {0x047C,0x00},
1866     {0x047D,0x2c}, 
1867     {0x047E,0xfe},
1868     {0x047F,0xe6},
1869     {0x0490,0x00},
1870     {0x0491,0x2b},  
1871     {0x0492,0xff},
1872     {0x0493,0x71},  
1873     {0x0494,0x00},
1874     {0x0495,0x43},  
1875     {0x0496,0x00},
1876     {0x0497,0x69},  
1877     {0x0498,0xff},
1878     {0x0499,0xd7},  
1879     {0x049A,0x00},
1880     {0x049B,0x59},  
1881     {0x049C,0xff},
1882     {0x049D,0xde},  
1883     {0x049E,0xff},
1884     {0x049F,0x76},                                    
1885     {0x0480,0x00},
1886     {0x0481,0x38},        
1887     {0x0482,0xff},
1888     {0x0483,0x3a},        
1889     {0x0484,0x00},
1890     {0x0485,0x6b},        
1891     {0x0486,0x00},
1892     {0x0487,0x86},        
1893     {0x0488,0x00},
1894     {0x0489,0x14},        
1895     {0x048A,0xff},
1896     {0x048B,0xd7},        
1897     {0x048C,0x00},
1898     {0x048D,0x13},        
1899     {0x048E,0xff},
1900     {0x048F,0x58},
1901     {0x0562,0x08},
1902     {0x04A0,0x00},
1903     {0x04A1,0x17},
1904     {0x04A2,0xff},
1905     {0x04A3,0x2e},
1906     {0x04A4,0x00},
1907     {0x04A5,0x5d},
1908     {0x04A6,0x00},
1909     {0x04A7,0x7a},
1910     {0x04A8,0xff},
1911     {0x04A9,0xf9},
1912     {0x04AA,0xff},
1913     {0x04AB,0xc0},
1914     {0x04AC,0xff},
1915     {0x04AD,0xc7},
1916     {0x04AE,0xff},
1917     {0x04AF,0x7d},
1918     {0x04B0,0x00},
1919     {0x04B1,0x13}, 
1920     {0x04B2,0xff},
1921     {0x04B3,0x45}, 
1922     {0x04B4,0x00},
1923     {0x04B5,0x70}, 
1924     {0x04B6,0x00},
1925     {0x04B7,0x96}, 
1926     {0x04B8,0xff},
1927     {0x04B9,0xde}, 
1928     {0x04BA,0x00},
1929     {0x04BB,0x17}, 
1930     {0x04BC,0x00},
1931     {0x04BD,0x23}, 
1932     {0x04BE,0xff},
1933     {0x04BF,0x46},
1934     {0x04D0,0x00},
1935     {0x04D1,0x17},  
1936     {0x04D2,0xff},
1937     {0x04D3,0x99},  
1938     {0x04D4,0x00},
1939     {0x04D5,0x3d},  
1940     {0x04D6,0x00},
1941     {0x04D7,0x5f},  
1942     {0x04D8,0xff},
1943     {0x04D9,0xd1},  
1944     {0x04DA,0xff},
1945     {0x04DB,0xe2},  
1946     {0x04DC,0xff},
1947     {0x04DD,0xc6},  
1948     {0x04DE,0xff},
1949     {0x04DF,0x9c},                                    
1950     {0x04C0,0x00},
1951     {0x04C1,0x32},        
1952     {0x04C2,0xff},
1953     {0x04C3,0x4e},        
1954     {0x04C4,0x00},
1955     {0x04C5,0x5e},        
1956     {0x04C6,0x00},
1957     {0x04C7,0x7c},        
1958     {0x04C8,0x00},
1959     {0x04C9,0x17},        
1960     {0x04CA,0xff},
1961     {0x04CB,0x9b},        
1962     {0x04CC,0x00},
1963     {0x04CD,0x06},        
1964     {0x04CE,0xff},
1965     {0x04CF,0x70},
1966     {0x0563,0x05},
1967     {0x04E0,0x00},
1968     {0x04E1,0x11},
1969     {0x04E2,0xff},
1970     {0x04E3,0x20},
1971     {0x04E4,0x00},
1972     {0x04E5,0x5f},
1973     {0x04E6,0x00},
1974     {0x04E7,0x7b},
1975     {0x04E8,0x00},
1976     {0x04E9,0x02},
1977     {0x04EA,0xff},
1978     {0x04EB,0xf1},
1979     {0x04EC,0xff},
1980     {0x04ED,0xb7},
1981     {0x04EE,0xff},
1982     {0x04EF,0x7b},
1983     {0x04F0,0x00},
1984     {0x04F1,0x1c}, 
1985     {0x04F2,0xff},
1986     {0x04F3,0x08}, 
1987     {0x04F4,0x00},
1988     {0x04F5,0x7e}, 
1989     {0x04F6,0x00},
1990     {0x04F7,0xac}, 
1991     {0x04F8,0xff},
1992     {0x04F9,0xeb}, 
1993     {0x04FA,0x00},
1994     {0x04FB,0x93}, 
1995     {0x04FC,0x00},
1996     {0x04FD,0x1b}, 
1997     {0x04FE,0xff},
1998     {0x04FF,0x11}, 
1999     {0x0510,0xff},
2000     {0x0511,0xfe},  
2001     {0x0512,0xff},
2002     {0x0513,0x8e},  
2003     {0x0514,0x00},
2004     {0x0515,0x4a},  
2005     {0x0516,0x00},
2006     {0x0517,0x6e},  
2007     {0x0518,0xff},
2008     {0x0519,0xbb},  
2009     {0x051A,0xff},
2010     {0x051B,0xcc},  
2011     {0x051C,0xff},
2012     {0x051D,0x9a},  
2013     {0x051E,0xff},
2014     {0x051F,0xa2},  
2015     {0x0500,0x00},
2016     {0x0501,0x30},        
2017     {0x0502,0xff},
2018     {0x0503,0x36},        
2019     {0x0504,0x00},
2020     {0x0505,0x5d},        
2021     {0x0506,0x00},
2022     {0x0507,0x81},        
2023     {0x0508,0x00},
2024     {0x0509,0x1f},        
2025     {0x050A,0xff},
2026     {0x050B,0xd4},        
2027     {0x050C,0xff},
2028     {0x050D,0xfe},        
2029     {0x050E,0xff},
2030     {0x050F,0x75},
2031     {0x0564,0x00}, //new LSC end
2032 #else
2033
2034 {0x0420,0x00},   //C0_GreenRed_X
2035 {0x0421,0x1E},   //C0_GreenRed_X LSB
2036 {0x0422,0xFF},   //C0_GreenRed_Y
2037 {0x0423,0xF3},   //C0_GreenRed_Y LSB
2038 {0x0424,0x00},   //C0_GreenRed_X2
2039 {0x0425,0x6E},   //C0_GreenRed_X2 LSB
2040 {0x0426,0x00},   //C0_GreenRed_Y2
2041 {0x0427,0x96},   //C0_GreenRed_Y2 LSB
2042 {0x0428,0x00},   //C0_GreenRed_XY
2043 {0x0429,0x40},   //C0_GreenRed_XY LSB
2044 {0x042A,0x00},   //C0_GreenRed_X2Y
2045 {0x042B,0x3F},   //C0_GreenRed_X2Y LSB
2046 {0x042C,0x00},   //C0_GreenRed_XY2
2047 {0x042D,0x99},   //C0_GreenRed_XY2 LSB
2048 {0x042E,0xFF},   //C0_GreenRed_X2Y2
2049 {0x042F,0xCD},   //C0_GreenRed_X2Y2 LSB
2050 {0x0430,0xFF},   //C0_Red_X
2051 {0x0431,0xC1},   //C0_Red_X LSB
2052 {0x0432,0xFF},   //C0_Red_Y
2053 {0x0433,0x8C},   //C0_Red_Y LSB
2054 {0x0434,0x00},   //C0_Red_X2
2055 {0x0435,0xD1},   //C0_Red_X2 LSB
2056 {0x0436,0x00},   //C0_Red_Y2
2057 {0x0437,0xF9},   //C0_Red_Y2 LSB
2058 {0x0438,0xFF},   //C0_Red_XY
2059 {0x0439,0xD0},   //C0_Red_XY LSB
2060 {0x043A,0xFF},   //C0_Red_X2Y
2061 {0x043B,0xD4},   //C0_Red_X2Y LSB
2062 {0x043C,0x00},   //C0_Red_XY2
2063 {0x043D,0x46},   //C0_Red_XY2 LSB
2064 {0x043E,0xFF},   //C0_Red_X2Y2
2065 {0x043F,0x1F},   //C0_Red_X2Y2 LSB
2066 {0x0440,0x00},   //C0_GreenBlue_X
2067 {0x0441,0x00},   //C0_GreenBlue_X LSB
2068 {0x0442,0xFF},   //C0_GreenBlue_Y
2069 {0x0443,0xEC},   //C0_GreenBlue_Y LSB
2070 {0x0444,0x00},   //C0_GreenBlue_X2
2071 {0x0445,0x7D},   //C0_GreenBlue_X2 LSB
2072 {0x0446,0x00},   //C0_GreenBlue_Y2
2073 {0x0447,0x89},   //C0_GreenBlue_Y2 LSB
2074 {0x0448,0x00},   //C0_GreenBlue_XY
2075 {0x0449,0x4A},   //C0_GreenBlue_XY LSB
2076 {0x044A,0x00},   //C0_GreenBlue_X2Y
2077 {0x044B,0x00},   //C0_GreenBlue_X2Y LSB
2078 {0x044C,0x00},   //C0_GreenBlue_XY2
2079 {0x044D,0x6C},   //C0_GreenBlue_XY2 LSB
2080 {0x044E,0xFF},   //C0_GreenBlue_X2Y2
2081 {0x044F,0xB5},   //C0_GreenBlue_X2Y2 LSB        // C9
2082 {0x0450,0x00},   //C0_Blue_X
2083 {0x0451,0x03},   //C0_Blue_X LSB
2084 {0x0452,0xFF},   //C0_Blue_Y
2085 {0x0453,0xC8},   //C0_Blue_Y LSB
2086 {0x0454,0x00},   //C0_Blue_X2
2087 {0x0455,0x5D},   //C0_Blue_X2 LSB
2088 {0x0456,0x00},   //C0_Blue_Y2
2089 {0x0457,0x7F},   //C0_Blue_Y2 LSB
2090 {0x0458,0xFF},   //C0_Blue_XY
2091 {0x0459,0xD0},   //C0_Blue_XY LSB
2092 {0x045A,0x00},   //C0_Blue_X2Y
2093 {0x045B,0x1A},   //C0_Blue_X2Y LSB
2094 {0x045C,0xFF},   //C0_Blue_XY2
2095 {0x045D,0xC8},   //C0_Blue_XY2 LSB
2096 {0x045E,0xFF},   //C0_Blue_X2Y2
2097 {0x045F,0xDA},   //C0_Blue_X2Y2 LSB
2098 {0x0460,0x00},   //C1_GreenRed_X
2099 {0x0461,0x25},   //C1_GreenRed_X LSB
2100 {0x0462,0x00},   //C1_GreenRed_Y
2101 {0x0463,0x00},   //C1_GreenRed_Y LSB
2102 {0x0464,0x00},   //C1_GreenRed_X2
2103 {0x0465,0x65},   //C1_GreenRed_X2 LSB
2104 {0x0466,0x00},   //C1_GreenRed_Y2
2105 {0x0467,0x85},   //C1_GreenRed_Y2 LSB
2106 {0x0468,0x00},   //C1_GreenRed_XY
2107 {0x0469,0x41},   //C1_GreenRed_XY LSB
2108 {0x046A,0x00},   //C1_GreenRed_X2Y
2109 {0x046B,0x42},   //C1_GreenRed_X2Y LSB
2110 {0x046C,0x00},   //C1_GreenRed_XY2
2111 {0x046D,0x91},   //C1_GreenRed_XY2 LSB
2112 {0x046E,0xFF},   //C1_GreenRed_X2Y2
2113 {0x046F,0xDA},   //C1_GreenRed_X2Y2 LSB // F0
2114 {0x0470,0xFF},   //C1_Red_X
2115 {0x0471,0xD7},   //C1_Red_X LSB
2116 {0x0472,0xFF},   //C1_Red_Y
2117 {0x0473,0xA0},   //C1_Red_Y LSB
2118 {0x0474,0x00},   //C1_Red_X2
2119 {0x0475,0x8C},   //C1_Red_X2 LSB
2120 {0x0476,0x00},   //C1_Red_Y2
2121 {0x0477,0xA5},   //C1_Red_Y2 LSB
2122 {0x0478,0xFF},   //C1_Red_XY
2123 {0x0479,0xD6},   //C1_Red_XY LSB
2124 {0x047A,0xFF},   //C1_Red_X2Y
2125 {0x047B,0xDA},   //C1_Red_X2Y LSB
2126 {0x047C,0x00},   //C1_Red_XY2
2127 {0x047D,0x58},   //C1_Red_XY2 LSB
2128 {0x047E,0xFF},   //C1_Red_X2Y2
2129 {0x047F,0xC4},   //C1_Red_X2Y2 LSB
2130 {0x0480,0x00},   //C1_GreenBlue_X
2131 {0x0481,0x04},   //C1_GreenBlue_X LSB
2132 {0x0482,0xFF},   //C1_GreenBlue_Y
2133 {0x0483,0xFA},   //C1_GreenBlue_Y LSB
2134 {0x0484,0x00},   //C1_GreenBlue_X2
2135 {0x0485,0x70},   //C1_GreenBlue_X2 LSB
2136 {0x0486,0x00},   //C1_GreenBlue_Y2
2137 {0x0487,0x7B},   //C1_GreenBlue_Y2 LSB
2138 {0x0488,0x00},   //C1_GreenBlue_XY
2139 {0x0489,0x4E},   //C1_GreenBlue_XY LSB
2140 {0x048A,0x00},   //C1_GreenBlue_X2Y
2141 {0x048B,0x00},   //C1_GreenBlue_X2Y LSB
2142 {0x048C,0x00},   //C1_GreenBlue_XY2
2143 {0x048D,0x8F},   //C1_GreenBlue_XY2 LSB
2144 {0x048E,0xFF},   //C1_GreenBlue_X2Y2
2145 {0x048F,0xEC},   //C1_GreenBlue_X2Y2 LSB
2146 {0x0490,0x00},   //C1_Blue_X
2147 {0x0491,0x08},   //C1_Blue_X LSB
2148 {0x0492,0xFF},   //C1_Blue_Y
2149 {0x0493,0xD0},   //C1_Blue_Y LSB
2150 {0x0494,0x00},   //C1_Blue_X2
2151 {0x0495,0x55},   //C1_Blue_X2 LSB
2152 {0x0496,0x00},   //C1_Blue_Y2
2153 {0x0497,0x70},   //C1_Blue_Y2 LSB
2154 {0x0498,0xFF},   //C1_Blue_XY
2155 {0x0499,0xC4},   //C1_Blue_XY LSB
2156 {0x049A,0x00},   //C1_Blue_X2Y
2157 {0x049B,0x03},   //C1_Blue_X2Y LSB
2158 {0x049C,0xFF},   //C1_Blue_XY2
2159 {0x049D,0xD2},   //C1_Blue_XY2 LSB
2160 {0x049E,0x00},   //C1_Blue_X2Y2
2161 {0x049F,0x04},   //C1_Blue_X2Y2 LSB
2162 {0x04A0,0x00},   //C2_GreenRed_X
2163 {0x04A1,0x28},   //C2_GreenRed_X LSB
2164 {0x04A2,0xFF},   //C2_GreenRed_Y
2165 {0x04A3,0xFA},   //C2_GreenRed_Y LSB
2166 {0x04A4,0x00},   //C2_GreenRed_X2
2167 {0x04A5,0x69},   //C2_GreenRed_X2 LSB
2168 {0x04A6,0x00},   //C2_GreenRed_Y2
2169 {0x04A7,0x88},   //C2_GreenRed_Y2 LSB
2170 {0x04A8,0x00},   //C2_GreenRed_XY
2171 {0x04A9,0x47},   //C2_GreenRed_XY LSB
2172 {0x04AA,0x00},   //C2_GreenRed_X2Y
2173 {0x04AB,0x46},   //C2_GreenRed_X2Y LSB
2174 {0x04AC,0x00},   //C2_GreenRed_XY2
2175 {0x04AD,0xA2},   //C2_GreenRed_XY2 LSB
2176 {0x04AE,0xFF},   //C2_GreenRed_X2Y2
2177 {0x04AF,0xCF},   //C2_GreenRed_X2Y2 LSB // EA
2178 {0x04B0,0xFF},   //C2_Red_X
2179 {0x04B1,0xDC},   //C2_Red_X LSB
2180 {0x04B2,0xFF},   //C2_Red_Y
2181 {0x04B3,0xA4},   //C2_Red_Y LSB
2182 {0x04B4,0x00},   //C2_Red_X2
2183 {0x04B5,0x93},   //C2_Red_X2 LSB
2184 {0x04B6,0x00},   //C2_Red_Y2
2185 {0x04B7,0xB2},   //C2_Red_Y2 LSB
2186 {0x04B8,0xFF},   //C2_Red_XY
2187 {0x04B9,0xD8},   //C2_Red_XY LSB
2188 {0x04BA,0xFF},   //C2_Red_X2Y
2189 {0x04BB,0xCD},   //C2_Red_X2Y LSB
2190 {0x04BC,0x00},   //C2_Red_XY2
2191 {0x04BD,0x48},   //C2_Red_XY2 LSB
2192 {0x04BE,0xFF},   //C2_Red_X2Y2
2193 {0x04BF,0x9B},   //C2_Red_X2Y2 LSB
2194 {0x04C0,0x00},   //C2_GreenBlue_X
2195 {0x04C1,0x08},   //C2_GreenBlue_X LSB
2196 {0x04C2,0x00},   //C2_GreenBlue_Y
2197 {0x04C3,0x00},   //C2_GreenBlue_Y LSB
2198 {0x04C4,0x00},   //C2_GreenBlue_X2
2199 {0x04C5,0x73},   //C2_GreenBlue_X2 LSB
2200 {0x04C6,0x00},   //C2_GreenBlue_Y2
2201 {0x04C7,0x80},   //C2_GreenBlue_Y2 LSB
2202 {0x04C8,0x00},   //C2_GreenBlue_XY
2203 {0x04C9,0x4F},   //C2_GreenBlue_XY LSB
2204 {0x04CA,0xFF},   //C2_GreenBlue_X2Y
2205 {0x04CB,0xEF},   //C2_GreenBlue_X2Y LSB
2206 {0x04CC,0x00},   //C2_GreenBlue_XY2
2207 {0x04CD,0x89},   //C2_GreenBlue_XY2 LSB
2208 {0x04CE,0xFF},   //C2_GreenBlue_X2Y2
2209 {0x04CF,0xE2},   //C2_GreenBlue_X2Y2 LSB
2210 {0x04D0,0x00},   //C2_Blue_X
2211 {0x04D1,0x0C},   //C2_Blue_X LSB
2212 {0x04D2,0xFF},   //C2_Blue_Y
2213 {0x04D3,0xCE},   //C2_Blue_Y LSB
2214 {0x04D4,0x00},   //C2_Blue_X2
2215 {0x04D5,0x57},   //C2_Blue_X2 LSB
2216 {0x04D6,0x00},   //C2_Blue_Y2
2217 {0x04D7,0x72},   //C2_Blue_Y2 LSB
2218 {0x04D8,0xFF},   //C2_Blue_XY
2219 {0x04D9,0xC4},   //C2_Blue_XY LSB
2220 {0x04DA,0x00},   //C2_Blue_X2Y
2221 {0x04DB,0x09},   //C2_Blue_X2Y LSB
2222 {0x04DC,0xFF},   //C2_Blue_XY2
2223 {0x04DD,0xD2},   //C2_Blue_XY2 LSB
2224 {0x04DE,0xFF},   //C2_Blue_X2Y2
2225 {0x04DF,0xFC},   //C2_Blue_X2Y2 LSB
2226 {0x04E0,0x00},   //C3_GreenRed_X
2227 {0x04E1,0x2C},   //C3_GreenRed_X LSB
2228 {0x04E2,0xFF},   //C3_GreenRed_Y
2229 {0x04E3,0xFB},   //C3_GreenRed_Y LSB
2230 {0x04E4,0x00},   //C3_GreenRed_X2
2231 {0x04E5,0x69},   //C3_GreenRed_X2 LSB
2232 {0x04E6,0x00},   //C3_GreenRed_Y2
2233 {0x04E7,0x87},   //C3_GreenRed_Y2 LSB
2234 {0x04E8,0x00},   //C3_GreenRed_XY
2235 {0x04E9,0x4A},   //C3_GreenRed_XY LSB
2236 {0x04EA,0x00},   //C3_GreenRed_X2Y
2237 {0x04EB,0x56},   //C3_GreenRed_X2Y LSB
2238 {0x04EC,0x00},   //C3_GreenRed_XY2
2239 {0x04ED,0x9A},   //C3_GreenRed_XY2 LSB
2240 {0x04EE,0xFF},   //C3_GreenRed_X2Y2
2241 {0x04EF,0xBE},   //C3_GreenRed_X2Y2 LSB // DC
2242 {0x04F0,0xFF},   //C3_Red_X
2243 {0x04F1,0xEB},   //C3_Red_X LSB
2244 {0x04F2,0xFF},   //C3_Red_Y
2245 {0x04F3,0x9B},   //C3_Red_Y LSB
2246 {0x04F4,0x00},   //C3_Red_X2
2247 {0x04F5,0xA5},   //C3_Red_X2 LSB
2248 {0x04F6,0x00},   //C3_Red_Y2
2249 {0x04F7,0xCC},   //C3_Red_Y2 LSB
2250 {0x04F8,0xFF},   //C3_Red_XY
2251 {0x04F9,0xE1},   //C3_Red_XY LSB
2252 {0x04FA,0xFF},   //C3_Red_X2Y
2253 {0x04FB,0xD9},   //C3_Red_X2Y LSB
2254 {0x04FC,0x00},   //C3_Red_XY2
2255 {0x04FD,0x6A},   //C3_Red_XY2 LSB
2256 {0x04FE,0xFF},   //C3_Red_X2Y2
2257 {0x04FF,0x5E},   //C3_Red_X2Y2 LSB
2258 {0x0500,0x00},   //C3_GreenBlue_X
2259 {0x0501,0x06},   //C3_GreenBlue_X LSB
2260 {0x0502,0xFF},   //C3_GreenBlue_Y
2261 {0x0503,0xFC},   //C3_GreenBlue_Y LSB
2262 {0x0504,0x00},   //C3_GreenBlue_X2
2263 {0x0505,0x6F},   //C3_GreenBlue_X2 LSB
2264 {0x0506,0x00},   //C3_GreenBlue_Y2
2265 {0x0507,0x83},   //C3_GreenBlue_Y2 LSB
2266 {0x0508,0x00},   //C3_GreenBlue_XY
2267 {0x0509,0x5A},   //C3_GreenBlue_XY LSB
2268 {0x050A,0xFF},   //C3_GreenBlue_X2Y
2269 {0x050B,0xF7},   //C3_GreenBlue_X2Y LSB
2270 {0x050C,0x00},   //C3_GreenBlue_XY2
2271 {0x050D,0x80},   //C3_GreenBlue_XY2 LSB
2272 {0x050E,0xFF},   //C3_GreenBlue_X2Y2
2273 {0x050F,0xD3},   //C3_GreenBlue_X2Y2 LSB
2274 {0x0510,0x00},   //C3_Blue_X
2275 {0x0511,0x0B},   //C3_Blue_X LSB
2276 {0x0512,0xFF},   //C3_Blue_Y
2277 {0x0513,0xCE},   //C3_Blue_Y LSB
2278 {0x0514,0x00},   //C3_Blue_X2
2279 {0x0515,0x58},   //C3_Blue_X2 LSB
2280 {0x0516,0x00},   //C3_Blue_Y2
2281 {0x0517,0x73},   //C3_Blue_Y2 LSB
2282 {0x0518,0xFF},   //C3_Blue_XY
2283 {0x0519,0xBE},   //C3_Blue_XY LSB
2284 {0x051A,0xFF},   //C3_Blue_X2Y
2285 {0x051B,0xFB},   //C3_Blue_X2Y LSB
2286 {0x051C,0xFF},   //C3_Blue_XY2
2287 {0x051D,0xD2},   //C3_Blue_XY2 LSB
2288 {0x051E,0xFF},   //C3_Blue_X2Y2
2289 {0x051F,0xFA},   //C3_Blue_X2Y2 LSB
2290 {0x0561,0x05},   //C0 Unity
2291 {0x0562,0x01},   //C1 Unity
2292 {0x0563,0x01},   //C2 Unity
2293 {0x0564,0x09},   //C3 Unity
2294
2295
2296 #endif
2297
2298     {0x0324,0x39},
2299     {0x0325,0xAE},
2300     {0x0326,0x3A},
2301     {0x0327,0x29},
2302     {0x0328,0x3B},
2303     {0x0329,0x0A},
2304     {0x032A,0x3B},
2305     {0x032B,0x62},
2306     {0x0320,0x01},
2307     {0x0321,0x04},
2308     {0x0322,0x01},
2309     {0x0323,0x01},
2310     {0x0330,0x01},
2311     {0x0384,0x00},
2312     {0x0337,0x01},
2313     {0x03EC,0x39},
2314     {0x03ED,0x85},
2315     {0x03FC,0x3A},
2316     {0x03FD,0x14},
2317     {0x040C,0x3A},
2318     {0x040D,0xF6},
2319     {0x041C,0x3B},
2320     {0x041D,0x9A},
2321     {0x03E0,0xB6},
2322     {0x03E1,0x04},
2323     {0x03E2,0xBB},
2324     {0x03E3,0xE9},
2325     {0x03E4,0xBC},
2326     {0x03E5,0x70},
2327     {0x03E6,0x37},
2328     {0x03E7,0x02},
2329     {0x03E8,0xBC},
2330     {0x03E9,0x00},
2331     {0x03EA,0xBF},
2332     {0x03EB,0x12},
2333     {0x03F0,0xBA},
2334     {0x03F1,0x7B},
2335     {0x03F2,0xBA},
2336     {0x03F3,0x83},
2337     {0x03F4,0xBB},
2338     {0x03F5,0xBC},
2339     {0x03F6,0x38},
2340     {0x03F7,0x2D},
2341     {0x03F8,0xBB},
2342     {0x03F9,0x23},
2343     {0x03FA,0xBD},
2344     {0x03FB,0xAC},
2345     {0x0400,0xBE},
2346     {0x0401,0x96},
2347     {0x0402,0xB9},
2348     {0x0403,0xBE},
2349     {0x0404,0xBB},
2350     {0x0405,0x57},
2351     {0x0406,0x3A},
2352     {0x0407,0xBB},
2353     {0x0408,0xB3},
2354     {0x0409,0x17},
2355     {0x040A,0xBE},
2356     {0x040B,0x66},
2357     {0x0410,0xBB},
2358     {0x0411,0x2A},
2359     {0x0412,0xBA},
2360     {0x0413,0x00},
2361     {0x0414,0xBB},
2362     {0x0415,0x10},
2363     {0x0416,0xB8},
2364     {0x0417,0xCD},
2365     {0x0418,0xB7},
2366     {0x0419,0x5C},
2367     {0x041A,0xBB},
2368     {0x041B,0x6C},
2369     {0x01f8,0x3c},
2370     {0x01f9,0x00},
2371     {0x01fa,0x00},
2372     {0x02a2,0x3e},
2373     {0x02a3,0x00},
2374     {0x02a4,0x3e},
2375     {0x02a5,0x00},
2376     {0x02a6,0x3e},
2377     {0x02a7,0x00},
2378     {0x02a8,0x3e},
2379     {0x02a9,0x00},
2380     {0x056c,0x42},
2381     {0x056d,0x00},
2382     {0x056e,0x42},
2383     {0x056f,0x00},
2384     {0x0570,0x42},
2385     {0x0571,0x00},
2386     {0x0572,0x42},
2387     {0x0573,0x10},
2388     {0x0081,0x64},  //6E->55
2389     {0x0588,0x00},
2390     {0x0589,0x5A},
2391     {0x058A,0xEE},
2392     {0x058B,0x69},
2393     {0x058C,0x49},
2394     {0x058D,0x3D},
2395     {0x058E,0x3D},
2396     {0x0080,0x64},
2397     {0x0082,0x5a},
2398   //  {0x0010,0x01},
2399
2400    // SensorWaitMs(200),
2401
2402     {0x4708,0x00},
2403     {0x4709,0x00},
2404     {0x4710,0x00},
2405     {0x4711,0x00},
2406     //AF intial setting
2407     {0x0659,0x01},//03-06 new af @ vcm
2408     {0x065A,0x00},
2409     {0x06C9,0x01},
2410     {0x06CD,0x01},
2411     {0x06CE,0xBD},
2412     {0x06CF,0x00},
2413     {0x06D0,0x60},
2414     {0x06D1,0x02},
2415     {0x06D2,0x30},
2416     {0x06D3,0xD4},
2417     {0x06D4,0x01},
2418     {0x06D5,0x01},
2419         {0x06D6,0xBD},//60->BC->66
2420         {0x06D7,0x00},
2421         {0x06D8,0x60},//93
2422         {0x06D9,0x00},
2423         {0x06DA,0x60},//93
2424     {0x06DB,0x59},
2425     {0x06DC,0x0d},
2426     {0x0730,0x00},
2427     {0x0731,0x00},
2428     {0x0732,0x03},
2429     {0x0733,0xFF},
2430     {0x0734,0x03},
2431     {0x0735,0x70},
2432     {0x0755,0x01},
2433     {0x0756,0x00},
2434     {0x075A,0x00},
2435     {0x075B,0x01},
2436     {0x075E,0x00},
2437     {0x0764,0x01},
2438     {0x0766,0x01},
2439     {0x0768,0x01},
2440     {0x076A,0x00},
2441     {0x0758,0x01},
2442     {0x075C,0x01},
2443     {0x0770,0x98},
2444     {0x0771,0x19},
2445     {0x0772,0x1B},
2446     {0x0774,0x01},
2447     {0x0775,0x4a},
2448     {0x0777,0x00},
2449     {0x0778,0x45},
2450     {0x0779,0x00},
2451     {0x077A,0x02},
2452     {0x077D,0x01},
2453     {0x077E,0x03},
2454     {0x0783,0x10},
2455     {0x0785,0x14},
2456     {0x0788,0x04},
2457     {0x0846,0x06},
2458     {0x0847,0x05},
2459     {0xC41A,0x05},
2460     {0xC423,0x11},
2461     {0xC427,0x11},
2462     {0x300B,0x09},
2463
2464     {0x7000,0x08}, 
2465     {0x5200,0x09}, 
2466     {0x00B2,0x50}, 
2467     {0x00B3,0x80}, 
2468     {0x00B5,0x02}, 
2469     {0x0030,0x11}, 
2470    // {0x0040,0x01}, //AB2
2471    // {0x0041,0x03}, //SVGA mode
2472         {0x0040,0x01},
2473     {0x0041,0x0A},
2474         {0x0042,0x05},
2475         {0x0043,0x00},
2476         {0x0044,0x03},
2477         {0x0045,0xC0},
2478
2479     {0x0010,0x01},
2480     SensorWaitMs(150),
2481     SensorEnd
2482 };
2483 /* Senor full resolution setting: recommand for capture */
2484 static struct rk_sensor_reg sensor_fullres_lowfps_data[] ={
2485
2486    // {0x0010,0x02},
2487    // SensorWaitMs(100),    
2488     //{0x00B5, 0x02}, 
2489     //{0x0030, 0x11}, 
2490   {0x0040, 0x00},
2491         {0x0041, 0x00},
2492         {0x004c, 0x12},
2493          //{0x0010, 0x01},
2494    // SensorWaitMs(150),
2495
2496         SensorEnd
2497 };
2498 /* Senor full resolution setting: recommand for video */
2499 static struct rk_sensor_reg sensor_fullres_highfps_data[] ={
2500         SensorEnd
2501 };
2502 /* Preview resolution setting*/
2503 static struct rk_sensor_reg sensor_preview_data[] =
2504 {
2505
2506    // {0x0010,0x02},
2507    // SensorWaitMs(100),    
2508    // {0x00B5, 0x01}, 
2509    // {0x0030, 0x12}, 
2510         {0x0040,0x01},
2511   {0x0041,0x0A},
2512         {0x0042,0x05},
2513         {0x0043,0x00},
2514         {0x0044,0x03},
2515         {0x0045,0xC0},
2516         {0x004c,0x0e},
2517         //{0x00ed,0x0d},
2518         //{0x0010, 0x01},
2519         // SensorWaitMs(150),
2520
2521         SensorEnd
2522 };
2523 /* 1280x720 */
2524 static struct rk_sensor_reg sensor_720p[]={
2525         SensorEnd
2526 };
2527
2528 /* 1920x1080 */
2529 static struct rk_sensor_reg sensor_1080p[]={
2530         SensorEnd
2531 };
2532
2533
2534 static struct rk_sensor_reg sensor_softreset_data[]={
2535         SensorEnd
2536 };
2537
2538 static struct rk_sensor_reg sensor_check_id_data[]={
2539         SensorRegVal(0x0000,0),
2540         SensorRegVal(0x0001,0),
2541         SensorEnd
2542 };
2543 /*
2544 *  The following setting must been filled, if the function is turn on by CONFIG_SENSOR_xxxx
2545 */
2546 static struct rk_sensor_reg sensor_WhiteB_Auto[]=
2547 {
2548         {0x01A0,0x01},
2549         SensorEnd
2550 };
2551 /* Cloudy Colour Temperature : 6500K - 8000K  */
2552 static  struct rk_sensor_reg sensor_WhiteB_Cloudy[]=
2553 {
2554         {0x01A0,0x04},
2555         SensorEnd
2556 };
2557 /* ClearDay Colour Temperature : 5000K - 6500K  */
2558 static  struct rk_sensor_reg sensor_WhiteB_ClearDay[]=
2559 {
2560         {0x01A0,0x05},
2561         SensorEnd
2562 };
2563 /* Office Colour Temperature : 3500K - 5000K  */
2564 static  struct rk_sensor_reg sensor_WhiteB_TungstenLamp1[]=
2565 {
2566         {0x01A0,0x07},
2567         SensorEnd
2568
2569 };
2570 /* Home Colour Temperature : 2500K - 3500K      */
2571 static  struct rk_sensor_reg sensor_WhiteB_TungstenLamp2[]=
2572 {
2573         {0x01A0,0x08},
2574         SensorEnd
2575 };
2576 static struct rk_sensor_reg *sensor_WhiteBalanceSeqe[] = {sensor_WhiteB_Auto, sensor_WhiteB_TungstenLamp1,sensor_WhiteB_TungstenLamp2,
2577         sensor_WhiteB_ClearDay, sensor_WhiteB_Cloudy,NULL,
2578 };
2579
2580 static  struct rk_sensor_reg sensor_Brightness0[]=
2581 {
2582         // Brightness -2
2583         SensorEnd
2584 };
2585
2586 static  struct rk_sensor_reg sensor_Brightness1[]=
2587 {
2588         // Brightness -1
2589
2590         SensorEnd
2591 };
2592
2593 static  struct rk_sensor_reg sensor_Brightness2[]=
2594 {
2595         //      Brightness 0
2596
2597         SensorEnd
2598 };
2599
2600 static  struct rk_sensor_reg sensor_Brightness3[]=
2601 {
2602         // Brightness +1
2603
2604         SensorEnd
2605 };
2606
2607 static  struct rk_sensor_reg sensor_Brightness4[]=
2608 {
2609         //      Brightness +2
2610
2611         SensorEnd
2612 };
2613
2614 static  struct rk_sensor_reg sensor_Brightness5[]=
2615 {
2616         //      Brightness +3
2617
2618         SensorEnd
2619 };
2620 static struct rk_sensor_reg *sensor_BrightnessSeqe[] = {sensor_Brightness0, sensor_Brightness1, sensor_Brightness2, sensor_Brightness3,
2621         sensor_Brightness4, sensor_Brightness5,NULL,
2622 };
2623
2624 static  struct rk_sensor_reg sensor_Effect_Normal[] =
2625 {
2626         {0x0380,0x0},
2627         {0x0381,0x0},
2628         {0x0382,0x0},
2629         {0x0384,0x0},
2630         SensorEnd
2631 };
2632
2633 static  struct rk_sensor_reg sensor_Effect_WandB[] =
2634 {
2635         {0x0380,0x0},
2636         {0x0381,0x0},
2637         {0x0382,0x0},
2638         {0x0384,0x5},
2639         SensorEnd
2640 };
2641
2642 static  struct rk_sensor_reg sensor_Effect_Sepia[] =
2643 {
2644         {0x0380,0x0},
2645         {0x0381,0x0},
2646         {0x0382,0x0},
2647         {0x0384,0x6},
2648         SensorEnd
2649 };
2650
2651 static  struct rk_sensor_reg sensor_Effect_Negative[] =
2652 {
2653         //Negative
2654         {0x0380,0x0},
2655         {0x0381,0x0},
2656         {0x0382,0x0},
2657         {0x0384,0x8},
2658         SensorEnd
2659 };
2660 static  struct rk_sensor_reg sensor_Effect_Bluish[] =
2661 {
2662         // Bluish
2663         {0x0380,0x0},
2664         {0x0381,0x0},
2665         {0x0382,0x0},
2666         {0x0384,0x4},
2667         SensorEnd
2668 };
2669
2670 static  struct rk_sensor_reg sensor_Effect_Green[] =
2671 {
2672         //      Greenish
2673         {0x0380,0x0},
2674         {0x0381,0x0},
2675         {0x0382,0x0},
2676         {0x0384,0x3},
2677         SensorEnd
2678 };
2679 static struct rk_sensor_reg *sensor_EffectSeqe[] = {sensor_Effect_Normal, sensor_Effect_WandB, sensor_Effect_Negative,sensor_Effect_Sepia,
2680         sensor_Effect_Bluish, sensor_Effect_Green,NULL,
2681 };
2682
2683 static  struct rk_sensor_reg sensor_Exposure0[]=
2684 {
2685         SensorEnd
2686 };
2687
2688 static  struct rk_sensor_reg sensor_Exposure1[]=
2689 {
2690         SensorEnd
2691 };
2692
2693 static  struct rk_sensor_reg sensor_Exposure2[]=
2694 {
2695         SensorEnd
2696 };
2697
2698 static  struct rk_sensor_reg sensor_Exposure3[]=
2699 {
2700         SensorEnd
2701 };
2702
2703 static  struct rk_sensor_reg sensor_Exposure4[]=
2704 {
2705         SensorEnd
2706 };
2707
2708 static  struct rk_sensor_reg sensor_Exposure5[]=
2709 {
2710         SensorEnd
2711 };
2712
2713 static  struct rk_sensor_reg sensor_Exposure6[]=
2714 {
2715         SensorEnd
2716 };
2717
2718 static struct rk_sensor_reg *sensor_ExposureSeqe[] = {sensor_Exposure0, sensor_Exposure1, sensor_Exposure2, sensor_Exposure3,
2719         sensor_Exposure4, sensor_Exposure5,sensor_Exposure6,NULL,
2720 };
2721
2722 static  struct rk_sensor_reg sensor_Saturation0[]=
2723 {
2724         SensorEnd
2725 };
2726
2727 static  struct rk_sensor_reg sensor_Saturation1[]=
2728 {
2729         SensorEnd
2730 };
2731
2732 static  struct rk_sensor_reg sensor_Saturation2[]=
2733 {
2734         SensorEnd
2735 };
2736 static struct rk_sensor_reg *sensor_SaturationSeqe[] = {sensor_Saturation0, sensor_Saturation1, sensor_Saturation2, NULL,};
2737
2738 static  struct rk_sensor_reg sensor_Contrast0[]=
2739 {
2740         SensorEnd
2741 };
2742
2743 static  struct rk_sensor_reg sensor_Contrast1[]=
2744 {
2745         SensorEnd
2746 };
2747
2748 static  struct rk_sensor_reg sensor_Contrast2[]=
2749 {
2750         SensorEnd
2751 };
2752
2753 static  struct rk_sensor_reg sensor_Contrast3[]=
2754 {
2755         SensorEnd
2756 };
2757
2758 static  struct rk_sensor_reg sensor_Contrast4[]=
2759 {
2760         SensorEnd
2761 };
2762
2763
2764 static  struct rk_sensor_reg sensor_Contrast5[]=
2765 {
2766         SensorEnd
2767 };
2768
2769 static  struct rk_sensor_reg sensor_Contrast6[]=
2770 {
2771         SensorEnd
2772 };
2773 static struct rk_sensor_reg *sensor_ContrastSeqe[] = {sensor_Contrast0, sensor_Contrast1, sensor_Contrast2, sensor_Contrast3,
2774         sensor_Contrast4, sensor_Contrast5, sensor_Contrast6, NULL,
2775 };
2776 static  struct rk_sensor_reg sensor_SceneAuto[] =
2777 {
2778         {0x3a00, 0x78},
2779         SensorEnd
2780 };
2781
2782 static  struct rk_sensor_reg sensor_SceneNight[] =
2783 {
2784         SensorEnd
2785 };
2786 static struct rk_sensor_reg *sensor_SceneSeqe[] = {sensor_SceneAuto, sensor_SceneNight,NULL,};
2787
2788 static struct rk_sensor_reg sensor_Zoom0[] =
2789 {
2790         SensorEnd
2791 };
2792
2793 static struct rk_sensor_reg sensor_Zoom1[] =
2794 {
2795         SensorEnd
2796 };
2797
2798 static struct rk_sensor_reg sensor_Zoom2[] =
2799 {
2800         SensorEnd
2801 };
2802
2803
2804 static struct rk_sensor_reg sensor_Zoom3[] =
2805 {
2806         SensorEnd
2807 };
2808 static struct rk_sensor_reg *sensor_ZoomSeqe[] = {sensor_Zoom0, sensor_Zoom1, sensor_Zoom2, sensor_Zoom3, NULL,};
2809
2810 /*
2811 * User could be add v4l2_querymenu in sensor_controls by new_usr_v4l2menu
2812 */
2813 static struct v4l2_querymenu sensor_menus[] =
2814 {
2815 };
2816 /*
2817 * User could be add v4l2_queryctrl in sensor_controls by new_user_v4l2ctrl
2818 */
2819 static struct sensor_v4l2ctrl_usr_s sensor_controls[] =
2820 {
2821 };
2822
2823 //MUST define the current used format as the first item   
2824 static struct rk_sensor_datafmt sensor_colour_fmts[] = {
2825         {V4L2_MBUS_FMT_UYVY8_2X8, V4L2_COLORSPACE_JPEG} 
2826 };
2827
2828
2829 /*
2830 **********************************************************
2831 * Following is local code:
2832
2833 * Please codeing your program here 
2834 **********************************************************
2835 */
2836
2837
2838 /*
2839 **********************************************************
2840 * Following is callback
2841 * If necessary, you could coding these callback
2842 **********************************************************
2843 */
2844
2845 /*
2846 * the function is called in open sensor  
2847 */
2848 static int sensor_activate_cb(struct i2c_client *client)
2849 {
2850         SENSOR_DG("%s",__FUNCTION__);
2851         return 0;
2852 }
2853 /*
2854 * the function is called in close sensor
2855 */
2856 static int sensor_deactivate_cb(struct i2c_client *client)
2857 {
2858     SENSOR_DG("%s",__FUNCTION__);
2859     return 0;
2860 }
2861 /*
2862 * the function is called before sensor register setting in VIDIOC_S_FMT  
2863 */
2864 static int sensor_s_fmt_cb_th(struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture)
2865 {
2866         //struct generic_sensor*sensor = to_generic_sensor(client);
2867         
2868         
2869         return 0;
2870 }
2871 static int sensor_softrest_usr_cb(struct i2c_client *client,struct rk_sensor_reg *series)
2872 {
2873         
2874         return 0;
2875 }
2876 static int sensor_check_id_usr_cb(struct i2c_client *client,struct rk_sensor_reg *series)
2877 {
2878         return 0;
2879 }
2880
2881 /*
2882 * the function is called after sensor register setting finished in VIDIOC_S_FMT  
2883 */
2884 static int sensor_s_fmt_cb_bh (struct i2c_client *client,struct v4l2_mbus_framefmt *mf, bool capture)
2885 {
2886         struct soc_camera_subdev_desc *ssdd = client->dev.platform_data;
2887         struct soc_camera_device *icd = ssdd->socdev;
2888         struct generic_sensor *gsensor = to_generic_sensor(client);
2889         
2890     if (capture) {
2891         generic_sensor_af_workqueue_set(icd, WqCmd_af_special_pos,0,true);
2892     } else {
2893         if (gsensor->sensor_focus.focus_mode == V4L2_CID_FOCUS_AUTO) {
2894           generic_sensor_af_workqueue_set(icd, WqCmd_af_close,0,false);
2895         } else if (gsensor->sensor_focus.focus_mode == V4L2_CID_FOCUS_CONTINUOUS) {
2896             generic_sensor_af_workqueue_set(icd,WqCmd_af_continues,0,false);    
2897         }
2898     }
2899         return 0;
2900 }
2901 static int sensor_try_fmt_cb_th(struct i2c_client *client,struct v4l2_mbus_framefmt *mf)
2902 {
2903         struct soc_camera_subdev_desc *ssdd = client->dev.platform_data;
2904     struct soc_camera_device *icd = ssdd->socdev;
2905         struct generic_sensor *gsensor = to_generic_sensor(client);
2906     
2907     if (gsensor->sensor_focus.focus_mode == V4L2_CID_FOCUS_CONTINUOUS) {
2908         generic_sensor_af_workqueue_set(icd,WqCmd_af_continues_pause,0,true);    
2909     }
2910         return 0;
2911 }
2912
2913 static int sensor_suspend(struct soc_camera_device *icd, pm_message_t pm_msg)
2914 {
2915         //struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
2916                 
2917         if (pm_msg.event == PM_EVENT_SUSPEND) {
2918                 SENSOR_DG("Suspend");
2919                 
2920         } else {
2921                 SENSOR_TR("pm_msg.event(0x%x) != PM_EVENT_SUSPEND\n",pm_msg.event);
2922                 return -EINVAL;
2923         }
2924         return 0;
2925 }
2926
2927 static int sensor_resume(struct soc_camera_device *icd)
2928 {
2929
2930         SENSOR_DG("Resume");
2931
2932         return 0;
2933
2934 }
2935 static int sensor_mirror_cb (struct i2c_client *client, int mirror)
2936 {
2937         
2938         SENSOR_DG("mirror: %d",mirror);
2939
2940         return 0;    
2941 }
2942 /*
2943 * the function is v4l2 control V4L2_CID_HFLIP callback  
2944 */
2945 static int sensor_v4l2ctrl_mirror_cb(struct soc_camera_device *icd, struct sensor_v4l2ctrl_info_s *ctrl_info, 
2946                                                                                                          struct v4l2_ext_control *ext_ctrl)
2947 {
2948         struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
2949
2950         if (sensor_mirror_cb(client,ext_ctrl->value) != 0)
2951                 SENSOR_TR("sensor_mirror failed, value:0x%x",ext_ctrl->value);
2952         
2953         SENSOR_DG("sensor_mirror success, value:0x%x",ext_ctrl->value);
2954         return 0;
2955 }
2956
2957 static int sensor_flip_cb(struct i2c_client *client, int flip)
2958 {
2959         SENSOR_DG("flip: %d",flip);
2960
2961         return 0;    
2962 }
2963 /*
2964 * the function is v4l2 control V4L2_CID_VFLIP callback  
2965 */
2966 static int sensor_v4l2ctrl_flip_cb(struct soc_camera_device *icd, struct sensor_v4l2ctrl_info_s *ctrl_info, 
2967                                                                                                          struct v4l2_ext_control *ext_ctrl)
2968 {
2969         struct i2c_client *client = to_i2c_client(to_soc_camera_control(icd));
2970
2971         if (sensor_flip_cb(client,ext_ctrl->value) != 0)
2972                 SENSOR_TR("sensor_flip failed, value:0x%x",ext_ctrl->value);
2973         
2974         SENSOR_DG("sensor_flip success, value:0x%x",ext_ctrl->value);
2975         return 0;
2976 }
2977 /*
2978 * the functions are focus callbacks
2979 */
2980 static int sensor_focus_af_single_usr_cb(struct i2c_client *client);
2981
2982 static int sensor_focus_init_usr_cb(struct i2c_client *client)
2983 {
2984     return 0;
2985 }
2986
2987 static int sensor_focus_af_single_usr_cb(struct i2c_client *client) 
2988 {
2989         int ret = 0;
2990
2991 #ifdef  SENSOR_AF_CONFIG  //xhh
2992     struct generic_sensor *sensor = to_generic_sensor(client);
2993     struct specific_sensor *ssensor = to_specific_sensor(sensor);
2994     
2995     sensor_write(client,0x0751,0x00);//add by jink 20141127
2996           ret |= sensor_write(client,AF_MODES_REG,0x03);
2997     msleep(200); //add by jink 20141127
2998     ret |= sensor_write(client,AF_AUTOCMDS_REG,0x01);
2999     msleep(200);//add by jink 20141127
3000     ret |= sensor_write(client,AF_AUTOCMDS_REG,0x02);
3001     msleep(300);
3002
3003    // do  {
3004    //     msleep(20);
3005    //     sensor_read(client,AF_FINISHCHK_REG,&state);
3006    //    cnt++;
3007    // }while ((state != 1) && (cnt<100));
3008
3009    // if (state == 1) {
3010         sensor_read(client, AF_LENSPOS_REG_H,(char*)&ssensor->parameter.af_pos[0]);
3011        sensor_read(client, AF_LENSPOS_REG_L,(char*)&ssensor->parameter.af_pos[1]);
3012    // }
3013
3014     //SENSOR_DG("single focus, state: %d cnt: %d",state,cnt);
3015 #endif    
3016 //sensor_af_single_end:
3017         return ret;
3018 }
3019
3020 static int sensor_focus_af_near_usr_cb(struct i2c_client *client)
3021 {
3022         return 0;
3023 }
3024
3025 static int sensor_focus_af_far_usr_cb(struct i2c_client *client)
3026 {
3027         
3028         return 0;
3029 }
3030
3031 static int sensor_focus_af_specialpos_usr_cb(struct i2c_client *client,int pos)
3032 {
3033     struct generic_sensor *sensor = to_generic_sensor(client);
3034     struct specific_sensor *ssensor = to_specific_sensor(sensor);
3035  #ifdef         SENSOR_AF_CONFIG //xhh    
3036     sensor_write(client,0x070A, 0x00);
3037         sensor_write(client,0x0734, ssensor->parameter.af_pos[0]& 0xFF);
3038         sensor_write(client,0x0735, ssensor->parameter.af_pos[1] & 0xFF);
3039         sensor_write(client,0x070C, 0x00);
3040         mdelay(100);
3041     sensor_write(client,0x070C, 0x05);
3042 #endif
3043         return 0;
3044 }
3045
3046 static int sensor_focus_af_const_usr_cb(struct i2c_client *client)
3047 {
3048     int ret;
3049  #ifdef         SENSOR_AF_CONFIG //xhh
3050      sensor_write(client,0x0751,0x00);//add by jink 20141127
3051     ret = sensor_write(client, AF_MODES_REG, 0x01);
3052     #endif
3053 //sensor_af_const_end:
3054         return ret;
3055 }
3056 static int sensor_focus_af_const_pause_usr_cb(struct i2c_client *client)
3057 {
3058     int ret = 0;
3059     #ifdef      SENSOR_AF_CONFIG //xhh
3060     char status = 0;
3061     struct generic_sensor *sensor = to_generic_sensor(client);
3062     struct specific_sensor *ssensor = to_specific_sensor(sensor);
3063     
3064     sensor_read(client, 0x07ae, &status);  //add by jink 20141127
3065
3066     if (status == 1) {
3067         sensor_read(client, AF_LENSPOS_REG_H,(char*)&ssensor->parameter.af_pos[0]);
3068         sensor_read(client, AF_LENSPOS_REG_L,(char*)&ssensor->parameter.af_pos[1]);
3069     } else {
3070         sensor_focus_af_single_usr_cb(client);
3071    }
3072   #endif  
3073         return ret;
3074 }
3075 static int sensor_focus_af_close_usr_cb(struct i2c_client *client)
3076 {
3077     int ret =0;
3078     #ifdef      SENSOR_AF_CONFIG  //xhh
3079      sensor_write(client,0x0751,0x01);//add by jink 20141127
3080     /*
3081     ret |= sensor_write(client,0x070A, 0x00);
3082     ret |= sensor_write(client,0x0700, 0x03);
3083     ret |= sensor_write(client,0x0701, 0xFF);   
3084     ret |= sensor_write(client,0x070C, 0x00);
3085     ret |= sensor_write(client,0x070C, 0x07);
3086     */
3087     #endif
3088     SENSOR_DG("%s",__FUNCTION__);
3089         return ret;
3090 }
3091
3092 static int sensor_focus_af_zoneupdate_usr_cb(struct i2c_client *client, int *zone_tm_pos)
3093 {
3094     int ret = 0;
3095     #ifdef      SENSOR_AF_CONFIG  //xhh
3096     int xstart,ystart;
3097     
3098     *zone_tm_pos += 1000;
3099     *(zone_tm_pos+1) += 1000;
3100     *(zone_tm_pos+2) += 1000;
3101     *(zone_tm_pos+3) += 1000;
3102
3103     xstart = ((*zone_tm_pos + *(zone_tm_pos+2))>>1)*800/2000;
3104     ystart = ((*(zone_tm_pos+1) + *(zone_tm_pos+3))>>1)*600/2000;
3105
3106     if (xstart>0xa0) {
3107         xstart -= 0xa0;
3108     } else {
3109         xstart = 0;
3110     }
3111
3112     if (ystart>0xa0) {
3113         ystart -= 0xa0;
3114     } else {
3115         ystart = 0;
3116     }
3117     
3118     ret |= sensor_write(client, AF_ZONE0_WEIGHT,0x01);
3119     ret |= sensor_write(client, AF_ZONE1_WEIGHT,0x00); 
3120     ret |= sensor_write(client, AF_ZONE2_WEIGHT,0x00);
3121     ret |= sensor_write(client, AF_ZONE3_WEIGHT,0x00);  
3122     ret |= sensor_write(client, AF_ZONE4_WEIGHT,0x00);    
3123     ret |= sensor_write(client, AF_ZONE5_WEIGHT,0x00);
3124     ret |= sensor_write(client, AF_ZONE6_WEIGHT,0x00);    
3125     ret |= sensor_write(client, FACE_LC,0x01); 
3126
3127     ret |= sensor_write(client, FACE_START_XH, ((xstart&0xff00)>>8));
3128     ret |= sensor_write(client, FACE_START_XL, xstart&0xff);
3129     ret |= sensor_write(client, FACE_START_YH, ((ystart&0xff00)>>8));
3130     ret |= sensor_write(client, FACE_START_YL, ystart&0xff);    
3131
3132     ret |= sensor_write(client, FACE_SIZE_XH, 0x01);
3133         ret |= sensor_write(client, FACE_SIZE_XL, 0x40);
3134         ret |= sensor_write(client, FACE_SIZE_YH, 0x01);
3135         ret |= sensor_write(client, FACE_SIZE_YL, 0x40);
3136         #endif
3137 //sensor_af_zone_end:
3138         return ret;
3139 }
3140
3141 /*
3142 face defect call back
3143 */
3144 static int      sensor_face_detect_usr_cb(struct i2c_client *client,int on){
3145         return 0;
3146 }
3147
3148 /*
3149 *       The function can been run in sensor_init_parametres which run in sensor_probe, so user can do some
3150 * initialization in the function. 
3151 */
3152 static void sensor_init_parameters_user(struct specific_sensor* spsensor,struct soc_camera_device *icd)
3153 {
3154         return;
3155 }
3156
3157 /*
3158 * :::::WARNING:::::
3159 * It is not allowed to modify the following code
3160 */
3161
3162 sensor_init_parameters_default_code();
3163
3164 sensor_v4l2_struct_initialization();
3165
3166 sensor_probe_default_code();
3167
3168 sensor_remove_default_code();
3169
3170 sensor_driver_default_module_code();
3171
3172  
3173
3174