Lines Matching +full:0 +full:xa0

14 0x10	high nibble red gain low nibble blue gain
15 0x11 low nibble green gain
17 0x05 red gain 0-127
18 0x06 blue gain 0-127
19 0x07 green gain 0-127
21 0x08-0x0f i2c / 3wire registers
22 0x12 hstart
23 0x13 vstart
24 0x15 hsize (hsize = register-value * 16)
25 0x16 vsize (vsize = register-value * 16)
26 0x17 bit 0 toggle compression quality (according to sn9c102 driver)
27 0x18 bit 7 enables compression, bit 4-5 set image down scaling:
29 0x19 high-nibble is sensor clock divider, changes exposure on sensors which
31 0x1c auto_exposure area (for avg_lum) startx (startx = register-value * 32)
32 0x1d auto_exposure area (for avg_lum) starty (starty = register-value * 32)
33 0x1e auto_exposure area (for avg_lum) stopx (hsize = (0x1e - 0x1c) * 32)
34 0x1f auto_exposure area (for avg_lum) stopy (vsize = (0x1f - 0x1d) * 32)
63 #define BRIDGE_101 0
64 #define BRIDGE_102 0 /* We make no difference between 101 and 102 */
68 #define SENSOR_HV7131D 0
91 #define F_SIF 0x01 /* sif or vga */
94 #define MODE_RAW 0x10 /* raw bayer mode */
95 #define MODE_REDUCED_SIF 0x20 /* vga mode (320x240 / 160x120) on sif cam */
97 #define COMP 0xc7 /* 0x87 //0x07 */
98 #define COMP1 0xc9 /* 0x89 //0x09 */
100 #define MCK_INIT 0x63
101 #define MCK_INIT1 0x20 /*fixme: Bayer - 0x50 for JPEG ??*/
103 #define SYS_CLK 0x04
139 .priv = 0},
166 .priv = 0 | MODE_REDUCED_SIF},
171 .priv = 0},
175 0x04, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x11, 0x00, 0x00, 0x00,
176 0x00, 0x00,
177 0x00, 0x00, 0x00, 0x02, 0x02, 0x00,
178 0x28, 0x1e, 0x60, 0x8e, 0x42,
181 {0xa0, 0x11, 0x01, 0x04, 0x00, 0x00, 0x00, 0x17},
182 {0xa0, 0x11, 0x02, 0x00, 0x00, 0x00, 0x00, 0x17},
183 {0xa0, 0x11, 0x28, 0x00, 0x00, 0x00, 0x00, 0x17},
184 {0xa0, 0x11, 0x30, 0x30, 0x00, 0x00, 0x00, 0x17}, /* reset level */
185 {0xa0, 0x11, 0x34, 0x02, 0x00, 0x00, 0x00, 0x17}, /* pixel bias volt */
189 0x46, 0x77, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x11, 0x00, 0x00, 0x00,
190 0x00, 0x00,
191 0x00, 0x00, 0x00, 0x02, 0x01, 0x00,
192 0x28, 0x1e, 0x60, 0x8a, 0x20,
195 {0xc0, 0x11, 0x31, 0x38, 0x2a, 0x2e, 0x00, 0x10},
196 {0xa0, 0x11, 0x01, 0x08, 0x2a, 0x2e, 0x00, 0x10},
197 {0xb0, 0x11, 0x20, 0x00, 0xd0, 0x2e, 0x00, 0x10},
198 {0xc0, 0x11, 0x25, 0x03, 0x0e, 0x28, 0x00, 0x16},
199 {0xa0, 0x11, 0x30, 0x10, 0x0e, 0x28, 0x00, 0x15},
202 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
203 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
204 0x00, 0x01, 0x01, 0x0a, 0x16, 0x12, 0x68, 0x8b,
205 0x10,
213 {0xa0, 0x60, 0x12, 0x80, 0x00, 0x00, 0x00, 0x10},
214 /* Set clock register 0x11 low nibble is clock divider */
215 {0xd0, 0x60, 0x11, 0xc0, 0x1b, 0x18, 0xc1, 0x10},
217 {0xb0, 0x60, 0x15, 0x00, 0x02, 0x18, 0xc1, 0x10},
218 /* {0xa0, 0x60, 0x1b, 0x01, 0x02, 0x18, 0xc1, 0x10},
222 {0xd0, 0x60, 0x26, 0x01, 0x14, 0xd8, 0xa4, 0x10}, /* format out? */
223 {0xd0, 0x60, 0x26, 0x01, 0x14, 0xd8, 0xa4, 0x10},
224 {0xa0, 0x60, 0x30, 0x3d, 0x0a, 0xd8, 0xa4, 0x10},
226 {0xa0, 0x60, 0x61, 0x08, 0x00, 0x00, 0x00, 0x10},
227 /* HDG: Note windows uses the line below, which sets both register 0x60
228 and 0x61 I believe these registers of the ov6650 are identical as
233 {0xb0, 0x60, 0x60, 0x66, 0x68, 0xd8, 0xa4, 0x10}, */
235 {0xa0, 0x60, 0x68, 0x04, 0x68, 0xd8, 0xa4, 0x10},
236 {0xd0, 0x60, 0x17, 0x24, 0xd6, 0x04, 0x94, 0x10}, /* Clipreg */
240 0x04, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* r01 .. r08 */
241 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* r09 .. r10 */
242 0x00, 0x01, 0x01, 0x0a, /* r11 .. r14 */
243 0x28, 0x1e, /* H & V sizes r15 .. r16 */
244 0x68, 0x8f, MCK_INIT1, /* r17 .. r19 */
247 {0xa0, 0x21, 0x12, 0x80, 0x00, 0x00, 0x00, 0x10},
248 {0xb0, 0x21, 0x01, 0x77, 0x3a, 0x00, 0x00, 0x10},
249 /* {0xd0, 0x21, 0x12, 0x7c, 0x01, 0x80, 0x34, 0x10}, jfm */
250 {0xd0, 0x21, 0x12, 0x5c, 0x00, 0x80, 0x34, 0x10}, /* jfm */
251 {0xa0, 0x21, 0x1b, 0x04, 0x00, 0x80, 0x34, 0x10},
252 {0xa0, 0x21, 0x20, 0x44, 0x00, 0x80, 0x34, 0x10},
253 {0xa0, 0x21, 0x23, 0xee, 0x00, 0x80, 0x34, 0x10},
254 {0xd0, 0x21, 0x26, 0xa0, 0x9a, 0xa0, 0x30, 0x10},
255 {0xb0, 0x21, 0x2a, 0x80, 0x00, 0xa0, 0x30, 0x10},
256 {0xb0, 0x21, 0x2f, 0x3d, 0x24, 0xa0, 0x30, 0x10},
257 {0xa0, 0x21, 0x32, 0x86, 0x24, 0xa0, 0x30, 0x10},
258 {0xb0, 0x21, 0x60, 0xa9, 0x4a, 0xa0, 0x30, 0x10},
259 /* {0xb0, 0x21, 0x60, 0xa9, 0x42, 0xa0, 0x30, 0x10}, * jfm */
260 {0xa0, 0x21, 0x65, 0x00, 0x42, 0xa0, 0x30, 0x10},
261 {0xa0, 0x21, 0x69, 0x38, 0x42, 0xa0, 0x30, 0x10},
262 {0xc0, 0x21, 0x6f, 0x88, 0x0b, 0x00, 0x30, 0x10},
263 {0xc0, 0x21, 0x74, 0x21, 0x8e, 0x00, 0x30, 0x10},
264 {0xa0, 0x21, 0x7d, 0xf7, 0x8e, 0x00, 0x30, 0x10},
265 {0xd0, 0x21, 0x17, 0x1c, 0xbd, 0x06, 0xf6, 0x10},
269 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x40, 0x00, 0x00, 0x00,
270 0x00, 0x00,
271 0x00, 0x00, 0x00, 0x04, 0x01, 0x00,
272 0x16, 0x12, 0x24, COMP1, MCK_INIT1,
274 /* compression 0x86 mckinit1 0x2b */
277 0x02 clock divider
278 0x03 Variable framerate bits 4-11
279 0x04 Var framerate bits 0-3, one must leave the 4 msb's at 0 !!
282 0x05 Shutter Time Line Offset, this can be used as an exposure control:
283 0 = use full frame time, 255 = no exposure at all
287 0x06 Shutter Time Pixel Offset, like reg05 this influences exposure, but
288 only a very little bit, leave at 0xcd
289 0x07 offset sign bit (bit0 1 > negative offset)
290 0x08 offset
291 0x09 Blue Gain
292 0x0a Green1 Gain
293 0x0b Green2 Gain
294 0x0c Red Gain
295 0x0e Global gain
296 0x13 Write 1 to commit settings to sensor
301 { 0xa1, 0x40, 0x02, 0x04, 0x00, 0x00, 0x00, 0x14 },
302 /* Frame Time MSB (also seen as 0x12) */
303 { 0xa1, 0x40, 0x03, 0x13, 0x00, 0x00, 0x00, 0x14 },
304 /* Frame Time LSB (also seen as 0x05) */
305 { 0xa1, 0x40, 0x04, 0x06, 0x00, 0x00, 0x00, 0x14 },
306 /* Shutter Time Line Offset (also seen as 0x6d) */
307 { 0xa1, 0x40, 0x05, 0x65, 0x00, 0x00, 0x00, 0x14 },
308 /* Shutter Time Pixel Offset (also seen as 0xb1) */
309 { 0xa1, 0x40, 0x06, 0xcd, 0x00, 0x00, 0x00, 0x14 },
310 /* Black Level Subtract Sign (also seen 0x00) */
311 { 0xa1, 0x40, 0x07, 0xc1, 0x00, 0x00, 0x00, 0x14 },
312 /* Black Level Subtract Level (also seen 0x01) */
313 { 0xa1, 0x40, 0x08, 0x06, 0x00, 0x00, 0x00, 0x14 },
314 { 0xa1, 0x40, 0x08, 0x06, 0x00, 0x00, 0x00, 0x14 },
316 { 0xa1, 0x40, 0x09, 0x05, 0x00, 0x00, 0x00, 0x14 },
318 { 0xa1, 0x40, 0x0a, 0x04, 0x00, 0x00, 0x00, 0x14 },
319 /* Color Gain G2 Pixel 1 0 5 */
320 { 0xa1, 0x40, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x14 },
322 { 0xa1, 0x40, 0x0c, 0x05, 0x00, 0x00, 0x00, 0x14 },
324 { 0xa1, 0x40, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x14 },
326 { 0xa1, 0x40, 0x0e, 0x0e, 0x00, 0x00, 0x00, 0x14 },
328 { 0xa1, 0x40, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x14 },
330 { 0xa1, 0x40, 0x10, 0x06, 0x00, 0x00, 0x00, 0x14 },
332 { 0xa1, 0x40, 0x11, 0x06, 0x00, 0x00, 0x00, 0x14 },
334 { 0xa1, 0x40, 0x12, 0x06, 0x00, 0x00, 0x00, 0x14 },
336 { 0xa1, 0x40, 0x14, 0x02, 0x00, 0x00, 0x00, 0x14 },
338 { 0xa1, 0x40, 0x13, 0x01, 0x00, 0x00, 0x00, 0x14 },
342 0x44, 0x44, 0x21, 0x30, 0x00, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00,
343 0x00, 0x00,
344 0x00, 0x00, 0x00, 0x06, 0x03, 0x0a,
345 0x28, 0x1e, 0x20, 0x89, 0x20,
349 0x02 clock divider
350 0x04 Variable framerate bits 6-11 (*)
351 0x05 Var framerate bits 0-5, one must leave the 2 msb's at 0 !!
352 0x07 Blue Gain
353 0x08 Green Gain
354 0x09 Red Gain
355 0x0b offset sign bit (bit0 1 > negative offset)
356 0x0c offset
357 0x0e Unknown image is slightly brighter when bit 0 is 0, if reg0f is 0 too,
359 0x0f Exposure 0-255, 0 = use full frame time, 255 = no exposure at all
360 0x10 Master gain 0 - 31
361 0x11 write 1 to apply changes
369 {0xa0, 0x40, 0x02, 0x04, 0x00, 0x00, 0x00, 0x10},
370 {0xd0, 0x40, 0x04, 0x07, 0x34, 0x00, 0x09, 0x10},
371 {0xd0, 0x40, 0x08, 0x01, 0x00, 0x00, 0x01, 0x10},
372 {0xd0, 0x40, 0x0c, 0x00, 0x0c, 0x01, 0x32, 0x10},
373 {0xd0, 0x40, 0x10, 0x00, 0x01, 0x00, 0x63, 0x10},
374 {0xa0, 0x40, 0x15, 0x70, 0x01, 0x00, 0x63, 0x10},
375 {0xa0, 0x40, 0x18, 0x00, 0x01, 0x00, 0x63, 0x10},
376 {0xa0, 0x40, 0x11, 0x01, 0x01, 0x00, 0x63, 0x10},
377 {0xa0, 0x40, 0x03, 0x56, 0x01, 0x00, 0x63, 0x10},
378 {0xa0, 0x40, 0x11, 0x01, 0x01, 0x00, 0x63, 0x10},
382 0x44, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x00,
383 0x00, 0x00,
384 0x00, 0x00, 0x00, 0x45, 0x09, 0x0a,
385 0x16, 0x12, 0x60, 0x86, 0x2b,
389 0x44, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x00,
390 0x00, 0x00,
391 0x00, 0x00, 0x00, 0x41, 0x09, 0x0a,
392 0x16, 0x12, 0x60, 0x86, 0x2b,
396 {0x30, 0x11, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x10},
397 {0x30, 0x11, 0x02, 0x20, 0xa9, 0x00, 0x00, 0x10},
400 * reg02: gain, bit order reversed!! 0 == max gain, 255 == min gain
405 {0xa0, 0x61, 0x9a, 0xca, 0x00, 0x00, 0x00, 0x17}, /* reset */
409 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x00,
410 0x00, 0x00,
411 0x00, 0x00, 0x00, 0x68, 0x0c, 0x0a,
412 0x28, 0x1e, 0x60, COMP, MCK_INIT,
415 /* {0x30, 0x11, 0x00, 0x40, 0x47, 0x00, 0x00, 0x10},
416 * shutter 0x47 short exposure? */
417 {0x30, 0x11, 0x00, 0x40, 0x01, 0x00, 0x00, 0x10},
418 /* shutter 0x01 long exposure */
419 {0x30, 0x11, 0x02, 0x20, 0x70, 0x00, 0x00, 0x10},
423 SENS(initHv7131d, hv7131d_sensor_init, 0, 0),
424 SENS(initHv7131r, hv7131r_sensor_init, 0, 0),
425 SENS(initOv6650, ov6650_sensor_init, F_SIF, 0x60),
426 SENS(initOv7630, ov7630_sensor_init, 0, 0x21),
427 SENS(initPas106, pas106_sensor_init, F_SIF, 0),
428 SENS(initPas202, pas202_sensor_init, 0, 0),
429 SENS(initTas5110c, tas5110c_sensor_init, F_SIF, 0),
430 SENS(initTas5110d, tas5110d_sensor_init, F_SIF, 0),
431 SENS(initTas5130, tas5130_sensor_init, 0, 0),
440 if (gspca_dev->usb_err < 0) in reg_r()
444 usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_r()
445 0, /* request */ in reg_r()
448 0, /* index */ in reg_r()
452 if (res < 0) { in reg_r()
460 gspca_dev->usb_buf[0] = 0; in reg_r()
471 if (gspca_dev->usb_err < 0) in reg_w()
476 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w()
477 0x08, /* request */ in reg_w()
480 0, /* index */ in reg_w()
484 if (res < 0) { in reg_w()
495 if (gspca_dev->usb_err < 0) in i2c_w()
499 reg_w(gspca_dev, 0x08, buf, 8); in i2c_w()
501 if (gspca_dev->usb_err < 0) in i2c_w()
504 reg_r(gspca_dev, 0x08); in i2c_w()
505 if (gspca_dev->usb_buf[0] & 0x04) { in i2c_w()
506 if (gspca_dev->usb_buf[0] & 0x08) { in i2c_w()
523 if (gspca_dev->usb_err < 0) in i2c_w_vector()
527 if (len <= 0) in i2c_w_vector()
541 {0xa0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x10}; in setbrightness()
543 /* change reg 0x06 */ in setbrightness()
552 {0xb0, 0x40, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x16}; in setbrightness()
554 {0xa0, 0x40, 0x11, 0x01, 0x00, 0x00, 0x00, 0x16}; in setbrightness()
559 i2cpdoit[2] = 0x13; in setbrightness()
563 /* change reg 0x0b, signreg */ in setbrightness()
564 i2cpbright[3] = 0x01; in setbrightness()
565 /* set reg 0x0c, offset */ in setbrightness()
587 {0xc0, 0x11, 0x31, 0x00, 0x00, 0x00, 0x00, 0x17}; in setgain()
589 i2c[3] = 0x3f - gain; in setgain()
590 i2c[4] = 0x3f - gain; in setgain()
591 i2c[5] = 0x3f - gain; in setgain()
599 {0x30, 0x11, 0x02, 0x20, 0x70, 0x00, 0x00, 0x10}; in setgain()
607 0xb0, 0x61, 0x02, 0x00, 0x10, 0x00, 0x00, 0x17 }; in setgain()
610 i2c[3] |= (gain & 0x80) >> 7; in setgain()
611 i2c[3] |= (gain & 0x40) >> 5; in setgain()
612 i2c[3] |= (gain & 0x20) >> 3; in setgain()
613 i2c[3] |= (gain & 0x10) >> 1; in setgain()
614 i2c[3] |= (gain & 0x08) << 1; in setgain()
615 i2c[3] |= (gain & 0x04) << 3; in setgain()
616 i2c[3] |= (gain & 0x02) << 5; in setgain()
617 i2c[3] |= (gain & 0x01) << 7; in setgain()
623 __u8 i2c[] = {0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10}; in setgain()
627 * same level as at 16, so skip 32-47 (of the 0-63 scale). in setgain()
640 {0xa0, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15}; in setgain()
642 {0xc0, 0x40, 0x07, 0x00, 0x00, 0x00, 0x00, 0x15}; in setgain()
644 {0xa0, 0x40, 0x11, 0x01, 0x00, 0x00, 0x00, 0x16}; in setgain()
648 i2cpgain[2] = 0x0e; in setgain()
649 i2cpcolorgain[0] = 0xd0; in setgain()
650 i2cpcolorgain[2] = 0x09; in setgain()
651 i2cpdoit[2] = 0x13; in setgain()
668 reg_w(gspca_dev, 0x05, buf, 3); in setgain()
671 buf[0] = gain << 4 | gain; /* Red and blue */ in setgain()
673 reg_w(gspca_dev, 0x10, buf, 2); in setgain()
685 0x26 and 0x27, testing has shown 0x25 + 0x26 */ in setexposure()
686 __u8 i2c[] = {0xc0, 0x11, 0x25, 0x00, 0x00, 0x00, 0x00, 0x17}; in setexposure()
690 i2c[4] = reg & 0xff; in setexposure()
701 reg = (reg << 4) | 0x0b; in setexposure()
702 reg_w(gspca_dev, 0x19, &reg, 1); in setexposure()
714 actual exposure as quotient of the full exposure, with 0 in setexposure()
718 The code maps our 0 - 510 ms exposure ctrl to these 2 in setexposure()
721 __u8 i2c[] = {0xb0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10}; in setexposure()
729 the ov6645. The ov7630 datasheet says the max is 0x41. */ in setexposure()
731 reg10_max = 0x4d; in setexposure()
732 i2c[4] = 0xc0; /* OV6650 needs non default vsync pol */ in setexposure()
734 reg10_max = 0x41; in setexposure()
770 i2c[0] = 0xa0; in setexposure()
773 if (gspca_dev->usb_err == 0) in setexposure()
779 {0xb0, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x16}; in setexposure()
781 {0xa0, 0x40, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x16}; in setexposure()
783 {0xa0, 0x40, 0x11, 0x01, 0x00, 0x00, 0x00, 0x16}; in setexposure()
801 /* The PAS202's exposure control goes from 0 - 4095, in setexposure()
809 i2cpframerate[4] = framerate_ctrl & 0x3f; in setexposure()
817 {0xb1, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x14}; in setexposure()
819 {0xa1, 0x40, 0x05, 0x00, 0x00, 0x00, 0x00, 0x14}; in setexposure()
821 {0xa1, 0x40, 0x13, 0x01, 0x00, 0x00, 0x00, 0x14}; in setexposure()
830 /* The PAS106's exposure control goes from 0 - 4095, in setexposure()
838 i2cpframerate[4] = framerate_ctrl & 0x0f; in setexposure()
856 0x2b register, see ov6630 datasheet. in setfreq()
857 0x4f / 0x8a -> (30 fps -> 25 fps), 0x00 -> no adjustment */ in setfreq()
858 __u8 i2c[] = {0xa0, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x10}; in setfreq()
861 /* case 0: * no filter*/ in setfreq()
863 i2c[3] = 0; in setfreq()
867 ? 0x4f : 0x8a; in setfreq()
884 if (sd->autogain_ignore_frames > 0) { in do_autogain()
922 reg_r(gspca_dev, 0x00); in sd_config()
923 if (gspca_dev->usb_buf[0] != 0x10) in sd_config()
928 sd->bridge = id->driver_info & 0xff; in sd_config()
940 return 0; in sd_config()
946 const __u8 stop = 0x09; /* Disable stream turn of LED */ in sd_init()
948 reg_w(gspca_dev, 0x01, &stop, 1); in sd_init()
959 gspca_dev->usb_err = 0; in sd_s_ctrl()
972 return 0; in sd_s_ctrl()
1009 V4L2_CID_BRIGHTNESS, 0, 255, 1, 127); in sd_init_controls()
1017 V4L2_CID_GAIN, 0, 31, 1, 15); in sd_init_controls()
1021 V4L2_CID_GAIN, 0, 47, 1, 31); in sd_init_controls()
1025 V4L2_CID_GAIN, 0, 63, 1, 31); in sd_init_controls()
1031 V4L2_CID_GAIN, 0, 255, 1, 127); in sd_init_controls()
1036 V4L2_CID_GAIN, 0, 127, 1, 63); in sd_init_controls()
1039 V4L2_CID_GAIN, 0, 15, 1, 7); in sd_init_controls()
1047 V4L2_CID_EXPOSURE, 0, 8191, 1, 482); in sd_init_controls()
1055 V4L2_CID_EXPOSURE, 0, 1023, 1, 66); in sd_init_controls()
1067 V4L2_CID_AUTOGAIN, 0, 1, 1, 1); in sd_init_controls()
1073 V4L2_CID_POWER_LINE_FREQUENCY_60HZ, 0, in sd_init_controls()
1082 v4l2_ctrl_auto_cluster(3, &gspca_dev->autogain, 0, false); in sd_init_controls()
1084 return 0; in sd_init_controls()
1093 __u8 regs[0x31]; in sd_start()
1095 mode = cam->cam_mode[gspca_dev->curr_mode].priv & 0x07; in sd_start()
1096 /* Copy registers 0x01 - 0x19 from the template */ in sd_start()
1097 memcpy(&regs[0x01], sensor_data[sd->sensor].bridge_init, 0x19); in sd_start()
1099 regs[0x18] |= mode << 4; in sd_start()
1103 regs[0x05] = 0x20; /* Red */ in sd_start()
1104 regs[0x06] = 0x20; /* Green */ in sd_start()
1105 regs[0x07] = 0x20; /* Blue */ in sd_start()
1107 regs[0x10] = 0x00; /* Red and blue */ in sd_start()
1108 regs[0x11] = 0x00; /* Green */ in sd_start()
1113 regs[0x1a] = 0x14; /* HO_SIZE 640, makes no sense */ in sd_start()
1114 regs[0x1b] = 0x0a; /* VO_SIZE 320, makes no sense */ in sd_start()
1115 regs[0x1c] = 0x02; /* AE H-start 64 */ in sd_start()
1116 regs[0x1d] = 0x02; /* AE V-start 64 */ in sd_start()
1117 regs[0x1e] = 0x09; /* AE H-end 288 */ in sd_start()
1118 regs[0x1f] = 0x07; /* AE V-end 224 */ in sd_start()
1120 regs[0x1a] = 0x1d; /* HO_SIZE 960, makes no sense */ in sd_start()
1121 regs[0x1b] = 0x10; /* VO_SIZE 512, makes no sense */ in sd_start()
1122 regs[0x1c] = 0x05; /* AE H-start 160 */ in sd_start()
1123 regs[0x1d] = 0x03; /* AE V-start 96 */ in sd_start()
1124 regs[0x1e] = 0x0f; /* AE H-end 480 */ in sd_start()
1125 regs[0x1f] = 0x0c; /* AE V-end 384 */ in sd_start()
1129 for (i = 0; i < 16; i++) in sd_start()
1130 regs[0x20 + i] = i * 16; in sd_start()
1131 regs[0x20 + i] = 255; in sd_start()
1138 nibble of 0x19 is exposure (clock divider) just as with in sd_start()
1140 regs[0x19] = mode ? 0x23 : 0x43; in sd_start()
1144 clock is set to 12 Mhz (reg1 == 0x04), rather then 24. in sd_start()
1148 regs[0x01] = 0x44; /* Select 24 Mhz clock */ in sd_start()
1149 regs[0x12] = 0x02; /* Set hstart to 2 */ in sd_start()
1156 regs[0x12] += 1; in sd_start()
1161 regs[0x18] &= ~0x80; in sd_start()
1165 regs[0x12] += 16; /* hstart adjust */ in sd_start()
1166 regs[0x13] += 24; /* vstart adjust */ in sd_start()
1167 regs[0x15] = 320 / 16; /* hsize */ in sd_start()
1168 regs[0x16] = 240 / 16; /* vsize */ in sd_start()
1171 /* reg 0x01 bit 2 video transfert on */ in sd_start()
1172 reg_w(gspca_dev, 0x01, &regs[0x01], 1); in sd_start()
1173 /* reg 0x17 SensorClk enable inv Clk 0x60 */ in sd_start()
1174 reg_w(gspca_dev, 0x17, &regs[0x17], 1); in sd_start()
1176 reg_w(gspca_dev, 0x01, &regs[0x01], in sd_start()
1177 (sd->bridge == BRIDGE_103) ? 0x30 : 0x1f); in sd_start()
1187 {0xa0, 0x40, 0x02, 0x03, 0x00, 0x00, 0x00, 0x10}; in sd_start()
1197 const __u8 i2c[] = { 0xa0, 0x21, 0x13, in sd_start()
1198 0x80, 0x00, 0x00, 0x00, 0x10 }; in sd_start()
1203 /* H_size V_size 0x28, 0x1e -> 640x480. 0x16, 0x12 -> 352x288 */ in sd_start()
1204 reg_w(gspca_dev, 0x15, &regs[0x15], 2); in sd_start()
1206 reg_w(gspca_dev, 0x18, &regs[0x18], 1); in sd_start()
1208 reg_w(gspca_dev, 0x12, &regs[0x12], 1); in sd_start()
1210 reg_w(gspca_dev, 0x13, &regs[0x13], 1); in sd_start()
1211 /* reset 0x17 SensorClk enable inv Clk 0x60 */ in sd_start()
1213 reg_w(gspca_dev, 0x17, &regs[0x17], 1); in sd_start()
1215 reg_w(gspca_dev, 0x19, &regs[0x19], 1); in sd_start()
1217 reg_w(gspca_dev, 0x1c, &regs[0x1c], 4); in sd_start()
1219 reg_w(gspca_dev, 0x01, &regs[0x01], 1); in sd_start()
1221 reg_w(gspca_dev, 0x18, &regs[0x18], 2); in sd_start()
1231 sd->frames_to_drop = 0; in sd_start()
1232 sd->autogain_ignore_frames = 0; in sd_start()
1233 gspca_dev->exp_too_high_cnt = 0; in sd_start()
1234 gspca_dev->exp_too_low_cnt = 0; in sd_start()
1258 for (i = 0; i < len; i++) { in find_sof()
1260 case 0: in find_sof()
1261 if (data[i] == 0xff) in find_sof()
1265 if (data[i] == 0xff) in find_sof()
1268 sd->header_read = 0; in find_sof()
1271 if (data[i] == 0x00) in find_sof()
1273 else if (data[i] != 0xff) in find_sof()
1274 sd->header_read = 0; in find_sof()
1277 if (data[i] == 0xc4) in find_sof()
1279 else if (data[i] == 0xff) in find_sof()
1282 sd->header_read = 0; in find_sof()
1285 if (data[i] == 0xc4) in find_sof()
1287 else if (data[i] == 0xff) in find_sof()
1290 sd->header_read = 0; in find_sof()
1293 if (data[i] == 0x96) in find_sof()
1295 else if (data[i] == 0xff) in find_sof()
1298 sd->header_read = 0; in find_sof()
1304 sd->header_read = 0; in find_sof()
1316 int fr_h_sz = 0, lum_offset = 0, len_after_sof = 0; in sd_pkt_scan()
1333 if (len < 0) in sd_pkt_scan()
1334 len = 0; in sd_pkt_scan()
1355 get a lum of 0 in this case drop 2 frames in sd_pkt_scan()
1358 *really* is 0 (cam used in low light with in sd_pkt_scan()
1360 if the previous lum was 0 too. */ in sd_pkt_scan()
1361 if (lum == 0 && sd->prev_avg_lum != 0) { in sd_pkt_scan()
1364 sd->prev_avg_lum = 0; in sd_pkt_scan()
1372 gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); in sd_pkt_scan()
1385 if (len == 1 && data[0] == 1) { in sd_int_pkt_scan()
1388 input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0); in sd_int_pkt_scan()
1390 ret = 0; in sd_int_pkt_scan()
1418 {USB_DEVICE(0x0c45, 0x6001), SB(TAS5110C, 102)}, /* TAS5110C1B */
1419 {USB_DEVICE(0x0c45, 0x6005), SB(TAS5110C, 101)}, /* TAS5110C1B */
1420 {USB_DEVICE(0x0c45, 0x6007), SB(TAS5110D, 101)}, /* TAS5110D */
1421 {USB_DEVICE(0x0c45, 0x6009), SB(PAS106, 101)},
1422 {USB_DEVICE(0x0c45, 0x600d), SB(PAS106, 101)},
1423 {USB_DEVICE(0x0c45, 0x6011), SB(OV6650, 101)},
1424 {USB_DEVICE(0x0c45, 0x6019), SB(OV7630, 101)},
1425 {USB_DEVICE(0x0c45, 0x6024), SB(TAS5130CXX, 102)},
1426 {USB_DEVICE(0x0c45, 0x6025), SB(TAS5130CXX, 102)},
1427 {USB_DEVICE(0x0c45, 0x6027), SB(OV7630, 101)}, /* Genius Eye 310 */
1428 {USB_DEVICE(0x0c45, 0x6028), SB(PAS202, 102)},
1429 {USB_DEVICE(0x0c45, 0x6029), SB(PAS106, 102)},
1430 {USB_DEVICE(0x0c45, 0x602a), SB(HV7131D, 102)},
1431 /* {USB_DEVICE(0x0c45, 0x602b), SB(MI0343, 102)}, */
1432 {USB_DEVICE(0x0c45, 0x602c), SB(OV7630, 102)},
1433 {USB_DEVICE(0x0c45, 0x602d), SB(HV7131R, 102)},
1434 {USB_DEVICE(0x0c45, 0x602e), SB(OV7630, 102)},
1435 /* {USB_DEVICE(0x0c45, 0x6030), SB(MI03XX, 102)}, */ /* MI0343 MI0360 MI0330 */
1436 /* {USB_DEVICE(0x0c45, 0x6082), SB(MI03XX, 103)}, */ /* MI0343 MI0360 */
1437 {USB_DEVICE(0x0c45, 0x6083), SB(HV7131D, 103)},
1438 {USB_DEVICE(0x0c45, 0x608c), SB(HV7131R, 103)},
1439 /* {USB_DEVICE(0x0c45, 0x608e), SB(CISVF10, 103)}, */
1440 {USB_DEVICE(0x0c45, 0x608f), SB(OV7630, 103)},
1441 {USB_DEVICE(0x0c45, 0x60a8), SB(PAS106, 103)},
1442 {USB_DEVICE(0x0c45, 0x60aa), SB(TAS5130CXX, 103)},
1443 {USB_DEVICE(0x0c45, 0x60af), SB(PAS202, 103)},
1444 {USB_DEVICE(0x0c45, 0x60b0), SB(OV7630, 103)},