2 * SPCA501 chip based cameras initialization data
4 * V4L2 by Jean-Francois Moine <http://moinejf.free.fr>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 #define MODULE_NAME "spca501"
26 MODULE_AUTHOR("Michel Xhaard <mxhaard@users.sourceforge.net>");
27 MODULE_DESCRIPTION("GSPCA/SPCA501 USB Camera Driver");
28 MODULE_LICENSE("GPL");
30 /* specific webcam descriptor */
32 struct gspca_dev gspca_dev
; /* !! must be the first item */
34 unsigned short contrast
;
41 #define Arowana300KCMOSCamera 0
42 #define IntelCreateAndShare 1
44 #define MystFromOriUnknownCamera 3
45 #define SmileIntlCamera 4
46 #define ThreeComHomeConnectLite 5
47 #define ViewQuestM318B 6
50 /* V4L2 controls supported by the driver */
51 static int sd_setbrightness(struct gspca_dev
*gspca_dev
, __s32 val
);
52 static int sd_getbrightness(struct gspca_dev
*gspca_dev
, __s32
*val
);
53 static int sd_setcontrast(struct gspca_dev
*gspca_dev
, __s32 val
);
54 static int sd_getcontrast(struct gspca_dev
*gspca_dev
, __s32
*val
);
55 static int sd_setcolors(struct gspca_dev
*gspca_dev
, __s32 val
);
56 static int sd_getcolors(struct gspca_dev
*gspca_dev
, __s32
*val
);
57 static int sd_setblue_balance(struct gspca_dev
*gspca_dev
, __s32 val
);
58 static int sd_getblue_balance(struct gspca_dev
*gspca_dev
, __s32
*val
);
59 static int sd_setred_balance(struct gspca_dev
*gspca_dev
, __s32 val
);
60 static int sd_getred_balance(struct gspca_dev
*gspca_dev
, __s32
*val
);
62 static struct ctrl sd_ctrls
[] = {
63 #define MY_BRIGHTNESS 0
66 .id
= V4L2_CID_BRIGHTNESS
,
67 .type
= V4L2_CTRL_TYPE_INTEGER
,
74 .set
= sd_setbrightness
,
75 .get
= sd_getbrightness
,
80 .id
= V4L2_CID_CONTRAST
,
81 .type
= V4L2_CTRL_TYPE_INTEGER
,
86 .default_value
= 64725,
88 .set
= sd_setcontrast
,
89 .get
= sd_getcontrast
,
94 .id
= V4L2_CID_SATURATION
,
95 .type
= V4L2_CTRL_TYPE_INTEGER
,
105 #define MY_BLUE_BALANCE 3
108 .id
= V4L2_CID_BLUE_BALANCE
,
109 .type
= V4L2_CTRL_TYPE_INTEGER
,
110 .name
= "Blue Balance",
116 .set
= sd_setblue_balance
,
117 .get
= sd_getblue_balance
,
119 #define MY_RED_BALANCE 4
122 .id
= V4L2_CID_RED_BALANCE
,
123 .type
= V4L2_CTRL_TYPE_INTEGER
,
124 .name
= "Red Balance",
130 .set
= sd_setred_balance
,
131 .get
= sd_getred_balance
,
135 static const struct v4l2_pix_format vga_mode
[] = {
136 {160, 120, V4L2_PIX_FMT_SPCA501
, V4L2_FIELD_NONE
,
138 .sizeimage
= 160 * 120 * 3 / 2,
139 .colorspace
= V4L2_COLORSPACE_SRGB
,
141 {320, 240, V4L2_PIX_FMT_SPCA501
, V4L2_FIELD_NONE
,
143 .sizeimage
= 320 * 240 * 3 / 2,
144 .colorspace
= V4L2_COLORSPACE_SRGB
,
146 {640, 480, V4L2_PIX_FMT_SPCA501
, V4L2_FIELD_NONE
,
148 .sizeimage
= 640 * 480 * 3 / 2,
149 .colorspace
= V4L2_COLORSPACE_SRGB
,
153 #define SPCA50X_REG_USB 0x2 /* spca505 501 */
155 * Data to initialize a SPCA501. From a capture file provided by Bill Roehl
156 * With SPCA501 chip description
158 #define CCDSP_SET /* set CCDSP parameters */
159 #define TG_SET /* set time generator set */
160 #undef DSPWIN_SET /* set DSP windows parameters */
161 #undef ALTER_GAMA /* Set alternate set to YUV transform coeffs. */
162 #define SPCA501_SNAPBIT 0x80
163 #define SPCA501_SNAPCTRL 0x10
164 /* Frame packet header offsets for the spca501 */
165 #define SPCA501_OFFSET_GPIO 1
166 #define SPCA501_OFFSET_TYPE 2
167 #define SPCA501_OFFSET_TURN3A 3
168 #define SPCA501_OFFSET_FRAMSEQ 4
169 #define SPCA501_OFFSET_COMPRESS 5
170 #define SPCA501_OFFSET_QUANT 6
171 #define SPCA501_OFFSET_QUANT2 7
172 #define SPCA501_OFFSET_DATA 8
174 #define SPCA501_PROP_COMP_ENABLE(d) ((d) & 1)
175 #define SPCA501_PROP_SNAP(d) ((d) & 0x40)
176 #define SPCA501_PROP_SNAP_CTRL(d) ((d) & 0x10)
177 #define SPCA501_PROP_COMP_THRESH(d) (((d) & 0x0e) >> 1)
178 #define SPCA501_PROP_COMP_QUANT(d) (((d) & 0x70) >> 4)
180 /* SPCA501 CCDSP control */
181 #define SPCA501_REG_CCDSP 0x01
182 /* SPCA501 control/status registers */
183 #define SPCA501_REG_CTLRL 0x02
185 /* registers for color correction and YUV transformation */
186 #define SPCA501_A11 0x08
187 #define SPCA501_A12 0x09
188 #define SPCA501_A13 0x0A
189 #define SPCA501_A21 0x0B
190 #define SPCA501_A22 0x0C
191 #define SPCA501_A23 0x0D
192 #define SPCA501_A31 0x0E
193 #define SPCA501_A32 0x0F
194 #define SPCA501_A33 0x10
196 /* Data for video camera initialization before capturing */
197 static const __u16 spca501_open_data
[][3] = {
198 /* bmRequest,value,index */
200 {0x2, 0x50, 0x00}, /* C/S enable soft reset */
201 {0x2, 0x40, 0x00}, /* C/S disable soft reset */
202 {0x2, 0x02, 0x05}, /* C/S general purpose I/O data */
203 {0x2, 0x03, 0x05}, /* C/S general purpose I/O data */
206 {0x1, 0x38, 0x01}, /* CCDSP options */
207 {0x1, 0x05, 0x02}, /* CCDSP Optical black level for user settings */
208 {0x1, 0xC0, 0x03}, /* CCDSP Optical black settings */
211 {0x1, 0x63, 0x3f}, /* CCDSP CCD gamma enable */
212 {0x1, 0x03, 0x56}, /* Add gamma correction */
214 {0x1, 0xFF, 0x15}, /* CCDSP High luminance for white balance */
215 {0x1, 0x01, 0x16}, /* CCDSP Low luminance for white balance */
217 /* Color correction and RGB-to-YUV transformation coefficients changing */
219 {0x0, 0x00, 0x08}, /* A11 */
220 {0x0, 0x00, 0x09}, /* A12 */
221 {0x0, 0x90, 0x0A}, /* A13 */
222 {0x0, 0x12, 0x0B}, /* A21 */
223 {0x0, 0x00, 0x0C}, /* A22 */
224 {0x0, 0x00, 0x0D}, /* A23 */
225 {0x0, 0x00, 0x0E}, /* A31 */
226 {0x0, 0x02, 0x0F}, /* A32 */
227 {0x0, 0x00, 0x10}, /* A33 */
229 {0x1, 0x2a, 0x08}, /* A11 0x31 */
230 {0x1, 0xf8, 0x09}, /* A12 f8 */
231 {0x1, 0xf8, 0x0A}, /* A13 f8 */
232 {0x1, 0xf8, 0x0B}, /* A21 f8 */
233 {0x1, 0x14, 0x0C}, /* A22 0x14 */
234 {0x1, 0xf8, 0x0D}, /* A23 f8 */
235 {0x1, 0xf8, 0x0E}, /* A31 f8 */
236 {0x1, 0xf8, 0x0F}, /* A32 f8 */
237 {0x1, 0x20, 0x10}, /* A33 0x20 */
239 {0x1, 0x00, 0x11}, /* R offset */
240 {0x1, 0x00, 0x12}, /* G offset */
241 {0x1, 0x00, 0x13}, /* B offset */
242 {0x1, 0x00, 0x14}, /* GB offset */
247 /* Time generator manipulations */
248 {0x0, 0xfc, 0x0}, /* Set up high bits of shutter speed */
249 {0x0, 0x01, 0x1}, /* Set up low bits of shutter speed */
251 {0x0, 0xe4, 0x04}, /* DCLK*2 clock phase adjustment */
252 {0x0, 0x08, 0x05}, /* ADCK phase adjustment, inv. ext. VB */
253 {0x0, 0x03, 0x06}, /* FR phase adjustment */
254 {0x0, 0x01, 0x07}, /* FCDS phase adjustment */
255 {0x0, 0x39, 0x08}, /* FS phase adjustment */
256 {0x0, 0x88, 0x0a}, /* FH1 phase and delay adjustment */
257 {0x0, 0x03, 0x0f}, /* pixel identification */
258 {0x0, 0x00, 0x11}, /* clock source selection (default) */
260 /*VERY strange manipulations with
261 * select DMCLP or OBPX to be ADCLP output (0x0C)
262 * OPB always toggle or not (0x0D) but they allow
263 * us to set up brightness
271 {0x1, 0xa0, 0x01}, /* Setting image processing parameters */
272 {0x1, 0x1c, 0x17}, /* Changing Windows positions X1 */
273 {0x1, 0xe2, 0x19}, /* X2 */
274 {0x1, 0x1c, 0x1b}, /* X3 */
275 {0x1, 0xe2, 0x1d}, /* X4 */
276 {0x1, 0x5f, 0x1f}, /* X5 */
277 {0x1, 0x32, 0x20}, /* Y5 */
278 {0x1, 0x01, 0x10}, /* Changing A33 */
281 {0x2, 0x204a, 0x07},/* Setting video compression & resolution 160x120 */
282 {0x2, 0x94, 0x06}, /* Setting video no compression */
287 The SPCAxxx docs from Sunplus document these values
288 in tables, one table per register number. In the data
289 below, dmRequest is the register number, index is the Addr,
290 and value is a combination of Bit values.
302 /* Data for chip initialization (set default values) */
303 static const __u16 spca501_init_data
[][3] = {
304 /* Set all the values to powerup defaults */
305 /* bmRequest,value,index */
580 /* Strange - looks like the 501 driver doesn't do anything
581 * at insert time except read the EEPROM
586 /* Data for video camera init before capture.
587 * Capture and decoding by Colin Peart.
588 * This is is for the 3com HomeConnect Lite which is spca501a based.
590 static const __u16 spca501_3com_open_data
[][3] = {
591 /* bmRequest,value,index */
592 {0x2, 0x0050, 0x0000}, /* C/S Enable TG soft reset, timing mode=010 */
593 {0x2, 0x0043, 0x0000}, /* C/S Disable TG soft reset, timing mode=010 */
594 {0x2, 0x0002, 0x0005}, /* C/S GPIO */
595 {0x2, 0x0003, 0x0005}, /* C/S GPIO */
598 {0x1, 0x0020, 0x0001}, /* CCDSP Options */
600 {0x1, 0x0020, 0x0002}, /* CCDSP Black Level */
601 {0x1, 0x006e, 0x0007}, /* CCDSP Gamma options */
602 {0x1, 0x0090, 0x0015}, /* CCDSP Luminance Low */
603 {0x1, 0x00ff, 0x0016}, /* CCDSP Luminance High */
604 {0x1, 0x0003, 0x003F}, /* CCDSP Gamma correction toggle */
607 {0x1, 0x0010, 0x0008}, /* CCDSP YUV A11 */
608 {0x1, 0x0000, 0x0009}, /* CCDSP YUV A12 */
609 {0x1, 0x0000, 0x000a}, /* CCDSP YUV A13 */
610 {0x1, 0x0000, 0x000b}, /* CCDSP YUV A21 */
611 {0x1, 0x0010, 0x000c}, /* CCDSP YUV A22 */
612 {0x1, 0x0000, 0x000d}, /* CCDSP YUV A23 */
613 {0x1, 0x0000, 0x000e}, /* CCDSP YUV A31 */
614 {0x1, 0x0000, 0x000f}, /* CCDSP YUV A32 */
615 {0x1, 0x0010, 0x0010}, /* CCDSP YUV A33 */
616 {0x1, 0x0000, 0x0011}, /* CCDSP R Offset */
617 {0x1, 0x0000, 0x0012}, /* CCDSP G Offset */
618 {0x1, 0x0001, 0x0013}, /* CCDSP B Offset */
619 {0x1, 0x0001, 0x0014}, /* CCDSP BG Offset */
620 {0x1, 0x003f, 0x00C1}, /* CCDSP Gamma Correction Enable */
625 {0x0, 0x00fc, 0x0000}, /* TG Shutter Speed High Bits */
626 {0x0, 0x0000, 0x0001}, /* TG Shutter Speed Low Bits */
627 {0x0, 0x00e4, 0x0004}, /* TG DCLK*2 Adjust */
628 {0x0, 0x0008, 0x0005}, /* TG ADCK Adjust */
629 {0x0, 0x0003, 0x0006}, /* TG FR Phase Adjust */
630 {0x0, 0x0001, 0x0007}, /* TG FCDS Phase Adjust */
631 {0x0, 0x0039, 0x0008}, /* TG FS Phase Adjust */
632 {0x0, 0x0088, 0x000a}, /* TG MH1 */
633 {0x0, 0x0003, 0x000f}, /* TG Pixel ID */
635 /* Like below, unexplained toglleing */
636 {0x0, 0x0080, 0x000c},
637 {0x0, 0x0000, 0x000d},
638 {0x0, 0x0080, 0x000c},
639 {0x0, 0x0004, 0x000d},
640 {0x0, 0x0000, 0x000c},
641 {0x0, 0x0000, 0x000d},
642 {0x0, 0x0040, 0x000c},
643 {0x0, 0x0017, 0x000d},
644 {0x0, 0x00c0, 0x000c},
645 {0x0, 0x0000, 0x000d},
646 {0x0, 0x0080, 0x000c},
647 {0x0, 0x0006, 0x000d},
648 {0x0, 0x0080, 0x000c},
649 {0x0, 0x0004, 0x000d},
650 {0x0, 0x0002, 0x0003},
654 {0x1, 0x001c, 0x0017}, /* CCDSP W1 Start X */
655 {0x1, 0x00e2, 0x0019}, /* CCDSP W2 Start X */
656 {0x1, 0x001c, 0x001b}, /* CCDSP W3 Start X */
657 {0x1, 0x00e2, 0x001d}, /* CCDSP W4 Start X */
658 {0x1, 0x00aa, 0x001f}, /* CCDSP W5 Start X */
659 {0x1, 0x0070, 0x0020}, /* CCDSP W5 Start Y */
661 {0x0, 0x0001, 0x0010}, /* TG Start Clock */
663 /* {0x2, 0x006a, 0x0001}, * C/S Enable ISOSYNCH Packet Engine */
664 {0x2, 0x0068, 0x0001}, /* C/S Diable ISOSYNCH Packet Engine */
665 {0x2, 0x0000, 0x0005},
666 {0x2, 0x0043, 0x0000}, /* C/S Set Timing Mode, Disable TG soft reset */
667 {0x2, 0x0043, 0x0000}, /* C/S Set Timing Mode, Disable TG soft reset */
668 {0x2, 0x0002, 0x0005}, /* C/S GPIO */
669 {0x2, 0x0003, 0x0005}, /* C/S GPIO */
671 {0x2, 0x006a, 0x0001}, /* C/S Enable ISOSYNCH Packet Engine */
676 * Data used to initialize a SPCA501C with HV7131B sensor.
677 * From a capture file taken with USBSnoop v 1.5
678 * I have a "SPCA501C pc camera chipset" manual by sunplus, but some
679 * of the value meanings are obscure or simply "reserved".
681 * 1) Understand what every value means
682 * 2) Understand why some values seem to appear more than once
683 * 3) Write a small comment for each line of the following arrays.
685 static const __u16 spca501c_arowana_open_data
[][3] = {
686 /* bmRequest,value,index */
687 {0x02, 0x0007, 0x0005},
688 {0x02, 0xa048, 0x0000},
689 {0x05, 0x0022, 0x0004},
690 {0x01, 0x0006, 0x0011},
691 {0x01, 0x00ff, 0x0012},
692 {0x01, 0x0014, 0x0013},
693 {0x01, 0x0000, 0x0014},
694 {0x01, 0x0042, 0x0051},
695 {0x01, 0x0040, 0x0052},
696 {0x01, 0x0051, 0x0053},
697 {0x01, 0x0040, 0x0054},
698 {0x01, 0x0000, 0x0055},
699 {0x00, 0x0025, 0x0000},
700 {0x00, 0x0026, 0x0000},
701 {0x00, 0x0001, 0x0000},
702 {0x00, 0x0027, 0x0000},
703 {0x00, 0x008a, 0x0000},
707 static const __u16 spca501c_arowana_init_data
[][3] = {
708 /* bmRequest,value,index */
709 {0x02, 0x0007, 0x0005},
710 {0x02, 0xa048, 0x0000},
711 {0x05, 0x0022, 0x0004},
712 {0x01, 0x0006, 0x0011},
713 {0x01, 0x00ff, 0x0012},
714 {0x01, 0x0014, 0x0013},
715 {0x01, 0x0000, 0x0014},
716 {0x01, 0x0042, 0x0051},
717 {0x01, 0x0040, 0x0052},
718 {0x01, 0x0051, 0x0053},
719 {0x01, 0x0040, 0x0054},
720 {0x01, 0x0000, 0x0055},
721 {0x00, 0x0025, 0x0000},
722 {0x00, 0x0026, 0x0000},
723 {0x00, 0x0001, 0x0000},
724 {0x00, 0x0027, 0x0000},
725 {0x00, 0x008a, 0x0000},
726 {0x02, 0x0000, 0x0005},
727 {0x02, 0x0007, 0x0005},
728 {0x02, 0x2000, 0x0000},
729 {0x05, 0x0022, 0x0004},
730 {0x05, 0x0015, 0x0001},
731 {0x05, 0x00ea, 0x0000},
732 {0x05, 0x0021, 0x0001},
733 {0x05, 0x00d2, 0x0000},
734 {0x05, 0x0023, 0x0001},
735 {0x05, 0x0003, 0x0000},
736 {0x05, 0x0030, 0x0001},
737 {0x05, 0x002b, 0x0000},
738 {0x05, 0x0031, 0x0001},
739 {0x05, 0x0023, 0x0000},
740 {0x05, 0x0032, 0x0001},
741 {0x05, 0x0023, 0x0000},
742 {0x05, 0x0033, 0x0001},
743 {0x05, 0x0023, 0x0000},
744 {0x05, 0x0034, 0x0001},
745 {0x05, 0x0002, 0x0000},
746 {0x05, 0x0050, 0x0001},
747 {0x05, 0x0000, 0x0000},
748 {0x05, 0x0051, 0x0001},
749 {0x05, 0x0000, 0x0000},
750 {0x05, 0x0052, 0x0001},
751 {0x05, 0x0000, 0x0000},
752 {0x05, 0x0054, 0x0001},
753 {0x05, 0x0001, 0x0000},
754 {0x00, 0x0000, 0x0001},
755 {0x00, 0x0000, 0x0002},
756 {0x00, 0x000c, 0x0003},
757 {0x00, 0x0000, 0x0004},
758 {0x00, 0x0090, 0x0005},
759 {0x00, 0x0000, 0x0006},
760 {0x00, 0x0040, 0x0007},
761 {0x00, 0x00c0, 0x0008},
762 {0x00, 0x004a, 0x0009},
763 {0x00, 0x0000, 0x000a},
764 {0x00, 0x0000, 0x000b},
765 {0x00, 0x0001, 0x000c},
766 {0x00, 0x0001, 0x000d},
767 {0x00, 0x0000, 0x000e},
768 {0x00, 0x0002, 0x000f},
769 {0x00, 0x0001, 0x0010},
770 {0x00, 0x0000, 0x0011},
771 {0x00, 0x0000, 0x0012},
772 {0x00, 0x0002, 0x0020},
773 {0x00, 0x0080, 0x0021},
774 {0x00, 0x0001, 0x0022},
775 {0x00, 0x00e0, 0x0023},
776 {0x00, 0x0000, 0x0024},
777 {0x00, 0x00d5, 0x0025},
778 {0x00, 0x0000, 0x0026},
779 {0x00, 0x000b, 0x0027},
780 {0x00, 0x0000, 0x0046},
781 {0x00, 0x0000, 0x0047},
782 {0x00, 0x0000, 0x0048},
783 {0x00, 0x0000, 0x0049},
784 {0x00, 0x0008, 0x004a},
785 {0xff, 0x0000, 0x00d0},
786 {0xff, 0x00d8, 0x00d1},
787 {0xff, 0x0000, 0x00d4},
788 {0xff, 0x0000, 0x00d5},
789 {0x01, 0x00a6, 0x0000},
790 {0x01, 0x0028, 0x0001},
791 {0x01, 0x0000, 0x0002},
792 {0x01, 0x000a, 0x0003},
793 {0x01, 0x0040, 0x0004},
794 {0x01, 0x0066, 0x0007},
795 {0x01, 0x0011, 0x0008},
796 {0x01, 0x0032, 0x0009},
797 {0x01, 0x00fd, 0x000a},
798 {0x01, 0x0038, 0x000b},
799 {0x01, 0x00d1, 0x000c},
800 {0x01, 0x00f7, 0x000d},
801 {0x01, 0x00ed, 0x000e},
802 {0x01, 0x00d8, 0x000f},
803 {0x01, 0x0038, 0x0010},
804 {0x01, 0x00ff, 0x0015},
805 {0x01, 0x0001, 0x0016},
806 {0x01, 0x0032, 0x0017},
807 {0x01, 0x0023, 0x0018},
808 {0x01, 0x00ce, 0x0019},
809 {0x01, 0x0023, 0x001a},
810 {0x01, 0x0032, 0x001b},
811 {0x01, 0x008d, 0x001c},
812 {0x01, 0x00ce, 0x001d},
813 {0x01, 0x008d, 0x001e},
814 {0x01, 0x0000, 0x001f},
815 {0x01, 0x0000, 0x0020},
816 {0x01, 0x00ff, 0x003e},
817 {0x01, 0x0003, 0x003f},
818 {0x01, 0x0000, 0x0040},
819 {0x01, 0x0035, 0x0041},
820 {0x01, 0x0053, 0x0042},
821 {0x01, 0x0069, 0x0043},
822 {0x01, 0x007c, 0x0044},
823 {0x01, 0x008c, 0x0045},
824 {0x01, 0x009a, 0x0046},
825 {0x01, 0x00a8, 0x0047},
826 {0x01, 0x00b4, 0x0048},
827 {0x01, 0x00bf, 0x0049},
828 {0x01, 0x00ca, 0x004a},
829 {0x01, 0x00d4, 0x004b},
830 {0x01, 0x00dd, 0x004c},
831 {0x01, 0x00e7, 0x004d},
832 {0x01, 0x00ef, 0x004e},
833 {0x01, 0x00f8, 0x004f},
834 {0x01, 0x00ff, 0x0050},
835 {0x01, 0x0001, 0x0056},
836 {0x01, 0x0060, 0x0057},
837 {0x01, 0x0040, 0x0058},
838 {0x01, 0x0011, 0x0059},
839 {0x01, 0x0001, 0x005a},
840 {0x02, 0x0007, 0x0005},
841 {0x02, 0xa048, 0x0000},
842 {0x02, 0x0007, 0x0005},
843 {0x02, 0x0015, 0x0006},
844 {0x02, 0x100a, 0x0007},
845 {0x02, 0xa048, 0x0000},
846 {0x02, 0xc002, 0x0001},
847 {0x02, 0x000f, 0x0005},
848 {0x02, 0xa048, 0x0000},
849 {0x05, 0x0022, 0x0004},
850 {0x05, 0x0025, 0x0001},
851 {0x05, 0x0000, 0x0000},
852 {0x05, 0x0026, 0x0001},
853 {0x05, 0x0001, 0x0000},
854 {0x05, 0x0027, 0x0001},
855 {0x05, 0x0000, 0x0000},
856 {0x05, 0x0001, 0x0001},
857 {0x05, 0x0000, 0x0000},
858 {0x05, 0x0021, 0x0001},
859 {0x05, 0x00d2, 0x0000},
860 {0x05, 0x0020, 0x0001},
861 {0x05, 0x0000, 0x0000},
862 {0x00, 0x0090, 0x0005},
863 {0x01, 0x00a6, 0x0000},
864 {0x02, 0x0007, 0x0005},
865 {0x02, 0x2000, 0x0000},
866 {0x05, 0x0022, 0x0004},
867 {0x05, 0x0015, 0x0001},
868 {0x05, 0x00ea, 0x0000},
869 {0x05, 0x0021, 0x0001},
870 {0x05, 0x00d2, 0x0000},
871 {0x05, 0x0023, 0x0001},
872 {0x05, 0x0003, 0x0000},
873 {0x05, 0x0030, 0x0001},
874 {0x05, 0x002b, 0x0000},
875 {0x05, 0x0031, 0x0001},
876 {0x05, 0x0023, 0x0000},
877 {0x05, 0x0032, 0x0001},
878 {0x05, 0x0023, 0x0000},
879 {0x05, 0x0033, 0x0001},
880 {0x05, 0x0023, 0x0000},
881 {0x05, 0x0034, 0x0001},
882 {0x05, 0x0002, 0x0000},
883 {0x05, 0x0050, 0x0001},
884 {0x05, 0x0000, 0x0000},
885 {0x05, 0x0051, 0x0001},
886 {0x05, 0x0000, 0x0000},
887 {0x05, 0x0052, 0x0001},
888 {0x05, 0x0000, 0x0000},
889 {0x05, 0x0054, 0x0001},
890 {0x05, 0x0001, 0x0000},
891 {0x00, 0x0000, 0x0001},
892 {0x00, 0x0000, 0x0002},
893 {0x00, 0x000c, 0x0003},
894 {0x00, 0x0000, 0x0004},
895 {0x00, 0x0090, 0x0005},
896 {0x00, 0x0000, 0x0006},
897 {0x00, 0x0040, 0x0007},
898 {0x00, 0x00c0, 0x0008},
899 {0x00, 0x004a, 0x0009},
900 {0x00, 0x0000, 0x000a},
901 {0x00, 0x0000, 0x000b},
902 {0x00, 0x0001, 0x000c},
903 {0x00, 0x0001, 0x000d},
904 {0x00, 0x0000, 0x000e},
905 {0x00, 0x0002, 0x000f},
906 {0x00, 0x0001, 0x0010},
907 {0x00, 0x0000, 0x0011},
908 {0x00, 0x0000, 0x0012},
909 {0x00, 0x0002, 0x0020},
910 {0x00, 0x0080, 0x0021},
911 {0x00, 0x0001, 0x0022},
912 {0x00, 0x00e0, 0x0023},
913 {0x00, 0x0000, 0x0024},
914 {0x00, 0x00d5, 0x0025},
915 {0x00, 0x0000, 0x0026},
916 {0x00, 0x000b, 0x0027},
917 {0x00, 0x0000, 0x0046},
918 {0x00, 0x0000, 0x0047},
919 {0x00, 0x0000, 0x0048},
920 {0x00, 0x0000, 0x0049},
921 {0x00, 0x0008, 0x004a},
922 {0xff, 0x0000, 0x00d0},
923 {0xff, 0x00d8, 0x00d1},
924 {0xff, 0x0000, 0x00d4},
925 {0xff, 0x0000, 0x00d5},
926 {0x01, 0x00a6, 0x0000},
927 {0x01, 0x0028, 0x0001},
928 {0x01, 0x0000, 0x0002},
929 {0x01, 0x000a, 0x0003},
930 {0x01, 0x0040, 0x0004},
931 {0x01, 0x0066, 0x0007},
932 {0x01, 0x0011, 0x0008},
933 {0x01, 0x0032, 0x0009},
934 {0x01, 0x00fd, 0x000a},
935 {0x01, 0x0038, 0x000b},
936 {0x01, 0x00d1, 0x000c},
937 {0x01, 0x00f7, 0x000d},
938 {0x01, 0x00ed, 0x000e},
939 {0x01, 0x00d8, 0x000f},
940 {0x01, 0x0038, 0x0010},
941 {0x01, 0x00ff, 0x0015},
942 {0x01, 0x0001, 0x0016},
943 {0x01, 0x0032, 0x0017},
944 {0x01, 0x0023, 0x0018},
945 {0x01, 0x00ce, 0x0019},
946 {0x01, 0x0023, 0x001a},
947 {0x01, 0x0032, 0x001b},
948 {0x01, 0x008d, 0x001c},
949 {0x01, 0x00ce, 0x001d},
950 {0x01, 0x008d, 0x001e},
951 {0x01, 0x0000, 0x001f},
952 {0x01, 0x0000, 0x0020},
953 {0x01, 0x00ff, 0x003e},
954 {0x01, 0x0003, 0x003f},
955 {0x01, 0x0000, 0x0040},
956 {0x01, 0x0035, 0x0041},
957 {0x01, 0x0053, 0x0042},
958 {0x01, 0x0069, 0x0043},
959 {0x01, 0x007c, 0x0044},
960 {0x01, 0x008c, 0x0045},
961 {0x01, 0x009a, 0x0046},
962 {0x01, 0x00a8, 0x0047},
963 {0x01, 0x00b4, 0x0048},
964 {0x01, 0x00bf, 0x0049},
965 {0x01, 0x00ca, 0x004a},
966 {0x01, 0x00d4, 0x004b},
967 {0x01, 0x00dd, 0x004c},
968 {0x01, 0x00e7, 0x004d},
969 {0x01, 0x00ef, 0x004e},
970 {0x01, 0x00f8, 0x004f},
971 {0x01, 0x00ff, 0x0050},
972 {0x01, 0x0001, 0x0056},
973 {0x01, 0x0060, 0x0057},
974 {0x01, 0x0040, 0x0058},
975 {0x01, 0x0011, 0x0059},
976 {0x01, 0x0001, 0x005a},
977 {0x02, 0x0007, 0x0005},
978 {0x02, 0xa048, 0x0000},
979 {0x02, 0x0007, 0x0005},
980 {0x02, 0x0015, 0x0006},
981 {0x02, 0x100a, 0x0007},
982 {0x02, 0xa048, 0x0000},
983 {0x02, 0xc002, 0x0001},
984 {0x02, 0x000f, 0x0005},
985 {0x02, 0xa048, 0x0000},
986 {0x05, 0x0022, 0x0004},
987 {0x05, 0x0025, 0x0001},
988 {0x05, 0x0000, 0x0000},
989 {0x05, 0x0026, 0x0001},
990 {0x05, 0x0001, 0x0000},
991 {0x05, 0x0027, 0x0001},
992 {0x05, 0x0000, 0x0000},
993 {0x05, 0x0001, 0x0001},
994 {0x05, 0x0000, 0x0000},
995 {0x05, 0x0021, 0x0001},
996 {0x05, 0x00d2, 0x0000},
997 {0x05, 0x0020, 0x0001},
998 {0x05, 0x0000, 0x0000},
999 {0x00, 0x0090, 0x0005},
1000 {0x01, 0x00a6, 0x0000},
1001 {0x01, 0x0003, 0x003f},
1002 {0x01, 0x0001, 0x0056},
1003 {0x01, 0x0011, 0x0008},
1004 {0x01, 0x0032, 0x0009},
1005 {0x01, 0xfffd, 0x000a},
1006 {0x01, 0x0023, 0x000b},
1007 {0x01, 0xffea, 0x000c},
1008 {0x01, 0xfff4, 0x000d},
1009 {0x01, 0xfffc, 0x000e},
1010 {0x01, 0xffe3, 0x000f},
1011 {0x01, 0x001f, 0x0010},
1012 {0x01, 0x00a8, 0x0001},
1013 {0x01, 0x0067, 0x0007},
1014 {0x01, 0x0032, 0x0017},
1015 {0x01, 0x0023, 0x0018},
1016 {0x01, 0x00ce, 0x0019},
1017 {0x01, 0x0023, 0x001a},
1018 {0x01, 0x0032, 0x001b},
1019 {0x01, 0x008d, 0x001c},
1020 {0x01, 0x00ce, 0x001d},
1021 {0x01, 0x008d, 0x001e},
1022 {0x01, 0x00c8, 0x0015},
1023 {0x01, 0x0032, 0x0016},
1024 {0x01, 0x0000, 0x0011},
1025 {0x01, 0x0000, 0x0012},
1026 {0x01, 0x0000, 0x0013},
1027 {0x01, 0x000a, 0x0003},
1028 {0x02, 0xc002, 0x0001},
1029 {0x02, 0x0007, 0x0005},
1030 {0x02, 0xc000, 0x0001},
1031 {0x02, 0x0000, 0x0005},
1032 {0x02, 0x0007, 0x0005},
1033 {0x02, 0x2000, 0x0000},
1034 {0x05, 0x0022, 0x0004},
1035 {0x05, 0x0015, 0x0001},
1036 {0x05, 0x00ea, 0x0000},
1037 {0x05, 0x0021, 0x0001},
1038 {0x05, 0x00d2, 0x0000},
1039 {0x05, 0x0023, 0x0001},
1040 {0x05, 0x0003, 0x0000},
1041 {0x05, 0x0030, 0x0001},
1042 {0x05, 0x002b, 0x0000},
1043 {0x05, 0x0031, 0x0001},
1044 {0x05, 0x0023, 0x0000},
1045 {0x05, 0x0032, 0x0001},
1046 {0x05, 0x0023, 0x0000},
1047 {0x05, 0x0033, 0x0001},
1048 {0x05, 0x0023, 0x0000},
1049 {0x05, 0x0034, 0x0001},
1050 {0x05, 0x0002, 0x0000},
1051 {0x05, 0x0050, 0x0001},
1052 {0x05, 0x0000, 0x0000},
1053 {0x05, 0x0051, 0x0001},
1054 {0x05, 0x0000, 0x0000},
1055 {0x05, 0x0052, 0x0001},
1056 {0x05, 0x0000, 0x0000},
1057 {0x05, 0x0054, 0x0001},
1058 {0x05, 0x0001, 0x0000},
1059 {0x00, 0x0000, 0x0001},
1060 {0x00, 0x0000, 0x0002},
1061 {0x00, 0x000c, 0x0003},
1062 {0x00, 0x0000, 0x0004},
1063 {0x00, 0x0090, 0x0005},
1064 {0x00, 0x0000, 0x0006},
1065 {0x00, 0x0040, 0x0007},
1066 {0x00, 0x00c0, 0x0008},
1067 {0x00, 0x004a, 0x0009},
1068 {0x00, 0x0000, 0x000a},
1069 {0x00, 0x0000, 0x000b},
1070 {0x00, 0x0001, 0x000c},
1071 {0x00, 0x0001, 0x000d},
1072 {0x00, 0x0000, 0x000e},
1073 {0x00, 0x0002, 0x000f},
1074 {0x00, 0x0001, 0x0010},
1075 {0x00, 0x0000, 0x0011},
1076 {0x00, 0x0000, 0x0012},
1077 {0x00, 0x0002, 0x0020},
1078 {0x00, 0x0080, 0x0021},
1079 {0x00, 0x0001, 0x0022},
1080 {0x00, 0x00e0, 0x0023},
1081 {0x00, 0x0000, 0x0024},
1082 {0x00, 0x00d5, 0x0025},
1083 {0x00, 0x0000, 0x0026},
1084 {0x00, 0x000b, 0x0027},
1085 {0x00, 0x0000, 0x0046},
1086 {0x00, 0x0000, 0x0047},
1087 {0x00, 0x0000, 0x0048},
1088 {0x00, 0x0000, 0x0049},
1089 {0x00, 0x0008, 0x004a},
1090 {0xff, 0x0000, 0x00d0},
1091 {0xff, 0x00d8, 0x00d1},
1092 {0xff, 0x0000, 0x00d4},
1093 {0xff, 0x0000, 0x00d5},
1094 {0x01, 0x00a6, 0x0000},
1095 {0x01, 0x0028, 0x0001},
1096 {0x01, 0x0000, 0x0002},
1097 {0x01, 0x000a, 0x0003},
1098 {0x01, 0x0040, 0x0004},
1099 {0x01, 0x0066, 0x0007},
1100 {0x01, 0x0011, 0x0008},
1101 {0x01, 0x0032, 0x0009},
1102 {0x01, 0x00fd, 0x000a},
1103 {0x01, 0x0038, 0x000b},
1104 {0x01, 0x00d1, 0x000c},
1105 {0x01, 0x00f7, 0x000d},
1106 {0x01, 0x00ed, 0x000e},
1107 {0x01, 0x00d8, 0x000f},
1108 {0x01, 0x0038, 0x0010},
1109 {0x01, 0x00ff, 0x0015},
1110 {0x01, 0x0001, 0x0016},
1111 {0x01, 0x0032, 0x0017},
1112 {0x01, 0x0023, 0x0018},
1113 {0x01, 0x00ce, 0x0019},
1114 {0x01, 0x0023, 0x001a},
1115 {0x01, 0x0032, 0x001b},
1116 {0x01, 0x008d, 0x001c},
1117 {0x01, 0x00ce, 0x001d},
1118 {0x01, 0x008d, 0x001e},
1119 {0x01, 0x0000, 0x001f},
1120 {0x01, 0x0000, 0x0020},
1121 {0x01, 0x00ff, 0x003e},
1122 {0x01, 0x0003, 0x003f},
1123 {0x01, 0x0000, 0x0040},
1124 {0x01, 0x0035, 0x0041},
1125 {0x01, 0x0053, 0x0042},
1126 {0x01, 0x0069, 0x0043},
1127 {0x01, 0x007c, 0x0044},
1128 {0x01, 0x008c, 0x0045},
1129 {0x01, 0x009a, 0x0046},
1130 {0x01, 0x00a8, 0x0047},
1131 {0x01, 0x00b4, 0x0048},
1132 {0x01, 0x00bf, 0x0049},
1133 {0x01, 0x00ca, 0x004a},
1134 {0x01, 0x00d4, 0x004b},
1135 {0x01, 0x00dd, 0x004c},
1136 {0x01, 0x00e7, 0x004d},
1137 {0x01, 0x00ef, 0x004e},
1138 {0x01, 0x00f8, 0x004f},
1139 {0x01, 0x00ff, 0x0050},
1140 {0x01, 0x0001, 0x0056},
1141 {0x01, 0x0060, 0x0057},
1142 {0x01, 0x0040, 0x0058},
1143 {0x01, 0x0011, 0x0059},
1144 {0x01, 0x0001, 0x005a},
1145 {0x02, 0x0007, 0x0005},
1146 {0x02, 0xa048, 0x0000},
1147 {0x02, 0x0007, 0x0005},
1148 {0x02, 0x0015, 0x0006},
1149 {0x02, 0x100a, 0x0007},
1150 {0x02, 0xa048, 0x0000},
1151 {0x02, 0xc002, 0x0001},
1152 {0x02, 0x000f, 0x0005},
1153 {0x02, 0xa048, 0x0000},
1154 {0x05, 0x0022, 0x0004},
1155 {0x05, 0x0025, 0x0001},
1156 {0x05, 0x0000, 0x0000},
1157 {0x05, 0x0026, 0x0001},
1158 {0x05, 0x0001, 0x0000},
1159 {0x05, 0x0027, 0x0001},
1160 {0x05, 0x0000, 0x0000},
1161 {0x05, 0x0001, 0x0001},
1162 {0x05, 0x0000, 0x0000},
1163 {0x05, 0x0021, 0x0001},
1164 {0x05, 0x00d2, 0x0000},
1165 {0x05, 0x0020, 0x0001},
1166 {0x05, 0x0000, 0x0000},
1167 {0x00, 0x0090, 0x0005},
1168 {0x01, 0x00a6, 0x0000},
1169 {0x02, 0x0007, 0x0005},
1170 {0x02, 0x2000, 0x0000},
1171 {0x05, 0x0022, 0x0004},
1172 {0x05, 0x0015, 0x0001},
1173 {0x05, 0x00ea, 0x0000},
1174 {0x05, 0x0021, 0x0001},
1175 {0x05, 0x00d2, 0x0000},
1176 {0x05, 0x0023, 0x0001},
1177 {0x05, 0x0003, 0x0000},
1178 {0x05, 0x0030, 0x0001},
1179 {0x05, 0x002b, 0x0000},
1180 {0x05, 0x0031, 0x0001},
1181 {0x05, 0x0023, 0x0000},
1182 {0x05, 0x0032, 0x0001},
1183 {0x05, 0x0023, 0x0000},
1184 {0x05, 0x0033, 0x0001},
1185 {0x05, 0x0023, 0x0000},
1186 {0x05, 0x0034, 0x0001},
1187 {0x05, 0x0002, 0x0000},
1188 {0x05, 0x0050, 0x0001},
1189 {0x05, 0x0000, 0x0000},
1190 {0x05, 0x0051, 0x0001},
1191 {0x05, 0x0000, 0x0000},
1192 {0x05, 0x0052, 0x0001},
1193 {0x05, 0x0000, 0x0000},
1194 {0x05, 0x0054, 0x0001},
1195 {0x05, 0x0001, 0x0000},
1196 {0x00, 0x0000, 0x0001},
1197 {0x00, 0x0000, 0x0002},
1198 {0x00, 0x000c, 0x0003},
1199 {0x00, 0x0000, 0x0004},
1200 {0x00, 0x0090, 0x0005},
1201 {0x00, 0x0000, 0x0006},
1202 {0x00, 0x0040, 0x0007},
1203 {0x00, 0x00c0, 0x0008},
1204 {0x00, 0x004a, 0x0009},
1205 {0x00, 0x0000, 0x000a},
1206 {0x00, 0x0000, 0x000b},
1207 {0x00, 0x0001, 0x000c},
1208 {0x00, 0x0001, 0x000d},
1209 {0x00, 0x0000, 0x000e},
1210 {0x00, 0x0002, 0x000f},
1211 {0x00, 0x0001, 0x0010},
1212 {0x00, 0x0000, 0x0011},
1213 {0x00, 0x0000, 0x0012},
1214 {0x00, 0x0002, 0x0020},
1215 {0x00, 0x0080, 0x0021},
1216 {0x00, 0x0001, 0x0022},
1217 {0x00, 0x00e0, 0x0023},
1218 {0x00, 0x0000, 0x0024},
1219 {0x00, 0x00d5, 0x0025},
1220 {0x00, 0x0000, 0x0026},
1221 {0x00, 0x000b, 0x0027},
1222 {0x00, 0x0000, 0x0046},
1223 {0x00, 0x0000, 0x0047},
1224 {0x00, 0x0000, 0x0048},
1225 {0x00, 0x0000, 0x0049},
1226 {0x00, 0x0008, 0x004a},
1227 {0xff, 0x0000, 0x00d0},
1228 {0xff, 0x00d8, 0x00d1},
1229 {0xff, 0x0000, 0x00d4},
1230 {0xff, 0x0000, 0x00d5},
1231 {0x01, 0x00a6, 0x0000},
1232 {0x01, 0x0028, 0x0001},
1233 {0x01, 0x0000, 0x0002},
1234 {0x01, 0x000a, 0x0003},
1235 {0x01, 0x0040, 0x0004},
1236 {0x01, 0x0066, 0x0007},
1237 {0x01, 0x0011, 0x0008},
1238 {0x01, 0x0032, 0x0009},
1239 {0x01, 0x00fd, 0x000a},
1240 {0x01, 0x0038, 0x000b},
1241 {0x01, 0x00d1, 0x000c},
1242 {0x01, 0x00f7, 0x000d},
1243 {0x01, 0x00ed, 0x000e},
1244 {0x01, 0x00d8, 0x000f},
1245 {0x01, 0x0038, 0x0010},
1246 {0x01, 0x00ff, 0x0015},
1247 {0x01, 0x0001, 0x0016},
1248 {0x01, 0x0032, 0x0017},
1249 {0x01, 0x0023, 0x0018},
1250 {0x01, 0x00ce, 0x0019},
1251 {0x01, 0x0023, 0x001a},
1252 {0x01, 0x0032, 0x001b},
1253 {0x01, 0x008d, 0x001c},
1254 {0x01, 0x00ce, 0x001d},
1255 {0x01, 0x008d, 0x001e},
1256 {0x01, 0x0000, 0x001f},
1257 {0x01, 0x0000, 0x0020},
1258 {0x01, 0x00ff, 0x003e},
1259 {0x01, 0x0003, 0x003f},
1260 {0x01, 0x0000, 0x0040},
1261 {0x01, 0x0035, 0x0041},
1262 {0x01, 0x0053, 0x0042},
1263 {0x01, 0x0069, 0x0043},
1264 {0x01, 0x007c, 0x0044},
1265 {0x01, 0x008c, 0x0045},
1266 {0x01, 0x009a, 0x0046},
1267 {0x01, 0x00a8, 0x0047},
1268 {0x01, 0x00b4, 0x0048},
1269 {0x01, 0x00bf, 0x0049},
1270 {0x01, 0x00ca, 0x004a},
1271 {0x01, 0x00d4, 0x004b},
1272 {0x01, 0x00dd, 0x004c},
1273 {0x01, 0x00e7, 0x004d},
1274 {0x01, 0x00ef, 0x004e},
1275 {0x01, 0x00f8, 0x004f},
1276 {0x01, 0x00ff, 0x0050},
1277 {0x01, 0x0001, 0x0056},
1278 {0x01, 0x0060, 0x0057},
1279 {0x01, 0x0040, 0x0058},
1280 {0x01, 0x0011, 0x0059},
1281 {0x01, 0x0001, 0x005a},
1282 {0x02, 0x0007, 0x0005},
1283 {0x02, 0xa048, 0x0000},
1284 {0x02, 0x0007, 0x0005},
1285 {0x02, 0x0015, 0x0006},
1286 {0x02, 0x100a, 0x0007},
1287 {0x02, 0xa048, 0x0000},
1288 {0x02, 0xc002, 0x0001},
1289 {0x02, 0x000f, 0x0005},
1290 {0x02, 0xa048, 0x0000},
1291 {0x05, 0x0022, 0x0004},
1292 {0x05, 0x0025, 0x0001},
1293 {0x05, 0x0000, 0x0000},
1294 {0x05, 0x0026, 0x0001},
1295 {0x05, 0x0001, 0x0000},
1296 {0x05, 0x0027, 0x0001},
1297 {0x05, 0x0000, 0x0000},
1298 {0x05, 0x0001, 0x0001},
1299 {0x05, 0x0000, 0x0000},
1300 {0x05, 0x0021, 0x0001},
1301 {0x05, 0x00d2, 0x0000},
1302 {0x05, 0x0020, 0x0001},
1303 {0x05, 0x0000, 0x0000},
1304 {0x00, 0x0090, 0x0005},
1305 {0x01, 0x00a6, 0x0000},
1306 {0x05, 0x0026, 0x0001},
1307 {0x05, 0x0001, 0x0000},
1308 {0x05, 0x0027, 0x0001},
1309 {0x05, 0x000f, 0x0000},
1310 {0x01, 0x0003, 0x003f},
1311 {0x01, 0x0001, 0x0056},
1312 {0x01, 0x0011, 0x0008},
1313 {0x01, 0x0032, 0x0009},
1314 {0x01, 0xfffd, 0x000a},
1315 {0x01, 0x0023, 0x000b},
1316 {0x01, 0xffea, 0x000c},
1317 {0x01, 0xfff4, 0x000d},
1318 {0x01, 0xfffc, 0x000e},
1319 {0x01, 0xffe3, 0x000f},
1320 {0x01, 0x001f, 0x0010},
1321 {0x01, 0x00a8, 0x0001},
1322 {0x01, 0x0067, 0x0007},
1323 {0x01, 0x0042, 0x0051},
1324 {0x01, 0x0051, 0x0053},
1325 {0x01, 0x000a, 0x0003},
1326 {0x02, 0xc002, 0x0001},
1327 {0x02, 0x0007, 0x0005},
1328 {0x02, 0xc000, 0x0001},
1329 {0x02, 0x0000, 0x0005},
1330 {0x02, 0x0007, 0x0005},
1331 {0x02, 0x2000, 0x0000},
1332 {0x05, 0x0022, 0x0004},
1333 {0x05, 0x0015, 0x0001},
1334 {0x05, 0x00ea, 0x0000},
1335 {0x05, 0x0021, 0x0001},
1336 {0x05, 0x00d2, 0x0000},
1337 {0x05, 0x0023, 0x0001},
1338 {0x05, 0x0003, 0x0000},
1339 {0x05, 0x0030, 0x0001},
1340 {0x05, 0x002b, 0x0000},
1341 {0x05, 0x0031, 0x0001},
1342 {0x05, 0x0023, 0x0000},
1343 {0x05, 0x0032, 0x0001},
1344 {0x05, 0x0023, 0x0000},
1345 {0x05, 0x0033, 0x0001},
1346 {0x05, 0x0023, 0x0000},
1347 {0x05, 0x0034, 0x0001},
1348 {0x05, 0x0002, 0x0000},
1349 {0x05, 0x0050, 0x0001},
1350 {0x05, 0x0000, 0x0000},
1351 {0x05, 0x0051, 0x0001},
1352 {0x05, 0x0000, 0x0000},
1353 {0x05, 0x0052, 0x0001},
1354 {0x05, 0x0000, 0x0000},
1355 {0x05, 0x0054, 0x0001},
1356 {0x05, 0x0001, 0x0000},
1357 {0x00, 0x0000, 0x0001},
1358 {0x00, 0x0000, 0x0002},
1359 {0x00, 0x000c, 0x0003},
1360 {0x00, 0x0000, 0x0004},
1361 {0x00, 0x0090, 0x0005},
1362 {0x00, 0x0000, 0x0006},
1363 {0x00, 0x0040, 0x0007},
1364 {0x00, 0x00c0, 0x0008},
1365 {0x00, 0x004a, 0x0009},
1366 {0x00, 0x0000, 0x000a},
1367 {0x00, 0x0000, 0x000b},
1368 {0x00, 0x0001, 0x000c},
1369 {0x00, 0x0001, 0x000d},
1370 {0x00, 0x0000, 0x000e},
1371 {0x00, 0x0002, 0x000f},
1372 {0x00, 0x0001, 0x0010},
1373 {0x00, 0x0000, 0x0011},
1374 {0x00, 0x0000, 0x0012},
1375 {0x00, 0x0002, 0x0020},
1376 {0x00, 0x0080, 0x0021},
1377 {0x00, 0x0001, 0x0022},
1378 {0x00, 0x00e0, 0x0023},
1379 {0x00, 0x0000, 0x0024},
1380 {0x00, 0x00d5, 0x0025},
1381 {0x00, 0x0000, 0x0026},
1382 {0x00, 0x000b, 0x0027},
1383 {0x00, 0x0000, 0x0046},
1384 {0x00, 0x0000, 0x0047},
1385 {0x00, 0x0000, 0x0048},
1386 {0x00, 0x0000, 0x0049},
1387 {0x00, 0x0008, 0x004a},
1388 {0xff, 0x0000, 0x00d0},
1389 {0xff, 0x00d8, 0x00d1},
1390 {0xff, 0x0000, 0x00d4},
1391 {0xff, 0x0000, 0x00d5},
1392 {0x01, 0x00a6, 0x0000},
1393 {0x01, 0x0028, 0x0001},
1394 {0x01, 0x0000, 0x0002},
1395 {0x01, 0x000a, 0x0003},
1396 {0x01, 0x0040, 0x0004},
1397 {0x01, 0x0066, 0x0007},
1398 {0x01, 0x0011, 0x0008},
1399 {0x01, 0x0032, 0x0009},
1400 {0x01, 0x00fd, 0x000a},
1401 {0x01, 0x0038, 0x000b},
1402 {0x01, 0x00d1, 0x000c},
1403 {0x01, 0x00f7, 0x000d},
1404 {0x01, 0x00ed, 0x000e},
1405 {0x01, 0x00d8, 0x000f},
1406 {0x01, 0x0038, 0x0010},
1407 {0x01, 0x00ff, 0x0015},
1408 {0x01, 0x0001, 0x0016},
1409 {0x01, 0x0032, 0x0017},
1410 {0x01, 0x0023, 0x0018},
1411 {0x01, 0x00ce, 0x0019},
1412 {0x01, 0x0023, 0x001a},
1413 {0x01, 0x0032, 0x001b},
1414 {0x01, 0x008d, 0x001c},
1415 {0x01, 0x00ce, 0x001d},
1416 {0x01, 0x008d, 0x001e},
1417 {0x01, 0x0000, 0x001f},
1418 {0x01, 0x0000, 0x0020},
1419 {0x01, 0x00ff, 0x003e},
1420 {0x01, 0x0003, 0x003f},
1421 {0x01, 0x0000, 0x0040},
1422 {0x01, 0x0035, 0x0041},
1423 {0x01, 0x0053, 0x0042},
1424 {0x01, 0x0069, 0x0043},
1425 {0x01, 0x007c, 0x0044},
1426 {0x01, 0x008c, 0x0045},
1427 {0x01, 0x009a, 0x0046},
1428 {0x01, 0x00a8, 0x0047},
1429 {0x01, 0x00b4, 0x0048},
1430 {0x01, 0x00bf, 0x0049},
1431 {0x01, 0x00ca, 0x004a},
1432 {0x01, 0x00d4, 0x004b},
1433 {0x01, 0x00dd, 0x004c},
1434 {0x01, 0x00e7, 0x004d},
1435 {0x01, 0x00ef, 0x004e},
1436 {0x01, 0x00f8, 0x004f},
1437 {0x01, 0x00ff, 0x0050},
1438 {0x01, 0x0001, 0x0056},
1439 {0x01, 0x0060, 0x0057},
1440 {0x01, 0x0040, 0x0058},
1441 {0x01, 0x0011, 0x0059},
1442 {0x01, 0x0001, 0x005a},
1443 {0x02, 0x0007, 0x0005},
1444 {0x02, 0xa048, 0x0000},
1445 {0x02, 0x0007, 0x0005},
1446 {0x02, 0x0015, 0x0006},
1447 {0x02, 0x100a, 0x0007},
1448 {0x02, 0xa048, 0x0000},
1449 {0x02, 0xc002, 0x0001},
1450 {0x02, 0x000f, 0x0005},
1451 {0x02, 0xa048, 0x0000},
1452 {0x05, 0x0022, 0x0004},
1453 {0x05, 0x0025, 0x0001},
1454 {0x05, 0x0000, 0x0000},
1455 {0x05, 0x0026, 0x0001},
1456 {0x05, 0x0001, 0x0000},
1457 {0x05, 0x0027, 0x0001},
1458 {0x05, 0x0000, 0x0000},
1459 {0x05, 0x0001, 0x0001},
1460 {0x05, 0x0000, 0x0000},
1461 {0x05, 0x0021, 0x0001},
1462 {0x05, 0x00d2, 0x0000},
1463 {0x05, 0x0020, 0x0001},
1464 {0x05, 0x0000, 0x0000},
1465 {0x00, 0x0090, 0x0005},
1466 {0x01, 0x00a6, 0x0000},
1467 {0x02, 0x0007, 0x0005},
1468 {0x02, 0x2000, 0x0000},
1469 {0x05, 0x0022, 0x0004},
1470 {0x05, 0x0015, 0x0001},
1471 {0x05, 0x00ea, 0x0000},
1472 {0x05, 0x0021, 0x0001},
1473 {0x05, 0x00d2, 0x0000},
1474 {0x05, 0x0023, 0x0001},
1475 {0x05, 0x0003, 0x0000},
1476 {0x05, 0x0030, 0x0001},
1477 {0x05, 0x002b, 0x0000},
1478 {0x05, 0x0031, 0x0001},
1479 {0x05, 0x0023, 0x0000},
1480 {0x05, 0x0032, 0x0001},
1481 {0x05, 0x0023, 0x0000},
1482 {0x05, 0x0033, 0x0001},
1483 {0x05, 0x0023, 0x0000},
1484 {0x05, 0x0034, 0x0001},
1485 {0x05, 0x0002, 0x0000},
1486 {0x05, 0x0050, 0x0001},
1487 {0x05, 0x0000, 0x0000},
1488 {0x05, 0x0051, 0x0001},
1489 {0x05, 0x0000, 0x0000},
1490 {0x05, 0x0052, 0x0001},
1491 {0x05, 0x0000, 0x0000},
1492 {0x05, 0x0054, 0x0001},
1493 {0x05, 0x0001, 0x0000},
1494 {0x00, 0x0000, 0x0001},
1495 {0x00, 0x0000, 0x0002},
1496 {0x00, 0x000c, 0x0003},
1497 {0x00, 0x0000, 0x0004},
1498 {0x00, 0x0090, 0x0005},
1499 {0x00, 0x0000, 0x0006},
1500 {0x00, 0x0040, 0x0007},
1501 {0x00, 0x00c0, 0x0008},
1502 {0x00, 0x004a, 0x0009},
1503 {0x00, 0x0000, 0x000a},
1504 {0x00, 0x0000, 0x000b},
1505 {0x00, 0x0001, 0x000c},
1506 {0x00, 0x0001, 0x000d},
1507 {0x00, 0x0000, 0x000e},
1508 {0x00, 0x0002, 0x000f},
1509 {0x00, 0x0001, 0x0010},
1510 {0x00, 0x0000, 0x0011},
1511 {0x00, 0x0000, 0x0012},
1512 {0x00, 0x0002, 0x0020},
1513 {0x00, 0x0080, 0x0021},
1514 {0x00, 0x0001, 0x0022},
1515 {0x00, 0x00e0, 0x0023},
1516 {0x00, 0x0000, 0x0024},
1517 {0x00, 0x00d5, 0x0025},
1518 {0x00, 0x0000, 0x0026},
1519 {0x00, 0x000b, 0x0027},
1520 {0x00, 0x0000, 0x0046},
1521 {0x00, 0x0000, 0x0047},
1522 {0x00, 0x0000, 0x0048},
1523 {0x00, 0x0000, 0x0049},
1524 {0x00, 0x0008, 0x004a},
1525 {0xff, 0x0000, 0x00d0},
1526 {0xff, 0x00d8, 0x00d1},
1527 {0xff, 0x0000, 0x00d4},
1528 {0xff, 0x0000, 0x00d5},
1529 {0x01, 0x00a6, 0x0000},
1530 {0x01, 0x0028, 0x0001},
1531 {0x01, 0x0000, 0x0002},
1532 {0x01, 0x000a, 0x0003},
1533 {0x01, 0x0040, 0x0004},
1534 {0x01, 0x0066, 0x0007},
1535 {0x01, 0x0011, 0x0008},
1536 {0x01, 0x0032, 0x0009},
1537 {0x01, 0x00fd, 0x000a},
1538 {0x01, 0x0038, 0x000b},
1539 {0x01, 0x00d1, 0x000c},
1540 {0x01, 0x00f7, 0x000d},
1541 {0x01, 0x00ed, 0x000e},
1542 {0x01, 0x00d8, 0x000f},
1543 {0x01, 0x0038, 0x0010},
1544 {0x01, 0x00ff, 0x0015},
1545 {0x01, 0x0001, 0x0016},
1546 {0x01, 0x0032, 0x0017},
1547 {0x01, 0x0023, 0x0018},
1548 {0x01, 0x00ce, 0x0019},
1549 {0x01, 0x0023, 0x001a},
1550 {0x01, 0x0032, 0x001b},
1551 {0x01, 0x008d, 0x001c},
1552 {0x01, 0x00ce, 0x001d},
1553 {0x01, 0x008d, 0x001e},
1554 {0x01, 0x0000, 0x001f},
1555 {0x01, 0x0000, 0x0020},
1556 {0x01, 0x00ff, 0x003e},
1557 {0x01, 0x0003, 0x003f},
1558 {0x01, 0x0000, 0x0040},
1559 {0x01, 0x0035, 0x0041},
1560 {0x01, 0x0053, 0x0042},
1561 {0x01, 0x0069, 0x0043},
1562 {0x01, 0x007c, 0x0044},
1563 {0x01, 0x008c, 0x0045},
1564 {0x01, 0x009a, 0x0046},
1565 {0x01, 0x00a8, 0x0047},
1566 {0x01, 0x00b4, 0x0048},
1567 {0x01, 0x00bf, 0x0049},
1568 {0x01, 0x00ca, 0x004a},
1569 {0x01, 0x00d4, 0x004b},
1570 {0x01, 0x00dd, 0x004c},
1571 {0x01, 0x00e7, 0x004d},
1572 {0x01, 0x00ef, 0x004e},
1573 {0x01, 0x00f8, 0x004f},
1574 {0x01, 0x00ff, 0x0050},
1575 {0x01, 0x0001, 0x0056},
1576 {0x01, 0x0060, 0x0057},
1577 {0x01, 0x0040, 0x0058},
1578 {0x01, 0x0011, 0x0059},
1579 {0x01, 0x0001, 0x005a},
1580 {0x02, 0x0007, 0x0005},
1581 {0x02, 0xa048, 0x0000},
1582 {0x02, 0x0007, 0x0005},
1583 {0x02, 0x0015, 0x0006},
1584 {0x02, 0x100a, 0x0007},
1585 {0x02, 0xa048, 0x0000},
1586 {0x02, 0xc002, 0x0001},
1587 {0x02, 0x000f, 0x0005},
1588 {0x02, 0xa048, 0x0000},
1589 {0x05, 0x0022, 0x0004},
1590 {0x05, 0x0025, 0x0001},
1591 {0x05, 0x0000, 0x0000},
1592 {0x05, 0x0026, 0x0001},
1593 {0x05, 0x0001, 0x0000},
1594 {0x05, 0x0027, 0x0001},
1595 {0x05, 0x0000, 0x0000},
1596 {0x05, 0x0001, 0x0001},
1597 {0x05, 0x0000, 0x0000},
1598 {0x05, 0x0021, 0x0001},
1599 {0x05, 0x00d2, 0x0000},
1600 {0x05, 0x0020, 0x0001},
1601 {0x05, 0x0000, 0x0000},
1602 {0x00, 0x0090, 0x0005},
1603 {0x01, 0x00a6, 0x0000},
1604 {0x05, 0x0026, 0x0001},
1605 {0x05, 0x0001, 0x0000},
1606 {0x05, 0x0027, 0x0001},
1607 {0x05, 0x001e, 0x0000},
1608 {0x01, 0x0003, 0x003f},
1609 {0x01, 0x0001, 0x0056},
1610 {0x01, 0x0011, 0x0008},
1611 {0x01, 0x0032, 0x0009},
1612 {0x01, 0xfffd, 0x000a},
1613 {0x01, 0x0023, 0x000b},
1614 {0x01, 0xffea, 0x000c},
1615 {0x01, 0xfff4, 0x000d},
1616 {0x01, 0xfffc, 0x000e},
1617 {0x01, 0xffe3, 0x000f},
1618 {0x01, 0x001f, 0x0010},
1619 {0x01, 0x00a8, 0x0001},
1620 {0x01, 0x0067, 0x0007},
1621 {0x01, 0x0042, 0x0051},
1622 {0x01, 0x0051, 0x0053},
1623 {0x01, 0x000a, 0x0003},
1624 {0x02, 0xc002, 0x0001},
1625 {0x02, 0x0007, 0x0005},
1626 {0x01, 0x0042, 0x0051},
1627 {0x01, 0x0051, 0x0053},
1628 {0x05, 0x0026, 0x0001},
1629 {0x05, 0x0001, 0x0000},
1630 {0x05, 0x0027, 0x0001},
1631 {0x05, 0x002d, 0x0000},
1632 {0x01, 0x0003, 0x003f},
1633 {0x01, 0x0001, 0x0056},
1634 {0x02, 0xc000, 0x0001},
1635 {0x02, 0x0000, 0x0005},
1639 /* Unknow camera from Ori Usbid 0x0000:0x0000 */
1640 /* Based on snoops from Ori Cohen */
1641 static const __u16 spca501c_mysterious_open_data
[][3] = {
1642 {0x02, 0x000f, 0x0005},
1643 {0x02, 0xa048, 0x0000},
1644 {0x05, 0x0022, 0x0004},
1646 {0x01, 0x0016, 0x0011}, /* RGB offset */
1647 {0x01, 0x0000, 0x0012},
1648 {0x01, 0x0006, 0x0013},
1649 {0x01, 0x0078, 0x0051},
1650 {0x01, 0x0040, 0x0052},
1651 {0x01, 0x0046, 0x0053},
1652 {0x01, 0x0040, 0x0054},
1653 {0x00, 0x0025, 0x0000},
1654 /* {0x00, 0x0000, 0x0000 }, */
1657 {0x00, 0x0026, 0x0000},
1658 {0x00, 0x0001, 0x0000},
1659 {0x00, 0x0027, 0x0000},
1660 {0x00, 0x008a, 0x0000},
1661 {0x02, 0x0007, 0x0005},
1662 {0x02, 0x2000, 0x0000},
1663 {0x05, 0x0022, 0x0004},
1664 {0x05, 0x0015, 0x0001},
1665 {0x05, 0x00ea, 0x0000},
1666 {0x05, 0x0021, 0x0001},
1667 {0x05, 0x00d2, 0x0000},
1668 {0x05, 0x0023, 0x0001},
1669 {0x05, 0x0003, 0x0000},
1670 {0x05, 0x0030, 0x0001},
1671 {0x05, 0x002b, 0x0000},
1672 {0x05, 0x0031, 0x0001},
1673 {0x05, 0x0023, 0x0000},
1674 {0x05, 0x0032, 0x0001},
1675 {0x05, 0x0023, 0x0000},
1676 {0x05, 0x0033, 0x0001},
1677 {0x05, 0x0023, 0x0000},
1678 {0x05, 0x0034, 0x0001},
1679 {0x05, 0x0002, 0x0000},
1680 {0x05, 0x0050, 0x0001},
1681 {0x05, 0x0000, 0x0000},
1682 {0x05, 0x0051, 0x0001},
1683 {0x05, 0x0000, 0x0000},
1684 {0x05, 0x0052, 0x0001},
1685 {0x05, 0x0000, 0x0000},
1686 {0x05, 0x0054, 0x0001},
1687 {0x05, 0x0001, 0x0000},
1691 /* Based on snoops from Ori Cohen */
1692 static const __u16 spca501c_mysterious_init_data
[][3] = {
1695 /* {0x00, 0x0000, 0x0000}, */
1696 {0x00, 0x0000, 0x0001},
1697 {0x00, 0x0000, 0x0002},
1698 {0x00, 0x0006, 0x0003},
1699 {0x00, 0x0000, 0x0004},
1700 {0x00, 0x0090, 0x0005},
1701 {0x00, 0x0000, 0x0006},
1702 {0x00, 0x0040, 0x0007},
1703 {0x00, 0x00c0, 0x0008},
1704 {0x00, 0x004a, 0x0009},
1705 {0x00, 0x0000, 0x000a},
1706 {0x00, 0x0000, 0x000b},
1707 {0x00, 0x0001, 0x000c},
1708 {0x00, 0x0001, 0x000d},
1709 {0x00, 0x0000, 0x000e},
1710 {0x00, 0x0002, 0x000f},
1711 {0x00, 0x0001, 0x0010},
1712 {0x00, 0x0000, 0x0011},
1713 {0x00, 0x0001, 0x0012},
1714 {0x00, 0x0002, 0x0020},
1715 {0x00, 0x0080, 0x0021}, /* 640 */
1716 {0x00, 0x0001, 0x0022},
1717 {0x00, 0x00e0, 0x0023}, /* 480 */
1718 {0x00, 0x0000, 0x0024}, /* Offset H hight */
1719 {0x00, 0x00d3, 0x0025}, /* low */
1720 {0x00, 0x0000, 0x0026}, /* Offset V */
1721 {0x00, 0x000d, 0x0027}, /* low */
1722 {0x00, 0x0000, 0x0046},
1723 {0x00, 0x0000, 0x0047},
1724 {0x00, 0x0000, 0x0048},
1725 {0x00, 0x0000, 0x0049},
1726 {0x00, 0x0008, 0x004a},
1728 {0x01, 0x00a6, 0x0000},
1729 {0x01, 0x0028, 0x0001},
1730 {0x01, 0x0000, 0x0002},
1731 {0x01, 0x000a, 0x0003}, /* Level Calc bit7 ->1 Auto */
1732 {0x01, 0x0040, 0x0004},
1733 {0x01, 0x0066, 0x0007},
1734 {0x01, 0x000f, 0x0008}, /* A11 Color correction coeff */
1735 {0x01, 0x002d, 0x0009}, /* A12 */
1736 {0x01, 0x0005, 0x000a}, /* A13 */
1737 {0x01, 0x0023, 0x000b}, /* A21 */
1738 {0x01, 0x00e0, 0x000c}, /* A22 */
1739 {0x01, 0x00fd, 0x000d}, /* A23 */
1740 {0x01, 0x00f4, 0x000e}, /* A31 */
1741 {0x01, 0x00e4, 0x000f}, /* A32 */
1742 {0x01, 0x0028, 0x0010}, /* A33 */
1743 {0x01, 0x00ff, 0x0015}, /* Reserved */
1744 {0x01, 0x0001, 0x0016}, /* Reserved */
1745 {0x01, 0x0032, 0x0017}, /* Win1 Start begin */
1746 {0x01, 0x0023, 0x0018},
1747 {0x01, 0x00ce, 0x0019},
1748 {0x01, 0x0023, 0x001a},
1749 {0x01, 0x0032, 0x001b},
1750 {0x01, 0x008d, 0x001c},
1751 {0x01, 0x00ce, 0x001d},
1752 {0x01, 0x008d, 0x001e},
1753 {0x01, 0x0000, 0x001f},
1754 {0x01, 0x0000, 0x0020}, /* Win1 Start end */
1755 {0x01, 0x00ff, 0x003e}, /* Reserved begin */
1756 {0x01, 0x0002, 0x003f},
1757 {0x01, 0x0000, 0x0040},
1758 {0x01, 0x0035, 0x0041},
1759 {0x01, 0x0053, 0x0042},
1760 {0x01, 0x0069, 0x0043},
1761 {0x01, 0x007c, 0x0044},
1762 {0x01, 0x008c, 0x0045},
1763 {0x01, 0x009a, 0x0046},
1764 {0x01, 0x00a8, 0x0047},
1765 {0x01, 0x00b4, 0x0048},
1766 {0x01, 0x00bf, 0x0049},
1767 {0x01, 0x00ca, 0x004a},
1768 {0x01, 0x00d4, 0x004b},
1769 {0x01, 0x00dd, 0x004c},
1770 {0x01, 0x00e7, 0x004d},
1771 {0x01, 0x00ef, 0x004e},
1772 {0x01, 0x00f8, 0x004f},
1773 {0x01, 0x00ff, 0x0050},
1774 {0x01, 0x0003, 0x0056}, /* Reserved end */
1775 {0x01, 0x0060, 0x0057}, /* Edge Gain */
1776 {0x01, 0x0040, 0x0058},
1777 {0x01, 0x0011, 0x0059}, /* Edge Bandwidth */
1778 {0x01, 0x0001, 0x005a},
1779 {0x02, 0x0007, 0x0005},
1780 {0x02, 0xa048, 0x0000},
1781 {0x02, 0x0007, 0x0005},
1782 {0x02, 0x0015, 0x0006},
1783 {0x02, 0x200a, 0x0007},
1784 {0x02, 0xa048, 0x0000},
1785 {0x02, 0xc000, 0x0001},
1786 {0x02, 0x000f, 0x0005},
1787 {0x02, 0xa048, 0x0000},
1788 {0x05, 0x0022, 0x0004},
1789 {0x05, 0x0025, 0x0001},
1790 {0x05, 0x0000, 0x0000},
1792 {0x05, 0x0026, 0x0001},
1793 {0x05, 0x0001, 0x0000},
1794 {0x05, 0x0027, 0x0001},
1795 {0x05, 0x0000, 0x0000},
1796 {0x05, 0x0001, 0x0001},
1797 {0x05, 0x0000, 0x0000},
1798 {0x05, 0x0021, 0x0001},
1799 {0x05, 0x00d2, 0x0000},
1800 {0x05, 0x0020, 0x0001},
1801 {0x05, 0x0000, 0x0000},
1802 {0x00, 0x0090, 0x0005},
1803 {0x01, 0x00a6, 0x0000},
1804 {0x02, 0x0000, 0x0005},
1805 {0x05, 0x0026, 0x0001},
1806 {0x05, 0x0001, 0x0000},
1807 {0x05, 0x0027, 0x0001},
1808 {0x05, 0x004e, 0x0000},
1810 {0x01, 0x0003, 0x003f},
1811 {0x01, 0x0001, 0x0056},
1812 {0x01, 0x000f, 0x0008},
1813 {0x01, 0x002d, 0x0009},
1814 {0x01, 0x0005, 0x000a},
1815 {0x01, 0x0023, 0x000b},
1816 {0x01, 0xffe0, 0x000c},
1817 {0x01, 0xfffd, 0x000d},
1818 {0x01, 0xfff4, 0x000e},
1819 {0x01, 0xffe4, 0x000f},
1820 {0x01, 0x0028, 0x0010},
1821 {0x01, 0x00a8, 0x0001},
1822 {0x01, 0x0066, 0x0007},
1823 {0x01, 0x0032, 0x0017},
1824 {0x01, 0x0023, 0x0018},
1825 {0x01, 0x00ce, 0x0019},
1826 {0x01, 0x0023, 0x001a},
1827 {0x01, 0x0032, 0x001b},
1828 {0x01, 0x008d, 0x001c},
1829 {0x01, 0x00ce, 0x001d},
1830 {0x01, 0x008d, 0x001e},
1831 {0x01, 0x00c8, 0x0015}, /* c8 Poids fort Luma */
1832 {0x01, 0x0032, 0x0016}, /* 32 */
1833 {0x01, 0x0016, 0x0011}, /* R 00 */
1834 {0x01, 0x0016, 0x0012}, /* G 00 */
1835 {0x01, 0x0016, 0x0013}, /* B 00 */
1836 {0x01, 0x000a, 0x0003},
1837 {0x02, 0xc002, 0x0001},
1838 {0x02, 0x0007, 0x0005},
1842 static int reg_write(struct usb_device
*dev
,
1843 __u16 req
, __u16 index
, __u16 value
)
1847 ret
= usb_control_msg(dev
,
1848 usb_sndctrlpipe(dev
, 0),
1850 USB_TYPE_VENDOR
| USB_RECIP_DEVICE
,
1851 value
, index
, NULL
, 0, 500);
1852 PDEBUG(D_USBO
, "reg write: 0x%02x 0x%02x 0x%02x",
1855 PDEBUG(D_ERR
, "reg write: error %d", ret
);
1860 static int write_vector(struct gspca_dev
*gspca_dev
,
1861 const __u16 data
[][3])
1863 struct usb_device
*dev
= gspca_dev
->dev
;
1866 while (data
[i
][0] != 0 || data
[i
][1] != 0 || data
[i
][2] != 0) {
1867 ret
= reg_write(dev
, data
[i
][0], data
[i
][2], data
[i
][1]);
1870 "Reg write failed for 0x%02x,0x%02x,0x%02x",
1871 data
[i
][0], data
[i
][1], data
[i
][2]);
1879 static void setbrightness(struct gspca_dev
*gspca_dev
)
1881 struct sd
*sd
= (struct sd
*) gspca_dev
;
1883 reg_write(gspca_dev
->dev
, SPCA501_REG_CCDSP
, 0x12, sd
->brightness
);
1886 static void getbrightness(struct gspca_dev
*gspca_dev
)
1890 static void setcontrast(struct gspca_dev
*gspca_dev
)
1892 struct sd
*sd
= (struct sd
*) gspca_dev
;
1894 reg_write(gspca_dev
->dev
, 0x00, 0x00,
1895 (sd
->contrast
>> 8) & 0xff);
1896 reg_write(gspca_dev
->dev
, 0x00, 0x01,
1897 sd
->contrast
& 0xff);
1900 static void getcontrast(struct gspca_dev
*gspca_dev
)
1904 static void setcolors(struct gspca_dev
*gspca_dev
)
1906 struct sd
*sd
= (struct sd
*) gspca_dev
;
1908 reg_write(gspca_dev
->dev
, SPCA501_REG_CCDSP
, 0x0c, sd
->colors
);
1911 static void getcolors(struct gspca_dev
*gspca_dev
)
1915 static void setblue_balance(struct gspca_dev
*gspca_dev
)
1917 struct sd
*sd
= (struct sd
*) gspca_dev
;
1919 reg_write(gspca_dev
->dev
, SPCA501_REG_CCDSP
, 0x11, sd
->blue_balance
);
1922 static void setred_balance(struct gspca_dev
*gspca_dev
)
1924 struct sd
*sd
= (struct sd
*) gspca_dev
;
1926 reg_write(gspca_dev
->dev
, SPCA501_REG_CCDSP
, 0x13, sd
->red_balance
);
1929 /* this function is called at probe time */
1930 static int sd_config(struct gspca_dev
*gspca_dev
,
1931 const struct usb_device_id
*id
)
1933 struct sd
*sd
= (struct sd
*) gspca_dev
;
1936 cam
= &gspca_dev
->cam
;
1938 cam
->cam_mode
= vga_mode
;
1939 cam
->nmodes
= sizeof vga_mode
/ sizeof vga_mode
[0];
1940 sd
->subtype
= id
->driver_info
;
1941 sd
->brightness
= sd_ctrls
[MY_BRIGHTNESS
].qctrl
.default_value
;
1942 sd
->contrast
= sd_ctrls
[MY_CONTRAST
].qctrl
.default_value
;
1943 sd
->colors
= sd_ctrls
[MY_COLOR
].qctrl
.default_value
;
1948 /* this function is called at probe and resume time */
1949 static int sd_init(struct gspca_dev
*gspca_dev
)
1951 struct sd
*sd
= (struct sd
*) gspca_dev
;
1953 switch (sd
->subtype
) {
1954 case Arowana300KCMOSCamera
:
1955 case SmileIntlCamera
:
1956 /* Arowana 300k CMOS Camera data */
1957 if (write_vector(gspca_dev
, spca501c_arowana_init_data
))
1960 case MystFromOriUnknownCamera
:
1961 /* UnKnow Ori CMOS Camera data */
1962 if (write_vector(gspca_dev
, spca501c_mysterious_open_data
))
1966 /* generic spca501 init data */
1967 if (write_vector(gspca_dev
, spca501_init_data
))
1971 PDEBUG(D_STREAM
, "Initializing SPCA501 finished");
1977 static int sd_start(struct gspca_dev
*gspca_dev
)
1979 struct sd
*sd
= (struct sd
*) gspca_dev
;
1980 struct usb_device
*dev
= gspca_dev
->dev
;
1983 switch (sd
->subtype
) {
1984 case ThreeComHomeConnectLite
:
1985 /* Special handling for 3com data */
1986 write_vector(gspca_dev
, spca501_3com_open_data
);
1988 case Arowana300KCMOSCamera
:
1989 case SmileIntlCamera
:
1990 /* Arowana 300k CMOS Camera data */
1991 write_vector(gspca_dev
, spca501c_arowana_open_data
);
1993 case MystFromOriUnknownCamera
:
1994 /* UnKnow CMOS Camera data */
1995 write_vector(gspca_dev
, spca501c_mysterious_init_data
);
1998 /* Generic 501 open data */
1999 write_vector(gspca_dev
, spca501_open_data
);
2002 /* memorize the wanted pixel format */
2003 mode
= gspca_dev
->cam
.cam_mode
[(int) gspca_dev
->curr_mode
].priv
;
2005 /* Enable ISO packet machine CTRL reg=2,
2006 * index=1 bitmask=0x2 (bit ordinal 1) */
2007 reg_write(dev
, SPCA50X_REG_USB
, 0x6, 0x94);
2009 case 0: /* 640x480 */
2010 reg_write(dev
, SPCA50X_REG_USB
, 0x07, 0x004a);
2012 case 1: /* 320x240 */
2013 reg_write(dev
, SPCA50X_REG_USB
, 0x07, 0x104a);
2016 /* case 2: * 160x120 */
2017 reg_write(dev
, SPCA50X_REG_USB
, 0x07, 0x204a);
2020 reg_write(dev
, SPCA501_REG_CTLRL
, 0x01, 0x02);
2022 /* HDG atleast the Intel CreateAndShare needs to have one of its
2023 * brightness / contrast / color set otherwise it assumes what seems
2024 * max contrast. Note that strange enough setting any of these is
2025 * enough to fix the max contrast problem, to be sure we set all 3 */
2026 setbrightness(gspca_dev
);
2027 setcontrast(gspca_dev
);
2028 setcolors(gspca_dev
);
2032 static void sd_stopN(struct gspca_dev
*gspca_dev
)
2034 /* Disable ISO packet
2035 * machine CTRL reg=2, index=1 bitmask=0x0 (bit ordinal 1) */
2036 reg_write(gspca_dev
->dev
, SPCA501_REG_CTLRL
, 0x01, 0x00);
2039 /* called on streamoff with alt 0 and on disconnect */
2040 static void sd_stop0(struct gspca_dev
*gspca_dev
)
2042 if (!gspca_dev
->present
)
2044 reg_write(gspca_dev
->dev
, SPCA501_REG_CTLRL
, 0x05, 0x00);
2047 static void sd_pkt_scan(struct gspca_dev
*gspca_dev
,
2048 struct gspca_frame
*frame
, /* target */
2049 __u8
*data
, /* isoc packet */
2050 int len
) /* iso packet length */
2053 case 0: /* start of frame */
2054 frame
= gspca_frame_add(gspca_dev
,
2058 data
+= SPCA501_OFFSET_DATA
;
2059 len
-= SPCA501_OFFSET_DATA
;
2060 gspca_frame_add(gspca_dev
, FIRST_PACKET
, frame
,
2063 case 0xff: /* drop */
2064 /* gspca_dev->last_packet_type = DISCARD_PACKET; */
2069 gspca_frame_add(gspca_dev
, INTER_PACKET
, frame
,
2073 static int sd_setbrightness(struct gspca_dev
*gspca_dev
, __s32 val
)
2075 struct sd
*sd
= (struct sd
*) gspca_dev
;
2077 sd
->brightness
= val
;
2078 if (gspca_dev
->streaming
)
2079 setbrightness(gspca_dev
);
2083 static int sd_getbrightness(struct gspca_dev
*gspca_dev
, __s32
*val
)
2085 struct sd
*sd
= (struct sd
*) gspca_dev
;
2087 getbrightness(gspca_dev
);
2088 *val
= sd
->brightness
;
2092 static int sd_setcontrast(struct gspca_dev
*gspca_dev
, __s32 val
)
2094 struct sd
*sd
= (struct sd
*) gspca_dev
;
2097 if (gspca_dev
->streaming
)
2098 setcontrast(gspca_dev
);
2102 static int sd_getcontrast(struct gspca_dev
*gspca_dev
, __s32
*val
)
2104 struct sd
*sd
= (struct sd
*) gspca_dev
;
2106 getcontrast(gspca_dev
);
2107 *val
= sd
->contrast
;
2111 static int sd_setcolors(struct gspca_dev
*gspca_dev
, __s32 val
)
2113 struct sd
*sd
= (struct sd
*) gspca_dev
;
2116 if (gspca_dev
->streaming
)
2117 setcolors(gspca_dev
);
2121 static int sd_getcolors(struct gspca_dev
*gspca_dev
, __s32
*val
)
2123 struct sd
*sd
= (struct sd
*) gspca_dev
;
2125 getcolors(gspca_dev
);
2130 static int sd_setblue_balance(struct gspca_dev
*gspca_dev
, __s32 val
)
2132 struct sd
*sd
= (struct sd
*) gspca_dev
;
2134 sd
->blue_balance
= val
;
2135 if (gspca_dev
->streaming
)
2136 setblue_balance(gspca_dev
);
2140 static int sd_getblue_balance(struct gspca_dev
*gspca_dev
, __s32
*val
)
2142 struct sd
*sd
= (struct sd
*) gspca_dev
;
2144 *val
= sd
->blue_balance
;
2148 static int sd_setred_balance(struct gspca_dev
*gspca_dev
, __s32 val
)
2150 struct sd
*sd
= (struct sd
*) gspca_dev
;
2152 sd
->red_balance
= val
;
2153 if (gspca_dev
->streaming
)
2154 setred_balance(gspca_dev
);
2158 static int sd_getred_balance(struct gspca_dev
*gspca_dev
, __s32
*val
)
2160 struct sd
*sd
= (struct sd
*) gspca_dev
;
2162 *val
= sd
->red_balance
;
2166 /* sub-driver description */
2167 static const struct sd_desc sd_desc
= {
2168 .name
= MODULE_NAME
,
2170 .nctrls
= ARRAY_SIZE(sd_ctrls
),
2171 .config
= sd_config
,
2176 .pkt_scan
= sd_pkt_scan
,
2179 /* -- module initialisation -- */
2180 static const __devinitdata
struct usb_device_id device_table
[] = {
2181 {USB_DEVICE(0x040a, 0x0002), .driver_info
= KodakDVC325
},
2182 {USB_DEVICE(0x0497, 0xc001), .driver_info
= SmileIntlCamera
},
2183 {USB_DEVICE(0x0506, 0x00df), .driver_info
= ThreeComHomeConnectLite
},
2184 {USB_DEVICE(0x0733, 0x0401), .driver_info
= IntelCreateAndShare
},
2185 {USB_DEVICE(0x0733, 0x0402), .driver_info
= ViewQuestM318B
},
2186 {USB_DEVICE(0x1776, 0x501c), .driver_info
= Arowana300KCMOSCamera
},
2187 {USB_DEVICE(0x0000, 0x0000), .driver_info
= MystFromOriUnknownCamera
},
2190 MODULE_DEVICE_TABLE(usb
, device_table
);
2192 /* -- device connect -- */
2193 static int sd_probe(struct usb_interface
*intf
,
2194 const struct usb_device_id
*id
)
2196 return gspca_dev_probe(intf
, id
, &sd_desc
, sizeof(struct sd
),
2200 static struct usb_driver sd_driver
= {
2201 .name
= MODULE_NAME
,
2202 .id_table
= device_table
,
2204 .disconnect
= gspca_disconnect
,
2206 .suspend
= gspca_suspend
,
2207 .resume
= gspca_resume
,
2211 /* -- module insert / remove -- */
2212 static int __init
sd_mod_init(void)
2214 if (usb_register(&sd_driver
) < 0)
2216 PDEBUG(D_PROBE
, "registered");
2219 static void __exit
sd_mod_exit(void)
2221 usb_deregister(&sd_driver
);
2222 PDEBUG(D_PROBE
, "deregistered");
2225 module_init(sd_mod_init
);
2226 module_exit(sd_mod_exit
);