aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-François Moine <moinejf@free.fr>2011-03-14 07:49:28 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-03-22 03:54:51 -0400
commitce5b2acce60405b938d1f1f994024cde4e2cdd7e (patch)
tree14ce6f56e6aece2fa18547e5ca21862b609213e2
parent59929cefa5f573178df3c4abfb36d55f7b33f214 (diff)
[media] gspca - nw80x: New subdriver for Divio based webcams
[mchehab@redhat.com: Fix a few CodingStyle issues] Tested-by: Kjell Claesson <kjell.claesson@epost.tidanet.se> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jean-François Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--Documentation/video4linux/gspca.txt9
-rw-r--r--drivers/media/video/gspca/Kconfig9
-rw-r--r--drivers/media/video/gspca/Makefile2
-rw-r--r--drivers/media/video/gspca/nw80x.c2443
-rw-r--r--include/linux/videodev2.h1
5 files changed, 2464 insertions, 0 deletions
diff --git a/Documentation/video4linux/gspca.txt b/Documentation/video4linux/gspca.txt
index dc72fff2eb12..5c542e60f51d 100644
--- a/Documentation/video4linux/gspca.txt
+++ b/Documentation/video4linux/gspca.txt
@@ -103,6 +103,7 @@ spca561 046d:092d Logitech QC Elch2
103spca561 046d:092e Logitech QC Elch2 103spca561 046d:092e Logitech QC Elch2
104spca561 046d:092f Logitech QuickCam Express Plus 104spca561 046d:092f Logitech QuickCam Express Plus
105sunplus 046d:0960 Logitech ClickSmart 420 105sunplus 046d:0960 Logitech ClickSmart 420
106nw80x 046d:d001 Logitech QuickCam Pro (dark focus ring)
106sunplus 0471:0322 Philips DMVC1300K 107sunplus 0471:0322 Philips DMVC1300K
107zc3xx 0471:0325 Philips SPC 200 NC 108zc3xx 0471:0325 Philips SPC 200 NC
108zc3xx 0471:0326 Philips SPC 300 NC 109zc3xx 0471:0326 Philips SPC 300 NC
@@ -150,10 +151,12 @@ sunplus 04fc:5330 Digitrex 2110
150sunplus 04fc:5360 Sunplus Generic 151sunplus 04fc:5360 Sunplus Generic
151spca500 04fc:7333 PalmPixDC85 152spca500 04fc:7333 PalmPixDC85
152sunplus 04fc:ffff Pure DigitalDakota 153sunplus 04fc:ffff Pure DigitalDakota
154nw80x 0502:d001 DVC V6
153spca501 0506:00df 3Com HomeConnect Lite 155spca501 0506:00df 3Com HomeConnect Lite
154sunplus 052b:1507 Megapixel 5 Pretec DC-1007 156sunplus 052b:1507 Megapixel 5 Pretec DC-1007
155sunplus 052b:1513 Megapix V4 157sunplus 052b:1513 Megapix V4
156sunplus 052b:1803 MegaImage VI 158sunplus 052b:1803 MegaImage VI
159nw80x 052b:d001 EZCam Pro p35u
157tv8532 0545:808b Veo Stingray 160tv8532 0545:808b Veo Stingray
158tv8532 0545:8333 Veo Stingray 161tv8532 0545:8333 Veo Stingray
159sunplus 0546:3155 Polaroid PDC3070 162sunplus 0546:3155 Polaroid PDC3070
@@ -177,6 +180,7 @@ sunplus 055f:c530 Mustek Gsmart LCD 3
177sunplus 055f:c540 Gsmart D30 180sunplus 055f:c540 Gsmart D30
178sunplus 055f:c630 Mustek MDC4000 181sunplus 055f:c630 Mustek MDC4000
179sunplus 055f:c650 Mustek MDC5500Z 182sunplus 055f:c650 Mustek MDC5500Z
183nw80x 055f:d001 Mustek Wcam 300 mini
180zc3xx 055f:d003 Mustek WCam300A 184zc3xx 055f:d003 Mustek WCam300A
181zc3xx 055f:d004 Mustek WCam300 AN 185zc3xx 055f:d004 Mustek WCam300 AN
182conex 0572:0041 Creative Notebook cx11646 186conex 0572:0041 Creative Notebook cx11646
@@ -195,8 +199,12 @@ gl860 05e3:0503 Genesys Logic PC Camera
195gl860 05e3:f191 Genesys Logic PC Camera 199gl860 05e3:f191 Genesys Logic PC Camera
196spca561 060b:a001 Maxell Compact Pc PM3 200spca561 060b:a001 Maxell Compact Pc PM3
197zc3xx 0698:2003 CTX M730V built in 201zc3xx 0698:2003 CTX M730V built in
202nw80x 06a5:0000 Typhoon Webcam 100 USB
203nw80x 06a5:d001 Divio based webcams
204nw80x 06a5:d800 Divio Chicony TwinkleCam, Trust SpaceCam
198spca500 06bd:0404 Agfa CL20 205spca500 06bd:0404 Agfa CL20
199spca500 06be:0800 Optimedia 206spca500 06be:0800 Optimedia
207nw80x 06be:d001 EZCam Pro p35u
200sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom 208sunplus 06d6:0031 Trust 610 LCD PowerC@m Zoom
201spca506 06e1:a190 ADS Instant VCD 209spca506 06e1:a190 ADS Instant VCD
202ov534 06f8:3002 Hercules Blog Webcam 210ov534 06f8:3002 Hercules Blog Webcam
@@ -204,6 +212,7 @@ ov534_9 06f8:3003 Hercules Dualpix HD Weblog
204sonixj 06f8:3004 Hercules Classic Silver 212sonixj 06f8:3004 Hercules Classic Silver
205sonixj 06f8:3008 Hercules Deluxe Optical Glass 213sonixj 06f8:3008 Hercules Deluxe Optical Glass
206pac7302 06f8:3009 Hercules Classic Link 214pac7302 06f8:3009 Hercules Classic Link
215nw80x 0728:d001 AVerMedia Camguard
207spca508 0733:0110 ViewQuest VQ110 216spca508 0733:0110 ViewQuest VQ110
208spca501 0733:0401 Intel Create and Share 217spca501 0733:0401 Intel Create and Share
209spca501 0733:0402 ViewQuest M318B 218spca501 0733:0402 ViewQuest M318B
diff --git a/drivers/media/video/gspca/Kconfig b/drivers/media/video/gspca/Kconfig
index a20f6ae88250..eb04e8b59989 100644
--- a/drivers/media/video/gspca/Kconfig
+++ b/drivers/media/video/gspca/Kconfig
@@ -104,6 +104,15 @@ config USB_GSPCA_MR97310A
104 To compile this driver as a module, choose M here: the 104 To compile this driver as a module, choose M here: the
105 module will be called gspca_mr97310a. 105 module will be called gspca_mr97310a.
106 106
107config USB_GSPCA_NW80X
108 tristate "Divio based (NW80x) USB Camera Driver"
109 depends on VIDEO_V4L2 && USB_GSPCA
110 help
111 Say Y here if you want support for cameras based on the NW80x chips.
112
113 To compile this driver as a module, choose M here: the
114 module will be called gspca_nw80x.
115
107config USB_GSPCA_OV519 116config USB_GSPCA_OV519
108 tristate "OV51x / OVFX2 / W996xCF USB Camera Driver" 117 tristate "OV51x / OVFX2 / W996xCF USB Camera Driver"
109 depends on VIDEO_V4L2 && USB_GSPCA 118 depends on VIDEO_V4L2 && USB_GSPCA
diff --git a/drivers/media/video/gspca/Makefile b/drivers/media/video/gspca/Makefile
index a0dbcfbab29c..855fbc8c9c47 100644
--- a/drivers/media/video/gspca/Makefile
+++ b/drivers/media/video/gspca/Makefile
@@ -8,6 +8,7 @@ obj-$(CONFIG_USB_GSPCA_JEILINJ) += gspca_jeilinj.o
8obj-$(CONFIG_USB_GSPCA_KONICA) += gspca_konica.o 8obj-$(CONFIG_USB_GSPCA_KONICA) += gspca_konica.o
9obj-$(CONFIG_USB_GSPCA_MARS) += gspca_mars.o 9obj-$(CONFIG_USB_GSPCA_MARS) += gspca_mars.o
10obj-$(CONFIG_USB_GSPCA_MR97310A) += gspca_mr97310a.o 10obj-$(CONFIG_USB_GSPCA_MR97310A) += gspca_mr97310a.o
11obj-$(CONFIG_USB_GSPCA_NW80X) += gspca_nw80x.o
11obj-$(CONFIG_USB_GSPCA_OV519) += gspca_ov519.o 12obj-$(CONFIG_USB_GSPCA_OV519) += gspca_ov519.o
12obj-$(CONFIG_USB_GSPCA_OV534) += gspca_ov534.o 13obj-$(CONFIG_USB_GSPCA_OV534) += gspca_ov534.o
13obj-$(CONFIG_USB_GSPCA_OV534_9) += gspca_ov534_9.o 14obj-$(CONFIG_USB_GSPCA_OV534_9) += gspca_ov534_9.o
@@ -48,6 +49,7 @@ gspca_jeilinj-objs := jeilinj.o
48gspca_konica-objs := konica.o 49gspca_konica-objs := konica.o
49gspca_mars-objs := mars.o 50gspca_mars-objs := mars.o
50gspca_mr97310a-objs := mr97310a.o 51gspca_mr97310a-objs := mr97310a.o
52gspca_nw80x-objs := nw80x.o
51gspca_ov519-objs := ov519.o 53gspca_ov519-objs := ov519.o
52gspca_ov534-objs := ov534.o 54gspca_ov534-objs := ov534.o
53gspca_ov534_9-objs := ov534_9.o 55gspca_ov534_9-objs := ov534_9.o
diff --git a/drivers/media/video/gspca/nw80x.c b/drivers/media/video/gspca/nw80x.c
new file mode 100644
index 000000000000..1c9d3c2f6670
--- /dev/null
+++ b/drivers/media/video/gspca/nw80x.c
@@ -0,0 +1,2443 @@
1/*
2 * DivIO nw80x subdriver
3 *
4 * Copyright (C) 2011 Jean-François Moine (http://moinejf.free.fr)
5 * Copyright (C) 2003 Sylvain Munaut <tnt@246tNt.com>
6 * Kjell Claesson <keyson@users.sourceforge.net>
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#define MODULE_NAME "nw80x"
24
25#include "gspca.h"
26
27MODULE_AUTHOR("Jean-Francois Moine <http://moinejf.free.fr>");
28MODULE_DESCRIPTION("NW80x USB Camera Driver");
29MODULE_LICENSE("GPL");
30
31static int webcam;
32
33/* controls */
34enum e_ctrl {
35 GAIN,
36 EXPOSURE,
37 AUTOGAIN,
38 NCTRLS /* number of controls */
39};
40
41/* specific webcam descriptor */
42struct sd {
43 struct gspca_dev gspca_dev; /* !! must be the first item */
44
45 struct gspca_ctrl ctrls[NCTRLS];
46
47 u32 ae_res;
48 s8 ag_cnt;
49#define AG_CNT_START 13
50
51 u8 bridge;
52 u8 webcam;
53};
54
55enum bridges {
56 BRIDGE_NW800, /* et31x110 */
57 BRIDGE_NW801,
58 BRIDGE_NW802,
59};
60enum webcams {
61 Generic800,
62 SpaceCam, /* Trust 120 SpaceCam */
63 SpaceCam2, /* other Trust 120 SpaceCam */
64 Cvideopro, /* Conceptronic Video Pro */
65 Dlink350c,
66 DS3303u,
67 Kr651us,
68 Kritter,
69 Mustek300,
70 Proscope,
71 Twinkle,
72 DsbC110,
73 DvcV6,
74 P35u,
75 Generic802,
76 NWEBCAMS /* number of webcams */
77};
78
79/*
80 - webcams:
81 - Typhoon Webcam 100 USB (06a5:0000)
82 nw800
83 - Trust SpaceCam120 or SpaceCam100 PORTABLE (06a5:d800)
84 nw801 SpaceCam.init
85 or trust_space.init if no LED (?)
86 - Divio Chicony TwinkleCam (06a5:d800) ?
87 nw800 Twinkle.init
88 - Plustek Opticam 500U or ProLink DS3303u
89 nw801 DS3303u.init
90 - Logitech QuickCam Pro (dark focus ring) (046d:d001)
91 nw801
92 - EZCam Pro p35u (052b:d001, 06a5:d001 and 06be:d001)
93 nw801 - sensor Sharp IR3Y38M
94 - AVerMedia Camguard (0728:d001)
95 nw801
96 - Panasonic GP-KR651US (06a5:d001)
97 nw802 kr651us.init
98 - iRez Kritter cam
99 nw802 kritter.init
100 - D-link dru-350c cam
101 nw802 d-link-350c.init
102 - The Scope USB Microscope M2 (ProScope)
103 = Divio ProLink DS3303u WebCam (06a5:d001)
104 = Scalar USB Microscope M2 (Proscope)
105 nw802 proscope.init
106 - Conceptronic Video Pro 'CVIDEOPRO USB Webcam CCD' (06a5:d001)
107 nw802 cvideopro.init
108 - Mustek Wcam 300 mini
109 nw802 mustek_300_mini.init
110 - D-Link NetQam Pro 250plus (06a5:d001)
111 - Showcam NGS webcam (065a:d800)
112 - sceptre svc300
113 - DSB-C110 (06a5:d800)
114 et31x110
115 - DVC V6 (0502:d001)
116 nw802
117 - registers
118 nw800/et31x110 nw801 nw802
119 0000..009e 0000..00a1 0000..009e
120 0200..0211 id id
121 0300..0302 id id
122 0400..0406 (inex) 0400..0406
123 0500..0505 0500..0506 (inex)
124 0600..061a 0600..0601 0600..0601
125 0800..0814 id id
126 1000..109c 1000..10a1 1000..109a
127
128 080c: luma (nw800/nw802)
129 080d: luma (nw801)
130 1004: LUT (?)
131 100b: R gain (0..63)
132 100c: B gain
133 100d: G gain
134 100e: Y gain
135 100f: U gain
136 1010: V gain
137 1019: clock (nw801 - bit 0x08: indoor/outdoor)
138 101b: shutter 1 (0..255)
139 101c: shutter 2
140 1026: BP = gain (nw801)
141 1041, 1052, 1063, 1074: LUT base (nw802)
142 1048, 1059, 106a, 107b: LUT base (nw801)
143 - resolutions
144 nw800 352x288
145 nw801/nw802 320x240 - 640x480
146*/
147
148static const struct v4l2_pix_format sif_mode[] = {
149 {352, 288, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,
150 .bytesperline = 352,
151 .sizeimage = 352 * 288 * 4 / 8,
152 .colorspace = V4L2_COLORSPACE_JPEG}
153};
154static const struct v4l2_pix_format vga_mode[] = {
155 {320, 240, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,
156 .bytesperline = 320,
157 .sizeimage = 320 * 240 * 4 / 8,
158 .colorspace = V4L2_COLORSPACE_JPEG},
159 {640, 480, V4L2_PIX_FMT_JPGL, V4L2_FIELD_NONE,
160 .bytesperline = 640,
161 .sizeimage = 640 * 480 * 3 / 8,
162 .colorspace = V4L2_COLORSPACE_JPEG},
163};
164
165/*
166 * The sequences below contain:
167 * - 1st and 2nd bytes: either
168 * - register number (BE)
169 * - I2C0 + i2c address
170 * - 3rd byte: data length (=0 for end of sequence)
171 * - n bytes: data
172 */
173#define I2C0 0xff
174static const u8 nw800_init[] = {
175 0x05, 0x00, 0x01, 0x55,
176 0x10, 0x9b, 0x01, 0xaa,
177 0x05, 0x02, 0x01, 0x02,
178 0x06, 0x00, 0x02, 0x04, 0xd9,
179 0x05, 0x05, 0x01, 0x00,
180 0x05, 0x05, 0x01, 0x01,
181 0x04, 0x06, 0x01, 0x04,
182
183 0x04, 0x06, 0x01, 0xc0,
184 0x00, 0x00, 0x40, 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,
185 0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
186 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
187 0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
188 0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
189 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
190 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
191 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
192 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
193 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
194 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
195 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
196 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
197 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
198 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
199 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
200 0x00, 0x80, 0x1f, 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
201 0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
202 0x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
203 0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,
204 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
205 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
206 0x40, 0x20,
207 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
208 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0xc0,
209 0x05, 0x00, 0x06, 0xe8, 0x00, 0x00, 0x00, 0x20, 0x20,
210 0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
211 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
212 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
213 0x00, 0x00, 0x00,
214 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
215 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
216 0x00, 0x00, 0x00, 0x00, 0x00,
217 0x10, 0x00, 0x40, 0x83, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
218 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
219 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
220 0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
221 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
222 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
223 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
224 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
225 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
226 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
227 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
228 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
229 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
230 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
231 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
232 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
233 0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
234 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
235 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
236 0x01, 0x60, 0x01, 0x00, 0x00,
237
238 0x04, 0x04, 0x01, 0xff,
239 0x04, 0x06, 0x01, 0xc4,
240
241 0x04, 0x06, 0x01, 0xc0,
242 0x00, 0x00, 0x40, 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,
243 0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
244 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
245 0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
246 0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
247 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
248 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
249 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
250 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
251 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
252 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
253 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
254 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
255 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
256 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
257 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
258 0x00, 0x80, 0x1f, 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
259 0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
260 0x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
261 0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,
262 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
263 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
264 0x40, 0x20,
265 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
266 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0xc0,
267 0x05, 0x00, 0x06, 0xe8, 0x00, 0x00, 0x00, 0x20, 0x20,
268 0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
269 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
270 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
271 0x00, 0x00, 0x00,
272 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
273 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
274 0x00, 0x00, 0x00, 0x00, 0x00,
275 0x10, 0x00, 0x40, 0x83, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
276 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
277 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
278 0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
279 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
280 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
281 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
282 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
283 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
284 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
285 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
286 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
287 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
288 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
289 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
290 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
291 0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
292 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
293 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
294 0x01, 0x60, 0x01, 0x00, 0x00,
295
296 0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
297 0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
298 0x40,
299 0x00, 0x80, 0x01, 0xa0,
300 0x10, 0x1a, 0x01, 0x00,
301 0x00, 0x91, 0x02, 0x6c, 0x01,
302 0x00, 0x03, 0x02, 0xc8, 0x01,
303 0x10, 0x1a, 0x01, 0x00,
304 0x10, 0x00, 0x01, 0x83,
305 0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
306 0x20, 0x01, 0x60, 0x01,
307 0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
308 0x10, 0x1b, 0x02, 0x69, 0x00,
309 0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
310 0x05, 0x02, 0x01, 0x02,
311 0x06, 0x00, 0x02, 0x04, 0xd9,
312 0x05, 0x05, 0x01, 0x20,
313 0x05, 0x05, 0x01, 0x21,
314 0x10, 0x0e, 0x01, 0x08,
315 0x10, 0x41, 0x11, 0x00, 0x08, 0x21, 0x3d, 0x52, 0x63, 0x75, 0x83,
316 0x91, 0x9e, 0xaa, 0xb6, 0xc1, 0xcc, 0xd6, 0xe0,
317 0xea,
318 0x10, 0x03, 0x01, 0x00,
319 0x10, 0x0f, 0x02, 0x13, 0x13,
320 0x10, 0x03, 0x01, 0x14,
321 0x10, 0x41, 0x11, 0x00, 0x08, 0x21, 0x3d, 0x52, 0x63, 0x75, 0x83,
322 0x91, 0x9e, 0xaa, 0xb6, 0xc1, 0xcc, 0xd6, 0xe0,
323 0xea,
324 0x10, 0x0b, 0x01, 0x14,
325 0x10, 0x0d, 0x01, 0x20,
326 0x10, 0x0c, 0x01, 0x34,
327 0x04, 0x06, 0x01, 0xc3,
328 0x04, 0x04, 0x01, 0x00,
329 0x05, 0x02, 0x01, 0x02,
330 0x06, 0x00, 0x02, 0x00, 0x48,
331 0x05, 0x05, 0x01, 0x20,
332 0x05, 0x05, 0x01, 0x21,
333 0, 0, 0
334};
335
336/* 06a5:d001 - nw801 - p35u */
337static const u8 nw801_init_1[] = {
338 0x05, 0x06, 0x01, 0x04,
339 0x00, 0x00, 0x40, 0x0e, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e,
340 0x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
341 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
342 0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
343 0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
344 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
345 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
346 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
347 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
348 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
349 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
350 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
351 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
352 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
353 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
354 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
355 0x00, 0x80, 0x22, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x08, 0x00,
356 0x00, 0x00, 0x00, 0x00, 0x69, 0xa8, 0x1f, 0x00,
357 0x0d, 0x02, 0x07, 0x00, 0x01, 0x00, 0x19, 0x00,
358 0xf2, 0x00, 0x18, 0x06, 0x10, 0x06, 0x10, 0x00,
359 0x36, 0x00,
360 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
361 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
362 0x40, 0x20,
363 0x03, 0x00, 0x03, 0x00, 0x00, 0x00,
364 0x05, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
365 0x06, 0x00, 0x02, 0x09, 0x99,
366 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
367 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
368 0x00, 0x00, 0x00, 0x00, 0x00,
369 0x10, 0x00, 0x40, 0x22, 0x02, 0x80, 0x00, 0x1e, 0x00, 0x00, 0x00,
370 0x00, 0x00, 0x00, 0x0a, 0x15, 0x08, 0x08, 0x0a,
371 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
372 0x00, 0x01, 0x35, 0xfd, 0x07, 0x3d, 0x00, 0x00,
373 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x14, 0x02,
374 0x00, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
375 0x40, 0x00, 0x00, 0x00, 0x40, 0x20, 0x10, 0x06,
376 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06, 0xf7,
377 0x10, 0x40, 0x40, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80, 0x80,
378 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99, 0xa4,
379 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc, 0xcf,
380 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54, 0x64,
381 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2, 0xe2,
382 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
383 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
384 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
385 0x10, 0x80, 0x22, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
386 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00, 0x00,
387 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x82, 0x02,
388 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40, 0x01,
389 0xf0, 0x00,
390 0, 0, 0,
391};
392static const u8 nw801_init_qvga[] = {
393 0x02, 0x00, 0x10, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
394 0x00, 0x78, 0x18, 0x0b, 0x06, 0xa2, 0x86, 0x78,
395 0x02, 0x0f, 0x01, 0x6b,
396 0x10, 0x1a, 0x01, 0x15,
397 0x00, 0x00, 0x01, 0x1e,
398 0x10, 0x00, 0x01, 0x2f,
399 0x10, 0x8c, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
400 0x10, 0x11, 0x08, 0x29, 0x00, 0x18, 0x01, 0x1f, 0x00, 0xd2, 0x00,
401 /* AE window */
402 0, 0, 0,
403};
404static const u8 nw801_init_vga[] = {
405 0x02, 0x00, 0x10, 0x78, 0xa0, 0x97, 0x78, 0xa0, 0x00, 0x00, 0x00,
406 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xf0,
407 0x02, 0x0f, 0x01, 0xd5,
408 0x10, 0x1a, 0x01, 0x15,
409 0x00, 0x00, 0x01, 0x0e,
410 0x10, 0x00, 0x01, 0x22,
411 0x10, 0x8c, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,
412 0x10, 0x11, 0x08, 0x51, 0x00, 0x30, 0x02, 0x3d, 0x00, 0xa4, 0x01,
413 0, 0, 0,
414};
415static const u8 nw801_init_2[] = {
416 0x10, 0x04, 0x01, 0x1a,
417 0x10, 0x19, 0x01, 0x09, /* clock */
418 0x10, 0x24, 0x06, 0xc0, 0x00, 0x3f, 0x02, 0x00, 0x01,
419 /* .. gain .. */
420 0x00, 0x03, 0x02, 0x92, 0x03,
421 0x00, 0x1d, 0x04, 0xf2, 0x00, 0x24, 0x07,
422 0x00, 0x7b, 0x01, 0xcf,
423 0x10, 0x94, 0x01, 0x07,
424 0x05, 0x05, 0x01, 0x01,
425 0x05, 0x04, 0x01, 0x01,
426 0x10, 0x0e, 0x01, 0x08,
427 0x10, 0x48, 0x11, 0x00, 0x37, 0x55, 0x6b, 0x7d, 0x8d, 0x9b, 0xa8,
428 0xb4, 0xbf, 0xca, 0xd4, 0xdd, 0xe6, 0xef, 0xf0,
429 0xf0,
430 0x10, 0x03, 0x01, 0x00,
431 0x10, 0x0f, 0x02, 0x0c, 0x0c,
432 0x10, 0x03, 0x01, 0x08,
433 0x10, 0x48, 0x11, 0x00, 0x37, 0x55, 0x6b, 0x7d, 0x8d, 0x9b, 0xa8,
434 0xb4, 0xbf, 0xca, 0xd4, 0xdd, 0xe6, 0xef, 0xf0,
435 0xf0,
436 0x10, 0x0b, 0x01, 0x0b,
437 0x10, 0x0d, 0x01, 0x0b,
438 0x10, 0x0c, 0x01, 0x1f,
439 0x05, 0x06, 0x01, 0x03,
440 0, 0, 0
441};
442
443/* nw802 (sharp IR3Y38M?) */
444static const u8 nw802_init[] = {
445 0x04, 0x06, 0x01, 0x04,
446 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0xf9, 0x02, 0x10, 0x00, 0x4d,
447 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
448 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
449 0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
450 0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
451 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
452 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
453 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
454 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
455 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
456 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
457 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
458 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
459 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
460 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
461 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
462 0x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,
463 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
464 0x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,
465 0x00, 0x10, 0x06, 0x08, 0x00, 0x18, 0x00,
466 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
467 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
468 0x40, 0x20,
469 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
470 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,
471 0x06, 0x00, 0x02, 0x09, 0x99,
472 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
473 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
474 0x00, 0x00, 0x00, 0x00, 0x00,
475 0x10, 0x00, 0x40, 0xa1, 0x02, 0x80, 0x00, 0x1d, 0x00, 0x00, 0x00,
476 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
477 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
478 0x00, 0x49, 0x13, 0xff, 0x01, 0xc0, 0x00, 0x14,
479 0x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,
480 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
481 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
482 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
483 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
484 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
485 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
486 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
487 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
488 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
489 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
490 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
491 0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
492 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x05, 0x82,
493 0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
494 0x01, 0xf0, 0x00,
495 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
496 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
497 0x40,
498 0x10, 0x1a, 0x01, 0x00,
499 0x10, 0x00, 0x01, 0xad,
500 0x00, 0x00, 0x01, 0x08,
501 0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
502 0x10, 0x1b, 0x02, 0x00, 0x00,
503 0x10, 0x11, 0x08, 0x51, 0x00, 0xf0, 0x00, 0x3d, 0x00, 0xb4, 0x00,
504 0x10, 0x1d, 0x08, 0x00, 0xa0, 0x00, 0xa0, 0x00, 0xa0, 0x00, 0xa0,
505 0x10, 0x0e, 0x01, 0x27,
506 0x10, 0x41, 0x11, 0x00, 0x0e, 0x35, 0x4f, 0x62, 0x71, 0x7f, 0x8b,
507 0x96, 0xa0, 0xa9, 0xb2, 0xbb, 0xc3, 0xca, 0xd2,
508 0xd8,
509 0x10, 0x03, 0x01, 0x00,
510 0x10, 0x0f, 0x02, 0x14, 0x14,
511 0x10, 0x03, 0x01, 0x0c,
512 0x10, 0x41, 0x11, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54, 0x64, 0x74,
513 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2, 0xe2, 0xf1,
514 0xff,
515/* 0x00, 0x0e, 0x35, 0x4f, 0x62, 0x71, 0x7f, 0x8b,
516 * 0x96, 0xa0, 0xa9, 0xb2, 0xbb, 0xc3, 0xca, 0xd2,
517 * 0xd8, */
518 0x10, 0x0b, 0x01, 0x10,
519 0x10, 0x0d, 0x01, 0x11,
520 0x10, 0x0c, 0x01, 0x1c,
521 0x04, 0x06, 0x01, 0x03,
522 0x04, 0x04, 0x01, 0x00,
523 0, 0, 0
524};
525/* et31x110 - Trust 120 SpaceCam */
526static const u8 spacecam_init[] = {
527/*fixme: at connection time*/
528 0x04, 0x05, 0x01, 0x01,
529 0x04, 0x04, 0x01, 0x01,
530 0x04, 0x06, 0x01, 0x04,
531 0x04, 0x04, 0x03, 0x00, 0x00, 0x00,
532 0x05, 0x05, 0x01, 0x00,
533/*fixme: add 300ms delay?*/
534/*fixme: at capture start time*/
535 0x04, 0x06, 0x01, 0x44,
536 0x00, 0x00, 0x40, 0x10, 0x43, 0x00, 0xb4, 0x01, 0x10, 0x00, 0x4f,
537 0xef, 0x0e, 0x00, 0x74, 0x01, 0x01, 0x00, 0x19,
538 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
539 0x00, 0x01, 0x00, 0x19, 0x00, 0x3e, 0x00, 0x24,
540 0x03, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
541 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
542 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
543 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
544 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
545 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
546 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
547 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
548 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
549 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
550 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
551 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
552 0x00, 0x80, 0x1f, 0xa0, 0x48, 0xc3, 0x02, 0x88, 0x0c, 0x68, 0x00,
553 0x00, 0x00, 0x00, 0x00, 0xa8, 0x06, 0x00, 0x08,
554 0x00, 0x32, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
555 0x00, 0x4b, 0x00, 0x7c, 0x00, 0x80, 0x00,
556 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
557 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
558 0x40, 0x20,
559 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
560 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
561 0x05, 0x00, 0x06, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
562 0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
563 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
564 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
565 0x00, 0x00, 0x00,
566 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
567 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
568 0x00, 0x00, 0x00, 0x00, 0x00,
569 0x10, 0x00, 0x40, 0x83, 0x02, 0x20, 0x00, 0x11, 0x00, 0x00, 0x00,
570 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
571 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
572 0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
573 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
574 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
575 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
576 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
577 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
578 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
579 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
580 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
581 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
582 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
583 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
584 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
585 0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
586 0x00, 0x00, 0x00, 0x00, 0x00, 0x2d, 0x00, 0x62,
587 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
588 0x01, 0x60, 0x01, 0x00, 0x00,
589 0x04, 0x06, 0x01, 0xc0,
590 0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
591 0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
592 0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
593 0x40,
594 0x00, 0x80, 0x01, 0xa0,
595 0x10, 0x1a, 0x01, 0x00,
596 0x00, 0x91, 0x02, 0x32, 0x01,
597 0x00, 0x03, 0x02, 0x08, 0x02,
598 0x10, 0x00, 0x01, 0x83,
599 0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
600 0x20, 0x01, 0x60, 0x01,
601 0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
602 0x10, 0x0e, 0x01, 0x08,
603 0x10, 0x41, 0x11, 0x00, 0x64, 0x99, 0xc0, 0xe2, 0xf9, 0xf9, 0xf9,
604 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
605 0xf9,
606 0x10, 0x03, 0x01, 0x00,
607 0x10, 0x0f, 0x02, 0x13, 0x13,
608 0x10, 0x03, 0x01, 0x06,
609 0x10, 0x41, 0x11, 0x00, 0x64, 0x99, 0xc0, 0xe2, 0xf9, 0xf9, 0xf9,
610 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
611 0xf9,
612 0x10, 0x0b, 0x01, 0x08,
613 0x10, 0x0d, 0x01, 0x10,
614 0x10, 0x0c, 0x01, 0x1f,
615 0x04, 0x06, 0x01, 0xc3,
616 0x04, 0x05, 0x01, 0x40,
617 0x04, 0x04, 0x01, 0x40,
618 0, 0, 0
619};
620/* et31x110 - other Trust SpaceCam120 */
621static const u8 spacecam2_init[] = {
622 0x04, 0x05, 0x01, 0x61,
623 0x04, 0x04, 0x01, 0x01,
624 0x04, 0x06, 0x01, 0x04,
625 0x04, 0x04, 0x03, 0x00, 0x00, 0x00,
626 0x05, 0x05, 0x01, 0x00,
627 0x04, 0x06, 0x01, 0x44,
628 0x04, 0x06, 0x01, 0x00,
629 0x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f,
630 0xef, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x19,
631 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
632 0x00, 0x01, 0x00, 0x19, 0x00, 0x06, 0x00, 0xfc,
633 0x01, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
634 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
635 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
636 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
637 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
638 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
639 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
640 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
641 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
642 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
643 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
644 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
645 0x00, 0x80, 0x1f, 0xb8, 0x48, 0x0f, 0x04, 0x88, 0x14, 0x68, 0x00,
646 0x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x03,
647 0x00, 0x24, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
648 0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,
649 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
650 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
651 0x40, 0x20,
652 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
653 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0x00,
654 0x05, 0x00, 0x06, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
655 0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
656 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
657 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
658 0x00, 0x00, 0x00,
659 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
660 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
661 0x00, 0x00, 0x00, 0x00, 0x00,
662 0x10, 0x00, 0x40, 0x80, 0x02, 0x20, 0x00, 0x13, 0x00, 0x00, 0x00,
663 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
664 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
665 0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
666 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
667 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
668 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
669 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
670 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
671 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
672 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
673 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
674 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
675 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
676 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
677 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
678 0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
679 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62,
680 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
681 0x01, 0x60, 0x01, 0x00, 0x00,
682 0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
683 0x04, 0x04, 0x01, 0x40,
684 0x04, 0x04, 0x01, 0x00,
685#if 1
686 I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05,
687 0x00, 0x00, 0x05, 0x05,
688 I2C0, 0x40, 0x02, 0x11, 0x06,
689 I2C0, 0x40, 0x02, 0x14, 0x00,
690 I2C0, 0x40, 0x02, 0x13, 0x01,
691#else
692 0x06, 0x00, 0x0b, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05, 0x00,
693 0x00, 0x05, 0x05,
694 0x06, 0x00, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x05,
695 0x00, 0x00, 0x05, 0x05,
696 0x05, 0x02, 0x02, 0x0c, 0x40,
697 0x05, 0x05, 0x01, 0x01,
698 0x06, 0x00, 0x01, 0x06,
699 0x06, 0x00, 0x02, 0x11, 0x06,
700 0x05, 0x02, 0x02, 0x02, 0x40,
701 0x05, 0x05, 0x01, 0x01,
702 0x06, 0x00, 0x01, 0x00,
703 0x06, 0x00, 0x02, 0x14, 0x00,
704 0x05, 0x02, 0x02, 0x02, 0x40,
705 0x05, 0x05, 0x01, 0x01,
706 0x06, 0x00, 0x01, 0x01,
707 0x06, 0x00, 0x02, 0x13, 0x01,
708 0x05, 0x02, 0x02, 0x02, 0x40,
709 0x05, 0x05, 0x01, 0x01,
710#endif
711 0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
712 0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
713 0x40,
714#if 1
715 I2C0, 0x40, 0x02, 0x02, 0x0c,
716 I2C0, 0x40, 0x02, 0x0f, 0x00,
717 I2C0, 0x40, 0x02, 0x13, 0x01,
718#else
719 0x06, 0x00, 0x01, 0x0c,
720 0x06, 0x00, 0x02, 0x02, 0x0c,
721 0x05, 0x02, 0x02, 0x02, 0x40,
722 0x05, 0x05, 0x01, 0x01,
723 0x06, 0x00, 0x01, 0x00,
724 0x06, 0x00, 0x02, 0x0f, 0x00,
725 0x05, 0x02, 0x02, 0x02, 0x40,
726 0x05, 0x05, 0x01, 0x01,
727 0x06, 0x00, 0x01, 0x01,
728 0x06, 0x00, 0x02, 0x13, 0x01,
729 0x05, 0x02, 0x02, 0x02, 0x40,
730 0x05, 0x05, 0x01, 0x01,
731#endif
732 0x10, 0x00, 0x01, 0x01,
733 0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
734 0x20, 0x01, 0x60, 0x01,
735#if 1
736 I2C0, 0x40, 0x02, 0x05, 0x0f,
737 I2C0, 0x40, 0x02, 0x13, 0x01,
738 I2C0, 0x40, 0x07, 0x09, 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00,
739 I2C0, 0x40, 0x03, 0x12, 0x04, 0x01,
740#else
741 0x06, 0x00, 0x01, 0x0f,
742 0x06, 0x00, 0x02, 0x05, 0x0f,
743 0x05, 0x02, 0x02, 0x02, 0x40,
744 0x05, 0x05, 0x01, 0x01,
745 0x06, 0x00, 0x01, 0x01,
746 0x06, 0x00, 0x02, 0x13, 0x01,
747 0x05, 0x02, 0x02, 0x02, 0x40,
748 0x05, 0x05, 0x01, 0x01,
749 0x06, 0x00, 0x06, 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00,
750 0x06, 0x00, 0x07, 0x09, 0x0b, 0x0f, 0x05, 0x05, 0x0f, 0x00,
751 0x05, 0x02, 0x02, 0x07, 0x40,
752 0x05, 0x05, 0x01, 0x01,
753 0x06, 0x00, 0x02, 0x04, 0x01,
754 0x06, 0x00, 0x03, 0x12, 0x04, 0x01,
755 0x05, 0x02, 0x02, 0x03, 0x40,
756 0x05, 0x05, 0x01, 0x01,
757#endif
758 0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
759 0x10, 0x0e, 0x01, 0x08,
760 0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
761 0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
762 0xf9,
763 0x10, 0x03, 0x01, 0x00,
764 0x10, 0x0f, 0x02, 0x13, 0x13,
765 0x10, 0x03, 0x01, 0x06,
766 0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
767 0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
768 0xf9,
769 0x10, 0x0b, 0x01, 0x11,
770 0x10, 0x0d, 0x01, 0x10,
771 0x10, 0x0c, 0x01, 0x14,
772 0x04, 0x06, 0x01, 0x03,
773 0x04, 0x05, 0x01, 0x61,
774 0x04, 0x04, 0x01, 0x00,
775 0, 0, 0
776};
777
778/* nw802 - Conceptronic Video Pro */
779static const u8 cvideopro_init[] = {
780 0x04, 0x06, 0x01, 0x04,
781 0x00, 0x00, 0x40, 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c,
782 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
783 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
784 0x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,
785 0x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
786 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
787 0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
788 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
789 0x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
790 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
791 0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
792 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
793 0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
794 0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
795 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
796 0x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30,
797 0x00, 0x80, 0x1f, 0x98, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
798 0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
799 0x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
800 0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,
801 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
802 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
803 0x40, 0x20,
804 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
805 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,
806 0x06, 0x00, 0x02, 0x09, 0x99,
807 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
808 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
809 0x00, 0x00, 0x00, 0x00, 0x00,
810 0x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
811 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
812 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
813 0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
814 0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
815 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
816 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
817 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
818 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
819 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
820 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
821 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
822 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
823 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
824 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
825 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
826 0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
827 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,
828 0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
829 0x01, 0xf0, 0x00,
830 0x02, 0x00, 0x11, 0x3c, 0x50, 0x8c, 0x3c, 0x50, 0x00, 0x00, 0x00,
831 0x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,
832 0x40,
833 0x10, 0x1a, 0x01, 0x03,
834 0x10, 0x00, 0x01, 0xac,
835 0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
836 0x10, 0x1b, 0x02, 0x3b, 0x01,
837 0x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,
838 0x10, 0x1f, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
839 0x10, 0x1d, 0x02, 0x40, 0x06,
840 0x10, 0x0e, 0x01, 0x08,
841 0x10, 0x41, 0x11, 0x00, 0x0f, 0x46, 0x62, 0x76, 0x86, 0x94, 0xa0,
842 0xab, 0xb6, 0xbf, 0xc8, 0xcf, 0xd7, 0xdc, 0xdc,
843 0xdc,
844 0x10, 0x03, 0x01, 0x00,
845 0x10, 0x0f, 0x02, 0x12, 0x12,
846 0x10, 0x03, 0x01, 0x0c,
847 0x10, 0x41, 0x11, 0x00, 0x0f, 0x46, 0x62, 0x76, 0x86, 0x94, 0xa0,
848 0xab, 0xb6, 0xbf, 0xc8, 0xcf, 0xd7, 0xdc, 0xdc,
849 0xdc,
850 0x10, 0x0b, 0x01, 0x09,
851 0x10, 0x0d, 0x01, 0x10,
852 0x10, 0x0c, 0x01, 0x2f,
853 0x04, 0x06, 0x01, 0x03,
854 0x04, 0x04, 0x01, 0x00,
855 0, 0, 0
856};
857
858/* nw802 - D-link dru-350c cam */
859static const u8 dlink_init[] = {
860 0x04, 0x06, 0x01, 0x04,
861 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d,
862/* 0xf9, 0x02, = nb pixels per line */
863 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
864 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
865 0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
866 0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
867 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
868 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
869 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
870 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
871 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
872 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
873 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
874 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
875 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
876 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
877 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
878 0x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,
879 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
880 0x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,
881/* 0x19, v index of clamping pulse */
882 0x00, 0x10, 0x06, 0x10, 0x00, 0x36, 0x00,
883 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
884 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
885 0x40, 0x20,
886 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
887 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,
888 0x06, 0x00, 0x02, 0x09, 0x99,
889 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
890 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
891 0x00, 0x00, 0x00, 0x00, 0x00,
892 0x10, 0x00, 0x40, 0xa1, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
893 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
894 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
895 0x00, 0x49, 0x13, 0x00, 0x00, 0xc0, 0x00, 0x14,
896 0x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,
897 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
898 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
899 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
900 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
901 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
902 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
903 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
904 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
905 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
906 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
907 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
908 0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
909 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x01, 0x82,
910 0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
911 0x01, 0xf0, 0x00,
912/* 0x00, 0x03, 0x02, 0x92, 0x03, = nb of pixels per line */
913 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
914 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
915 0x40,
916 0x10, 0x1a, 0x01, 0x00,
917 0x10, 0x00, 0x01, 0xad,
918 0x00, 0x00, 0x01, 0x08,
919 0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
920 0x10, 0x1b, 0x02, 0x00, 0x00,
921 0x10, 0x11, 0x08, 0x51, 0x00, 0xf0, 0x00, 0x3d, 0x00, 0xb4, 0x00,
922 0x10, 0x1d, 0x08, 0x40, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
923 0x10, 0x0e, 0x01, 0x20,
924 0x10, 0x41, 0x11, 0x00, 0x07, 0x1e, 0x38, 0x4d, 0x60, 0x70, 0x7f,
925 0x8e, 0x9b, 0xa8, 0xb4, 0xbf, 0xca, 0xd5, 0xdf,
926 0xea,
927 0x10, 0x03, 0x01, 0x00,
928 0x10, 0x0f, 0x02, 0x11, 0x11,
929 0x10, 0x03, 0x01, 0x10,
930 0x10, 0x41, 0x11, 0x00, 0x07, 0x1e, 0x38, 0x4d, 0x60, 0x70, 0x7f,
931 0x8e, 0x9b, 0xa8, 0xb4, 0xbf, 0xca, 0xd5, 0xdf,
932 0xea,
933 0x10, 0x0b, 0x01, 0x19,
934 0x10, 0x0d, 0x01, 0x10,
935 0x10, 0x0c, 0x01, 0x1e,
936 0x04, 0x06, 0x01, 0x03,
937 0x04, 0x04, 0x01, 0x00,
938 0, 0, 0
939};
940
941/* nw801 - Plustek Opticam 500U or ProLink DS3303u (Hitachi HD49322BF) */
942static const u8 ds330_init[] = {
943 0x05, 0x06, 0x01, 0x04,
944 0x00, 0x00, 0x40, 0x16, 0x00, 0x00, 0xf9, 0x02, 0x11, 0x00, 0x0e,
945 0x01, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
946 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
947 0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
948 0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
949 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
950 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
951 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
952 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
953 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
954 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
955 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
956 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
957 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
958 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
959 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
960 0x00, 0x80, 0x22, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x08, 0x00,
961 0x00, 0x00, 0x00, 0x00, 0xa9, 0xa8, 0x1f, 0x00,
962 0x0d, 0x02, 0x07, 0x00, 0x01, 0x00, 0x19, 0x00,
963 0xf2, 0x00, 0x18, 0x06, 0x10, 0x06, 0x10, 0x00,
964 0x36, 0x00,
965 0x02, 0x00, 0x12, 0x03, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
966 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0x50,
967 0x40, 0x20,
968 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
969 0x05, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,
970 0x06, 0x00, 0x02, 0x09, 0x99,
971 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
972 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
973 0x00, 0x00, 0x00, 0x00, 0x00,
974 0x10, 0x00, 0x40, 0x2f, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
975 0x00, 0x00, 0x00, 0x10, 0x1f, 0x10, 0x08, 0x0a,
976 0x0a, 0x51, 0x00, 0xf1, 0x00, 0x3c, 0x00, 0xb4,
977 0x00, 0x01, 0x15, 0xfd, 0x07, 0x3d, 0x00, 0x00,
978 0x00, 0x00, 0x00, 0x00, 0x8c, 0x04, 0x01, 0x20,
979 0x02, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00, 0x00,
980 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08, 0x03,
981 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06, 0xf7,
982 0x10, 0x40, 0x40, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80, 0x80,
983 0x00, 0x2d, 0x46, 0x58, 0x67, 0x74, 0x7f, 0x88,
984 0x94, 0x9d, 0xa6, 0xae, 0xb5, 0xbd, 0xc4, 0xcb,
985 0xd1, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54, 0x64,
986 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2, 0xe2,
987 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
988 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
989 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
990 0x10, 0x80, 0x22, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
991 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x3f, 0x01,
992 0x00, 0x00, 0xef, 0x00, 0x02, 0x0a, 0x82, 0x02,
993 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40, 0x01,
994 0xf0, 0x00,
995
996 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
997 0x00, 0x78, 0x3f, 0x3f, 0x00, 0xf2, 0x8f, 0x81,
998 0x40,
999 0x10, 0x1a, 0x01, 0x15,
1000 0x10, 0x00, 0x01, 0x2f,
1001 0x10, 0x8c, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
1002 0x10, 0x1b, 0x02, 0x00, 0x00,
1003 0x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,
1004 0x10, 0x26, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
1005 0x10, 0x24, 0x02, 0x40, 0x06,
1006 0x10, 0x0e, 0x01, 0x08,
1007 0x10, 0x48, 0x11, 0x00, 0x15, 0x40, 0x67, 0x84, 0x9d, 0xb2, 0xc6,
1008 0xd6, 0xe7, 0xf6, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
1009 0xf9,
1010 0x10, 0x03, 0x01, 0x00,
1011 0x10, 0x0f, 0x02, 0x16, 0x16,
1012 0x10, 0x03, 0x01, 0x0c,
1013 0x10, 0x48, 0x11, 0x00, 0x15, 0x40, 0x67, 0x84, 0x9d, 0xb2, 0xc6,
1014 0xd6, 0xe7, 0xf6, 0xf9, 0xf9, 0xf9, 0xf9, 0xf9,
1015 0xf9,
1016 0x10, 0x0b, 0x01, 0x26,
1017 0x10, 0x0d, 0x01, 0x10,
1018 0x10, 0x0c, 0x01, 0x1c,
1019 0x05, 0x06, 0x01, 0x03,
1020 0x05, 0x04, 0x01, 0x00,
1021 0, 0, 0
1022};
1023
1024/* 06a5:d001 - nw802 - Panasonic GP-KR651US (Philips TDA8786) */
1025static const u8 kr651_init_1[] = {
1026 0x04, 0x06, 0x01, 0x04,
1027 0x00, 0x00, 0x40, 0x44, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x48,
1028 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
1029 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
1030 0x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,
1031 0x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
1032 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1033 0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
1034 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1035 0x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
1036 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1037 0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
1038 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1039 0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
1040 0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
1041 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
1042 0x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30,
1043 0x00, 0x80, 0x1f, 0x18, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
1044 0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
1045 0x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
1046 0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,
1047 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
1048 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
1049 0x40, 0x20,
1050 0x03, 0x00, 0x03, 0x02, 0x00, 0x00,
1051 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,
1052 0x06, 0x00, 0x02, 0x09, 0x99,
1053 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1054 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1055 0x00, 0x00, 0x00, 0x00, 0x00,
1056 0x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
1057 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
1058 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1059 0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
1060 0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
1061 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
1062 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
1063 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
1064 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
1065 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
1066 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
1067 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
1068 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
1069 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
1070 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
1071 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
1072 0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
1073 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,
1074 0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
1075 0x01, 0xf0, 0x00,
1076 0, 0, 0
1077};
1078static const u8 kr651_init_qvga[] = {
1079 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
1080 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
1081 0x40,
1082 0x10, 0x1a, 0x01, 0x03,
1083 0x10, 0x00, 0x01, 0xac,
1084 0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
1085 0x10, 0x1b, 0x02, 0x00, 0x00,
1086 0x10, 0x11, 0x08, 0x29, 0x00, 0x18, 0x01, 0x1f, 0x00, 0xd2, 0x00,
1087 0x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00,
1088 0x10, 0x1d, 0x02, 0x28, 0x01,
1089 0, 0, 0
1090};
1091static const u8 kr651_init_vga[] = {
1092 0x02, 0x00, 0x11, 0x78, 0xa0, 0x8c, 0x78, 0xa0, 0x00, 0x00, 0x00,
1093 0x00, 0xf0, 0x30, 0x03, 0x01, 0x82, 0x82, 0x98,
1094 0x80,
1095 0x10, 0x1a, 0x01, 0x03,
1096 0x10, 0x00, 0x01, 0xa0,
1097 0x10, 0x85, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,
1098
1099 0x10, 0x1b, 0x02, 0x00, 0x00,
1100 0x10, 0x11, 0x08, 0x51, 0x00, 0x30, 0x02, 0x3d, 0x00, 0xa4, 0x01,
1101
1102 0x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00,
1103 0x10, 0x1d, 0x02, 0x68, 0x00,
1104};
1105static const u8 kr651_init_2[] = {
1106 0x10, 0x0e, 0x01, 0x08,
1107 0x10, 0x41, 0x11, 0x00, 0x11, 0x3c, 0x5c, 0x74, 0x88, 0x99, 0xa8,
1108 0xb7, 0xc4, 0xd0, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc,
1109 0xdc,
1110 0x10, 0x03, 0x01, 0x00,
1111 0x10, 0x0f, 0x02, 0x0c, 0x0c,
1112 0x10, 0x03, 0x01, 0x0c,
1113 0x10, 0x41, 0x11, 0x00, 0x11, 0x3c, 0x5c, 0x74, 0x88, 0x99, 0xa8,
1114 0xb7, 0xc4, 0xd0, 0xdc, 0xdc, 0xdc, 0xdc, 0xdc,
1115 0xdc,
1116 0x10, 0x0b, 0x01, 0x10,
1117 0x10, 0x0d, 0x01, 0x10,
1118 0x10, 0x0c, 0x01, 0x2d,
1119 0x04, 0x06, 0x01, 0x03,
1120 0x04, 0x04, 0x01, 0x00,
1121 0, 0, 0
1122};
1123
1124/* nw802 - iRez Kritter cam */
1125static const u8 kritter_init[] = {
1126 0x04, 0x06, 0x01, 0x06,
1127 0x00, 0x00, 0x40, 0x44, 0x96, 0x98, 0x94, 0x03, 0x18, 0x00, 0x48,
1128 0x0f, 0x1e, 0x00, 0x0c, 0x02, 0x01, 0x00, 0x19,
1129 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
1130 0x00, 0x0b, 0x00, 0x1b, 0x00, 0x0a, 0x01, 0x28,
1131 0x07, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
1132 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1133 0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
1134 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1135 0x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
1136 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1137 0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
1138 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1139 0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
1140 0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
1141 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
1142 0x00, 0x5d, 0x00, 0x0e, 0x00, 0x7e, 0x00, 0x30,
1143 0x00, 0x80, 0x1f, 0x18, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
1144 0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
1145 0x00, 0x0b, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
1146 0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,
1147 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
1148 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
1149 0x40, 0x20,
1150 0x03, 0x00, 0x03, 0x02, 0x00, 0x00,
1151 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,
1152 0x06, 0x00, 0x02, 0x09, 0x99,
1153 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1154 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1155 0x00, 0x00, 0x00, 0x00, 0x00,
1156 0x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
1157 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
1158 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1159 0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
1160 0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
1161 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
1162 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
1163 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
1164 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
1165 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
1166 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
1167 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
1168 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
1169 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
1170 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
1171 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
1172 0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
1173 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x82,
1174 0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
1175 0x01, 0xf0, 0x00,
1176 0x02, 0x00, 0x11, 0x3c, 0x50, 0x8c, 0x3c, 0x50, 0x00, 0x00, 0x00,
1177 0x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,
1178 0x40,
1179 0x10, 0x1a, 0x01, 0x03,
1180 0x10, 0x00, 0x01, 0xaf,
1181 0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
1182 0x10, 0x1b, 0x02, 0x3b, 0x01,
1183 0x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,
1184 0x10, 0x1d, 0x06, 0xe0, 0x00, 0x0c, 0x00, 0x52, 0x00,
1185 0x10, 0x1d, 0x02, 0x00, 0x00,
1186 0x10, 0x0e, 0x01, 0x08,
1187 0x10, 0x41, 0x11, 0x00, 0x0d, 0x36, 0x4e, 0x60, 0x6f, 0x7b, 0x86,
1188 0x90, 0x98, 0xa1, 0xa9, 0xb1, 0xb7, 0xbe, 0xc4,
1189 0xcb,
1190 0x10, 0x03, 0x01, 0x00,
1191 0x10, 0x0f, 0x02, 0x0d, 0x0d,
1192 0x10, 0x03, 0x01, 0x02,
1193 0x10, 0x41, 0x11, 0x00, 0x0d, 0x36, 0x4e, 0x60, 0x6f, 0x7b, 0x86,
1194 0x90, 0x98, 0xa1, 0xa9, 0xb1, 0xb7, 0xbe, 0xc4,
1195 0xcb,
1196 0x10, 0x0b, 0x01, 0x17,
1197 0x10, 0x0d, 0x01, 0x10,
1198 0x10, 0x0c, 0x01, 0x1e,
1199 0x04, 0x06, 0x01, 0x03,
1200 0x04, 0x04, 0x01, 0x00,
1201 0, 0, 0
1202};
1203
1204/* nw802 - Mustek Wcam 300 mini */
1205static const u8 mustek_init[] = {
1206 0x04, 0x06, 0x01, 0x04,
1207 0x00, 0x00, 0x40, 0x10, 0x00, 0x00, 0x92, 0x03, 0x10, 0x00, 0x4d,
1208 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
1209 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
1210 0x00, 0x01, 0x00, 0x19, 0x00, 0xce, 0x00, 0xf4,
1211 0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
1212 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
1213 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
1214 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
1215 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
1216 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
1217 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
1218 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
1219 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
1220 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
1221 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
1222 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
1223 0x00, 0x80, 0x1f, 0xb4, 0x6f, 0x3f, 0x0f, 0x88, 0x20, 0x68, 0x00,
1224 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
1225 0x00, 0x0c, 0x02, 0x01, 0x00, 0x16, 0x00, 0x94,
1226 0x00, 0x10, 0x06, 0xfc, 0x05, 0x0c, 0x06,
1227 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
1228 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
1229 0x40, 0x20,
1230 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
1231 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,
1232 0x06, 0x00, 0x02, 0x09, 0x99,
1233 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1234 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1235 0x00, 0x00, 0x00, 0x00, 0x00,
1236 0x10, 0x00, 0x40, 0xa1, 0x02, 0x80, 0x00, 0x13, 0x00, 0x00, 0x00,
1237 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
1238 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1239 0x00, 0x49, 0x13, 0x00, 0x00, 0xc0, 0x00, 0x14,
1240 0x02, 0x00, 0x01, 0x00, 0x00, 0x20, 0x00, 0x00,
1241 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
1242 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
1243 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
1244 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
1245 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
1246 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
1247 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
1248 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
1249 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
1250 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
1251 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
1252 0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
1253 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x01, 0x82,
1254 0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
1255 0x01, 0xf0, 0x00,
1256 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
1257 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
1258 0x40,
1259 0x10, 0x1a, 0x01, 0x00,
1260 0x10, 0x00, 0x01, 0xad,
1261 0x00, 0x00, 0x01, 0x08,
1262 0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
1263 0x10, 0x1b, 0x02, 0x00, 0x00,
1264 0x10, 0x11, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
1265 0x10, 0x1d, 0x08, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
1266 0x10, 0x0e, 0x01, 0x0f,
1267 0x10, 0x41, 0x11, 0x00, 0x0f, 0x29, 0x4a, 0x64, 0x7a, 0x8c, 0x9e,
1268 0xad, 0xba, 0xc7, 0xd3, 0xde, 0xe8, 0xf1, 0xf9,
1269 0xff,
1270 0x10, 0x0f, 0x02, 0x11, 0x11,
1271 0x10, 0x03, 0x01, 0x0c,
1272 0x10, 0x41, 0x11, 0x00, 0x0f, 0x29, 0x4a, 0x64, 0x7a, 0x8c, 0x9e,
1273 0xad, 0xba, 0xc7, 0xd3, 0xde, 0xe8, 0xf1, 0xf9,
1274 0xff,
1275 0x10, 0x0b, 0x01, 0x1c,
1276 0x10, 0x0d, 0x01, 0x1a,
1277 0x10, 0x0c, 0x01, 0x34,
1278 0x04, 0x05, 0x01, 0x61,
1279 0x04, 0x04, 0x01, 0x40,
1280 0x04, 0x06, 0x01, 0x03,
1281 0, 0, 0
1282};
1283
1284/* nw802 - Scope USB Microscope M2 (ProScope) (Hitachi HD49322BF) */
1285static const u8 proscope_init_1[] = {
1286 0x04, 0x05, 0x01, 0x21,
1287 0x04, 0x04, 0x01, 0x01,
1288 0x04, 0x06, 0x01, 0x04,
1289 0x00, 0x00, 0x40, 0x10, 0x01, 0x00, 0xf9, 0x02, 0x10, 0x00, 0x04,
1290 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
1291 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
1292 0x00, 0x08, 0x00, 0x17, 0x00, 0xce, 0x00, 0xf4,
1293 0x05, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
1294 0x00, 0xce, 0x00, 0xf8, 0x03, 0x3e, 0x00, 0x86,
1295 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
1296 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
1297 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0xb6,
1298 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
1299 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
1300 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
1301 0x00, 0xf6, 0x03, 0x34, 0x04, 0xf6, 0x03, 0x34,
1302 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
1303 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xe8,
1304 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
1305 0x00, 0x80, 0x1f, 0xb4, 0x6f, 0x1f, 0x0f, 0x08, 0x20, 0xa8, 0x00,
1306 0x00, 0x00, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
1307 0x00, 0x0c, 0x02, 0x01, 0x00, 0x19, 0x00, 0x94,
1308 0x00, 0x10, 0x06, 0x10, 0x00, 0x36, 0x00,
1309 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
1310 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
1311 0x40, 0x20,
1312 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
1313 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00,
1314 0x06, 0x00, 0x02, 0x09, 0x99,
1315 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1316 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1317 0x00, 0x00, 0x00, 0x00, 0x00,
1318 0x10, 0x00, 0x40, 0xad, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
1319 0x00, 0x00, 0x00, 0x10, 0x1f, 0x10, 0x08, 0x0a,
1320 0x0a, 0x51, 0x00, 0xf1, 0x00, 0x3c, 0x00, 0xb4,
1321 0x00, 0x49, 0x13, 0x00, 0x00, 0x8c, 0x04, 0x01,
1322 0x20, 0x02, 0x00, 0x03, 0x00, 0x20, 0x00, 0x00,
1323 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
1324 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
1325 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
1326 0x10, 0x40, 0x40, 0x80, 0x00, 0x2d, 0x46, 0x58, 0x67, 0x74, 0x7f,
1327 0x88, 0x94, 0x9d, 0xa6, 0xae, 0xb5, 0xbd, 0xc4,
1328 0xcb, 0xd1, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
1329 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
1330 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
1331 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
1332 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
1333 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
1334 0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x3f,
1335 0x01, 0x00, 0x00, 0xef, 0x00, 0x09, 0x05, 0x82,
1336 0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
1337 0x01, 0xf0, 0x00,
1338 0, 0, 0
1339};
1340static const u8 proscope_init_qvga[] = {
1341 0x02, 0x00, 0x11, 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00,
1342 0x00, 0x78, 0x3f, 0x10, 0x02, 0xf2, 0x8f, 0x78,
1343 0x40,
1344 0x10, 0x1a, 0x01, 0x06,
1345 0x00, 0x03, 0x02, 0xf9, 0x02,
1346 0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
1347 0x10, 0x1b, 0x02, 0x00, 0x00,
1348 0x10, 0x11, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
1349 0x10, 0x1d, 0x08, 0xc0, 0x0d, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
1350 0x10, 0x0e, 0x01, 0x10,
1351 0, 0, 0
1352};
1353static const u8 proscope_init_vga[] = {
1354 0x00, 0x03, 0x02, 0xf9, 0x02,
1355 0x10, 0x85, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,
1356 0x02, 0x00, 0x11, 0x78, 0xa0, 0x8c, 0x78, 0xa0, 0x00, 0x00, 0x00,
1357 0x00, 0xf0, 0x16, 0x00, 0x00, 0x82, 0x84, 0x00,
1358 0x80,
1359 0x10, 0x1a, 0x01, 0x06,
1360 0x10, 0x00, 0x01, 0xa1,
1361 0x10, 0x1b, 0x02, 0x00, 0x00,
1362 0x10, 0x1d, 0x08, 0xc0, 0x0d, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
1363 0x10, 0x11, 0x08, 0x00, 0x00, 0x7f, 0x02, 0x00, 0x00, 0xdf, 0x01,
1364 0x10, 0x0e, 0x01, 0x10,
1365 0x10, 0x41, 0x11, 0x00, 0x10, 0x51, 0x6e, 0x83, 0x93, 0xa1, 0xae,
1366 0xb9, 0xc3, 0xcc, 0xd4, 0xdd, 0xe4, 0xeb, 0xf2,
1367 0xf9,
1368 0x10, 0x03, 0x01, 0x00,
1369 0, 0, 0
1370};
1371static const u8 proscope_init_2[] = {
1372 0x10, 0x0f, 0x02, 0x0c, 0x0c,
1373 0x10, 0x03, 0x01, 0x0c,
1374 0x10, 0x41, 0x11, 0x00, 0x10, 0x51, 0x6e, 0x83, 0x93, 0xa1, 0xae,
1375 0xb9, 0xc3, 0xcc, 0xd4, 0xdd, 0xe4, 0xeb, 0xf2,
1376 0xf9,
1377 0x10, 0x0b, 0x01, 0x0b,
1378 0x10, 0x0d, 0x01, 0x10,
1379 0x10, 0x0c, 0x01, 0x1b,
1380 0x04, 0x06, 0x01, 0x03,
1381 0x04, 0x05, 0x01, 0x21,
1382 0x04, 0x04, 0x01, 0x00,
1383 0, 0, 0
1384};
1385
1386/* nw800 - Divio Chicony TwinkleCam */
1387static const u8 twinkle_init[] = {
1388 0x04, 0x05, 0x01, 0x61,
1389 0x04, 0x04, 0x01, 0x01,
1390 0x04, 0x06, 0x01, 0x04,
1391 0x04, 0x04, 0x03, 0x00, 0x00, 0x00,
1392 0x05, 0x05, 0x01, 0x00,
1393
1394 0x04, 0x06, 0x01, 0x44,
1395 0x04, 0x06, 0x01, 0x00,
1396 0x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f,
1397 0xef, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x19,
1398 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
1399 0x00, 0x01, 0x00, 0x19, 0x00, 0x06, 0x00, 0xfc,
1400 0x01, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
1401 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
1402 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
1403 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
1404 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
1405 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
1406 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
1407 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
1408 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
1409 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
1410 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
1411 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
1412 0x00, 0x80, 0x1f, 0xb8, 0x48, 0x0f, 0x04, 0x88, 0x14, 0x68, 0x00,
1413 0x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x03,
1414 0x00, 0x24, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
1415 0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,
1416 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
1417 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
1418 0x40, 0x20,
1419 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
1420 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0x00,
1421 0x05, 0x00, 0x06, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
1422 0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1423 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1424 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1425 0x00, 0x00, 0x00,
1426 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1427 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1428 0x00, 0x00, 0x00, 0x00, 0x00,
1429 0x10, 0x00, 0x40, 0x80, 0x02, 0x20, 0x00, 0x11, 0x00, 0x00, 0x00,
1430 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x08,
1431 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1432 0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
1433 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
1434 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
1435 0x03, 0x00, 0x00, 0x10, 0x00, 0x20, 0x10, 0x06,
1436 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x00, 0x80,
1437 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
1438 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
1439 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
1440 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
1441 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
1442 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
1443 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
1444 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
1445 0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
1446 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62,
1447 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
1448 0x01, 0x60, 0x01, 0x00, 0x00,
1449
1450 0x10, 0x85, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
1451/*320 3f ef, 0x00 */
1452 0x04, 0x04, 0x01, 0x10,
1453 0x04, 0x04, 0x01, 0x00,
1454 0x04, 0x05, 0x01, 0x61,
1455 0x04, 0x04, 0x01, 0x01,
1456#if 1
1457 I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00,
1458 0x00, 0x00, 0x00, 0x0a,
1459 I2C0, 0x40, 0x02, 0x11, 0x06,
1460 I2C0, 0x40, 0x02, 0x14, 0x00,
1461 I2C0, 0x40, 0x02, 0x13, 0x01,
1462 I2C0, 0x40, 0x02, 0x07, 0x01,
1463#else
1464 0x06, 0x00, 0x0b, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
1465 0x00, 0x00, 0x0a,
1466 0x06, 0x00, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00,
1467 0x00, 0x00, 0x00, 0x0a,
1468 0x05, 0x02, 0x02, 0x0c, 0x40,
1469 0x05, 0x05, 0x01, 0x01,
1470 0x06, 0x00, 0x01, 0x06,
1471 0x06, 0x00, 0x02, 0x11, 0x06,
1472 0x05, 0x02, 0x02, 0x02, 0x40,
1473 0x05, 0x05, 0x01, 0x01,
1474 0x06, 0x00, 0x01, 0x00,
1475 0x06, 0x00, 0x02, 0x14, 0x00,
1476 0x05, 0x02, 0x02, 0x02, 0x40,
1477 0x05, 0x05, 0x01, 0x01,
1478 0x06, 0x00, 0x01, 0x01,
1479 0x06, 0x00, 0x02, 0x13, 0x01,
1480 0x05, 0x02, 0x02, 0x02, 0x40,
1481 0x05, 0x05, 0x01, 0x01,
1482 0x06, 0x00, 0x01, 0x01,
1483 0x06, 0x00, 0x02, 0x07, 0x01,
1484 0x05, 0x02, 0x02, 0x02, 0x40,
1485 0x05, 0x05, 0x01, 0x01,
1486#endif
1487 0x02, 0x00, 0x11, 0x48, 0x58, 0x9e, 0x48, 0x58, 0x00, 0x00, 0x00,
1488/* 320 0x3c, 0x50, 0x9e, 0x3c, 0x50, 0x00, 0x00, 0x00, */
1489 0x00, 0x84, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x65,
1490/* 320 0x00, 0x78, 0x36, 0x05, 0x01, 0xf2, 0x86, 0x5c, */
1491 0x40,
1492#if 1
1493 I2C0, 0x40, 0x02, 0x02, 0x0c,
1494 I2C0, 0x40, 0x02, 0x13, 0x01,
1495#else
1496 0x06, 0x00, 0x01, 0x0c,
1497 0x06, 0x00, 0x02, 0x02, 0x0c,
1498 0x05, 0x02, 0x02, 0x02, 0x40,
1499 0x05, 0x05, 0x01, 0x01,
1500 0x06, 0x00, 0x01, 0x01,
1501 0x06, 0x00, 0x02, 0x13, 0x01,
1502 0x05, 0x02, 0x02, 0x02, 0x40,
1503 0x05, 0x05, 0x01, 0x01,
1504#endif
1505 0x10, 0x00, 0x01, 0x01,
1506 0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
1507 0x20, 0x01, 0x60, 0x01,
1508/* 320 0xf0, 0x00, 0x40, 0x01, */
1509#if 1
1510 I2C0, 0x40, 0x02, 0x05, 0x0f,
1511 I2C0, 0x40, 0x02, 0x13, 0x01,
1512 I2C0, 0x40, 0x08, 0x08, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x17,
1513 I2C0, 0x40, 0x03, 0x12, 0x00, 0x01,
1514#else
1515 0x06, 0x00, 0x01, 0x0f,
1516 0x06, 0x00, 0x02, 0x05, 0x0f,
1517 0x05, 0x02, 0x02, 0x02, 0x40,
1518 0x05, 0x05, 0x01, 0x01,
1519 0x06, 0x00, 0x01, 0x01,
1520 0x06, 0x00, 0x02, 0x13, 0x01,
1521 0x05, 0x02, 0x02, 0x02, 0x40,
1522 0x05, 0x05, 0x01, 0x01,
1523 0x06, 0x00, 0x07, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x17,
1524 0x06, 0x00, 0x08, 0x08, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x17,
1525 0x05, 0x02, 0x02, 0x08, 0x40,
1526 0x05, 0x05, 0x01, 0x01,
1527 0x06, 0x00, 0x02, 0x00, 0x01,
1528 0x06, 0x00, 0x03, 0x12, 0x00, 0x01,
1529 0x05, 0x02, 0x02, 0x03, 0x40,
1530 0x05, 0x05, 0x01, 0x01,
1531#endif
1532 0x10, 0x11, 0x08, 0x00, 0x00, 0x5f, 0x01, 0x00, 0x00, 0x1f, 0x01,
1533/* 320 3f ef */
1534#if 1
1535 I2C0, 0x40, 0x02, 0x12, 0x00,
1536 I2C0, 0x40, 0x02, 0x0e, 0x00,
1537 I2C0, 0x40, 0x02, 0x11, 0x06,
1538#else
1539 0x06, 0x00, 0x01, 0x00,
1540 0x06, 0x00, 0x02, 0x12, 0x00,
1541 0x05, 0x02, 0x02, 0x02, 0x40,
1542 0x05, 0x05, 0x01, 0x01,
1543 0x06, 0x00, 0x01, 0x00,
1544 0x06, 0x00, 0x02, 0x0e, 0x00,
1545 0x05, 0x02, 0x02, 0x02, 0x40,
1546 0x05, 0x05, 0x01, 0x01,
1547 0x06, 0x00, 0x01, 0x06,
1548 0x06, 0x00, 0x02, 0x11, 0x06,
1549 0x05, 0x02, 0x02, 0x02, 0x40,
1550 0x05, 0x05, 0x01, 0x01,
1551#endif
1552 0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
1553 0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
1554 0xf9,
1555 0x10, 0x03, 0x01, 0x00,
1556 0x10, 0x0f, 0x02, 0x0c, 0x0c,
1557 0x10, 0x03, 0x01, 0x06,
1558 0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
1559 0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
1560 0xf9,
1561 0x10, 0x0b, 0x01, 0x19,
1562 0x10, 0x0d, 0x01, 0x10,
1563 0x10, 0x0c, 0x01, 0x0d,
1564 0x04, 0x06, 0x01, 0x03,
1565 0x04, 0x05, 0x01, 0x61,
1566 0x04, 0x04, 0x01, 0x41,
1567 0, 0, 0
1568};
1569
1570/* et31x110 DSB-C110 */
1571static const u8 dsbc110_init[] = {
1572 0x04, 0x05, 0x01, 0x61,
1573 0x04, 0x04, 0x01, 0x01,
1574 0x04, 0x06, 0x01, 0x04,
1575 0x04, 0x04, 0x03, 0x00, 0x00, 0x00,
1576 0x05, 0x05, 0x01, 0x00,
1577
1578 0x04, 0x06, 0x01, 0x44,
1579 0x04, 0x06, 0x01, 0x00,
1580 0x00, 0x00, 0x40, 0x14, 0x83, 0x00, 0xba, 0x01, 0x10, 0x00, 0x4f,
1581 0xef, 0x00, 0x00, 0x60, 0x00, 0x01, 0x00, 0x19,
1582 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
1583 0x00, 0x01, 0x00, 0x19, 0x00, 0x06, 0x00, 0xfc,
1584 0x01, 0x3e, 0x00, 0x86, 0x00, 0x3e, 0x00, 0x86,
1585 0x00, 0x3e, 0x00, 0x86, 0x00, 0x01, 0x00, 0x01,
1586 0x00, 0x56, 0x00, 0x9e, 0x00, 0x56, 0x00, 0x9e,
1587 0x00, 0x56, 0x00, 0x9e, 0x00, 0x01, 0x00, 0x01,
1588 0x00, 0x40, 0x40, 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
1589 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
1590 0x00, 0x6e, 0x00, 0xb6, 0x00, 0x6e, 0x00, 0x78,
1591 0x04, 0x6e, 0x00, 0xb6, 0x00, 0x01, 0x00, 0x01,
1592 0x00, 0xca, 0x03, 0x46, 0x04, 0xca, 0x03, 0x46,
1593 0x04, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
1594 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf0,
1595 0x00, 0x3e, 0x00, 0xaa, 0x00, 0x88, 0x00, 0x2e,
1596 0x00, 0x80, 0x1f, 0xb8, 0x48, 0x0f, 0x04, 0x88, 0x14, 0x68, 0x00,
1597 0x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x03,
1598 0x00, 0x24, 0x01, 0x01, 0x00, 0x16, 0x00, 0x04,
1599 0x00, 0x4b, 0x00, 0x76, 0x00, 0x86, 0x00,
1600 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
1601 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
1602 0x40, 0x20,
1603 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
1604 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0x61, 0x00,
1605 0x05, 0x00, 0x06, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00,
1606 0x06, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1607 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1608 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1609 0x00, 0x00, 0x00,
1610 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1611 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1612 0x00, 0x00, 0x00, 0x00, 0x00,
1613 0x10, 0x00, 0x40, 0x80, 0x02, 0x20, 0x00, 0x11, 0x00, 0x00, 0x00,
1614 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x08,
1615 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1616 0x00, 0x49, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00,
1617 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
1618 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
1619 0x03, 0x00, 0x00, 0x10, 0x00, 0x20, 0x10, 0x06,
1620 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x00, 0x80,
1621 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
1622 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
1623 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
1624 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
1625 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
1626 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
1627 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
1628 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
1629 0x10, 0x80, 0x1d, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
1630 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x62,
1631 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01, 0x20,
1632 0x01, 0x60, 0x01, 0x00, 0x00,
1633 0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
1634 0x04, 0x04, 0x01, 0x10,
1635 0x04, 0x04, 0x01, 0x00,
1636 0x04, 0x05, 0x01, 0x61,
1637 0x04, 0x04, 0x01, 0x01,
1638#if 1
1639 I2C0, 0x40, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00,
1640 0x00, 0x00, 0x00, 0x0a,
1641 I2C0, 0x40, 0x02, 0x11, 0x06,
1642 I2C0, 0x40, 0x02, 0x14, 0x00,
1643 I2C0, 0x40, 0x02, 0x13, 0x01,
1644 I2C0, 0x40, 0x02, 0x07, 0x01,
1645#else
1646 0x06, 0x00, 0x0b, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
1647 0x00, 0x00, 0x0a,
1648 0x06, 0x00, 0x0c, 0x02, 0x0c, 0x12, 0x07, 0x00, 0x00, 0x00, 0x00,
1649 0x00, 0x00, 0x00, 0x0a,
1650 0x05, 0x02, 0x02, 0x0c, 0x40,
1651 0x05, 0x05, 0x01, 0x01,
1652 0x06, 0x00, 0x01, 0x06,
1653 0x06, 0x00, 0x02, 0x11, 0x06,
1654 0x05, 0x02, 0x02, 0x02, 0x40,
1655 0x05, 0x05, 0x01, 0x01,
1656 0x06, 0x00, 0x01, 0x00,
1657 0x06, 0x00, 0x02, 0x14, 0x00,
1658 0x05, 0x02, 0x02, 0x02, 0x40,
1659 0x05, 0x05, 0x01, 0x01,
1660 0x06, 0x00, 0x01, 0x01,
1661 0x06, 0x00, 0x02, 0x13, 0x01,
1662 0x05, 0x02, 0x02, 0x02, 0x40,
1663 0x05, 0x05, 0x01, 0x01,
1664 0x06, 0x00, 0x01, 0x01,
1665 0x06, 0x00, 0x02, 0x07, 0x01,
1666 0x05, 0x02, 0x02, 0x02, 0x40,
1667 0x05, 0x05, 0x01, 0x01,
1668#endif
1669 0x02, 0x00, 0x11, 0x3c, 0x50, 0x8c, 0x3c, 0x50, 0x00, 0x00, 0x00,
1670 0x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xe4,
1671 0x40,
1672#if 1
1673 I2C0, 0x40, 0x02, 0x02, 0x0c,
1674 I2C0, 0x40, 0x02, 0x13, 0x01,
1675#else
1676 0x06, 0x00, 0x01, 0x1c,
1677 0x06, 0x00, 0x02, 0x02, 0x1c,
1678 0x05, 0x02, 0x02, 0x02, 0x40,
1679 0x05, 0x05, 0x01, 0x01,
1680 0x06, 0x00, 0x01, 0x01,
1681 0x06, 0x00, 0x02, 0x13, 0x01,
1682 0x05, 0x02, 0x02, 0x02, 0x40,
1683 0x05, 0x05, 0x01, 0x01,
1684#endif
1685 0x10, 0x00, 0x01, 0x01,
1686 0x10, 0x8f, 0x0c, 0x62, 0x01, 0x24, 0x01, 0x62, 0x01, 0x24, 0x01,
1687 0xf0, 0x00, 0x40, 0x01,
1688#if 1
1689 I2C0, 0x40, 0x02, 0x05, 0x23,
1690 I2C0, 0x40, 0x02, 0x13, 0x01,
1691 I2C0, 0x40, 0x08, 0x08, 0x04, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x00,
1692 I2C0, 0x40, 0x03, 0x12, 0x00, 0x01,
1693#else
1694 0x06, 0x00, 0x01, 0x24,
1695 0x06, 0x00, 0x02, 0x05, 0x24,
1696 0x05, 0x02, 0x02, 0x02, 0x40,
1697 0x05, 0x05, 0x01, 0x01,
1698 0x06, 0x00, 0x01, 0x01,
1699 0x06, 0x00, 0x02, 0x13, 0x01,
1700 0x05, 0x02, 0x02, 0x02, 0x40,
1701 0x05, 0x05, 0x01, 0x01,
1702 0x06, 0x00, 0x07, 0x06, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x00,
1703 0x06, 0x00, 0x08, 0x08, 0x06, 0x0b, 0x01, 0x01, 0x02, 0x00, 0x00,
1704 0x05, 0x02, 0x02, 0x08, 0x40,
1705 0x05, 0x05, 0x01, 0x01,
1706 0x06, 0x00, 0x02, 0x00, 0x01,
1707 0x06, 0x00, 0x03, 0x12, 0x00, 0x01,
1708 0x05, 0x02, 0x02, 0x03, 0x40,
1709 0x05, 0x05, 0x01, 0x01,
1710#endif
1711 0x10, 0x11, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
1712#if 1
1713 I2C0, 0x40, 0x02, 0x12, 0x00,
1714 I2C0, 0x40, 0x02, 0x0e, 0x00,
1715 I2C0, 0x40, 0x02, 0x11, 0x06,
1716#else
1717 0x06, 0x00, 0x01, 0x00,
1718 0x06, 0x00, 0x02, 0x12, 0x00,
1719 0x05, 0x02, 0x02, 0x02, 0x40,
1720 0x05, 0x05, 0x01, 0x01,
1721 0x06, 0x00, 0x01, 0x00,
1722 0x06, 0x00, 0x02, 0x0e, 0x00,
1723 0x05, 0x02, 0x02, 0x02, 0x40,
1724 0x05, 0x05, 0x01, 0x01,
1725 0x06, 0x00, 0x01, 0x06,
1726 0x06, 0x00, 0x02, 0x11, 0x06,
1727 0x05, 0x02, 0x02, 0x02, 0x40,
1728 0x05, 0x05, 0x01, 0x01,
1729#endif
1730 0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
1731 0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
1732 0xf9,
1733 0x10, 0x03, 0x01, 0x00,
1734 0x10, 0x0f, 0x02, 0x0c, 0x0c,
1735 0x10, 0x03, 0x01, 0x06,
1736 0x10, 0x41, 0x11, 0x00, 0x17, 0x3f, 0x69, 0x7b, 0x8c, 0x9a, 0xa7,
1737 0xb3, 0xbf, 0xc9, 0xd3, 0xdd, 0xe6, 0xef, 0xf7,
1738 0xf9,
1739 0x10, 0x0b, 0x01, 0x14,
1740 0x10, 0x0d, 0x01, 0x10,
1741 0x10, 0x0c, 0x01, 0x1d,
1742 0x04, 0x06, 0x01, 0x03,
1743 0x04, 0x05, 0x01, 0x61,
1744 0x04, 0x04, 0x01, 0x41,
1745};
1746
1747/* nw802 dvc-v6 */
1748static const u8 dvcv6_init[] = {
1749 0x04, 0x06, 0x01, 0x06,
1750 0x00, 0x00, 0x40, 0x54, 0x96, 0x98, 0xf9, 0x02, 0x18, 0x00, 0x4c,
1751 0x0f, 0x1f, 0x00, 0x0d, 0x02, 0x01, 0x00, 0x19,
1752 0x00, 0x01, 0x00, 0x19, 0x00, 0x01, 0x00, 0x19,
1753 0x00, 0x0b, 0x00, 0x1b, 0x00, 0xc8, 0x00, 0xf4,
1754 0x05, 0xb4, 0x00, 0xcc, 0x00, 0x01, 0x00, 0x01,
1755 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1756 0x00, 0xa2, 0x00, 0xc6, 0x00, 0x60, 0x00, 0xc6,
1757 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1758 0x00, 0x40, 0x40, 0x00, 0xae, 0x00, 0xd2, 0x00, 0xae, 0x00, 0xd2,
1759 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1760 0x00, 0xa8, 0x00, 0xc0, 0x00, 0x66, 0x00, 0xc0,
1761 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
1762 0x00, 0x0a, 0x00, 0x54, 0x00, 0x0a, 0x00, 0x54,
1763 0x00, 0x10, 0x00, 0x36, 0x00, 0xd2, 0x00, 0xee,
1764 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6,
1765 0x00, 0x5d, 0x00, 0xc7, 0x00, 0x7e, 0x00, 0x30,
1766 0x00, 0x80, 0x1f, 0x98, 0x43, 0x3f, 0x0d, 0x88, 0x20, 0x80, 0x3f,
1767 0x47, 0xaf, 0x00, 0x00, 0xa8, 0x08, 0x00, 0x11,
1768 0x00, 0x0c, 0x02, 0x0c, 0x00, 0x1c, 0x00, 0x94,
1769 0x00, 0x10, 0x06, 0x24, 0x00, 0x4a, 0x00,
1770 0x02, 0x00, 0x12, 0x78, 0xa0, 0x9e, 0x78, 0xa0, 0x00, 0x00, 0x00,
1771 0x00, 0xf0, 0x18, 0x0b, 0x06, 0x62, 0x82, 0xa0,
1772 0x40, 0x20,
1773 0x03, 0x00, 0x03, 0x03, 0x00, 0x00,
1774 0x04, 0x00, 0x07, 0x01, 0x10, 0x00, 0x00, 0x00, 0xff, 0x00,
1775 0x06, 0x00, 0x02, 0x09, 0x99,
1776 0x08, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1777 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1778 0x00, 0x00, 0x00, 0x00, 0x00,
1779 0x10, 0x00, 0x40, 0xa0, 0x02, 0x80, 0x00, 0x12, 0x00, 0x00, 0x00,
1780 0x00, 0x00, 0x00, 0x10, 0x10, 0x10, 0x08, 0x0a,
1781 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
1782 0x00, 0x49, 0x13, 0x00, 0x00, 0xe0, 0x00, 0x0c,
1783 0x00, 0x52, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00,
1784 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x10, 0x08,
1785 0x03, 0x00, 0x00, 0x00, 0x00, 0x20, 0x10, 0x06,
1786 0xf7, 0xee, 0x1c, 0x1c, 0xe9, 0xfc, 0x10, 0x80,
1787 0x10, 0x40, 0x40, 0x80, 0x00, 0x05, 0x35, 0x5e, 0x78, 0x8b, 0x99,
1788 0xa4, 0xae, 0xb5, 0xbc, 0xc1, 0xc6, 0xc9, 0xcc,
1789 0xcf, 0xd0, 0x00, 0x11, 0x22, 0x32, 0x43, 0x54,
1790 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3, 0xd2,
1791 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32, 0x43,
1792 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3, 0xc3,
1793 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x11, 0x22, 0x32,
1794 0x43, 0x54, 0x64, 0x74, 0x84, 0x94, 0xa4, 0xb3,
1795 0x10, 0x80, 0x1b, 0xc3, 0xd2, 0xe2, 0xf1, 0xff, 0x00, 0x00, 0x00,
1796 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x05, 0x82,
1797 0x02, 0xe4, 0x01, 0x40, 0x01, 0xf0, 0x00, 0x40,
1798 0x01, 0xf0, 0x00,
1799 0x00, 0x03, 0x02, 0x94, 0x03,
1800 0x00, 0x1d, 0x04, 0x0a, 0x01, 0x28, 0x07,
1801 0x00, 0x7b, 0x02, 0xe0, 0x00,
1802 0x10, 0x8d, 0x01, 0x00,
1803 0x00, 0x09, 0x04, 0x1e, 0x00, 0x0c, 0x02,
1804 0x00, 0x91, 0x02, 0x0b, 0x02,
1805 0x10, 0x00, 0x01, 0xaf,
1806 0x02, 0x00, 0x11, 0x3c, 0x50, 0x8f, 0x3c, 0x50, 0x00, 0x00, 0x00,
1807 0x00, 0x78, 0x3f, 0x3f, 0x06, 0xf2, 0x8f, 0xf0,
1808 0x40,
1809 0x10, 0x1a, 0x01, 0x02,
1810 0x10, 0x00, 0x01, 0xaf,
1811 0x10, 0x85, 0x08, 0x00, 0x00, 0x3f, 0x01, 0x00, 0x00, 0xef, 0x00,
1812 0x10, 0x1b, 0x02, 0x07, 0x01,
1813 0x10, 0x11, 0x08, 0x61, 0x00, 0xe0, 0x00, 0x49, 0x00, 0xa8, 0x00,
1814 0x10, 0x1f, 0x06, 0x01, 0x20, 0x02, 0xe8, 0x03, 0x00,
1815 0x10, 0x1d, 0x02, 0x40, 0x06,
1816 0x10, 0x0e, 0x01, 0x08,
1817 0x10, 0x41, 0x11, 0x00, 0x0f, 0x54, 0x6f, 0x82, 0x91, 0x9f, 0xaa,
1818 0xb4, 0xbd, 0xc5, 0xcd, 0xd5, 0xdb, 0xdc, 0xdc,
1819 0xdc,
1820 0x10, 0x03, 0x01, 0x00,
1821 0x10, 0x0f, 0x02, 0x12, 0x12,
1822 0x10, 0x03, 0x01, 0x11,
1823 0x10, 0x41, 0x11, 0x00, 0x0f, 0x54, 0x6f, 0x82, 0x91, 0x9f, 0xaa,
1824 0xb4, 0xbd, 0xc5, 0xcd, 0xd5, 0xdb, 0xdc, 0xdc,
1825 0xdc,
1826 0x10, 0x0b, 0x01, 0x16,
1827 0x10, 0x0d, 0x01, 0x10,
1828 0x10, 0x0c, 0x01, 0x1a,
1829 0x04, 0x06, 0x01, 0x03,
1830 0x04, 0x04, 0x01, 0x00,
1831};
1832
1833static const u8 *webcam_init[] = {
1834 [Generic800] = nw800_init,
1835 [SpaceCam] = spacecam_init,
1836 [SpaceCam2] = spacecam2_init,
1837 [Cvideopro] = cvideopro_init,
1838 [Dlink350c] = dlink_init,
1839 [DS3303u] = ds330_init,
1840 [Kr651us] = kr651_init_1,
1841 [Kritter] = kritter_init,
1842 [Mustek300] = mustek_init,
1843 [Proscope] = proscope_init_1,
1844 [Twinkle] = twinkle_init,
1845 [DsbC110] = dsbc110_init,
1846 [DvcV6] = dvcv6_init,
1847 [P35u] = nw801_init_1,
1848 [Generic802] = nw802_init,
1849};
1850
1851/* -- write a register -- */
1852static void reg_w(struct gspca_dev *gspca_dev,
1853 u16 index,
1854 const u8 *data,
1855 int len)
1856{
1857 struct usb_device *dev = gspca_dev->dev;
1858 int ret;
1859
1860 if (gspca_dev->usb_err < 0)
1861 return;
1862 if (len == 1)
1863 PDEBUG(D_USBO, "SET 00 0000 %04x %02x", index, *data);
1864 else
1865 PDEBUG(D_USBO, "SET 00 0000 %04x %02x %02x ...",
1866 index, *data, data[1]);
1867 memcpy(gspca_dev->usb_buf, data, len);
1868 ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
1869 0x00,
1870 USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
1871 0x00, /* value */
1872 index,
1873 gspca_dev->usb_buf,
1874 len,
1875 500);
1876 if (ret < 0) {
1877 err("reg_w err %d", ret);
1878 gspca_dev->usb_err = ret;
1879 }
1880}
1881
1882/* -- read registers in usb_buf -- */
1883static void reg_r(struct gspca_dev *gspca_dev,
1884 u16 index,
1885 int len)
1886{
1887 struct usb_device *dev = gspca_dev->dev;
1888 int ret;
1889
1890 if (gspca_dev->usb_err < 0)
1891 return;
1892 ret = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0),
1893 0x00,
1894 USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
1895 0x00, index,
1896 gspca_dev->usb_buf, len, 500);
1897 if (ret < 0) {
1898 err("reg_r err %d", ret);
1899 gspca_dev->usb_err = ret;
1900 return;
1901 }
1902 if (len == 1)
1903 PDEBUG(D_USBI, "GET 00 0000 %04x %02x",
1904 index, gspca_dev->usb_buf[0]);
1905 else
1906 PDEBUG(D_USBI, "GET 00 0000 %04x %02x %02x ..",
1907 index, gspca_dev->usb_buf[0],
1908 gspca_dev->usb_buf[1]);
1909}
1910
1911static void i2c_w(struct gspca_dev *gspca_dev,
1912 u8 i2c_addr,
1913 const u8 *data,
1914 int len)
1915{
1916 u8 val[2];
1917 int i;
1918
1919 reg_w(gspca_dev, 0x0600, data + 1, len - 1);
1920 reg_w(gspca_dev, 0x0600, data, len);
1921 val[0] = len;
1922 val[1] = i2c_addr;
1923 reg_w(gspca_dev, 0x0502, val, 2);
1924 val[0] = 0x01;
1925 reg_w(gspca_dev, 0x0501, val, 1);
1926 for (i = 5; --i >= 0; ) {
1927 msleep(4);
1928 reg_r(gspca_dev, 0x0505, 1);
1929 if (gspca_dev->usb_err < 0)
1930 return;
1931 if (gspca_dev->usb_buf[0] == 0)
1932 return;
1933 }
1934 gspca_dev->usb_err = -ETIME;
1935}
1936
1937static void reg_w_buf(struct gspca_dev *gspca_dev,
1938 const u8 *cmd)
1939{
1940 u16 reg;
1941 int len;
1942
1943 for (;;) {
1944 reg = *cmd++ << 8;
1945 reg += *cmd++;
1946 len = *cmd++;
1947 if (len == 0)
1948 break;
1949 if (cmd[-3] != I2C0)
1950 reg_w(gspca_dev, reg, cmd, len);
1951 else
1952 i2c_w(gspca_dev, reg & 0xff, cmd, len);
1953 cmd += len;
1954 }
1955}
1956
1957static int swap_6bits(int v)
1958{
1959 int r, i;
1960
1961 r = 0;
1962 for (i = 0; i < 6; i++) {
1963 r <<= 1;
1964 if (v & 1)
1965 r++;
1966 v >>= 1;
1967 }
1968 return r;
1969}
1970
1971static void setgain(struct gspca_dev *gspca_dev)
1972{
1973 struct sd *sd = (struct sd *) gspca_dev;
1974 u8 val, v[2];
1975
1976 val = sd->ctrls[GAIN].val >> 1; /* 0 - 63 -> 0 - 31 */
1977 reg_w(gspca_dev, 0x100e, &val, 1); /* AE Y gain */
1978
1979 switch (sd->webcam) {
1980 case P35u:
1981 /* Note the control goes from 0-255 not 0-127, but anything
1982 above 127 just means amplifying noise */
1983 val = sd->ctrls[GAIN].val << 1; /* 0 - 63 -> 0 - 127 */
1984 reg_w(gspca_dev, 0x1026, &val, 1);
1985 break;
1986 case Kr651us:
1987 /* 0 - 63 -> 0 - 0x37 */
1988 val = (sd->ctrls[GAIN].val * 0x37) / 63;
1989 val = swap_6bits(val);
1990 v[0] = val << 3;
1991 v[1] = val >> 5;
1992 reg_w(gspca_dev, 0x101d, v, 2); /* SIF reg0/1 (AGC) */
1993 break;
1994 }
1995}
1996
1997static void setexposure(struct gspca_dev *gspca_dev)
1998{
1999 struct sd *sd = (struct sd *) gspca_dev;
2000 u8 v[2];
2001
2002 switch (sd->webcam) {
2003 case P35u:
2004 v[0] = (sd->ctrls[EXPOSURE].val << 3) | 0x01;
2005 reg_w(gspca_dev, 0x1019, v, 1);
2006 break;
2007 case Kr651us:
2008 v[0] = sd->ctrls[EXPOSURE].val;
2009 v[1] = sd->ctrls[EXPOSURE].val >> 8;
2010 reg_w(gspca_dev, 0x101b, v, 2);
2011 break;
2012 }
2013}
2014
2015static void setautogain(struct gspca_dev *gspca_dev)
2016{
2017 struct sd *sd = (struct sd *) gspca_dev;
2018 int w, h;
2019
2020 if (gspca_dev->ctrl_dis & (1 << AUTOGAIN))
2021 return;
2022 if (!sd->ctrls[AUTOGAIN].val) {
2023 sd->ag_cnt = -1;
2024 return;
2025 }
2026 sd->ag_cnt = AG_CNT_START;
2027
2028 reg_r(gspca_dev, 0x1004, 1);
2029 if (gspca_dev->usb_buf[0] & 0x04) { /* if AE_FULL_FRM */
2030 sd->ae_res = gspca_dev->width * gspca_dev->height;
2031 } else { /* get the AE window size */
2032 reg_r(gspca_dev, 0x1011, 8);
2033 w = (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0]
2034 - (gspca_dev->usb_buf[3] << 8) - gspca_dev->usb_buf[2];
2035 h = (gspca_dev->usb_buf[5] << 8) + gspca_dev->usb_buf[4]
2036 - (gspca_dev->usb_buf[7] << 8) - gspca_dev->usb_buf[6];
2037 sd->ae_res = h * w;
2038 if (sd->ae_res == 0)
2039 sd->ae_res = gspca_dev->width * gspca_dev->height;
2040 }
2041}
2042
2043/* this function is called at probe time */
2044static int sd_config(struct gspca_dev *gspca_dev,
2045 const struct usb_device_id *id)
2046{
2047 struct sd *sd = (struct sd *) gspca_dev;
2048
2049 if ((unsigned) webcam >= NWEBCAMS)
2050 webcam = 0;
2051 sd->webcam = webcam;
2052 gspca_dev->cam.reverse_alts = 1;
2053 gspca_dev->cam.ctrls = sd->ctrls;
2054 sd->ag_cnt = -1;
2055 return 0;
2056}
2057
2058static int nw802_test_reg(struct gspca_dev *gspca_dev,
2059 u16 index,
2060 u8 value)
2061{
2062 /* write the value */
2063 reg_w(gspca_dev, index, &value, 1);
2064
2065 /* read it */
2066 reg_r(gspca_dev, index, 1);
2067
2068 return gspca_dev->usb_buf[0] == value;
2069}
2070
2071/* this function is called at probe and resume time */
2072static int sd_init(struct gspca_dev *gspca_dev)
2073{
2074 struct sd *sd = (struct sd *) gspca_dev;
2075
2076 /*
2077 * Autodetect sequence inspired from some log.
2078 * We try to detect what registers exist or not.
2079 * If 0x0500 does not exist => NW802
2080 * If it does, test 0x109b. If it doesn't exist,
2081 * then it's a NW801. Else, a NW800
2082 */
2083 if (!nw802_test_reg(gspca_dev, 0x0500, 0x55)) {
2084 sd->bridge = BRIDGE_NW802;
2085 if (sd->webcam == Generic800)
2086 sd->webcam = Generic802;
2087 } else if (!nw802_test_reg(gspca_dev, 0x109b, 0xaa)) {
2088 sd->bridge = BRIDGE_NW801;
2089 if (sd->webcam == Generic800)
2090 sd->webcam = P35u;
2091 }
2092 PDEBUG(D_PROBE, "Bridge nw80%d", sd->bridge);
2093
2094 if (sd->bridge == BRIDGE_NW800) {
2095 gspca_dev->cam.cam_mode = sif_mode;
2096 gspca_dev->cam.nmodes = ARRAY_SIZE(sif_mode);
2097 } else {
2098 gspca_dev->cam.cam_mode = vga_mode;
2099 switch (sd->webcam) {
2100 case Generic802:
2101 case Kr651us:
2102 case Proscope:
2103 case P35u:
2104 gspca_dev->cam.nmodes = ARRAY_SIZE(vga_mode);
2105 break;
2106 default:
2107 gspca_dev->cam.nmodes = 1; /* qvga only */
2108 break;
2109 }
2110 }
2111 switch (sd->webcam) {
2112 case P35u:
2113/* sd->ctrls[EXPOSURE].min = 0;
2114 * sd->ctrls[EXPOSURE].max = 9;
2115 * sd->ctrls[EXPOSURE].def = 1; */
2116 break;
2117 case Kr651us:
2118/* sd->ctrls[EXPOSURE].min = 0; */
2119 sd->ctrls[EXPOSURE].max = 315;
2120 sd->ctrls[EXPOSURE].def = 150;
2121 break;
2122 default:
2123 gspca_dev->ctrl_dis = ~(1 << GAIN);
2124 break;
2125 }
2126
2127 return gspca_dev->usb_err;
2128}
2129
2130/* -- start the camera -- */
2131static int sd_start(struct gspca_dev *gspca_dev)
2132{
2133 struct sd *sd = (struct sd *) gspca_dev;
2134 const u8 *cmd;
2135
2136 cmd = webcam_init[sd->webcam];
2137 reg_w_buf(gspca_dev, cmd);
2138 switch (sd->webcam) {
2139 case P35u:
2140 if (gspca_dev->width == 320)
2141 reg_w_buf(gspca_dev, nw801_init_qvga);
2142 else
2143 reg_w_buf(gspca_dev, nw801_init_vga);
2144 reg_w_buf(gspca_dev, nw801_init_2);
2145 break;
2146 case Kr651us:
2147 if (gspca_dev->width == 320)
2148 reg_w_buf(gspca_dev, kr651_init_qvga);
2149 else
2150 reg_w_buf(gspca_dev, kr651_init_vga);
2151 reg_w_buf(gspca_dev, kr651_init_2);
2152 break;
2153 case Proscope:
2154 if (gspca_dev->width == 320)
2155 reg_w_buf(gspca_dev, proscope_init_qvga);
2156 else
2157 reg_w_buf(gspca_dev, proscope_init_vga);
2158 reg_w_buf(gspca_dev, proscope_init_2);
2159 break;
2160 }
2161
2162 setgain(gspca_dev);
2163 setexposure(gspca_dev);
2164 setautogain(gspca_dev);
2165 return gspca_dev->usb_err;
2166}
2167
2168static void sd_stopN(struct gspca_dev *gspca_dev)
2169{
2170 struct sd *sd = (struct sd *) gspca_dev;
2171 u8 value;
2172
2173 /* 'go' off */
2174 if (sd->bridge != BRIDGE_NW801) {
2175 value = 0x02;
2176 reg_w(gspca_dev, 0x0406, &value, 1);
2177 }
2178
2179 /* LED off */
2180 switch (sd->webcam) {
2181 case Cvideopro:
2182 case Kr651us:
2183 case DvcV6:
2184 case Kritter:
2185 value = 0xff;
2186 break;
2187 case Dlink350c:
2188 value = 0x21;
2189 break;
2190 case SpaceCam:
2191 case SpaceCam2:
2192 case Proscope:
2193 case Twinkle:
2194 value = 0x01;
2195 break;
2196 default:
2197 return;
2198 }
2199 reg_w(gspca_dev, 0x0404, &value, 1);
2200}
2201
2202static void sd_pkt_scan(struct gspca_dev *gspca_dev,
2203 u8 *data, /* isoc packet */
2204 int len) /* iso packet length */
2205{
2206 /*
2207 * frame header = '00 00 hh ww ss xx ff ff'
2208 * with:
2209 * - 'hh': height / 4
2210 * - 'ww': width / 4
2211 * - 'ss': frame sequence number c0..dd
2212 */
2213 if (data[0] == 0x00 && data[1] == 0x00
2214 && data[6] == 0xff && data[7] == 0xff) {
2215 gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0);
2216 gspca_frame_add(gspca_dev, FIRST_PACKET, data + 8, len - 8);
2217 } else {
2218 gspca_frame_add(gspca_dev, INTER_PACKET, data, len);
2219 }
2220}
2221
2222static int sd_setautogain(struct gspca_dev *gspca_dev, __s32 val)
2223{
2224 struct sd *sd = (struct sd *) gspca_dev;
2225
2226 sd->ctrls[AUTOGAIN].val = val;
2227 if (val)
2228 gspca_dev->ctrl_inac = (1 << GAIN) | (1 << EXPOSURE);
2229 else
2230 gspca_dev->ctrl_inac = 0;
2231 if (gspca_dev->streaming)
2232 setautogain(gspca_dev);
2233 return gspca_dev->usb_err;
2234}
2235
2236static void do_autogain(struct gspca_dev *gspca_dev)
2237{
2238 struct sd *sd = (struct sd *) gspca_dev;
2239 int luma;
2240 int gain, shutter;
2241
2242 if (sd->ag_cnt < 0)
2243 return;
2244 if (--sd->ag_cnt >= 0)
2245 return;
2246 sd->ag_cnt = AG_CNT_START;
2247
2248 /* get the average luma */
2249 reg_r(gspca_dev, sd->bridge == BRIDGE_NW801 ? 0x080d : 0x080c, 4);
2250 luma = (gspca_dev->usb_buf[3] << 24) + (gspca_dev->usb_buf[2] << 16)
2251 + (gspca_dev->usb_buf[1] << 8) + gspca_dev->usb_buf[0];
2252 luma /= sd->ae_res;
2253
2254 if (sd->webcam == P35u) {
2255 u8 clock;
2256
2257 if (luma > 92 && luma < 108)
2258 return; /* fine */
2259 clock = sd->ctrls[EXPOSURE].val;
2260 gain = sd->ctrls[GAIN].val;
2261 if (luma < 100) {
2262 if (luma < 70 && clock > 0)
2263 clock--;
2264 if (gain > 98 && clock > 0)
2265 clock--;
2266 if (gain <= 50)
2267 gain += 3;
2268 } else {
2269 if (luma > 150 && clock < 9)
2270 clock++;
2271 if (gain < 12 && clock < 9)
2272 clock++;
2273 if (gain >= 5)
2274 gain -= 3;
2275 }
2276 if (gain != sd->ctrls[GAIN].val) {
2277 sd->ctrls[GAIN].val = gain;
2278 setgain(gspca_dev);
2279 }
2280 if (clock != sd->ctrls[EXPOSURE].val) {
2281 sd->ctrls[EXPOSURE].val = clock;
2282 setexposure(gspca_dev);
2283 }
2284 return;
2285 }
2286
2287 /* kr651us */
2288 if (luma > 95 && luma < 105)
2289 return; /* fine */
2290 gain = sd->ctrls[GAIN].val;
2291 shutter = sd->ctrls[EXPOSURE].val;
2292 if (luma < 100) {
2293 if (shutter > 0) {
2294 if (luma < 85 && shutter > 50)
2295 shutter -= 50;
2296 else
2297 shutter--;
2298 } else if (gain < 63) {
2299 if (luma < 85 && gain < 53)
2300 gain += 10;
2301 else
2302 gain++;
2303 }
2304 } else {
2305 if (gain > 0) {
2306 if (luma > 115 && gain > 10)
2307 gain -= 10;
2308 else
2309 gain--;
2310 } else if (shutter < 316) { /* max 0x13b */
2311 if (luma > 115 && shutter < 266)
2312 shutter += 50;
2313 else
2314 shutter++;
2315 }
2316 }
2317 if (gain != sd->ctrls[GAIN].val) {
2318 sd->ctrls[GAIN].val = gain;
2319 setgain(gspca_dev);
2320 }
2321 if (shutter != sd->ctrls[EXPOSURE].val) {
2322 sd->ctrls[EXPOSURE].val = shutter;
2323 setexposure(gspca_dev);
2324 }
2325}
2326
2327/* V4L2 controls supported by the driver */
2328static const struct ctrl sd_ctrls[NCTRLS] = {
2329[GAIN] = {
2330 {
2331 .id = V4L2_CID_GAIN,
2332 .type = V4L2_CTRL_TYPE_INTEGER,
2333 .name = "Gain",
2334 .minimum = 0,
2335 .maximum = 63,
2336 .step = 1,
2337 .default_value = 16
2338 },
2339 .set_control = setgain
2340 },
2341[EXPOSURE] = {
2342 {
2343 .id = V4L2_CID_EXPOSURE,
2344 .type = V4L2_CTRL_TYPE_INTEGER,
2345 .name = "Exposure",
2346 .minimum = 0,
2347 .maximum = 9,
2348 .step = 1,
2349 .default_value = 1
2350 },
2351 .set_control = setexposure
2352 },
2353[AUTOGAIN] = {
2354 {
2355 .id = V4L2_CID_AUTOGAIN,
2356 .type = V4L2_CTRL_TYPE_BOOLEAN,
2357 .name = "Auto Gain",
2358 .minimum = 0,
2359 .maximum = 1,
2360 .step = 1,
2361 .default_value = 1,
2362 .flags = V4L2_CTRL_FLAG_UPDATE
2363 },
2364 .set = sd_setautogain
2365 },
2366};
2367
2368/* sub-driver description */
2369static const struct sd_desc sd_desc = {
2370 .name = MODULE_NAME,
2371 .ctrls = sd_ctrls,
2372 .nctrls = ARRAY_SIZE(sd_ctrls),
2373 .config = sd_config,
2374 .init = sd_init,
2375 .start = sd_start,
2376 .stopN = sd_stopN,
2377 .pkt_scan = sd_pkt_scan,
2378 .dq_callback = do_autogain,
2379};
2380
2381/* -- module initialisation -- */
2382static const struct usb_device_id device_table[] = {
2383 {USB_DEVICE(0x046d, 0xd001)},
2384 {USB_DEVICE(0x0502, 0xd001)},
2385 {USB_DEVICE(0x052b, 0xd001)},
2386 {USB_DEVICE(0x055f, 0xd001)},
2387 {USB_DEVICE(0x06a5, 0x0000)},
2388 {USB_DEVICE(0x06a5, 0xd001)},
2389 {USB_DEVICE(0x06a5, 0xd800)},
2390 {USB_DEVICE(0x06be, 0xd001)},
2391 {USB_DEVICE(0x0728, 0xd001)},
2392 {}
2393};
2394MODULE_DEVICE_TABLE(usb, device_table);
2395
2396/* -- device connect -- */
2397static int sd_probe(struct usb_interface *intf,
2398 const struct usb_device_id *id)
2399{
2400 return gspca_dev_probe(intf, id, &sd_desc, sizeof(struct sd),
2401 THIS_MODULE);
2402}
2403
2404static struct usb_driver sd_driver = {
2405 .name = MODULE_NAME,
2406 .id_table = device_table,
2407 .probe = sd_probe,
2408 .disconnect = gspca_disconnect,
2409#ifdef CONFIG_PM
2410 .suspend = gspca_suspend,
2411 .resume = gspca_resume,
2412#endif
2413};
2414
2415/* -- module insert / remove -- */
2416static int __init sd_mod_init(void)
2417{
2418 return usb_register(&sd_driver);
2419}
2420static void __exit sd_mod_exit(void)
2421{
2422 usb_deregister(&sd_driver);
2423}
2424
2425module_init(sd_mod_init);
2426module_exit(sd_mod_exit);
2427
2428module_param(webcam, int, 0644);
2429MODULE_PARM_DESC(webcam,
2430 "Webcam type\n"
2431 "0: generic\n"
2432 "1: Trust 120 SpaceCam\n"
2433 "2: other Trust 120 SpaceCam\n"
2434 "3: Conceptronic Video Pro\n"
2435 "4: D-link dru-350c\n"
2436 "5: Plustek Opticam 500U\n"
2437 "6: Panasonic GP-KR651US\n"
2438 "7: iRez Kritter\n"
2439 "8: Mustek Wcam 300 mini\n"
2440 "9: Scalar USB Microscope M2 (Proscope)\n"
2441 "10: Divio Chicony TwinkleCam\n"
2442 "11: DSB-C110\n"
2443 "12: DVC-V6\n");
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
index 8c80fd36da0d..aa6c393b7ae9 100644
--- a/include/linux/videodev2.h
+++ b/include/linux/videodev2.h
@@ -396,6 +396,7 @@ struct v4l2_pix_format {
396#define V4L2_PIX_FMT_TM6000 v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */ 396#define V4L2_PIX_FMT_TM6000 v4l2_fourcc('T', 'M', '6', '0') /* tm5600/tm60x0 */
397#define V4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */ 397#define V4L2_PIX_FMT_CIT_YYVYUY v4l2_fourcc('C', 'I', 'T', 'V') /* one line of Y then 1 line of VYUY */
398#define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */ 398#define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */
399#define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */
399 400
400/* 401/*
401 * F O R M A T E N U M E R A T I O N 402 * F O R M A T E N U M E R A T I O N