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