• Home
  • Raw
  • Download

Lines Matching +full:0 +full:xa0

23 0x10	high nibble red gain low nibble blue gain
24 0x11 low nibble green gain
26 0x05 red gain 0-127
27 0x06 blue gain 0-127
28 0x07 green gain 0-127
30 0x08-0x0f i2c / 3wire registers
31 0x12 hstart
32 0x13 vstart
33 0x15 hsize (hsize = register-value * 16)
34 0x16 vsize (vsize = register-value * 16)
35 0x17 bit 0 toggle compression quality (according to sn9c102 driver)
36 0x18 bit 7 enables compression, bit 4-5 set image down scaling:
38 0x19 high-nibble is sensor clock divider, changes exposure on sensors which
40 0x1c auto_exposure area (for avg_lum) startx (startx = register-value * 32)
41 0x1d auto_exposure area (for avg_lum) starty (starty = register-value * 32)
42 0x1e auto_exposure area (for avg_lum) stopx (hsize = (0x1e - 0x1c) * 32)
43 0x1f auto_exposure area (for avg_lum) stopy (vsize = (0x1f - 0x1d) * 32)
72 #define BRIDGE_101 0
73 #define BRIDGE_102 0 /* We make no difference between 101 and 102 */
77 #define SENSOR_HV7131D 0
100 #define F_SIF 0x01 /* sif or vga */
103 #define MODE_RAW 0x10 /* raw bayer mode */
104 #define MODE_REDUCED_SIF 0x20 /* vga mode (320x240 / 160x120) on sif cam */
106 #define COMP 0xc7 /* 0x87 //0x07 */
107 #define COMP1 0xc9 /* 0x89 //0x09 */
109 #define MCK_INIT 0x63
110 #define MCK_INIT1 0x20 /*fixme: Bayer - 0x50 for JPEG ??*/
112 #define SYS_CLK 0x04
148 .priv = 0},
175 .priv = 0 | MODE_REDUCED_SIF},
180 .priv = 0},
184 0x04, 0x03, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x11, 0x00, 0x00, 0x00,
185 0x00, 0x00,
186 0x00, 0x00, 0x00, 0x02, 0x02, 0x00,
187 0x28, 0x1e, 0x60, 0x8e, 0x42,
190 {0xa0, 0x11, 0x01, 0x04, 0x00, 0x00, 0x00, 0x17},
191 {0xa0, 0x11, 0x02, 0x00, 0x00, 0x00, 0x00, 0x17},
192 {0xa0, 0x11, 0x28, 0x00, 0x00, 0x00, 0x00, 0x17},
193 {0xa0, 0x11, 0x30, 0x30, 0x00, 0x00, 0x00, 0x17}, /* reset level */
194 {0xa0, 0x11, 0x34, 0x02, 0x00, 0x00, 0x00, 0x17}, /* pixel bias volt */
198 0x46, 0x77, 0x00, 0x04, 0x00, 0x00, 0x00, 0x80, 0x11, 0x00, 0x00, 0x00,
199 0x00, 0x00,
200 0x00, 0x00, 0x00, 0x02, 0x01, 0x00,
201 0x28, 0x1e, 0x60, 0x8a, 0x20,
204 {0xc0, 0x11, 0x31, 0x38, 0x2a, 0x2e, 0x00, 0x10},
205 {0xa0, 0x11, 0x01, 0x08, 0x2a, 0x2e, 0x00, 0x10},
206 {0xb0, 0x11, 0x20, 0x00, 0xd0, 0x2e, 0x00, 0x10},
207 {0xc0, 0x11, 0x25, 0x03, 0x0e, 0x28, 0x00, 0x16},
208 {0xa0, 0x11, 0x30, 0x10, 0x0e, 0x28, 0x00, 0x15},
211 0x44, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
212 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
213 0x00, 0x01, 0x01, 0x0a, 0x16, 0x12, 0x68, 0x8b,
214 0x10,
222 {0xa0, 0x60, 0x12, 0x80, 0x00, 0x00, 0x00, 0x10},
223 /* Set clock register 0x11 low nibble is clock divider */
224 {0xd0, 0x60, 0x11, 0xc0, 0x1b, 0x18, 0xc1, 0x10},
226 {0xb0, 0x60, 0x15, 0x00, 0x02, 0x18, 0xc1, 0x10},
227 /* {0xa0, 0x60, 0x1b, 0x01, 0x02, 0x18, 0xc1, 0x10},
231 {0xd0, 0x60, 0x26, 0x01, 0x14, 0xd8, 0xa4, 0x10}, /* format out? */
232 {0xd0, 0x60, 0x26, 0x01, 0x14, 0xd8, 0xa4, 0x10},
233 {0xa0, 0x60, 0x30, 0x3d, 0x0a, 0xd8, 0xa4, 0x10},
235 {0xa0, 0x60, 0x61, 0x08, 0x00, 0x00, 0x00, 0x10},
236 /* HDG: Note windows uses the line below, which sets both register 0x60
237 and 0x61 I believe these registers of the ov6650 are identical as
242 {0xb0, 0x60, 0x60, 0x66, 0x68, 0xd8, 0xa4, 0x10}, */
244 {0xa0, 0x60, 0x68, 0x04, 0x68, 0xd8, 0xa4, 0x10},
245 {0xd0, 0x60, 0x17, 0x24, 0xd6, 0x04, 0x94, 0x10}, /* Clipreg */
249 0x04, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* r01 .. r08 */
250 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* r09 .. r10 */
251 0x00, 0x01, 0x01, 0x0a, /* r11 .. r14 */
252 0x28, 0x1e, /* H & V sizes r15 .. r16 */
253 0x68, 0x8f, MCK_INIT1, /* r17 .. r19 */
256 {0xa0, 0x21, 0x12, 0x80, 0x00, 0x00, 0x00, 0x10},
257 {0xb0, 0x21, 0x01, 0x77, 0x3a, 0x00, 0x00, 0x10},
258 /* {0xd0, 0x21, 0x12, 0x7c, 0x01, 0x80, 0x34, 0x10}, jfm */
259 {0xd0, 0x21, 0x12, 0x5c, 0x00, 0x80, 0x34, 0x10}, /* jfm */
260 {0xa0, 0x21, 0x1b, 0x04, 0x00, 0x80, 0x34, 0x10},
261 {0xa0, 0x21, 0x20, 0x44, 0x00, 0x80, 0x34, 0x10},
262 {0xa0, 0x21, 0x23, 0xee, 0x00, 0x80, 0x34, 0x10},
263 {0xd0, 0x21, 0x26, 0xa0, 0x9a, 0xa0, 0x30, 0x10},
264 {0xb0, 0x21, 0x2a, 0x80, 0x00, 0xa0, 0x30, 0x10},
265 {0xb0, 0x21, 0x2f, 0x3d, 0x24, 0xa0, 0x30, 0x10},
266 {0xa0, 0x21, 0x32, 0x86, 0x24, 0xa0, 0x30, 0x10},
267 {0xb0, 0x21, 0x60, 0xa9, 0x4a, 0xa0, 0x30, 0x10},
268 /* {0xb0, 0x21, 0x60, 0xa9, 0x42, 0xa0, 0x30, 0x10}, * jfm */
269 {0xa0, 0x21, 0x65, 0x00, 0x42, 0xa0, 0x30, 0x10},
270 {0xa0, 0x21, 0x69, 0x38, 0x42, 0xa0, 0x30, 0x10},
271 {0xc0, 0x21, 0x6f, 0x88, 0x0b, 0x00, 0x30, 0x10},
272 {0xc0, 0x21, 0x74, 0x21, 0x8e, 0x00, 0x30, 0x10},
273 {0xa0, 0x21, 0x7d, 0xf7, 0x8e, 0x00, 0x30, 0x10},
274 {0xd0, 0x21, 0x17, 0x1c, 0xbd, 0x06, 0xf6, 0x10},
278 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x40, 0x00, 0x00, 0x00,
279 0x00, 0x00,
280 0x00, 0x00, 0x00, 0x04, 0x01, 0x00,
281 0x16, 0x12, 0x24, COMP1, MCK_INIT1,
283 /* compression 0x86 mckinit1 0x2b */
286 0x02 clock divider
287 0x03 Variable framerate bits 4-11
288 0x04 Var framerate bits 0-3, one must leave the 4 msb's at 0 !!
291 0x05 Shutter Time Line Offset, this can be used as an exposure control:
292 0 = use full frame time, 255 = no exposure at all
296 0x06 Shutter Time Pixel Offset, like reg05 this influences exposure, but
297 only a very little bit, leave at 0xcd
298 0x07 offset sign bit (bit0 1 > negative offset)
299 0x08 offset
300 0x09 Blue Gain
301 0x0a Green1 Gain
302 0x0b Green2 Gain
303 0x0c Red Gain
304 0x0e Global gain
305 0x13 Write 1 to commit settings to sensor
310 { 0xa1, 0x40, 0x02, 0x04, 0x00, 0x00, 0x00, 0x14 },
311 /* Frame Time MSB (also seen as 0x12) */
312 { 0xa1, 0x40, 0x03, 0x13, 0x00, 0x00, 0x00, 0x14 },
313 /* Frame Time LSB (also seen as 0x05) */
314 { 0xa1, 0x40, 0x04, 0x06, 0x00, 0x00, 0x00, 0x14 },
315 /* Shutter Time Line Offset (also seen as 0x6d) */
316 { 0xa1, 0x40, 0x05, 0x65, 0x00, 0x00, 0x00, 0x14 },
317 /* Shutter Time Pixel Offset (also seen as 0xb1) */
318 { 0xa1, 0x40, 0x06, 0xcd, 0x00, 0x00, 0x00, 0x14 },
319 /* Black Level Subtract Sign (also seen 0x00) */
320 { 0xa1, 0x40, 0x07, 0xc1, 0x00, 0x00, 0x00, 0x14 },
321 /* Black Level Subtract Level (also seen 0x01) */
322 { 0xa1, 0x40, 0x08, 0x06, 0x00, 0x00, 0x00, 0x14 },
323 { 0xa1, 0x40, 0x08, 0x06, 0x00, 0x00, 0x00, 0x14 },
325 { 0xa1, 0x40, 0x09, 0x05, 0x00, 0x00, 0x00, 0x14 },
327 { 0xa1, 0x40, 0x0a, 0x04, 0x00, 0x00, 0x00, 0x14 },
328 /* Color Gain G2 Pixel 1 0 5 */
329 { 0xa1, 0x40, 0x0b, 0x04, 0x00, 0x00, 0x00, 0x14 },
331 { 0xa1, 0x40, 0x0c, 0x05, 0x00, 0x00, 0x00, 0x14 },
333 { 0xa1, 0x40, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x14 },
335 { 0xa1, 0x40, 0x0e, 0x0e, 0x00, 0x00, 0x00, 0x14 },
337 { 0xa1, 0x40, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x14 },
339 { 0xa1, 0x40, 0x10, 0x06, 0x00, 0x00, 0x00, 0x14 },
341 { 0xa1, 0x40, 0x11, 0x06, 0x00, 0x00, 0x00, 0x14 },
343 { 0xa1, 0x40, 0x12, 0x06, 0x00, 0x00, 0x00, 0x14 },
345 { 0xa1, 0x40, 0x14, 0x02, 0x00, 0x00, 0x00, 0x14 },
347 { 0xa1, 0x40, 0x13, 0x01, 0x00, 0x00, 0x00, 0x14 },
351 0x44, 0x44, 0x21, 0x30, 0x00, 0x00, 0x00, 0x80, 0x40, 0x00, 0x00, 0x00,
352 0x00, 0x00,
353 0x00, 0x00, 0x00, 0x06, 0x03, 0x0a,
354 0x28, 0x1e, 0x20, 0x89, 0x20,
358 0x02 clock divider
359 0x04 Variable framerate bits 6-11 (*)
360 0x05 Var framerate bits 0-5, one must leave the 2 msb's at 0 !!
361 0x07 Blue Gain
362 0x08 Green Gain
363 0x09 Red Gain
364 0x0b offset sign bit (bit0 1 > negative offset)
365 0x0c offset
366 0x0e Unknown image is slightly brighter when bit 0 is 0, if reg0f is 0 too,
368 0x0f Exposure 0-255, 0 = use full frame time, 255 = no exposure at all
369 0x10 Master gain 0 - 31
370 0x11 write 1 to apply changes
378 {0xa0, 0x40, 0x02, 0x04, 0x00, 0x00, 0x00, 0x10},
379 {0xd0, 0x40, 0x04, 0x07, 0x34, 0x00, 0x09, 0x10},
380 {0xd0, 0x40, 0x08, 0x01, 0x00, 0x00, 0x01, 0x10},
381 {0xd0, 0x40, 0x0c, 0x00, 0x0c, 0x01, 0x32, 0x10},
382 {0xd0, 0x40, 0x10, 0x00, 0x01, 0x00, 0x63, 0x10},
383 {0xa0, 0x40, 0x15, 0x70, 0x01, 0x00, 0x63, 0x10},
384 {0xa0, 0x40, 0x18, 0x00, 0x01, 0x00, 0x63, 0x10},
385 {0xa0, 0x40, 0x11, 0x01, 0x01, 0x00, 0x63, 0x10},
386 {0xa0, 0x40, 0x03, 0x56, 0x01, 0x00, 0x63, 0x10},
387 {0xa0, 0x40, 0x11, 0x01, 0x01, 0x00, 0x63, 0x10},
391 0x44, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x00,
392 0x00, 0x00,
393 0x00, 0x00, 0x00, 0x45, 0x09, 0x0a,
394 0x16, 0x12, 0x60, 0x86, 0x2b,
398 0x44, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x00,
399 0x00, 0x00,
400 0x00, 0x00, 0x00, 0x41, 0x09, 0x0a,
401 0x16, 0x12, 0x60, 0x86, 0x2b,
405 {0x30, 0x11, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x10},
406 {0x30, 0x11, 0x02, 0x20, 0xa9, 0x00, 0x00, 0x10},
409 * reg02: gain, bit order reversed!! 0 == max gain, 255 == min gain
414 {0xa0, 0x61, 0x9a, 0xca, 0x00, 0x00, 0x00, 0x17}, /* reset */
418 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x00,
419 0x00, 0x00,
420 0x00, 0x00, 0x00, 0x68, 0x0c, 0x0a,
421 0x28, 0x1e, 0x60, COMP, MCK_INIT,
424 /* {0x30, 0x11, 0x00, 0x40, 0x47, 0x00, 0x00, 0x10},
425 * shutter 0x47 short exposure? */
426 {0x30, 0x11, 0x00, 0x40, 0x01, 0x00, 0x00, 0x10},
427 /* shutter 0x01 long exposure */
428 {0x30, 0x11, 0x02, 0x20, 0x70, 0x00, 0x00, 0x10},
432 SENS(initHv7131d, hv7131d_sensor_init, 0, 0),
433 SENS(initHv7131r, hv7131r_sensor_init, 0, 0),
434 SENS(initOv6650, ov6650_sensor_init, F_SIF, 0x60),
435 SENS(initOv7630, ov7630_sensor_init, 0, 0x21),
436 SENS(initPas106, pas106_sensor_init, F_SIF, 0),
437 SENS(initPas202, pas202_sensor_init, 0, 0),
438 SENS(initTas5110c, tas5110c_sensor_init, F_SIF, 0),
439 SENS(initTas5110d, tas5110d_sensor_init, F_SIF, 0),
440 SENS(initTas5130, tas5130_sensor_init, 0, 0),
449 if (gspca_dev->usb_err < 0) in reg_r()
453 usb_rcvctrlpipe(gspca_dev->dev, 0), in reg_r()
454 0, /* request */ in reg_r()
457 0, /* index */ in reg_r()
461 if (res < 0) { in reg_r()
469 gspca_dev->usb_buf[0] = 0; in reg_r()
480 if (gspca_dev->usb_err < 0) in reg_w()
485 usb_sndctrlpipe(gspca_dev->dev, 0), in reg_w()
486 0x08, /* request */ in reg_w()
489 0, /* index */ in reg_w()
493 if (res < 0) { in reg_w()
504 if (gspca_dev->usb_err < 0) in i2c_w()
508 reg_w(gspca_dev, 0x08, buf, 8); in i2c_w()
510 if (gspca_dev->usb_err < 0) in i2c_w()
513 reg_r(gspca_dev, 0x08); in i2c_w()
514 if (gspca_dev->usb_buf[0] & 0x04) { in i2c_w()
515 if (gspca_dev->usb_buf[0] & 0x08) { in i2c_w()
532 if (gspca_dev->usb_err < 0) in i2c_w_vector()
536 if (len <= 0) in i2c_w_vector()
550 {0xa0, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x10}; in setbrightness()
552 /* change reg 0x06 */ in setbrightness()
561 {0xb0, 0x40, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x16}; in setbrightness()
563 {0xa0, 0x40, 0x11, 0x01, 0x00, 0x00, 0x00, 0x16}; in setbrightness()
568 i2cpdoit[2] = 0x13; in setbrightness()
572 /* change reg 0x0b, signreg */ in setbrightness()
573 i2cpbright[3] = 0x01; in setbrightness()
574 /* set reg 0x0c, offset */ in setbrightness()
596 {0xc0, 0x11, 0x31, 0x00, 0x00, 0x00, 0x00, 0x17}; in setgain()
598 i2c[3] = 0x3f - gain; in setgain()
599 i2c[4] = 0x3f - gain; in setgain()
600 i2c[5] = 0x3f - gain; in setgain()
608 {0x30, 0x11, 0x02, 0x20, 0x70, 0x00, 0x00, 0x10}; in setgain()
616 0xb0, 0x61, 0x02, 0x00, 0x10, 0x00, 0x00, 0x17 }; in setgain()
619 i2c[3] |= (gain & 0x80) >> 7; in setgain()
620 i2c[3] |= (gain & 0x40) >> 5; in setgain()
621 i2c[3] |= (gain & 0x20) >> 3; in setgain()
622 i2c[3] |= (gain & 0x10) >> 1; in setgain()
623 i2c[3] |= (gain & 0x08) << 1; in setgain()
624 i2c[3] |= (gain & 0x04) << 3; in setgain()
625 i2c[3] |= (gain & 0x02) << 5; in setgain()
626 i2c[3] |= (gain & 0x01) << 7; in setgain()
632 __u8 i2c[] = {0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10}; in setgain()
636 * same level as at 16, so skip 32-47 (of the 0-63 scale). in setgain()
649 {0xa0, 0x40, 0x10, 0x00, 0x00, 0x00, 0x00, 0x15}; in setgain()
651 {0xc0, 0x40, 0x07, 0x00, 0x00, 0x00, 0x00, 0x15}; in setgain()
653 {0xa0, 0x40, 0x11, 0x01, 0x00, 0x00, 0x00, 0x16}; in setgain()
657 i2cpgain[2] = 0x0e; in setgain()
658 i2cpcolorgain[0] = 0xd0; in setgain()
659 i2cpcolorgain[2] = 0x09; in setgain()
660 i2cpdoit[2] = 0x13; in setgain()
677 reg_w(gspca_dev, 0x05, buf, 3); in setgain()
680 buf[0] = gain << 4 | gain; /* Red and blue */ in setgain()
682 reg_w(gspca_dev, 0x10, buf, 2); in setgain()
694 0x26 and 0x27, testing has shown 0x25 + 0x26 */ in setexposure()
695 __u8 i2c[] = {0xc0, 0x11, 0x25, 0x00, 0x00, 0x00, 0x00, 0x17}; in setexposure()
699 i2c[4] = reg & 0xff; in setexposure()
710 reg = (reg << 4) | 0x0b; in setexposure()
711 reg_w(gspca_dev, 0x19, &reg, 1); in setexposure()
723 actual exposure as quotient of the full exposure, with 0 in setexposure()
727 The code maps our 0 - 510 ms exposure ctrl to these 2 in setexposure()
730 __u8 i2c[] = {0xb0, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10}; in setexposure()
738 the ov6645. The ov7630 datasheet says the max is 0x41. */ in setexposure()
740 reg10_max = 0x4d; in setexposure()
741 i2c[4] = 0xc0; /* OV6650 needs non default vsync pol */ in setexposure()
743 reg10_max = 0x41; in setexposure()
779 i2c[0] = 0xa0; in setexposure()
782 if (gspca_dev->usb_err == 0) in setexposure()
788 {0xb0, 0x40, 0x04, 0x00, 0x00, 0x00, 0x00, 0x16}; in setexposure()
790 {0xa0, 0x40, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x16}; in setexposure()
792 {0xa0, 0x40, 0x11, 0x01, 0x00, 0x00, 0x00, 0x16}; in setexposure()
810 /* The PAS202's exposure control goes from 0 - 4095, in setexposure()
818 i2cpframerate[4] = framerate_ctrl & 0x3f; in setexposure()
826 {0xb1, 0x40, 0x03, 0x00, 0x00, 0x00, 0x00, 0x14}; in setexposure()
828 {0xa1, 0x40, 0x05, 0x00, 0x00, 0x00, 0x00, 0x14}; in setexposure()
830 {0xa1, 0x40, 0x13, 0x01, 0x00, 0x00, 0x00, 0x14}; in setexposure()
839 /* The PAS106's exposure control goes from 0 - 4095, in setexposure()
847 i2cpframerate[4] = framerate_ctrl & 0x0f; in setexposure()
865 0x2b register, see ov6630 datasheet. in setfreq()
866 0x4f / 0x8a -> (30 fps -> 25 fps), 0x00 -> no adjustment */ in setfreq()
867 __u8 i2c[] = {0xa0, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x00, 0x10}; in setfreq()
870 /* case 0: * no filter*/ in setfreq()
872 i2c[3] = 0; in setfreq()
876 ? 0x4f : 0x8a; in setfreq()
893 if (sd->autogain_ignore_frames > 0) { in do_autogain()
931 reg_r(gspca_dev, 0x00); in sd_config()
932 if (gspca_dev->usb_buf[0] != 0x10) in sd_config()
937 sd->bridge = id->driver_info & 0xff; in sd_config()
949 return 0; in sd_config()
955 const __u8 stop = 0x09; /* Disable stream turn of LED */ in sd_init()
957 reg_w(gspca_dev, 0x01, &stop, 1); in sd_init()
968 gspca_dev->usb_err = 0; in sd_s_ctrl()
981 return 0; in sd_s_ctrl()
1018 V4L2_CID_BRIGHTNESS, 0, 255, 1, 127); in sd_init_controls()
1026 V4L2_CID_GAIN, 0, 31, 1, 15); in sd_init_controls()
1030 V4L2_CID_GAIN, 0, 47, 1, 31); in sd_init_controls()
1034 V4L2_CID_GAIN, 0, 63, 1, 31); in sd_init_controls()
1040 V4L2_CID_GAIN, 0, 255, 1, 127); in sd_init_controls()
1045 V4L2_CID_GAIN, 0, 127, 1, 63); in sd_init_controls()
1048 V4L2_CID_GAIN, 0, 15, 1, 7); in sd_init_controls()
1056 V4L2_CID_EXPOSURE, 0, 8191, 1, 482); in sd_init_controls()
1064 V4L2_CID_EXPOSURE, 0, 1023, 1, 66); in sd_init_controls()
1076 V4L2_CID_AUTOGAIN, 0, 1, 1, 1); in sd_init_controls()
1082 V4L2_CID_POWER_LINE_FREQUENCY_60HZ, 0, in sd_init_controls()
1091 v4l2_ctrl_auto_cluster(3, &gspca_dev->autogain, 0, false); in sd_init_controls()
1093 return 0; in sd_init_controls()
1102 __u8 regs[0x31]; in sd_start()
1104 mode = cam->cam_mode[gspca_dev->curr_mode].priv & 0x07; in sd_start()
1105 /* Copy registers 0x01 - 0x19 from the template */ in sd_start()
1106 memcpy(&regs[0x01], sensor_data[sd->sensor].bridge_init, 0x19); in sd_start()
1108 regs[0x18] |= mode << 4; in sd_start()
1112 regs[0x05] = 0x20; /* Red */ in sd_start()
1113 regs[0x06] = 0x20; /* Green */ in sd_start()
1114 regs[0x07] = 0x20; /* Blue */ in sd_start()
1116 regs[0x10] = 0x00; /* Red and blue */ in sd_start()
1117 regs[0x11] = 0x00; /* Green */ in sd_start()
1122 regs[0x1a] = 0x14; /* HO_SIZE 640, makes no sense */ in sd_start()
1123 regs[0x1b] = 0x0a; /* VO_SIZE 320, makes no sense */ in sd_start()
1124 regs[0x1c] = 0x02; /* AE H-start 64 */ in sd_start()
1125 regs[0x1d] = 0x02; /* AE V-start 64 */ in sd_start()
1126 regs[0x1e] = 0x09; /* AE H-end 288 */ in sd_start()
1127 regs[0x1f] = 0x07; /* AE V-end 224 */ in sd_start()
1129 regs[0x1a] = 0x1d; /* HO_SIZE 960, makes no sense */ in sd_start()
1130 regs[0x1b] = 0x10; /* VO_SIZE 512, makes no sense */ in sd_start()
1131 regs[0x1c] = 0x05; /* AE H-start 160 */ in sd_start()
1132 regs[0x1d] = 0x03; /* AE V-start 96 */ in sd_start()
1133 regs[0x1e] = 0x0f; /* AE H-end 480 */ in sd_start()
1134 regs[0x1f] = 0x0c; /* AE V-end 384 */ in sd_start()
1138 for (i = 0; i < 16; i++) in sd_start()
1139 regs[0x20 + i] = i * 16; in sd_start()
1140 regs[0x20 + i] = 255; in sd_start()
1147 nibble of 0x19 is exposure (clock divider) just as with in sd_start()
1149 regs[0x19] = mode ? 0x23 : 0x43; in sd_start()
1153 clock is set to 12 Mhz (reg1 == 0x04), rather then 24. in sd_start()
1157 regs[0x01] = 0x44; /* Select 24 Mhz clock */ in sd_start()
1158 regs[0x12] = 0x02; /* Set hstart to 2 */ in sd_start()
1165 regs[0x12] += 1; in sd_start()
1170 regs[0x18] &= ~0x80; in sd_start()
1174 regs[0x12] += 16; /* hstart adjust */ in sd_start()
1175 regs[0x13] += 24; /* vstart adjust */ in sd_start()
1176 regs[0x15] = 320 / 16; /* hsize */ in sd_start()
1177 regs[0x16] = 240 / 16; /* vsize */ in sd_start()
1180 /* reg 0x01 bit 2 video transfert on */ in sd_start()
1181 reg_w(gspca_dev, 0x01, &regs[0x01], 1); in sd_start()
1182 /* reg 0x17 SensorClk enable inv Clk 0x60 */ in sd_start()
1183 reg_w(gspca_dev, 0x17, &regs[0x17], 1); in sd_start()
1185 reg_w(gspca_dev, 0x01, &regs[0x01], in sd_start()
1186 (sd->bridge == BRIDGE_103) ? 0x30 : 0x1f); in sd_start()
1196 {0xa0, 0x40, 0x02, 0x03, 0x00, 0x00, 0x00, 0x10}; in sd_start()
1206 const __u8 i2c[] = { 0xa0, 0x21, 0x13, in sd_start()
1207 0x80, 0x00, 0x00, 0x00, 0x10 }; in sd_start()
1212 /* H_size V_size 0x28, 0x1e -> 640x480. 0x16, 0x12 -> 352x288 */ in sd_start()
1213 reg_w(gspca_dev, 0x15, &regs[0x15], 2); in sd_start()
1215 reg_w(gspca_dev, 0x18, &regs[0x18], 1); in sd_start()
1217 reg_w(gspca_dev, 0x12, &regs[0x12], 1); in sd_start()
1219 reg_w(gspca_dev, 0x13, &regs[0x13], 1); in sd_start()
1220 /* reset 0x17 SensorClk enable inv Clk 0x60 */ in sd_start()
1222 reg_w(gspca_dev, 0x17, &regs[0x17], 1); in sd_start()
1224 reg_w(gspca_dev, 0x19, &regs[0x19], 1); in sd_start()
1226 reg_w(gspca_dev, 0x1c, &regs[0x1c], 4); in sd_start()
1228 reg_w(gspca_dev, 0x01, &regs[0x01], 1); in sd_start()
1230 reg_w(gspca_dev, 0x18, &regs[0x18], 2); in sd_start()
1240 sd->frames_to_drop = 0; in sd_start()
1241 sd->autogain_ignore_frames = 0; in sd_start()
1242 gspca_dev->exp_too_high_cnt = 0; in sd_start()
1243 gspca_dev->exp_too_low_cnt = 0; in sd_start()
1267 for (i = 0; i < len; i++) { in find_sof()
1269 case 0: in find_sof()
1270 if (data[i] == 0xff) in find_sof()
1274 if (data[i] == 0xff) in find_sof()
1277 sd->header_read = 0; in find_sof()
1280 if (data[i] == 0x00) in find_sof()
1282 else if (data[i] != 0xff) in find_sof()
1283 sd->header_read = 0; in find_sof()
1286 if (data[i] == 0xc4) in find_sof()
1288 else if (data[i] == 0xff) in find_sof()
1291 sd->header_read = 0; in find_sof()
1294 if (data[i] == 0xc4) in find_sof()
1296 else if (data[i] == 0xff) in find_sof()
1299 sd->header_read = 0; in find_sof()
1302 if (data[i] == 0x96) in find_sof()
1304 else if (data[i] == 0xff) in find_sof()
1307 sd->header_read = 0; in find_sof()
1313 sd->header_read = 0; in find_sof()
1325 int fr_h_sz = 0, lum_offset = 0, len_after_sof = 0; in sd_pkt_scan()
1342 if (len < 0) in sd_pkt_scan()
1343 len = 0; in sd_pkt_scan()
1364 get a lum of 0 in this case drop 2 frames in sd_pkt_scan()
1367 *really* is 0 (cam used in low light with in sd_pkt_scan()
1369 if the previous lum was 0 too. */ in sd_pkt_scan()
1370 if (lum == 0 && sd->prev_avg_lum != 0) { in sd_pkt_scan()
1373 sd->prev_avg_lum = 0; in sd_pkt_scan()
1381 gspca_frame_add(gspca_dev, LAST_PACKET, NULL, 0); in sd_pkt_scan()
1394 if (len == 1 && data[0] == 1) { in sd_int_pkt_scan()
1397 input_report_key(gspca_dev->input_dev, KEY_CAMERA, 0); in sd_int_pkt_scan()
1399 ret = 0; in sd_int_pkt_scan()
1427 {USB_DEVICE(0x0c45, 0x6001), SB(TAS5110C, 102)}, /* TAS5110C1B */
1428 {USB_DEVICE(0x0c45, 0x6005), SB(TAS5110C, 101)}, /* TAS5110C1B */
1429 {USB_DEVICE(0x0c45, 0x6007), SB(TAS5110D, 101)}, /* TAS5110D */
1430 {USB_DEVICE(0x0c45, 0x6009), SB(PAS106, 101)},
1431 {USB_DEVICE(0x0c45, 0x600d), SB(PAS106, 101)},
1432 {USB_DEVICE(0x0c45, 0x6011), SB(OV6650, 101)},
1433 {USB_DEVICE(0x0c45, 0x6019), SB(OV7630, 101)},
1434 {USB_DEVICE(0x0c45, 0x6024), SB(TAS5130CXX, 102)},
1435 {USB_DEVICE(0x0c45, 0x6025), SB(TAS5130CXX, 102)},
1436 {USB_DEVICE(0x0c45, 0x6027), SB(OV7630, 101)}, /* Genius Eye 310 */
1437 {USB_DEVICE(0x0c45, 0x6028), SB(PAS202, 102)},
1438 {USB_DEVICE(0x0c45, 0x6029), SB(PAS106, 102)},
1439 {USB_DEVICE(0x0c45, 0x602a), SB(HV7131D, 102)},
1440 /* {USB_DEVICE(0x0c45, 0x602b), SB(MI0343, 102)}, */
1441 {USB_DEVICE(0x0c45, 0x602c), SB(OV7630, 102)},
1442 {USB_DEVICE(0x0c45, 0x602d), SB(HV7131R, 102)},
1443 {USB_DEVICE(0x0c45, 0x602e), SB(OV7630, 102)},
1444 /* {USB_DEVICE(0x0c45, 0x6030), SB(MI03XX, 102)}, */ /* MI0343 MI0360 MI0330 */
1445 /* {USB_DEVICE(0x0c45, 0x6082), SB(MI03XX, 103)}, */ /* MI0343 MI0360 */
1446 {USB_DEVICE(0x0c45, 0x6083), SB(HV7131D, 103)},
1447 {USB_DEVICE(0x0c45, 0x608c), SB(HV7131R, 103)},
1448 /* {USB_DEVICE(0x0c45, 0x608e), SB(CISVF10, 103)}, */
1449 {USB_DEVICE(0x0c45, 0x608f), SB(OV7630, 103)},
1450 {USB_DEVICE(0x0c45, 0x60a8), SB(PAS106, 103)},
1451 {USB_DEVICE(0x0c45, 0x60aa), SB(TAS5130CXX, 103)},
1452 {USB_DEVICE(0x0c45, 0x60af), SB(PAS202, 103)},
1453 {USB_DEVICE(0x0c45, 0x60b0), SB(OV7630, 103)},