SyntekUSBVideoCamera
stk11xx-dev-6a51.c
Go to the documentation of this file.
1 
34 #include <linux/module.h>
35 #include <linux/init.h>
36 #include <linux/kernel.h>
37 #include <linux/version.h>
38 #include <linux/errno.h>
39 #include <linux/slab.h>
40 #include <linux/kref.h>
41 
42 #include <linux/usb.h>
43 #include <media/v4l2-common.h>
44 #include <media/v4l2-ioctl.h>
45 
46 #include "stk11xx.h"
47 #include "stk11xx-dev.h"
48 
49 
50 //=============================================================================
51 //
52 // STK-6A51 API
53 //
54 //=============================================================================
55 
56 
71 {
72  int i;
73  int value;
74  int retok;
75 
76  STK_INFO("Initialize USB2.0 Syntek Camera\n");
77 
78  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
79  usb_stk11xx_write_registry(dev, 0x0002, 0x0078);
80  usb_stk11xx_write_registry(dev, 0x0003, 0x0080);
81 
82  usb_stk11xx_write_registry(dev, 0x0002, 0x007f);
83  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
84  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
85  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
86  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
87  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
88  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
89  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
90  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
91  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
92  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
93  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
94  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
95  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
96  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
97  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
98  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
99  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
100  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
101  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
102  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
103  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
104  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
105  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
106  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
107  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
108  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
109  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
110  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
111  usb_stk11xx_write_registry(dev, 0x0002, 0x007d);
112  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
113 
114  for (i=0; i<16; i++) {
115  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
116  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
117  usb_stk11xx_read_registry(dev, 0x0000, &value);
118 
119  STK_DEBUG("Loop 1 : Read 0x0000 = %02X\n", value);
120  }
121 
122  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
123  usb_stk11xx_write_registry(dev, 0x0000, 0x0020);
124 
125  usb_stk11xx_write_registry(dev, 0x0002, 0x007f);
126  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
127  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
128  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
129  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
130  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
131  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
132  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
133  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
134  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
135  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
136  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
137  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
138  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
139  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
140  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
141  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
142  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
143  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
144  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
145  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
146  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
147  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
148  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
149  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
150  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
151  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
152  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
153  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
154  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
155  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
156  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
157  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
158  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
159  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
160  usb_stk11xx_write_registry(dev, 0x0002, 0x007d);
161  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
162 
163  for (i=0; i<16; i++) {
164  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
165  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
166  usb_stk11xx_read_registry(dev, 0x0000, &value);
167 
168  STK_DEBUG("Loop 2 : Read 0x0000 = %02X\n", value);
169  }
170 
171  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
172  usb_stk11xx_write_registry(dev, 0x0000, 0x0020);
173 
174  usb_stk11xx_write_registry(dev, 0x0002, 0x007f);
175  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
176  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
177  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
178  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
179  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
180  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
181  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
182  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
183  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
184  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
185  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
186  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
187  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
188  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
189  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
190  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
191  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
192  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
193  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
194  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
195  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
196  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
197  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
198  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
199  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
200  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
201  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
202  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
203  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
204  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
205  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
206  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
207  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
208  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
209  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
210  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
211  usb_stk11xx_write_registry(dev, 0x0000, 0x0027);
212  usb_stk11xx_write_registry(dev, 0x0000, 0x0026);
213  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
214  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
215  usb_stk11xx_write_registry(dev, 0x0002, 0x007d);
216  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
217 
218  for (i=0; i<16; i++) {
219  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
220  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
221  usb_stk11xx_read_registry(dev, 0x0000, &value);
222 
223  STK_DEBUG("Loop 3 : Read 0x0000 = %02X\n", value);
224  }
225 
226  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
227  usb_stk11xx_write_registry(dev, 0x0000, 0x0020);
228  usb_stk11xx_write_registry(dev, 0x0002, 0x007f);
229  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
230  usb_stk11xx_write_registry(dev, 0x0000, 0x0020);
231 
232  usb_stk11xx_write_registry(dev, 0x0117, 0x0000);
233  usb_stk11xx_read_registry(dev, 0x0103, &value);
234  usb_stk11xx_write_registry(dev, 0x0103, 0x0001);
235  usb_stk11xx_read_registry(dev, 0x0103, &value);
236  usb_stk11xx_write_registry(dev, 0x0103, 0x0000);
237 
238  usb_stk11xx_write_registry(dev, 0x0000, 0x00e0);
239  usb_stk11xx_write_registry(dev, 0x0002, 0x00f8);
240  usb_stk11xx_write_registry(dev, 0x0002, 0x0078);
241  usb_stk11xx_write_registry(dev, 0x0000, 0x0020);
242 
244  retok = dev_stk11xx_check_device(dev, 65);
245  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
246 
248  retok = dev_stk11xx_check_device(dev, 65);
249  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
250 
252  retok = dev_stk11xx_check_device(dev, 65);
253  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
254 
256  retok = dev_stk11xx_check_device(dev, 65);
257  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
258 
260  retok = dev_stk11xx_check_device(dev, 65);
261  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
262 
264  retok = dev_stk11xx_check_device(dev, 65);
265  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
266 
268  retok = dev_stk11xx_check_device(dev, 65);
269  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
270 
272  retok = dev_stk11xx_check_device(dev, 65);
273  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
274 
276  retok = dev_stk11xx_check_device(dev, 65);
277  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
278 
280  retok = dev_stk11xx_check_device(dev, 65);
281  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
282 
284  retok = dev_stk11xx_check_device(dev, 65);
285  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
286 
288  retok = dev_stk11xx_check_device(dev, 65);
289  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
290 
292  retok = dev_stk11xx_check_device(dev, 65);
293  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
294 
296 
298 
300  retok = dev_stk11xx_check_device(dev, 65);
301  usb_stk11xx_write_registry(dev, 0x0200, 0x0008);
302 
304 
306 
307 
308 
309 
310 
312 
313  usb_stk11xx_set_feature(dev, 0);
314 
315  // Device is initialized and is ready !!!
316  STK_INFO("Syntek USB2.0 Camera is ready\n");
317 
318  return 0;
319 }
320 
321 
335 int dev_stk6a51_configure_device(struct usb_stk11xx *dev, int step)
336 {
337  int retok;
338  int value;
339 
340  // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19
341  static const int values_001B[] = {
342  0x0e, 0x03, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x0e, 0x07, 0x07, 0x07, 0x07, 0x07, 0x0e, 0x0e, 0x0e, 0x0e
343  };
344  static const int values_001C[] = {
345  0x06, 0x02, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x46, 0x46, 0x46, 0x46
346  };
347  static const int values_0202[] = {
348  0x1e, 0x0a, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x1e, 0x0a, 0x1e, 0x14, 0x1e, 0x1f, 0x0a, 0x0a, 0x0a, 0x0a
349  };
350  static const int values_0110[] = {
351  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
352  };
353  static const int values_0112[] = {
354  0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x09, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01
355  };
356  static const int values_0114[] = {
357  0x87, 0x80, 0x80, 0x80, 0x80, 0x00, 0xbe, 0xbe, 0x80, 0x80, 0x84, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80
358  };
359  static const int values_0115[] = {
360  0x02, 0x02, 0x02, 0x02, 0x02, 0x05, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02
361  };
362  static const int values_0116[] = {
363  0xe7, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe9, 0xe9, 0xe0, 0xe0, 0xe4, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe1, 0xe1, 0xe1, 0xe1
364  };
365  static const int values_0117[] = {
366  0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01
367  };
368  static const int values_0100[] = {
369  0x20, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x21, 0x23, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20
370  };
371 
372 
373  STK_DEBUG("dev_stk6a51_configure_device : %d\n", step);
374 
375  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
376  usb_stk11xx_write_registry(dev, 0x0002, 0x0078);
377  usb_stk11xx_write_registry(dev, 0x0003, 0x0080);
378  usb_stk11xx_write_registry(dev, 0x0005, 0x0000);
379 
380  usb_stk11xx_write_registry(dev, 0x0007, 0x0003);
381  usb_stk11xx_write_registry(dev, 0x000d, 0x0000);
382  usb_stk11xx_write_registry(dev, 0x000f, 0x0002);
383  usb_stk11xx_write_registry(dev, 0x0300, 0x0012);
384  usb_stk11xx_write_registry(dev, 0x0350, 0x0041);
385 
386  usb_stk11xx_write_registry(dev, 0x0351, 0x0000);
387  usb_stk11xx_write_registry(dev, 0x0352, 0x0000);
388  usb_stk11xx_write_registry(dev, 0x0353, 0x0000);
389  usb_stk11xx_write_registry(dev, 0x0018, 0x0010);
390  usb_stk11xx_write_registry(dev, 0x0019, 0x0000);
391 
392  usb_stk11xx_write_registry(dev, 0x001b, values_001B[step]);
393  usb_stk11xx_write_registry(dev, 0x001c, values_001C[step]);
394  usb_stk11xx_write_registry(dev, 0x0300, 0x0080);
395  usb_stk11xx_write_registry(dev, 0x001a, 0x0004);
396  usb_stk11xx_write_registry(dev, 0x0202, values_0202[step]);
397 
398  usb_stk11xx_write_registry(dev, 0x0110, values_0110[step]);
399  usb_stk11xx_write_registry(dev, 0x0111, 0x0000);
400  usb_stk11xx_write_registry(dev, 0x0112, values_0112[step]);
401  usb_stk11xx_write_registry(dev, 0x0113, 0x0000);
402  usb_stk11xx_write_registry(dev, 0x0114, values_0114[step]);
403 
404  usb_stk11xx_write_registry(dev, 0x0115, values_0115[step]);
405  usb_stk11xx_write_registry(dev, 0x0116, values_0116[step]);
406  usb_stk11xx_write_registry(dev, 0x0117, values_0117[step]);
407 
408  usb_stk11xx_read_registry(dev, 0x0100, &value);
409  usb_stk11xx_write_registry(dev, 0x0100, values_0100[step]);
410 
411 // usb_stk11xx_write_registry(dev, 0x0200, 0x0080);
412 // usb_stk11xx_write_registry(dev, 0x0200, 0x0000);
413  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
414 
415 
416  switch (step) {
417  case 0:
418  usb_stk11xx_write_registry(dev, 0x0203, 0x0040);
419 
420  usb_stk11xx_write_registry(dev, 0x0204, 0x0041);
421  usb_stk11xx_write_registry(dev, 0x0205, 0x0001);
422  usb_stk11xx_write_registry(dev, 0x0204, 0x001c);
423  usb_stk11xx_write_registry(dev, 0x0205, 0x0002);
424 
425  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
426 
427  break;
428 
429  case 1:
430  usb_stk11xx_write_registry(dev, 0x0203, 0x0022);
431 
432  usb_stk11xx_write_registry(dev, 0x0204, 0x0027);
433  usb_stk11xx_write_registry(dev, 0x0205, 0x00a5);
434 
435  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
436 
437  break;
438 
439  case 2:
440  usb_stk11xx_write_registry(dev, 0x0203, 0x0060);
441 
442  usb_stk11xx_write_registry(dev, 0x0204, 0x0012);
443  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
444  usb_stk11xx_write_registry(dev, 0x0204, 0x0013);
445  usb_stk11xx_write_registry(dev, 0x0205, 0x00bf);
446 
447  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
448 
449  break;
450 
451  case 3:
452  usb_stk11xx_write_registry(dev, 0x0203, 0x0042);
453 
454  usb_stk11xx_write_registry(dev, 0x0204, 0x0012);
455  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
456  usb_stk11xx_write_registry(dev, 0x0204, 0x0024);
457  usb_stk11xx_write_registry(dev, 0x0205, 0x00a5);
458 
459  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
460 
461  break;
462 
463  case 4:
464  usb_stk11xx_write_registry(dev, 0x0203, 0x0042);
465 
466  usb_stk11xx_write_registry(dev, 0x0204, 0x0012);
467  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
468  usb_stk11xx_write_registry(dev, 0x0204, 0x0013);
469  usb_stk11xx_write_registry(dev, 0x0205, 0x00e0);
470  usb_stk11xx_write_registry(dev, 0x0204, 0x0024);
471  usb_stk11xx_write_registry(dev, 0x0205, 0x00a5);
472 
473  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
474 
475  break;
476 
477  case 5:
478  usb_stk11xx_write_registry(dev, 0x0203, 0x0042);
479 
480  usb_stk11xx_write_registry(dev, 0x0204, 0x0012);
481  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
482  usb_stk11xx_write_registry(dev, 0x0204, 0x0013);
483  usb_stk11xx_write_registry(dev, 0x0205, 0x00bf);
484 
485  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
486 
487  break;
488 
489  case 6:
490  usb_stk11xx_write_registry(dev, 0x0203, 0x0060);
491 
492  usb_stk11xx_write_registry(dev, 0x0204, 0x0012);
493  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
494  usb_stk11xx_write_registry(dev, 0x0204, 0x0013);
495  usb_stk11xx_write_registry(dev, 0x0205, 0x00ff);
496 
497  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
498 
499  break;
500 
501  case 7:
502  usb_stk11xx_write_registry(dev, 0x0203, 0x0060);
503 
504  usb_stk11xx_write_registry(dev, 0x0204, 0x0012);
505  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
506  usb_stk11xx_write_registry(dev, 0x0204, 0x0013);
507  usb_stk11xx_write_registry(dev, 0x0205, 0x00ff);
508 
509  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
510 
511  break;
512 
513  case 8:
514  usb_stk11xx_write_registry(dev, 0x0203, 0x0060);
515 
516  usb_stk11xx_write_registry(dev, 0x0204, 0x0012);
517  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
518  usb_stk11xx_write_registry(dev, 0x0204, 0x0013);
519  usb_stk11xx_write_registry(dev, 0x0205, 0x00b7);
520 
521  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
522 
523  break;
524 
525  case 9:
526  usb_stk11xx_write_registry(dev, 0x0203, 0x0060);
527 
528  usb_stk11xx_write_registry(dev, 0x0204, 0x0012);
529  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
530  usb_stk11xx_write_registry(dev, 0x0204, 0x0013);
531  usb_stk11xx_write_registry(dev, 0x0205, 0x00b7);
532 
533  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
534 
535  break;
536 
537  case 10:
538  usb_stk11xx_write_registry(dev, 0x0203, 0x0080);
539 
540  usb_stk11xx_write_registry(dev, 0x0204, 0x0012);
541  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
542  usb_stk11xx_write_registry(dev, 0x0204, 0x000a);
543  usb_stk11xx_write_registry(dev, 0x0205, 0x00ff);
544 
545  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
546 
547  break;
548 
549  case 11:
550  usb_stk11xx_write_registry(dev, 0x0203, 0x00dc);
551 
552  usb_stk11xx_write_registry(dev, 0x0204, 0x0015);
553  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
554 
555  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
556 
557  break;
558 
559  case 12:
560  usb_stk11xx_write_registry(dev, 0x0203, 0x00ec);
561 
562  usb_stk11xx_write_registry(dev, 0x0204, 0x0015);
563  usb_stk11xx_write_registry(dev, 0x0205, 0x0080);
564 
565  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
566 
567  break;
568 
569  case 13:
570  usb_stk11xx_write_registry(dev, 0x0203, 0x00ba);
571 
572  usb_stk11xx_read_registry(dev, 0x02ff, &value);
573  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
574 
575  usb_stk11xx_write_registry(dev, 0x0208, 0x0020);
576  usb_stk11xx_write_registry(dev, 0x0200, 0x0020);
577  retok = dev_stk11xx_check_device(dev, 500);
578  usb_stk11xx_read_registry(dev, 0x0209, &value);
579  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
580 
581  break;
582 
583  case 14:
584  usb_stk11xx_write_registry(dev, 0x0203, 0x00ba);
585 
586  usb_stk11xx_read_registry(dev, 0x02ff, &value);
587  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
588 
589  usb_stk11xx_write_registry(dev, 0x0208, 0x0000);
590  usb_stk11xx_write_registry(dev, 0x0200, 0x0020);
591  retok = dev_stk11xx_check_device(dev, 500);
592  usb_stk11xx_read_registry(dev, 0x0209, &value);
593  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
594  usb_stk11xx_read_registry(dev, 0x02ff, &value);
595  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
596 
597  usb_stk11xx_write_registry(dev, 0x0208, 0x00f1);
598  usb_stk11xx_write_registry(dev, 0x0200, 0x0020);
599  retok = dev_stk11xx_check_device(dev, 500);
600  usb_stk11xx_read_registry(dev, 0x0209, &value);
601  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
602 
603  break;
604 
605  case 15:
606  usb_stk11xx_write_registry(dev, 0x0203, 0x00ba);
607 
608  usb_stk11xx_write_registry(dev, 0x0204, 0x0001);
609  usb_stk11xx_write_registry(dev, 0x0205, 0x0000);
610  usb_stk11xx_write_registry(dev, 0x0200, 0x0005);
611 
612  break;
613 
614  case 16:
615  usb_stk11xx_write_registry(dev, 0x0203, 0x007a);
616 
617  usb_stk11xx_read_registry(dev, 0x02ff, &value);
618  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
619  usb_stk11xx_write_registry(dev, 0x0205, 0x0030);
620  usb_stk11xx_write_registry(dev, 0x0205, 0x0000);
621  usb_stk11xx_read_registry(dev, 0x0201, &value);
622  usb_stk11xx_read_registry(dev, 0x0201, &value);
623  usb_stk11xx_read_registry(dev, 0x0201, &value);
624  usb_stk11xx_read_registry(dev, 0x0209, &value);
625  usb_stk11xx_write_registry(dev, 0x0200, 0x0020);
626  usb_stk11xx_read_registry(dev, 0x0201, &value);
627  usb_stk11xx_read_registry(dev, 0x0209, &value);
628  usb_stk11xx_write_registry(dev, 0x02ff, 0x0001);
629  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
630 
631  usb_stk11xx_write_registry(dev, 0x0002, 0x007f);
632  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
633  usb_stk11xx_write_registry(dev, 0x0002, 0x007d);
634  usb_stk11xx_write_registry(dev, 0x0000, 0x0024);
635  usb_stk11xx_write_registry(dev, 0x0000, 0x0025);
636  usb_stk11xx_write_registry(dev, 0x0000, 0x0020);
637 
638  break;
639 
640  case 17:
641  usb_stk11xx_write_registry(dev, 0x0203, 0x007a);
642 
644 
645  usb_stk11xx_read_registry(dev, 0x02ff, &value);
646  usb_stk11xx_write_registry(dev, 0x02ff, 0x0001);
647 
648  usb_stk11xx_write_registry(dev, 0x0205, 0x0033);
649  usb_stk11xx_write_registry(dev, 0x0205, 0x0090);
650  usb_stk11xx_write_registry(dev, 0x0200, 0x0061);
651  retok = dev_stk11xx_check_device(dev, 500);
652  usb_stk11xx_read_registry(dev, 0x0209, &value);
653  usb_stk11xx_write_registry(dev, 0x0200, 0x0020);
654  retok = dev_stk11xx_check_device(dev, 500);
655  usb_stk11xx_read_registry(dev, 0x0209, &value);
656  usb_stk11xx_write_registry(dev, 0x02ff, 0x0001);
657  usb_stk11xx_read_registry(dev, 0x0201, &value);
658  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
659 
660  usb_stk11xx_write_registry(dev, 0x0200, 0x0080);
661  usb_stk11xx_write_registry(dev, 0x0200, 0x0000);
662  usb_stk11xx_write_registry(dev, 0x02ff, 0x0001);
663 
664  break;
665 
666  case 18:
667  usb_stk11xx_write_registry(dev, 0x0203, 0x007a);
668 
670 
671  usb_stk11xx_read_registry(dev, 0x02ff, &value);
672  usb_stk11xx_write_registry(dev, 0x02ff, 0x0001);
673 
674  usb_stk11xx_write_registry(dev, 0x0205, 0x0033);
675  usb_stk11xx_write_registry(dev, 0x0205, 0x0090);
676  usb_stk11xx_write_registry(dev, 0x0200, 0x0061);
677  retok = dev_stk11xx_check_device(dev, 500);
678  usb_stk11xx_read_registry(dev, 0x0209, &value);
679  usb_stk11xx_write_registry(dev, 0x0200, 0x0020);
680  retok = dev_stk11xx_check_device(dev, 500);
681  usb_stk11xx_read_registry(dev, 0x0209, &value);
682  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
683  break;
684 
685  case 19:
686  usb_stk11xx_write_registry(dev, 0x0203, 0x007a);
687 
689 
690  usb_stk11xx_read_registry(dev, 0x02ff, &value);
691  usb_stk11xx_write_registry(dev, 0x02ff, 0x0001);
692 
693  usb_stk11xx_write_registry(dev, 0x0205, 0x0033);
694  usb_stk11xx_write_registry(dev, 0x0205, 0x0090);
695  usb_stk11xx_write_registry(dev, 0x0200, 0x0061);
696  retok = dev_stk11xx_check_device(dev, 500);
697  usb_stk11xx_read_registry(dev, 0x0209, &value);
698  usb_stk11xx_write_registry(dev, 0x0200, 0x0020);
699  retok = dev_stk11xx_check_device(dev, 500);
700  usb_stk11xx_read_registry(dev, 0x0209, &value);
701  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
702  break;
703  }
704 
705  return 0;
706 }
707 
708 
719 {
720  int value;
721 
722  usb_stk11xx_write_registry(dev, 0x0203, 0x00a0);
723 
724  usb_stk11xx_read_registry(dev, 0x0104, &value);
725  usb_stk11xx_read_registry(dev, 0x0105, &value);
726  usb_stk11xx_read_registry(dev, 0x0106, &value);
727 
728  usb_stk11xx_write_registry(dev, 0x0100, 0x0021);
729  usb_stk11xx_write_registry(dev, 0x0116, 0x0000);
730  usb_stk11xx_write_registry(dev, 0x0117, 0x0000);
731  usb_stk11xx_write_registry(dev, 0x0018, 0x0000);
732 
733  usb_stk11xx_read_registry(dev, 0x0000, &value);
734  usb_stk11xx_write_registry(dev, 0x0000, 0x0049);
735 
736  return 0;
737 }
738 
739 
751 {
753 
754  usb_stk11xx_set_feature(dev, 0);
755 
757 
758  usb_stk11xx_write_registry(dev, 0x0000, 0x00e0);
759  usb_stk11xx_write_registry(dev, 0x0002, 0x00f8);
760  usb_stk11xx_write_registry(dev, 0x0002, 0x0078);
761  usb_stk11xx_write_registry(dev, 0x0000, 0x0020);
762 
764 
766 
767  return 0;
768 }
769 
770 
782 {
783  int i;
784  int retok;
785  int value;
786 
787  int asize;
788 
789  static const int values_205[][4] = {
790  { 0x33, 0x86, 0x05, 0x01 },
791  { 0x33, 0x86, 0x05, 0x00 },
792  { 0x33, 0x8c, 0xa1, 0x04 },
793  { 0x33, 0x90, -1 },
794  { 0x30, 0x1a, 0x0a, 0xcc },
795  { 0x32, 0x02, 0x00, 0x08 },
796  { 0x33, 0xf4, 0x03, 0x1d },
797  { 0x33, 0x8c, 0xa1, 0x04 },
798  { 0x33, 0x90, -1 },
799  { 0x33, 0x8c, 0xa1, 0x04 },
800  { 0x33, 0x90, -1 },
801  { 0x34, 0x1e, 0x8f, 0x09 },
802  { 0x34, 0x1c, 0x02, 0x50 },
803  { 0x34, 0x1e, 0x8f, 0x09 },
804  { 0x34, 0x1e, 0x8f, 0x08 },
805  { 0x33, 0x8c, 0x04, 0x00 },
806  { 0x33, 0x90, 0x30, 0x8f },
807  { 0x33, 0x92, 0xc3, 0xff },
808  { 0x33, 0x94, 0xed, 0x8f },
809  { 0x33, 0x96, 0x35, 0x8f },
810  { 0x33, 0x98, 0x18, 0x8f },
811  { 0x33, 0x9a, 0x30, 0x8f },
812  { 0x33, 0x9c, 0xc3, 0x00 },
813  { 0x33, 0x9e, 0x15, 0x8f },
814  { 0x33, 0x8c, 0x04, 0x10 },
815  { 0x33, 0x90, 0xcc, 0x00 },
816  { 0x33, 0x92, 0x07, 0xbd },
817  { 0x33, 0x94, 0x04, 0xb5 },
818  { 0x33, 0x96, 0xbd, 0x9e },
819  { 0x33, 0x98, 0x9f, 0xf6 },
820  { 0x33, 0x9a, 0x03, 0x22 },
821  { 0x33, 0x9c, 0x30, 0xe7 },
822  { 0x33, 0x9e, 0x0a, 0xf6 },
823  { 0x33, 0x8c, 0x04, 0x20 },
824  { 0x33, 0x90, 0x02, 0x39 },
825  { 0x33, 0x92, 0xc1, 0x01 },
826  { 0x33, 0x94, 0x26, 0x05 },
827  { 0x33, 0x96, 0xf6, 0x03 },
828  { 0x33, 0x98, 0x23, 0xe7 },
829  { 0x33, 0x9a, 0x0a, 0x7d },
830  { 0x33, 0x9c, 0x03, 0x21 },
831  { 0x33, 0x9e, 0x27, 0x20 },
832  { 0x33, 0x8c, 0x04, 0x30 },
833  { 0x33, 0x90, 0xf6, 0x02 },
834  { 0x33, 0x92, 0x39, 0xe7 },
835  { 0x33, 0x94, 0x02, 0x8f },
836  { 0x33, 0x96, 0xc3, 0x00 },
837  { 0x33, 0x98, 0x0b, 0x30 },
838  { 0x33, 0x9a, 0xed, 0x00 },
839  { 0x33, 0x9c, 0xfe, 0x02 },
840  { 0x33, 0x9e, 0x37, 0xee },
841  { 0x33, 0x8c, 0x04, 0x40 },
842  { 0x33, 0x90, 0x04, 0x5f },
843  { 0x33, 0x92, 0xad, 0x00 },
844  { 0x33, 0x94, 0x30, 0xe6 },
845  { 0x33, 0x96, 0x0a, 0x4f },
846  { 0x33, 0x98, 0xed, 0x08 },
847  { 0x33, 0x9a, 0xec, 0x11 },
848  { 0x33, 0x9c, 0xa3, 0x08 },
849  { 0x33, 0x9e, 0xdd, 0x56 },
850  { 0x33, 0x8c, 0x04, 0x50 },
851  { 0x33, 0x90, 0x30, 0xc6 },
852  { 0x33, 0x92, 0x13, 0x3a },
853  { 0x33, 0x94, 0x35, 0x39 },
854  { 0x33, 0x96, 0x3c, 0x3c },
855  { 0x33, 0x98, 0x3c, 0xc6 },
856  { 0x33, 0x9a, 0x01, 0xf7 },
857  { 0x33, 0x9c, 0x03, 0x21 },
858  { 0x33, 0x9e, 0xc6, 0x0a },
859  { 0x33, 0x8c, 0x04, 0x60 },
860  { 0x33, 0x90, 0xf7, 0x03 },
861  { 0x33, 0x92, 0x22, 0xf7 },
862  { 0x33, 0x94, 0x03, 0x23 },
863  { 0x33, 0x96, 0xcc, 0x03 },
864  { 0x33, 0x98, 0x03, 0x30 },
865  { 0x33, 0x9a, 0xed, 0x02 },
866  { 0x33, 0x9c, 0xfe, 0x10 },
867  { 0x33, 0x9e, 0x50, 0xec },
868  { 0x33, 0x8c, 0x04, 0x70 },
869  { 0x33, 0x90, 0x04, 0xfd },
870  { 0x33, 0x92, 0x02, 0xff },
871  { 0x33, 0x94, 0xfe, 0x02 },
872  { 0x33, 0x96, 0xff, 0xec },
873  { 0x33, 0x98, 0x00, 0xfd },
874  { 0x33, 0x9a, 0x03, 0x01 },
875  { 0x33, 0x9c, 0x5f, 0x4f },
876  { 0x33, 0x9e, 0x30, 0xed },
877  { 0x33, 0x8c, 0x04, 0x80 },
878  { 0x33, 0x90, 0x04, 0xec },
879  { 0x33, 0x92, 0x04, 0x05 },
880  { 0x33, 0x94, 0xf3, 0x03 },
881  { 0x33, 0x96, 0x01, 0x8f },
882  { 0x33, 0x98, 0xec, 0x00 },
883  { 0x33, 0x9a, 0x30, 0xed },
884  { 0x33, 0x9c, 0x00, 0xec },
885  { 0x33, 0x9e, 0x04, 0x05 },
886  { 0x33, 0x8c, 0x04, 0x90 },
887  { 0x33, 0x90, 0xe3, 0x02 },
888  { 0x33, 0x92, 0x18, 0x8f },
889  { 0x33, 0x94, 0xec, 0x00 },
890  { 0x33, 0x96, 0x18, 0xed },
891  { 0x33, 0x98, 0x00, 0xec },
892  { 0x33, 0x9a, 0x04, 0xc3 },
893  { 0x33, 0x9c, 0x00, 0x01 },
894  { 0x33, 0x9e, 0xed, 0x04 },
895  { 0x33, 0x8c, 0x04, 0xa0 },
896  { 0x33, 0x90, 0x83, 0x00 },
897  { 0x33, 0x92, 0x0f, 0x25 },
898  { 0x33, 0x94, 0xdc, 0xee },
899  { 0x33, 0x96, 0x02, 0xcc },
900  { 0x33, 0x98, 0x04, 0x00 },
901  { 0x33, 0x9a, 0xed, 0x04 },
902  { 0x33, 0x9c, 0xcc, 0x03 },
903  { 0x33, 0x9e, 0x03, 0xdd },
904  { 0x33, 0x8c, 0x04, 0xb0 },
905  { 0x33, 0x90, 0x52, 0x38 },
906  { 0x33, 0x92, 0x38, 0x38 },
907  { 0x33, 0x94, 0x39, 0x37 },
908  { 0x33, 0x96, 0x36, 0x8f },
909  { 0x33, 0x98, 0x30, 0xe3 },
910  { 0x33, 0x9a, 0x00, 0x8f },
911  { 0x33, 0x9c, 0x18, 0x8f },
912  { 0x33, 0x9e, 0x18, 0x30 },
913  { 0x33, 0x8c, 0x04, 0xc0 },
914  { 0x33, 0x90, 0x18, 0xe3 },
915  { 0x33, 0x92, 0x00, 0x18 },
916  { 0x33, 0x94, 0x8f, 0x32 },
917  { 0x33, 0x96, 0x33, 0x36 },
918  { 0x33, 0x98, 0xa6, 0x00 },
919  { 0x33, 0x9a, 0x18, 0xa7 },
920  { 0x33, 0x9c, 0x00, 0x09 },
921  { 0x33, 0x9e, 0x18, 0x09 },
922  { 0x33, 0x8c, 0x04, 0xd0 },
923  { 0x33, 0x90, 0xc0, 0x01 },
924  { 0x33, 0x92, 0x24, 0xf4 },
925  { 0x33, 0x94, 0x32, 0x80 },
926  { 0x33, 0x96, 0x01, 0x24 },
927  { 0x33, 0x98, 0xee, 0x39 },
928  { 0x33, 0x8c, 0x20, 0x03 },
929  { 0x33, 0x90, 0x04, 0x56 },
930  { 0x33, 0x8c, 0xa0, 0x02 },
931  { 0x33, 0x90, 0x00, 0x01 },
932  { 0x33, 0x8c, 0xa1, 0x04 },
933  { 0x33, 0x90, -1 },
934  { 0x34, 0xce, 0x81, 0x60 },
935  { 0x34, 0xd0, 0x66, 0x33 },
936  { 0x34, 0xd2, 0x31, 0x9a },
937  { 0x34, 0xd4, 0x94, 0x63 },
938  { 0x34, 0xd6, 0x4b, 0x25 },
939  { 0x34, 0xd8, 0x26, 0x70 },
940  { 0x34, 0xda, 0x72, 0x4c },
941  { 0x34, 0xdc, 0xff, 0x04 },
942  { 0x34, 0xde, 0x00, 0xf4 },
943  { 0x34, 0xe6, 0x00, 0xcc },
944  { 0x34, 0xee, 0x0e, 0x42 },
945  { 0x34, 0xf6, 0x0d, 0xb5 },
946  { 0x35, 0x00, 0x0a, 0xfa },
947  { 0x35, 0x08, 0x0f, 0x10 },
948  { 0x35, 0x10, 0x11, 0x22 },
949  { 0x35, 0x18, 0x0c, 0x28 },
950  { 0x35, 0x20, 0x1c, 0x2c },
951  { 0x35, 0x28, 0x17, 0x40 },
952  { 0x35, 0x30, 0x08, 0xf2 },
953  { 0x35, 0x38, 0xfb, 0xd5 },
954  { 0x35, 0x4c, 0x05, 0xc7 },
955  { 0x35, 0x44, 0x04, 0xf9 },
956  { 0x35, 0x5c, 0x05, 0xd0 },
957  { 0x35, 0x54, 0x05, 0xf4 },
958  { 0x34, 0xe0, 0x01, 0x05 },
959  { 0x34, 0xe8, 0x00, 0xa0 },
960  { 0x34, 0xf0, 0x0e, 0xa1 },
961  { 0x34, 0xf8, 0x0e, 0x01 },
962  { 0x35, 0x02, 0x0f, 0xeb },
963  { 0x35, 0x0a, 0x09, 0x0a },
964  { 0x35, 0x12, 0x10, 0x1e },
965  { 0x35, 0x1a, 0x08, 0x23 },
966  { 0x35, 0x22, 0x1c, 0x22 },
967  { 0x35, 0x2a, 0x07, 0x22 },
968  { 0x35, 0x32, 0x0b, 0x06 },
969  { 0x35, 0x3a, 0xf9, 0x16 },
970  { 0x35, 0x4e, 0x05, 0x9f },
971  { 0x35, 0x46, 0x05, 0x30 },
972  { 0x35, 0x5e, 0x06, 0x75 },
973  { 0x35, 0x56, 0x06, 0x5c },
974  { 0x34, 0xe4, 0x00, 0xc5 },
975  { 0x34, 0xec, 0x00, 0x48 },
976  { 0x34, 0xf4, 0x0f, 0x66 },
977  { 0x34, 0xfc, 0x0e, 0x61 },
978  { 0x35, 0x06, 0x1b, 0xdb },
979  { 0x35, 0x0e, 0x04, 0x0a },
980  { 0x35, 0x16, 0x11, 0x13 },
981  { 0x35, 0x1e, 0x08, 0x1f },
982  { 0x35, 0x26, 0x11, 0x19 },
983  { 0x35, 0x2e, 0xf8, 0x1a },
984  { 0x35, 0x36, 0x04, 0x0c },
985  { 0x35, 0x3e, 0xfa, 0x00 },
986  { 0x35, 0x52, 0x06, 0xf1 },
987  { 0x35, 0x4a, 0x04, 0x0e },
988  { 0x35, 0x62, 0x06, 0xa1 },
989  { 0x35, 0x5a, 0x06, 0x91 },
990  { 0x34, 0xe2, 0x00, 0xd2 },
991  { 0x34, 0xea, 0x00, 0x72 },
992  { 0x34, 0xf2, 0x0e, 0x1d },
993  { 0x34, 0xfa, 0x0e, 0x06 },
994  { 0x35, 0x04, 0x13, 0x0e },
995  { 0x35, 0x0c, 0x0f, 0x0d },
996  { 0x35, 0x14, 0x13, 0x1c },
997  { 0x35, 0x1c, 0x13, 0x29 },
998  { 0x35, 0x24, 0x0d, 0x24 },
999  { 0x35, 0x2c, 0xfd, 0x29 },
1000  { 0x35, 0x34, 0x07, 0xf4 },
1001  { 0x35, 0x3c, 0xee, 0xe7 },
1002  { 0x35, 0x50, 0x06, 0x50 },
1003  { 0x35, 0x48, 0x05, 0xc1 },
1004  { 0x35, 0x60, 0x06, 0x11 },
1005  { 0x35, 0x58, 0x06, 0x58 },
1006  { 0x35, 0x40, 0x00, 0x00 },
1007  { 0x35, 0x42, 0x00, 0x00 },
1008  { 0x32, 0x10, 0x01, 0xfc },
1009  { 0x33, 0x8c, 0xa3, 0x52 },
1010  { 0x33, 0x90, 0x00, 0x3c },
1011  { 0x33, 0x8c, 0xa1, 0x18 },
1012  { 0x33, 0x90, 0x00, 0x3c },
1013  { 0x33, 0x8c, 0xa1, 0x19 },
1014  { 0x33, 0x90, 0x00, 0x0a },
1015  { 0x33, 0x8c, 0xa7, 0x6d },
1016  { 0x33, 0x90, 0x00, 0x03 },
1017  { 0x33, 0x8c, 0xa7, 0x6e },
1018  { 0x33, 0x90, 0x00, 0x03 },
1019  { 0x33, 0x8c, 0xa7, 0x6f },
1020  { 0x33, 0x90, 0x00, 0x00 },
1021  { 0x33, 0x8c, 0xa7, 0x70 },
1022  { 0x33, 0x90, 0x00, 0x05 },
1023  { 0x33, 0x8c, 0xa7, 0x71 },
1024  { 0x33, 0x90, 0x00, 0x10 },
1025  { 0x33, 0x8c, 0xa7, 0x72 },
1026  { 0x33, 0x90, 0x00, 0x30 },
1027  { 0x33, 0x8c, 0xa7, 0x73 },
1028  { 0x33, 0x90, 0x00, 0x5b },
1029  { 0x33, 0x8c, 0xa7, 0x74 },
1030  { 0x33, 0x90, 0x00, 0x77 },
1031  { 0x33, 0x8c, 0xa7, 0x75 },
1032  { 0x33, 0x90, 0x00, 0x8e },
1033  { 0x33, 0x8c, 0xa7, 0x76 },
1034  { 0x33, 0x90, 0x00, 0xa0 },
1035  { 0x33, 0x8c, 0xa7, 0x77 },
1036  { 0x33, 0x90, 0x00, 0xaf },
1037  { 0x33, 0x8c, 0xa7, 0x78 },
1038  { 0x33, 0x90, 0x00, 0xbc },
1039  { 0x33, 0x8c, 0xa7, 0x79 },
1040  { 0x33, 0x90, 0x00, 0xc7 },
1041  { 0x33, 0x8c, 0xa7, 0x7a },
1042  { 0x33, 0x90, 0x00, 0xd0 },
1043  { 0x33, 0x8c, 0xa7, 0x7b },
1044  { 0x33, 0x90, 0x00, 0xd9 },
1045  { 0x33, 0x8c, 0xa7, 0x7c },
1046  { 0x33, 0x90, 0x00, 0xe0 },
1047  { 0x33, 0x8c, 0xa7, 0x7d },
1048  { 0x33, 0x90, 0x00, 0xe8 },
1049  { 0x33, 0x8c, 0xa7, 0x7e },
1050  { 0x33, 0x90, 0x00, 0xee },
1051  { 0x33, 0x8c, 0xa7, 0x7f },
1052  { 0x33, 0x90, 0x00, 0xf4 },
1053  { 0x33, 0x8c, 0xa7, 0x80 },
1054  { 0x33, 0x90, 0x00, 0xfa },
1055  { 0x33, 0x8c, 0xa7, 0x81 },
1056  { 0x33, 0x90, 0x00, 0xff },
1057  { 0x33, 0x8c, 0xa7, 0x82 },
1058  { 0x33, 0x90, 0x00, 0x00 },
1059  { 0x33, 0x8c, 0xa7, 0x83 },
1060  { 0x33, 0x90, 0x00, 0x05 },
1061  { 0x33, 0x8c, 0xa7, 0x84 },
1062  { 0x33, 0x90, 0x00, 0x10 },
1063  { 0x33, 0x8c, 0xa7, 0x85 },
1064  { 0x33, 0x90, 0x00, 0x30 },
1065  { 0x33, 0x8c, 0xa7, 0x86 },
1066  { 0x33, 0x90, 0x00, 0x5b },
1067  { 0x33, 0x8c, 0xa7, 0x87 },
1068  { 0x33, 0x90, 0x00, 0x77 },
1069  { 0x33, 0x8c, 0xa7, 0x88 },
1070  { 0x33, 0x90, 0x00, 0x8e },
1071  { 0x33, 0x8c, 0xa7, 0x89 },
1072  { 0x33, 0x90, 0x00, 0xa0 },
1073  { 0x33, 0x8c, 0xa7, 0x8a },
1074  { 0x33, 0x90, 0x00, 0xaf },
1075  { 0x33, 0x8c, 0xa7, 0x8b },
1076  { 0x33, 0x90, 0x00, 0xbc },
1077  { 0x33, 0x8c, 0xa7, 0x8c },
1078  { 0x33, 0x90, 0x00, 0xc7 },
1079  { 0x33, 0x8c, 0xa7, 0x8d },
1080  { 0x33, 0x90, 0x00, 0xd0 },
1081  { 0x33, 0x8c, 0xa7, 0x8e },
1082  { 0x33, 0x90, 0x00, 0xd9 },
1083  { 0x33, 0x8c, 0xa7, 0x8f },
1084  { 0x33, 0x90, 0x00, 0xe0 },
1085  { 0x33, 0x8c, 0xa7, 0x90 },
1086  { 0x33, 0x90, 0x00, 0xe8 },
1087  { 0x33, 0x8c, 0xa7, 0x91 },
1088  { 0x33, 0x90, 0x00, 0xee },
1089  { 0x33, 0x8c, 0xa7, 0x92 },
1090  { 0x33, 0x90, 0x00, 0xf4 },
1091  { 0x33, 0x8c, 0xa7, 0x93 },
1092  { 0x33, 0x90, 0x00, 0xfa },
1093  { 0x33, 0x8c, 0xa7, 0x94 },
1094  { 0x33, 0x90, 0x00, 0xff },
1095  { 0x33, 0x8c, 0xa1, 0x03 },
1096  { 0x33, 0x90, 0x00, 0x05 },
1097  { 0x33, 0x8c, 0xa1, 0x04 },
1098  { 0x33, 0x90, -1 },
1099  { 0x33, 0x8c, 0xa2, 0x06 },
1100  { 0x33, 0x90, 0x00, 0x50 },
1101  { 0x33, 0x8c, 0x27, 0x03 },
1102  { 0x33, 0x90, 0x02, 0x82 },
1103  { 0x33, 0x8c, 0x27, 0x05 },
1104  { 0x33, 0x90, 0x01, 0xe2 },
1105  { 0x33, 0x8c, 0x27, 0x07 },
1106  { 0x33, 0x90, 0x05, 0x02 },
1107  { 0x33, 0x8c, 0x27, 0x09 },
1108  { 0x33, 0x90, 0x04, 0x02 },
1109  { 0x33, 0x8c, 0x27, 0x0d },
1110  { 0x33, 0x90, 0x00, 0x00 },
1111  { 0x33, 0x8c, 0x27, 0x0f },
1112  { 0x33, 0x90, 0x00, 0x00 },
1113  { 0x33, 0x8c, 0x27, 0x11 },
1114  { 0x33, 0x90, 0x04, 0xbd },
1115  { 0x33, 0x8c, 0x27, 0x13 },
1116  { 0x33, 0x90, 0x06, 0x4d },
1117  { 0x33, 0x8c, 0x27, 0x15 },
1118  { 0x33, 0x90, 0x04, 0x00 },
1119  { 0x33, 0x8c, 0x27, 0x17 },
1120  { 0x33, 0x90, 0x21, 0x11 },
1121  { 0x33, 0x8c, 0x27, 0x19 },
1122  { 0x33, 0x90, 0x04, 0x6c },
1123  { 0x33, 0x8c, 0x27, 0x1b },
1124  { 0x33, 0x90, 0x02, 0x4f },
1125  { 0x33, 0x8c, 0x27, 0x1d },
1126  { 0x33, 0x90, 0x01, 0x02 },
1127  { 0x33, 0x8c, 0x27, 0x1f },
1128  { 0x33, 0x90, 0x02, 0x79 },
1129  { 0x33, 0x8c, 0x27, 0x21 },
1130  { 0x33, 0x90, 0x01, 0x55 },
1131  { 0x33, 0x8c, 0x27, 0x23 },
1132  { 0x33, 0x90, 0x03, 0x5b },
1133  { 0x33, 0x8c, 0x27, 0x25 },
1134  { 0x33, 0x90, 0x06, 0x0f },
1135  { 0x33, 0x8c, 0x27, 0x27 },
1136  { 0x33, 0x90, 0x20, 0x20 },
1137  { 0x33, 0x8c, 0x27, 0x29 },
1138  { 0x33, 0x90, 0x20, 0x20 },
1139  { 0x33, 0x8c, 0x27, 0x2b },
1140  { 0x33, 0x90, 0x10, 0x20 },
1141  { 0x33, 0x8c, 0x27, 0x2d },
1142  { 0x33, 0x90, 0x20, 0x07 },
1143  { 0x33, 0x8c, 0x27, 0x2f },
1144  { 0x33, 0x90, 0x00, 0x04 },
1145  { 0x33, 0x8c, 0x27, 0x31 },
1146  { 0x33, 0x90, 0x00, 0x04 },
1147  { 0x33, 0x8c, 0x27, 0x33 },
1148  { 0x33, 0x90, 0x04, 0xbb },
1149  { 0x33, 0x8c, 0x27, 0x35 },
1150  { 0x33, 0x90, 0x06, 0x4b },
1151  { 0x33, 0x8c, 0x27, 0x37 },
1152  { 0x33, 0x90, 0x04, 0xce },
1153  { 0x33, 0x8c, 0x27, 0x39 },
1154  { 0x33, 0x90, 0x21, 0x11 },
1155  { 0x33, 0x8c, 0x27, 0x3b },
1156  { 0x33, 0x90, 0x00, 0x24 },
1157  { 0x33, 0x8c, 0x27, 0x3d },
1158  { 0x33, 0x90, 0x01, 0x20 },
1159  { 0x33, 0x8c, 0x27, 0x41 },
1160  { 0x33, 0x90, 0x01, 0x69 },
1161  { 0x33, 0x8c, 0x27, 0x45 },
1162  { 0x33, 0x90, 0x04, 0xff },
1163  { 0x33, 0x8c, 0x27, 0x47 },
1164  { 0x33, 0x90, 0x08, 0x24 },
1165  { 0x33, 0x8c, 0x27, 0x51 },
1166  { 0x33, 0x90, 0x00, 0x00 },
1167  { 0x33, 0x8c, 0x27, 0x53 },
1168  { 0x33, 0x90, 0x03, 0x20 },
1169  { 0x33, 0x8c, 0x27, 0x55 },
1170  { 0x33, 0x90, 0x00, 0x00 },
1171  { 0x33, 0x8c, 0x27, 0x57 },
1172  { 0x33, 0x90, 0x02, 0x58 },
1173  { 0x33, 0x8c, 0x27, 0x5f },
1174  { 0x33, 0x90, 0x00, 0x00 },
1175  { 0x33, 0x8c, 0x27, 0x61 },
1176  { 0x33, 0x90, 0x06, 0x40 },
1177  { 0x33, 0x8c, 0x27, 0x63 },
1178  { 0x33, 0x90, 0x00, 0x00 },
1179  { 0x33, 0x8c, 0x27, 0x65 },
1180  { 0x33, 0x90, 0x04, 0xb0 },
1181  { 0x33, 0x8c, 0x22, 0x2e },
1182  { 0x33, 0x90, 0x00, 0xd7 },
1183  { 0x33, 0x8c, 0xa4, 0x08 },
1184  { 0x33, 0x90, 0x00, 0x2a },
1185  { 0x33, 0x8c, 0xa4, 0x09 },
1186  { 0x33, 0x90, 0x00, 0x2c },
1187  { 0x33, 0x8c, 0xa4, 0x0a },
1188  { 0x33, 0x90, 0x00, 0x32 },
1189  { 0x33, 0x8c, 0xa4, 0x0b },
1190  { 0x33, 0x90, 0x00, 0x34 },
1191  { 0x33, 0x8c, 0x24, 0x11 },
1192  { 0x33, 0x90, 0x00, 0xd7 },
1193  { 0x33, 0x8c, 0x24, 0x13 },
1194  { 0x33, 0x90, 0x01, 0x02 },
1195  { 0x33, 0x8c, 0x24, 0x15 },
1196  { 0x33, 0x90, 0x00, 0xa0 },
1197  { 0x33, 0x8c, 0x24, 0x17 },
1198  { 0x33, 0x90, 0x00, 0xc0 },
1199  { 0x33, 0x8c, 0x27, 0x99 },
1200  { 0x33, 0x90, 0x64, 0x08 },
1201  { 0x33, 0x8c, 0x27, 0x9b },
1202  { 0x33, 0x90, 0x64, 0x08 },
1203  { 0x33, 0x8c, 0xa2, 0x0c },
1204  { 0x33, 0x90, 0x00, 0x18 },
1205  { 0x33, 0x8c, 0xa2, 0x14 },
1206  { 0x33, 0x90, 0x00, 0x24 },
1207  { 0x33, 0x8c, 0xa2, 0x15 },
1208  { 0x33, 0x90, 0x00, 0x04 },
1209  { 0x33, 0x8c, 0xa2, 0x0d },
1210  { 0x33, 0x90, 0x00, 0x30 },
1211  { 0x33, 0x8c, 0xa2, 0x0e },
1212  { 0x33, 0x90, 0x00, 0x80 },
1213  { 0x33, 0x8c, 0xa1, 0x03 },
1214  { 0x33, 0x90, 0x00, 0x05 },
1215  { 0x33, 0x8c, 0xa1, 0x04 },
1216  { 0x33, 0x90, -1 },
1217  { 0x33, 0x8c, 0xa1, 0x03 },
1218  { 0x33, 0x90, 0x00, 0x06 },
1219  { 0x33, 0x8c, 0xa1, 0x04 },
1220  { 0x33, 0x90, -1 },
1221  { 0x33, 0x8c, 0xa1, 0x30 },
1222  { 0x33, 0x90, 0x00, 0x04 },
1223  { 0x33, 0x8c, 0xa1, 0x15 },
1224  { 0x33, 0x90, 0x00, 0xef },
1225  { 0x33, 0x8c, 0xa1, 0x16 },
1226  { 0x33, 0x90, 0x00, 0x30 },
1227  { 0x33, 0x8c, 0xa1, 0x17 },
1228  { 0x33, 0x90, 0x00, 0x55 },
1229  { 0x33, 0x8c, 0xa1, 0x18 },
1230  { 0x33, 0x90, 0x00, 0x5a },
1231  { 0x33, 0x8c, 0xa1, 0x19 },
1232  { 0x33, 0x90, 0x00, 0x28 },
1233  { 0x33, 0x8c, 0xa1, 0x1a },
1234  { 0x33, 0x90, 0x00, 0x08 },
1235  { 0x33, 0x8c, 0xa1, 0x1b },
1236  { 0x33, 0x90, 0x00, 0x1e },
1237  { 0x33, 0x8c, 0xa1, 0x1c },
1238  { 0x33, 0x90, 0x00, 0x02 },
1239  { 0x33, 0x8c, 0xa1, 0x1d },
1240  { 0x33, 0x90, 0x00, 0x00 },
1241  { 0x33, 0x8c, 0xa1, 0x1e },
1242  { 0x33, 0x90, 0x00, 0x00 },
1243  { 0x33, 0x8c, 0xa1, 0x1f },
1244  { 0x33, 0x90, 0x00, 0x04 },
1245  { 0x33, 0x8c, 0xab, 0x05 },
1246  { 0x33, 0x90, 0x00, 0x00 },
1247  { 0x33, 0x8c, 0xa7, 0x6d },
1248  { 0x33, 0x90, 0x00, 0x03 },
1249  { 0x33, 0x8c, 0xa7, 0x6e },
1250  { 0x33, 0x90, 0x00, 0x03 },
1251  { 0x33, 0x8c, 0xa7, 0x6f },
1252  { 0x33, 0x90, 0x00, 0x00 },
1253  { 0x33, 0x8c, 0xa7, 0x70 },
1254  { 0x33, 0x90, 0x00, 0x15 },
1255  { 0x33, 0x8c, 0xa7, 0x71 },
1256  { 0x33, 0x90, 0x00, 0x25 },
1257  { 0x33, 0x8c, 0xa7, 0x72 },
1258  { 0x33, 0x90, 0x00, 0x3f },
1259  { 0x33, 0x8c, 0xa7, 0x73 },
1260  { 0x33, 0x90, 0x00, 0x64 },
1261  { 0x33, 0x8c, 0xa7, 0x74 },
1262  { 0x33, 0x90, 0x00, 0x80 },
1263  { 0x33, 0x8c, 0xa7, 0x75 },
1264  { 0x33, 0x90, 0x00, 0x97 },
1265  { 0x33, 0x8c, 0xa7, 0x76 },
1266  { 0x33, 0x90, 0x00, 0xa9 },
1267  { 0x33, 0x8c, 0xa7, 0x77 },
1268  { 0x33, 0x90, 0x00, 0xba },
1269  { 0x33, 0x8c, 0xa7, 0x78 },
1270  { 0x33, 0x90, 0x00, 0xc7 },
1271  { 0x33, 0x8c, 0xa7, 0x79 },
1272  { 0x33, 0x90, 0x00, 0xd2 },
1273  { 0x33, 0x8c, 0xa7, 0x7a },
1274  { 0x33, 0x90, 0x00, 0xdc },
1275  { 0x33, 0x8c, 0xa7, 0x7b },
1276  { 0x33, 0x90, 0x00, 0xe4 },
1277  { 0x33, 0x8c, 0xa7, 0x7c },
1278  { 0x33, 0x90, 0x00, 0xea },
1279  { 0x33, 0x8c, 0xa7, 0x7d },
1280  { 0x33, 0x90, 0x00, 0xf0 },
1281  { 0x33, 0x8c, 0xa7, 0x7e },
1282  { 0x33, 0x90, 0x00, 0xf4 },
1283  { 0x33, 0x8c, 0xa7, 0x7f },
1284  { 0x33, 0x90, 0x00, 0xf8 },
1285  { 0x33, 0x8c, 0xa7, 0x80 },
1286  { 0x33, 0x90, 0x00, 0xfc },
1287  { 0x33, 0x8c, 0xa7, 0x81 },
1288  { 0x33, 0x90, 0x00, 0xff },
1289  { 0x33, 0x8c, 0xa7, 0x82 },
1290  { 0x33, 0x90, 0x00, 0x00 },
1291  { 0x33, 0x8c, 0xa7, 0x83 },
1292  { 0x33, 0x90, 0x00, 0x15 },
1293  { 0x33, 0x8c, 0xa7, 0x84 },
1294  { 0x33, 0x90, 0x00, 0x25 },
1295  { 0x33, 0x8c, 0xa7, 0x85 },
1296  { 0x33, 0x90, 0x00, 0x3f },
1297  { 0x33, 0x8c, 0xa7, 0x86 },
1298  { 0x33, 0x90, 0x00, 0x64 },
1299  { 0x33, 0x8c, 0xa7, 0x87 },
1300  { 0x33, 0x90, 0x00, 0x80 },
1301  { 0x33, 0x8c, 0xa7, 0x88 },
1302  { 0x33, 0x90, 0x00, 0x97 },
1303  { 0x33, 0x8c, 0xa7, 0x89 },
1304  { 0x33, 0x90, 0x00, 0xa9 },
1305  { 0x33, 0x8c, 0xa7, 0x8a },
1306  { 0x33, 0x90, 0x00, 0xba },
1307  { 0x33, 0x8c, 0xa7, 0x8b },
1308  { 0x33, 0x90, 0x00, 0xc7 },
1309  { 0x33, 0x8c, 0xa7, 0x8c },
1310  { 0x33, 0x90, 0x00, 0xd2 },
1311  { 0x33, 0x8c, 0xa7, 0x8d },
1312  { 0x33, 0x90, 0x00, 0xdc },
1313  { 0x33, 0x8c, 0xa7, 0x8e },
1314  { 0x33, 0x90, 0x00, 0xe4 },
1315  { 0x33, 0x8c, 0xa7, 0x8f },
1316  { 0x33, 0x90, 0x00, 0xea },
1317  { 0x33, 0x8c, 0xa7, 0x90 },
1318  { 0x33, 0x90, 0x00, 0xf0 },
1319  { 0x33, 0x8c, 0xa7, 0x91 },
1320  { 0x33, 0x90, 0x00, 0xf4 },
1321  { 0x33, 0x8c, 0xa7, 0x92 },
1322  { 0x33, 0x90, 0x00, 0xf8 },
1323  { 0x33, 0x8c, 0xa7, 0x93 },
1324  { 0x33, 0x90, 0x00, 0xfc },
1325  { 0x33, 0x8c, 0xa7, 0x94 },
1326  { 0x33, 0x90, 0x00, 0xff },
1327  { 0x33, 0x8c, 0xa1, 0x03 },
1328  { 0x33, 0x90, 0x00, 0x06 },
1329  { 0x33, 0x8c, 0xa1, 0x04 },
1330  { 0x33, 0x90, -1 },
1331  { 0x35, 0xa4, 0x05, 0x96 },
1332  { 0x33, 0x8c, 0xa1, 0x18 },
1333  { 0x33, 0x90, 0x00, 0x1e },
1334  { 0x33, 0x8c, 0xa1, 0x19 },
1335  { 0x33, 0x90, 0x00, 0x04 },
1336  { 0x33, 0x8c, 0xa1, 0x1a },
1337  { 0x33, 0x90, 0x00, 0x0a },
1338  { 0x33, 0x8c, 0xa1, 0x1b },
1339  { 0x33, 0x90, 0x00, 0x20 },
1340  { 0x33, 0x8c, 0xa1, 0x3e },
1341  { 0x33, 0x90, 0x00, 0x04 },
1342  { 0x33, 0x8c, 0xa1, 0x3f },
1343  { 0x33, 0x90, 0x00, 0x0e },
1344  { 0x33, 0x8c, 0xa1, 0x40 },
1345  { 0x33, 0x90, 0x00, 0x04 },
1346  { 0x33, 0x8c, 0xa1, 0x41 },
1347  { 0x33, 0x90, 0x00, 0x04 },
1348  { 0x33, 0x8c, 0xa1, 0x42 },
1349  { 0x33, 0x90, 0x00, 0x32 },
1350  { 0x33, 0x8c, 0xa1, 0x43 },
1351  { 0x33, 0x90, 0x00, 0x0f },
1352  { 0x33, 0x8c, 0xa1, 0x44 },
1353  { 0x33, 0x90, 0x00, 0x32 },
1354  { 0x33, 0x8c, 0xa1, 0x45 },
1355  { 0x33, 0x90, 0x00, 0x32 },
1356  { 0x33, 0x8c, 0xa1, 0x46 },
1357  { 0x33, 0x90, 0x00, 0x05 },
1358  { 0x33, 0x8c, 0xa1, 0x04 },
1359  { 0x33, 0x90, -1 },
1360  { 0x33, 0x8c, 0xa1, 0x47 },
1361  { 0x33, 0x90, 0x00, 0x3a },
1362  { 0x33, 0x8c, 0x27, 0x95 },
1363  { 0x33, 0x90, 0x01, 0x00 },
1364  { 0x33, 0x8c, 0xa1, 0x03 },
1365  { 0x33, 0x90, 0x00, 0x05 },
1366  { 0x33, 0x8c, 0xa1, 0x04 },
1367  { 0x33, 0x90, -1 },
1368  { 0x33, 0x8c, 0x27, 0x97 },
1369  { 0x33, 0x90, 0x01, 0x00 },
1370  { 0x33, 0x8c, 0xa1, 0x03 },
1371  { 0x33, 0x90, 0x00, 0x05 },
1372  { 0x33, 0x8c, 0xa1, 0x04 },
1373  { 0x33, 0x90, -1 },
1374  { 0x33, 0x8c, 0xa4, 0x04 },
1375  { 0x33, 0x90, 0x00, 0x80 },
1376  { 0x33, 0x8c, 0xa1, 0x03 },
1377  { 0x33, 0x90, 0x00, 0x05 },
1378  { 0x33, 0x8c, 0xa1, 0x04 },
1379  { 0x33, 0x90 }
1380  };
1381 
1382 
1383  asize = ARRAY_SIZE(values_205);
1384 
1385  for(i=0; i<asize; i++) {
1386  usb_stk11xx_read_registry(dev, 0x02ff, &value);
1387  usb_stk11xx_write_registry(dev, 0x02ff, 0x0001);
1388 
1389  usb_stk11xx_write_registry(dev, 0x0205, values_205[i][0]);
1390  usb_stk11xx_write_registry(dev, 0x0205, values_205[i][1]);
1391 
1392  if (values_205[i][2] == -1) {
1393  usb_stk11xx_write_registry(dev, 0x0200, 0x0061);
1394 
1395  retok = dev_stk11xx_check_device(dev, 500);
1396 
1397  usb_stk11xx_read_registry(dev, 0x0209, &value);
1398  usb_stk11xx_write_registry(dev, 0x0200, 0x0020);
1399 
1400  retok = dev_stk11xx_check_device(dev, 500);
1401 
1402  usb_stk11xx_read_registry(dev, 0x0209, &value);
1403  }
1404  else {
1405  usb_stk11xx_write_registry(dev, 0x0205, values_205[i][2]);
1406  usb_stk11xx_write_registry(dev, 0x0205, values_205[i][3]);
1407  usb_stk11xx_write_registry(dev, 0x0200, 0x0001);
1408 
1409  retok = dev_stk11xx_check_device(dev, 500);
1410  }
1411 
1412  usb_stk11xx_write_registry(dev, 0x02ff, 0x0001);
1413  }
1414 
1415  return 0;
1416 }
1417 
1418 
1433 {
1434  return 0;
1435 }
1436 
1437 
1452 {
1453  int ret;
1454  int value;
1455 
1456  // Contrast register
1457  usb_stk11xx_read_registry(dev, 0x02ff, &value);
1458  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
1459 
1460  usb_stk11xx_write_registry(dev, 0x0204, 0x00b3);
1461  usb_stk11xx_write_registry(dev, 0x0205, (dev->vsettings.contrast >> 8));
1462 
1463  usb_stk11xx_write_registry(dev, 0x0200, 0x0001);
1464  ret = dev_stk11xx_check_device(dev, 500);
1465  usb_stk11xx_write_registry(dev, 0x02ff, 0x0000);
1466 
1467  STK_DEBUG("Set colour : %d\n", dev->vsettings.colour);
1468  STK_DEBUG("Set contrast : %d\n", dev->vsettings.contrast);
1469  STK_DEBUG("Set whiteness : %d\n", dev->vsettings.whiteness);
1470  STK_DEBUG("Set brightness : %d\n", dev->vsettings.brightness);
1471 
1472  return 0;
1473 }
1474 
1475 
1486 {
1487  return 0;
1488 }
1489 
1490 
1502 {
1503  int value;
1504  int value_116, value_117;
1505 
1506  usb_stk11xx_read_registry(dev, 0x0116, &value_116);
1507  usb_stk11xx_read_registry(dev, 0x0117, &value_117);
1508 
1509  usb_stk11xx_write_registry(dev, 0x0116, 0x0000);
1510  usb_stk11xx_write_registry(dev, 0x0117, 0x0000);
1511 
1512  usb_stk11xx_read_registry(dev, 0x0100, &value); // read 0x21
1513  usb_stk11xx_write_registry(dev, 0x0100, 0x00a0);
1514 
1515  usb_stk11xx_write_registry(dev, 0x0116, value_116);
1516  usb_stk11xx_write_registry(dev, 0x0117, value_117);
1517 
1518  return 0;
1519 }
1520 
1521 
1532 {
1534 
1536 
1537  return 0;
1538 }
1539 
1540 
1552 {
1553  return 0;
1554 }
1555 
dev_stk6a51_set_camera_fps
int dev_stk6a51_set_camera_fps(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
Definition: stk11xx-dev-6a51.c:1485
dev_stk11xx_camera_off
int dev_stk11xx_camera_off(struct usb_stk11xx *dev)
This function switchs off the camera.
Definition: stk11xx-dev.c:264
stk11xx_video::brightness
int brightness
Definition: stk11xx.h:278
stk11xx.h
Driver for Syntek USB video camera.
dev_stk6a51_stop_stream
int dev_stk6a51_stop_stream(struct usb_stk11xx *dev)
This function sets the device to stop the stream.
Definition: stk11xx-dev-6a51.c:1551
STK_DEBUG
#define STK_DEBUG(str, args...)
Definition: stk11xx.h:149
dev_stk6a51_configure_device
int dev_stk6a51_configure_device(struct usb_stk11xx *dev, int step)
This function permits to configure the device.
Definition: stk11xx-dev-6a51.c:335
stk11xx_video::colour
int colour
Definition: stk11xx.h:281
dev_stk6a51_set_camera_quality
int dev_stk6a51_set_camera_quality(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
Definition: stk11xx-dev-6a51.c:1451
dev_stk11xx_camera_settings
int dev_stk11xx_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
Definition: stk11xx-dev.c:342
dev_stk6a51_initialize_device
int dev_stk6a51_initialize_device(struct usb_stk11xx *dev)
This function permits to initialize the device.
Definition: stk11xx-dev-6a51.c:70
dev_stk6a51_reconf_camera
int dev_stk6a51_reconf_camera(struct usb_stk11xx *dev)
Reconfigure the camera before the stream.
Definition: stk11xx-dev-6a51.c:1531
usb_stk11xx_set_feature
int usb_stk11xx_set_feature(struct usb_stk11xx *dev, int index)
Send the message SET_FEATURE and choose the interface.
Definition: stk11xx-usb.c:474
usb_stk11xx_write_registry
int usb_stk11xx_write_registry(struct usb_stk11xx *dev, __u16 index, __u16 value)
Write a 16-bits value to a 16-bits register.
Definition: stk11xx-usb.c:540
dev_stk6a51_sensor_settings
int dev_stk6a51_sensor_settings(struct usb_stk11xx *dev)
This function permits to set default sensor settings.
Definition: stk11xx-dev-6a51.c:781
dev_stk6a51_camera_settings
int dev_stk6a51_camera_settings(struct usb_stk11xx *dev)
This function permits to modify the settings of the camera.
Definition: stk11xx-dev-6a51.c:1432
usb_stk11xx_read_registry
int usb_stk11xx_read_registry(struct usb_stk11xx *dev, __u16 index, int *value)
Read a 16-bits value from a 16-bits register.
Definition: stk11xx-usb.c:572
STK_INFO
#define STK_INFO(str, args...)
Definition: stk11xx.h:146
stk11xx_video::contrast
int contrast
Definition: stk11xx.h:279
dev_stk6a51_camera_asleep
int dev_stk6a51_camera_asleep(struct usb_stk11xx *dev)
Wake-up the camera.
Definition: stk11xx-dev-6a51.c:718
usb_stk11xx
Definition: stk11xx.h:301
usb_stk11xx::vsettings
struct stk11xx_video vsettings
Definition: stk11xx.h:319
dev_stk6a51_start_stream
int dev_stk6a51_start_stream(struct usb_stk11xx *dev)
This function sets the device to start the stream.
Definition: stk11xx-dev-6a51.c:1501
stk11xx-dev.h
Driver for Syntek USB video camera.
stk11xx_video::whiteness
int whiteness
Definition: stk11xx.h:280
dev_stk11xx_check_device
int dev_stk11xx_check_device(struct usb_stk11xx *dev, int nbr)
This function permits to check the device in reading the register 0x0201.
Definition: stk11xx-dev.c:170
dev_stk6a51_init_camera
int dev_stk6a51_init_camera(struct usb_stk11xx *dev)
This function initializes the device for the stream.
Definition: stk11xx-dev-6a51.c:750