diff options
author | AceLan Kao <acelan.kao@canonical.com> | 2009-07-27 04:43:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-09-12 11:18:17 -0400 |
commit | 4041f6b3b4deaa3c67fbe71b67c3c18ac9ce0207 (patch) | |
tree | 0cb0caeeae4f02b3ec43e2b78151f00c92eea264 /drivers/media/video/gspca/vc032x.c | |
parent | 00b581ef0d31db9c28215254b64f3890c7c9f939 (diff) |
V4L/DVB (12352): gspca - vc032x: Fix mi1310_soc preview and LED
The patches
gspca - vc032x: Add resolution 1280x1024 for sensor mi1310_soc.
gspca - vc032x: Webcam 041e:405b added and mi1310_soc updated.
will make the preview function not work, so I disable the 1280x1024 resolution
and revert back to the origin mi1310_soc settings.
And, using USB snoop tool on Windows to get the correct i2c commands to
turn on/off the LED flash.
Signed-off-by: AceLan Kao <acelan.kao@canonical.com>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/vc032x.c')
-rw-r--r-- | drivers/media/video/gspca/vc032x.c | 397 |
1 files changed, 205 insertions, 192 deletions
diff --git a/drivers/media/video/gspca/vc032x.c b/drivers/media/video/gspca/vc032x.c index 5b6f717d3fe4..cda14583bc35 100644 --- a/drivers/media/video/gspca/vc032x.c +++ b/drivers/media/video/gspca/vc032x.c | |||
@@ -425,208 +425,92 @@ static const __u8 mi0360_initQVGA_JPG[][4] = { | |||
425 | static const __u8 mi1310_socinitVGA_JPG[][4] = { | 425 | static const __u8 mi1310_socinitVGA_JPG[][4] = { |
426 | {0xb0, 0x03, 0x19, 0xcc}, | 426 | {0xb0, 0x03, 0x19, 0xcc}, |
427 | {0xb0, 0x04, 0x02, 0xcc}, | 427 | {0xb0, 0x04, 0x02, 0xcc}, |
428 | {0xb3, 0x00, 0x24, 0xcc}, | 428 | {0xb3, 0x00, 0x64, 0xcc}, |
429 | {0xb3, 0x00, 0x25, 0xcc}, | 429 | {0xb3, 0x00, 0x65, 0xcc}, |
430 | {0xb3, 0x05, 0x01, 0xcc}, | 430 | {0xb3, 0x05, 0x00, 0xcc}, |
431 | {0xb3, 0x06, 0x03, 0xcc}, | 431 | {0xb3, 0x06, 0x00, 0xcc}, |
432 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
433 | {0xb3, 0x08, 0x01, 0xcc}, | 432 | {0xb3, 0x08, 0x01, 0xcc}, |
434 | {0xb3, 0x09, 0x0c, 0xcc}, | 433 | {0xb3, 0x09, 0x0c, 0xcc}, |
435 | {0xb3, 0x34, 0x02, 0xcc}, | 434 | {0xb3, 0x34, 0x02, 0xcc}, |
436 | {0xb3, 0x35, 0xdd, 0xcc}, | 435 | {0xb3, 0x35, 0xdd, 0xcc}, |
436 | {0xb3, 0x02, 0x00, 0xcc}, | ||
437 | {0xb3, 0x03, 0x0a, 0xcc}, | 437 | {0xb3, 0x03, 0x0a, 0xcc}, |
438 | {0xb3, 0x04, 0x0d, 0xcc}, | 438 | {0xb3, 0x04, 0x05, 0xcc}, |
439 | {0xb3, 0x20, 0x00, 0xcc}, | 439 | {0xb3, 0x20, 0x00, 0xcc}, |
440 | {0xb3, 0x21, 0x00, 0xcc}, | 440 | {0xb3, 0x21, 0x00, 0xcc}, |
441 | {0xb3, 0x22, 0x01, 0xcc}, | 441 | {0xb3, 0x22, 0x03, 0xcc}, |
442 | {0xb3, 0x23, 0xe0, 0xcc}, | 442 | {0xb3, 0x23, 0xc0, 0xcc}, |
443 | {0xb3, 0x14, 0x00, 0xcc}, | 443 | {0xb3, 0x14, 0x00, 0xcc}, |
444 | {0xb3, 0x15, 0x00, 0xcc}, | 444 | {0xb3, 0x15, 0x00, 0xcc}, |
445 | {0xb3, 0x16, 0x02, 0xcc}, | 445 | {0xb3, 0x16, 0x04, 0xcc}, |
446 | {0xb3, 0x17, 0x7f, 0xcc}, | 446 | {0xb3, 0x17, 0xff, 0xcc}, |
447 | {0xb8, 0x01, 0x7d, 0xcc}, | 447 | {0xb3, 0x00, 0x65, 0xcc}, |
448 | {0xb8, 0x81, 0x09, 0xcc}, | 448 | {0xb8, 0x00, 0x00, 0xcc}, |
449 | {0xb8, 0x27, 0x20, 0xcc}, | 449 | {0xbc, 0x00, 0xd0, 0xcc}, |
450 | {0xb8, 0x26, 0x80, 0xcc}, | 450 | {0xbc, 0x01, 0x01, 0xcc}, |
451 | {0xb3, 0x00, 0x25, 0xcc}, | 451 | {0xf0, 0x00, 0x02, 0xbb}, |
452 | {0xb8, 0x00, 0x13, 0xcc}, | 452 | {0xc8, 0x9f, 0x0b, 0xbb}, |
453 | {0xbc, 0x00, 0x71, 0xcc}, | 453 | {0x5b, 0x00, 0x01, 0xbb}, |
454 | {0xb8, 0x81, 0x01, 0xcc}, | 454 | {0x2f, 0xde, 0x20, 0xbb}, |
455 | {0xb8, 0x2c, 0x5a, 0xcc}, | ||
456 | {0xb8, 0x2d, 0xff, 0xcc}, | ||
457 | {0xb8, 0x2e, 0xee, 0xcc}, | ||
458 | {0xb8, 0x2f, 0xfb, 0xcc}, | ||
459 | {0xb8, 0x30, 0x52, 0xcc}, | ||
460 | {0xb8, 0x31, 0xf8, 0xcc}, | ||
461 | {0xb8, 0x32, 0xf1, 0xcc}, | ||
462 | {0xb8, 0x33, 0xff, 0xcc}, | ||
463 | {0xb8, 0x34, 0x54, 0xcc}, | ||
464 | {0xb8, 0x35, 0x00, 0xcc}, | ||
465 | {0xb8, 0x36, 0x00, 0xcc}, | ||
466 | {0xb8, 0x37, 0x00, 0xcc}, | ||
467 | {0xf0, 0x00, 0x00, 0xbb}, | 455 | {0xf0, 0x00, 0x00, 0xbb}, |
468 | {0x00, 0x01, 0x00, 0xdd}, | 456 | {0x20, 0x03, 0x02, 0xbb}, |
469 | {0x0d, 0x00, 0x09, 0xbb}, | ||
470 | {0x0d, 0x00, 0x08, 0xbb}, | ||
471 | {0xf0, 0x00, 0x01, 0xbb}, | 457 | {0xf0, 0x00, 0x01, 0xbb}, |
472 | {0x00, 0x01, 0x00, 0xdd}, | 458 | {0x05, 0x00, 0x07, 0xbb}, |
473 | {0x06, 0x00, 0x14, 0xbb}, | 459 | {0x34, 0x00, 0x00, 0xbb}, |
474 | {0x3a, 0x10, 0x00, 0xbb}, | 460 | {0x35, 0xff, 0x00, 0xbb}, |
475 | {0x00, 0x00, 0x10, 0xdd}, | 461 | {0xdc, 0x07, 0x02, 0xbb}, |
476 | {0x9b, 0x10, 0x00, 0xbb}, | 462 | {0xdd, 0x3c, 0x18, 0xbb}, |
477 | {0x00, 0x00, 0x10, 0xdd}, | 463 | {0xde, 0x92, 0x6d, 0xbb}, |
464 | {0xdf, 0xcd, 0xb1, 0xbb}, | ||
465 | {0xe0, 0xff, 0xe7, 0xbb}, | ||
466 | {0x06, 0xf0, 0x0d, 0xbb}, | ||
467 | {0x06, 0x70, 0x0e, 0xbb}, | ||
468 | {0x4c, 0x00, 0x01, 0xbb}, | ||
469 | {0x4d, 0x00, 0x01, 0xbb}, | ||
470 | {0xf0, 0x00, 0x02, 0xbb}, | ||
471 | {0x2e, 0x0c, 0x55, 0xbb}, | ||
472 | {0x21, 0xb6, 0x6e, 0xbb}, | ||
473 | {0x36, 0x30, 0x10, 0xbb}, | ||
474 | {0x37, 0x00, 0xc1, 0xbb}, | ||
478 | {0xf0, 0x00, 0x00, 0xbb}, | 475 | {0xf0, 0x00, 0x00, 0xbb}, |
479 | {0x00, 0x01, 0x00, 0xdd}, | 476 | {0x07, 0x00, 0x84, 0xbb}, |
480 | {0x2b, 0x00, 0x28, 0xbb}, | 477 | {0x08, 0x02, 0x4a, 0xbb}, |
481 | {0x2c, 0x00, 0x30, 0xbb}, | 478 | {0x05, 0x01, 0x10, 0xbb}, |
482 | {0x2d, 0x00, 0x30, 0xbb}, | 479 | {0x06, 0x00, 0x39, 0xbb}, |
483 | {0x2e, 0x00, 0x28, 0xbb}, | 480 | {0xf0, 0x00, 0x02, 0xbb}, |
484 | {0x41, 0x00, 0xd7, 0xbb}, | 481 | {0x58, 0x02, 0x67, 0xbb}, |
485 | {0x09, 0x02, 0x3a, 0xbb}, | 482 | {0x57, 0x02, 0x00, 0xbb}, |
486 | {0x0c, 0x00, 0x00, 0xbb}, | 483 | {0x5a, 0x02, 0x67, 0xbb}, |
487 | {0x20, 0x00, 0x00, 0xbb}, | 484 | {0x59, 0x02, 0x00, 0xbb}, |
488 | {0x05, 0x00, 0x8c, 0xbb}, | 485 | {0x5c, 0x12, 0x0d, 0xbb}, |
489 | {0x06, 0x00, 0x32, 0xbb}, | 486 | {0x5d, 0x16, 0x11, 0xbb}, |
490 | {0x07, 0x00, 0xc6, 0xbb}, | 487 | {0x39, 0x06, 0x18, 0xbb}, |
491 | {0x08, 0x00, 0x19, 0xbb}, | 488 | {0x3a, 0x06, 0x18, 0xbb}, |
492 | {0x24, 0x80, 0x6f, 0xbb}, | 489 | {0x3b, 0x06, 0x18, 0xbb}, |
493 | {0xc8, 0x00, 0x0f, 0xbb}, | 490 | {0x3c, 0x06, 0x18, 0xbb}, |
494 | {0x20, 0x00, 0x0f, 0xbb}, | 491 | {0x64, 0x7b, 0x5b, 0xbb}, |
492 | {0xf0, 0x00, 0x02, 0xbb}, | ||
493 | {0x36, 0x30, 0x10, 0xbb}, | ||
494 | {0x37, 0x00, 0xc0, 0xbb}, | ||
495 | {0xbc, 0x0e, 0x00, 0xcc}, | ||
496 | {0xbc, 0x0f, 0x05, 0xcc}, | ||
497 | {0xbc, 0x10, 0xc0, 0xcc}, | ||
498 | {0xbc, 0x11, 0x03, 0xcc}, | ||
495 | {0xb6, 0x00, 0x00, 0xcc}, | 499 | {0xb6, 0x00, 0x00, 0xcc}, |
496 | {0xb6, 0x03, 0x02, 0xcc}, | 500 | {0xb6, 0x03, 0x02, 0xcc}, |
497 | {0xb6, 0x02, 0x80, 0xcc}, | 501 | {0xb6, 0x02, 0x80, 0xcc}, |
498 | {0xb6, 0x05, 0x01, 0xcc}, | 502 | {0xb6, 0x05, 0x01, 0xcc}, |
499 | {0xb6, 0x04, 0xe0, 0xcc}, | 503 | {0xb6, 0x04, 0xe0, 0xcc}, |
500 | {0xb6, 0x12, 0x78, 0xcc}, | 504 | {0xb6, 0x12, 0xf8, 0xcc}, |
505 | {0xb6, 0x13, 0x25, 0xcc}, | ||
501 | {0xb6, 0x18, 0x02, 0xcc}, | 506 | {0xb6, 0x18, 0x02, 0xcc}, |
502 | {0xb6, 0x17, 0x58, 0xcc}, | 507 | {0xb6, 0x17, 0x58, 0xcc}, |
503 | {0xb6, 0x16, 0x00, 0xcc}, | 508 | {0xb6, 0x16, 0x00, 0xcc}, |
504 | {0xb6, 0x22, 0x12, 0xcc}, | 509 | {0xb6, 0x22, 0x12, 0xcc}, |
505 | {0xb6, 0x23, 0x0b, 0xcc}, | 510 | {0xb6, 0x23, 0x0b, 0xcc}, |
506 | {0xb3, 0x02, 0x02, 0xcc}, | ||
507 | {0xbf, 0xc0, 0x39, 0xcc}, | 511 | {0xbf, 0xc0, 0x39, 0xcc}, |
508 | {0xbf, 0xc1, 0x04, 0xcc}, | 512 | {0xbf, 0xc1, 0x04, 0xcc}, |
509 | {0xbf, 0xcc, 0x10, 0xcc}, | 513 | {0xbf, 0xcc, 0x00, 0xcc}, |
510 | {0xb9, 0x12, 0x00, 0xcc}, | ||
511 | {0xb9, 0x13, 0x0a, 0xcc}, | ||
512 | {0xb9, 0x14, 0x0a, 0xcc}, | ||
513 | {0xb9, 0x15, 0x0a, 0xcc}, | ||
514 | {0xb9, 0x16, 0x0a, 0xcc}, | ||
515 | {0xb9, 0x18, 0x00, 0xcc}, | ||
516 | {0xb9, 0x19, 0x0f, 0xcc}, | ||
517 | {0xb9, 0x1a, 0x0f, 0xcc}, | ||
518 | {0xb9, 0x1b, 0x0f, 0xcc}, | ||
519 | {0xb9, 0x1c, 0x0f, 0xcc}, | ||
520 | {0xb8, 0x8e, 0x00, 0xcc}, | ||
521 | {0xb8, 0x8f, 0xff, 0xcc}, | ||
522 | {0xb3, 0x01, 0x41, 0xcc}, | ||
523 | {0x03, 0x03, 0xc0, 0xbb}, | ||
524 | {0x06, 0x00, 0x10, 0xbb}, | ||
525 | {0xb6, 0x12, 0xf8, 0xcc}, | ||
526 | {0xb8, 0x0c, 0x20, 0xcc}, | ||
527 | {0xb8, 0x0d, 0x70, 0xcc}, | ||
528 | {0xb6, 0x13, 0x13, 0xcc}, | ||
529 | {0x2f, 0x00, 0xC0, 0xbb}, | ||
530 | {0xb8, 0xa0, 0x12, 0xcc}, | ||
531 | {}, | ||
532 | }; | ||
533 | static const __u8 mi1310_socinitQVGA_JPG[][4] = { | ||
534 | {0xb0, 0x03, 0x19, 0xcc}, | ||
535 | {0xb0, 0x04, 0x02, 0xcc}, | ||
536 | {0xb3, 0x00, 0x24, 0xcc}, | ||
537 | {0xb3, 0x00, 0x25, 0xcc}, | ||
538 | {0xb3, 0x05, 0x01, 0xcc}, | ||
539 | {0xb3, 0x06, 0x03, 0xcc}, | ||
540 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
541 | {0xb3, 0x08, 0x01, 0xcc}, | ||
542 | {0xb3, 0x09, 0x0c, 0xcc}, | ||
543 | {0xb3, 0x34, 0x02, 0xcc}, | ||
544 | {0xb3, 0x35, 0xdd, 0xcc}, | ||
545 | {0xb3, 0x03, 0x0a, 0xcc}, | ||
546 | {0xb3, 0x04, 0x0d, 0xcc}, | ||
547 | {0xb3, 0x20, 0x00, 0xcc}, | ||
548 | {0xb3, 0x21, 0x00, 0xcc}, | ||
549 | {0xb3, 0x22, 0x01, 0xcc}, | ||
550 | {0xb3, 0x23, 0xe0, 0xcc}, | ||
551 | {0xb3, 0x14, 0x00, 0xcc}, | ||
552 | {0xb3, 0x15, 0x00, 0xcc}, | ||
553 | {0xb3, 0x16, 0x02, 0xcc}, | ||
554 | {0xb3, 0x17, 0x7f, 0xcc}, | ||
555 | {0xb8, 0x01, 0x7d, 0xcc}, | ||
556 | {0xb8, 0x81, 0x09, 0xcc}, | ||
557 | {0xb8, 0x27, 0x20, 0xcc}, | ||
558 | {0xb8, 0x26, 0x80, 0xcc}, | ||
559 | {0xb3, 0x00, 0x25, 0xcc}, | ||
560 | {0xb8, 0x00, 0x13, 0xcc}, | ||
561 | {0xbc, 0x00, 0xd1, 0xcc}, | ||
562 | {0xb8, 0x81, 0x01, 0xcc}, | ||
563 | {0xb8, 0x2c, 0x5a, 0xcc}, | ||
564 | {0xb8, 0x2d, 0xff, 0xcc}, | ||
565 | {0xb8, 0x2e, 0xee, 0xcc}, | ||
566 | {0xb8, 0x2f, 0xfb, 0xcc}, | ||
567 | {0xb8, 0x30, 0x52, 0xcc}, | ||
568 | {0xb8, 0x31, 0xf8, 0xcc}, | ||
569 | {0xb8, 0x32, 0xf1, 0xcc}, | ||
570 | {0xb8, 0x33, 0xff, 0xcc}, | ||
571 | {0xb8, 0x34, 0x54, 0xcc}, | ||
572 | {0xb8, 0x35, 0x00, 0xcc}, | ||
573 | {0xb8, 0x36, 0x00, 0xcc}, | ||
574 | {0xb8, 0x37, 0x00, 0xcc}, | ||
575 | {0xf0, 0x00, 0x00, 0xbb}, | ||
576 | {0x00, 0x01, 0x00, 0xdd}, | ||
577 | {0x0d, 0x00, 0x09, 0xbb}, | ||
578 | {0x0d, 0x00, 0x08, 0xbb}, | ||
579 | {0xf0, 0x00, 0x01, 0xbb}, | ||
580 | {0x00, 0x01, 0x00, 0xdd}, | ||
581 | {0x06, 0x00, 0x14, 0xbb}, | ||
582 | {0x3a, 0x10, 0x00, 0xbb}, | ||
583 | {0x00, 0x00, 0x10, 0xdd}, | ||
584 | {0x9b, 0x10, 0x00, 0xbb}, | ||
585 | {0x00, 0x00, 0x10, 0xdd}, | ||
586 | {0xf0, 0x00, 0x00, 0xbb}, | ||
587 | {0x00, 0x01, 0x00, 0xdd}, | ||
588 | {0x2b, 0x00, 0x28, 0xbb}, | ||
589 | {0x2c, 0x00, 0x30, 0xbb}, | ||
590 | {0x2d, 0x00, 0x30, 0xbb}, | ||
591 | {0x2e, 0x00, 0x28, 0xbb}, | ||
592 | {0x41, 0x00, 0xd7, 0xbb}, | ||
593 | {0x09, 0x02, 0x3a, 0xbb}, | ||
594 | {0x0c, 0x00, 0x00, 0xbb}, | ||
595 | {0x20, 0x00, 0x00, 0xbb}, | ||
596 | {0x05, 0x00, 0x8c, 0xbb}, | ||
597 | {0x06, 0x00, 0x32, 0xbb}, | ||
598 | {0x07, 0x00, 0xc6, 0xbb}, | ||
599 | {0x08, 0x00, 0x19, 0xbb}, | ||
600 | {0x24, 0x80, 0x6f, 0xbb}, | ||
601 | {0xc8, 0x00, 0x0f, 0xbb}, | ||
602 | {0x20, 0x00, 0x0f, 0xbb}, | ||
603 | {0xb6, 0x00, 0x00, 0xcc}, | ||
604 | {0xb6, 0x03, 0x01, 0xcc}, | ||
605 | {0xb6, 0x02, 0x40, 0xcc}, | ||
606 | {0xb6, 0x05, 0x00, 0xcc}, | ||
607 | {0xb6, 0x04, 0xf0, 0xcc}, | ||
608 | {0xb6, 0x12, 0x78, 0xcc}, | ||
609 | {0xb6, 0x18, 0x00, 0xcc}, | ||
610 | {0xb6, 0x17, 0x96, 0xcc}, | ||
611 | {0xb6, 0x16, 0x00, 0xcc}, | ||
612 | {0xb6, 0x22, 0x12, 0xcc}, | ||
613 | {0xb6, 0x23, 0x0b, 0xcc}, | ||
614 | {0xb3, 0x02, 0x02, 0xcc}, | ||
615 | {0xbf, 0xc0, 0x39, 0xcc}, | ||
616 | {0xbf, 0xc1, 0x04, 0xcc}, | ||
617 | {0xbf, 0xcc, 0x10, 0xcc}, | ||
618 | {0xb9, 0x12, 0x00, 0xcc}, | ||
619 | {0xb9, 0x13, 0x0a, 0xcc}, | ||
620 | {0xb9, 0x14, 0x0a, 0xcc}, | ||
621 | {0xb9, 0x15, 0x0a, 0xcc}, | ||
622 | {0xb9, 0x16, 0x0a, 0xcc}, | ||
623 | {0xb9, 0x18, 0x00, 0xcc}, | ||
624 | {0xb9, 0x19, 0x0f, 0xcc}, | ||
625 | {0xb9, 0x1a, 0x0f, 0xcc}, | ||
626 | {0xb9, 0x1b, 0x0f, 0xcc}, | ||
627 | {0xb9, 0x1c, 0x0f, 0xcc}, | ||
628 | {0xb8, 0x8e, 0x00, 0xcc}, | ||
629 | {0xb8, 0x8f, 0xff, 0xcc}, | ||
630 | {0xbc, 0x02, 0x18, 0xcc}, | 514 | {0xbc, 0x02, 0x18, 0xcc}, |
631 | {0xbc, 0x03, 0x50, 0xcc}, | 515 | {0xbc, 0x03, 0x50, 0xcc}, |
632 | {0xbc, 0x04, 0x18, 0xcc}, | 516 | {0xbc, 0x04, 0x18, 0xcc}, |
@@ -637,15 +521,130 @@ static const __u8 mi1310_socinitQVGA_JPG[][4] = { | |||
637 | {0xbc, 0x0a, 0x10, 0xcc}, | 521 | {0xbc, 0x0a, 0x10, 0xcc}, |
638 | {0xbc, 0x0b, 0x00, 0xcc}, | 522 | {0xbc, 0x0b, 0x00, 0xcc}, |
639 | {0xbc, 0x0c, 0x00, 0xcc}, | 523 | {0xbc, 0x0c, 0x00, 0xcc}, |
524 | {0xb3, 0x5c, 0x01, 0xcc}, | ||
525 | {0xf0, 0x00, 0x01, 0xbb}, | ||
526 | {0x80, 0x00, 0x03, 0xbb}, | ||
527 | {0x81, 0xc7, 0x14, 0xbb}, | ||
528 | {0x82, 0xeb, 0xe8, 0xbb}, | ||
529 | {0x83, 0xfe, 0xf4, 0xbb}, | ||
530 | {0x84, 0xcd, 0x10, 0xbb}, | ||
531 | {0x85, 0xf3, 0xee, 0xbb}, | ||
532 | {0x86, 0xff, 0xf1, 0xbb}, | ||
533 | {0x87, 0xcd, 0x10, 0xbb}, | ||
534 | {0x88, 0xf3, 0xee, 0xbb}, | ||
535 | {0x89, 0x01, 0xf1, 0xbb}, | ||
536 | {0x8a, 0xe5, 0x17, 0xbb}, | ||
537 | {0x8b, 0xe8, 0xe2, 0xbb}, | ||
538 | {0x8c, 0xf7, 0xed, 0xbb}, | ||
539 | {0x8d, 0x00, 0xff, 0xbb}, | ||
540 | {0x8e, 0xec, 0x10, 0xbb}, | ||
541 | {0x8f, 0xf0, 0xed, 0xbb}, | ||
542 | {0x90, 0xf9, 0xf2, 0xbb}, | ||
543 | {0x91, 0x00, 0x00, 0xbb}, | ||
544 | {0x92, 0xe9, 0x0d, 0xbb}, | ||
545 | {0x93, 0xf4, 0xf2, 0xbb}, | ||
546 | {0x94, 0xfb, 0xf5, 0xbb}, | ||
547 | {0x95, 0x00, 0xff, 0xbb}, | ||
548 | {0xb6, 0x0f, 0x08, 0xbb}, | ||
549 | {0xb7, 0x3d, 0x16, 0xbb}, | ||
550 | {0xb8, 0x0c, 0x04, 0xbb}, | ||
551 | {0xb9, 0x1c, 0x07, 0xbb}, | ||
552 | {0xba, 0x0a, 0x03, 0xbb}, | ||
553 | {0xbb, 0x1b, 0x09, 0xbb}, | ||
554 | {0xbc, 0x17, 0x0d, 0xbb}, | ||
555 | {0xbd, 0x23, 0x1d, 0xbb}, | ||
556 | {0xbe, 0x00, 0x28, 0xbb}, | ||
557 | {0xbf, 0x11, 0x09, 0xbb}, | ||
558 | {0xc0, 0x16, 0x15, 0xbb}, | ||
559 | {0xc1, 0x00, 0x1b, 0xbb}, | ||
560 | {0xc2, 0x0e, 0x07, 0xbb}, | ||
561 | {0xc3, 0x14, 0x10, 0xbb}, | ||
562 | {0xc4, 0x00, 0x17, 0xbb}, | ||
563 | {0x06, 0x74, 0x8e, 0xbb}, | ||
564 | {0xf0, 0x00, 0x01, 0xbb}, | ||
565 | {0x06, 0xf4, 0x8e, 0xbb}, | ||
566 | {0x00, 0x00, 0x50, 0xdd}, | ||
567 | {0x06, 0x74, 0x8e, 0xbb}, | ||
568 | {0xf0, 0x00, 0x02, 0xbb}, | ||
569 | {0x24, 0x50, 0x20, 0xbb}, | ||
570 | {0xf0, 0x00, 0x02, 0xbb}, | ||
571 | {0x34, 0x0c, 0x50, 0xbb}, | ||
640 | {0xb3, 0x01, 0x41, 0xcc}, | 572 | {0xb3, 0x01, 0x41, 0xcc}, |
573 | {0xf0, 0x00, 0x00, 0xbb}, | ||
574 | {0x03, 0x03, 0xc0, 0xbb}, | ||
575 | {}, | ||
576 | }; | ||
577 | static const __u8 mi1310_socinitQVGA_JPG[][4] = { | ||
578 | {0xb0, 0x03, 0x19, 0xcc}, {0xb0, 0x04, 0x02, 0xcc}, | ||
579 | {0xb3, 0x00, 0x64, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, | ||
580 | {0xb3, 0x05, 0x00, 0xcc}, {0xb3, 0x06, 0x00, 0xcc}, | ||
581 | {0xb3, 0x08, 0x01, 0xcc}, {0xb3, 0x09, 0x0c, 0xcc}, | ||
582 | {0xb3, 0x34, 0x02, 0xcc}, {0xb3, 0x35, 0xdd, 0xcc}, | ||
583 | {0xb3, 0x02, 0x00, 0xcc}, {0xb3, 0x03, 0x0a, 0xcc}, | ||
584 | {0xb3, 0x04, 0x05, 0xcc}, {0xb3, 0x20, 0x00, 0xcc}, | ||
585 | {0xb3, 0x21, 0x00, 0xcc}, {0xb3, 0x22, 0x03, 0xcc}, | ||
586 | {0xb3, 0x23, 0xc0, 0xcc}, {0xb3, 0x14, 0x00, 0xcc}, | ||
587 | {0xb3, 0x15, 0x00, 0xcc}, {0xb3, 0x16, 0x04, 0xcc}, | ||
588 | {0xb3, 0x17, 0xff, 0xcc}, {0xb3, 0x00, 0x65, 0xcc}, | ||
589 | {0xb8, 0x00, 0x00, 0xcc}, {0xbc, 0x00, 0xf0, 0xcc}, | ||
590 | {0xbc, 0x01, 0x01, 0xcc}, {0xf0, 0x00, 0x02, 0xbb}, | ||
591 | {0xc8, 0x9f, 0x0b, 0xbb}, {0x5b, 0x00, 0x01, 0xbb}, | ||
592 | {0x2f, 0xde, 0x20, 0xbb}, {0xf0, 0x00, 0x00, 0xbb}, | ||
593 | {0x20, 0x03, 0x02, 0xbb}, {0xf0, 0x00, 0x01, 0xbb}, | ||
594 | {0x05, 0x00, 0x07, 0xbb}, {0x34, 0x00, 0x00, 0xbb}, | ||
595 | {0x35, 0xff, 0x00, 0xbb}, {0xdc, 0x07, 0x02, 0xbb}, | ||
596 | {0xdd, 0x3c, 0x18, 0xbb}, {0xde, 0x92, 0x6d, 0xbb}, | ||
597 | {0xdf, 0xcd, 0xb1, 0xbb}, {0xe0, 0xff, 0xe7, 0xbb}, | ||
598 | {0x06, 0xf0, 0x0d, 0xbb}, {0x06, 0x70, 0x0e, 0xbb}, | ||
599 | {0x4c, 0x00, 0x01, 0xbb}, {0x4d, 0x00, 0x01, 0xbb}, | ||
600 | {0xf0, 0x00, 0x02, 0xbb}, {0x2e, 0x0c, 0x55, 0xbb}, | ||
601 | {0x21, 0xb6, 0x6e, 0xbb}, {0x36, 0x30, 0x10, 0xbb}, | ||
602 | {0x37, 0x00, 0xc1, 0xbb}, {0xf0, 0x00, 0x00, 0xbb}, | ||
603 | {0x07, 0x00, 0x84, 0xbb}, {0x08, 0x02, 0x4a, 0xbb}, | ||
604 | {0x05, 0x01, 0x10, 0xbb}, {0x06, 0x00, 0x39, 0xbb}, | ||
605 | {0xf0, 0x00, 0x02, 0xbb}, {0x58, 0x02, 0x67, 0xbb}, | ||
606 | {0x57, 0x02, 0x00, 0xbb}, {0x5a, 0x02, 0x67, 0xbb}, | ||
607 | {0x59, 0x02, 0x00, 0xbb}, {0x5c, 0x12, 0x0d, 0xbb}, | ||
608 | {0x5d, 0x16, 0x11, 0xbb}, {0x39, 0x06, 0x18, 0xbb}, | ||
609 | {0x3a, 0x06, 0x18, 0xbb}, {0x3b, 0x06, 0x18, 0xbb}, | ||
610 | {0x3c, 0x06, 0x18, 0xbb}, {0x64, 0x7b, 0x5b, 0xbb}, | ||
611 | {0xf0, 0x00, 0x02, 0xbb}, {0x36, 0x30, 0x10, 0xbb}, | ||
612 | {0x37, 0x00, 0xc0, 0xbb}, {0xbc, 0x0e, 0x00, 0xcc}, | ||
613 | {0xbc, 0x0f, 0x05, 0xcc}, {0xbc, 0x10, 0xc0, 0xcc}, | ||
614 | {0xbc, 0x11, 0x03, 0xcc}, {0xb6, 0x00, 0x00, 0xcc}, | ||
615 | {0xb6, 0x03, 0x01, 0xcc}, {0xb6, 0x02, 0x40, 0xcc}, | ||
616 | {0xb6, 0x05, 0x00, 0xcc}, {0xb6, 0x04, 0xf0, 0xcc}, | ||
617 | {0xb6, 0x12, 0xf8, 0xcc}, {0xb6, 0x13, 0x25, 0xcc}, | ||
618 | {0xb6, 0x18, 0x00, 0xcc}, {0xb6, 0x17, 0x96, 0xcc}, | ||
619 | {0xb6, 0x16, 0x00, 0xcc}, {0xb6, 0x22, 0x12, 0xcc}, | ||
620 | {0xb6, 0x23, 0x0b, 0xcc}, {0xbf, 0xc0, 0x39, 0xcc}, | ||
621 | {0xbf, 0xc1, 0x04, 0xcc}, {0xbf, 0xcc, 0x00, 0xcc}, | ||
622 | {0xb3, 0x5c, 0x01, 0xcc}, {0xf0, 0x00, 0x01, 0xbb}, | ||
623 | {0x80, 0x00, 0x03, 0xbb}, {0x81, 0xc7, 0x14, 0xbb}, | ||
624 | {0x82, 0xeb, 0xe8, 0xbb}, {0x83, 0xfe, 0xf4, 0xbb}, | ||
625 | {0x84, 0xcd, 0x10, 0xbb}, {0x85, 0xf3, 0xee, 0xbb}, | ||
626 | {0x86, 0xff, 0xf1, 0xbb}, {0x87, 0xcd, 0x10, 0xbb}, | ||
627 | {0x88, 0xf3, 0xee, 0xbb}, {0x89, 0x01, 0xf1, 0xbb}, | ||
628 | {0x8a, 0xe5, 0x17, 0xbb}, {0x8b, 0xe8, 0xe2, 0xbb}, | ||
629 | {0x8c, 0xf7, 0xed, 0xbb}, {0x8d, 0x00, 0xff, 0xbb}, | ||
630 | {0x8e, 0xec, 0x10, 0xbb}, {0x8f, 0xf0, 0xed, 0xbb}, | ||
631 | {0x90, 0xf9, 0xf2, 0xbb}, {0x91, 0x00, 0x00, 0xbb}, | ||
632 | {0x92, 0xe9, 0x0d, 0xbb}, {0x93, 0xf4, 0xf2, 0xbb}, | ||
633 | {0x94, 0xfb, 0xf5, 0xbb}, {0x95, 0x00, 0xff, 0xbb}, | ||
634 | {0xb6, 0x0f, 0x08, 0xbb}, {0xb7, 0x3d, 0x16, 0xbb}, | ||
635 | {0xb8, 0x0c, 0x04, 0xbb}, {0xb9, 0x1c, 0x07, 0xbb}, | ||
636 | {0xba, 0x0a, 0x03, 0xbb}, {0xbb, 0x1b, 0x09, 0xbb}, | ||
637 | {0xbc, 0x17, 0x0d, 0xbb}, {0xbd, 0x23, 0x1d, 0xbb}, | ||
638 | {0xbe, 0x00, 0x28, 0xbb}, {0xbf, 0x11, 0x09, 0xbb}, | ||
639 | {0xc0, 0x16, 0x15, 0xbb}, {0xc1, 0x00, 0x1b, 0xbb}, | ||
640 | {0xc2, 0x0e, 0x07, 0xbb}, {0xc3, 0x14, 0x10, 0xbb}, | ||
641 | {0xc4, 0x00, 0x17, 0xbb}, {0x06, 0x74, 0x8e, 0xbb}, | ||
642 | {0xf0, 0x00, 0x01, 0xbb}, {0x06, 0xf4, 0x8e, 0xbb}, | ||
643 | {0x00, 0x00, 0x50, 0xdd}, {0x06, 0x74, 0x8e, 0xbb}, | ||
644 | {0xf0, 0x00, 0x02, 0xbb}, {0x24, 0x50, 0x20, 0xbb}, | ||
645 | {0xf0, 0x00, 0x02, 0xbb}, {0x34, 0x0c, 0x50, 0xbb}, | ||
646 | {0xb3, 0x01, 0x41, 0xcc}, {0xf0, 0x00, 0x00, 0xbb}, | ||
641 | {0x03, 0x03, 0xc0, 0xbb}, | 647 | {0x03, 0x03, 0xc0, 0xbb}, |
642 | {0x06, 0x00, 0x10, 0xbb}, | ||
643 | {0xb6, 0x12, 0xf8, 0xcc}, | ||
644 | {0xb8, 0x0c, 0x20, 0xcc}, | ||
645 | {0xb8, 0x0d, 0x70, 0xcc}, | ||
646 | {0xb6, 0x13, 0x13, 0xcc}, | ||
647 | {0x2f, 0x00, 0xC0, 0xbb}, | ||
648 | {0xb8, 0xa0, 0x12, 0xcc}, | ||
649 | {}, | 648 | {}, |
650 | }; | 649 | }; |
651 | static const u8 mi1310_soc_InitSXGA_JPG[][4] = { | 650 | static const u8 mi1310_soc_InitSXGA_JPG[][4] = { |
@@ -2523,7 +2522,8 @@ static int sd_config(struct gspca_dev *gspca_dev, | |||
2523 | break; | 2522 | break; |
2524 | case SENSOR_MI1310_SOC: | 2523 | case SENSOR_MI1310_SOC: |
2525 | cam->cam_mode = vc0323_mode; | 2524 | cam->cam_mode = vc0323_mode; |
2526 | cam->nmodes = ARRAY_SIZE(vc0323_mode); | 2525 | /* TODO: 1280x1024 resolution setting is incorrect, so don't export it now*/ |
2526 | cam->nmodes = ARRAY_SIZE(vc0323_mode) - 1; | ||
2527 | break; | 2527 | break; |
2528 | case SENSOR_MI1320_SOC: | 2528 | case SENSOR_MI1320_SOC: |
2529 | cam->cam_mode = bi_mode; | 2529 | cam->cam_mode = bi_mode; |
@@ -2753,15 +2753,20 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
2753 | put_tab_to_reg(gspca_dev, MatrixT, 9, 0xb82c); | 2753 | put_tab_to_reg(gspca_dev, MatrixT, 9, 0xb82c); |
2754 | 2754 | ||
2755 | /* set the led on 0x0892 0x0896 */ | 2755 | /* set the led on 0x0892 0x0896 */ |
2756 | if (sd->sensor != SENSOR_PO1200) { | 2756 | if (sd->sensor == SENSOR_PO1200) { |
2757 | reg_w(gspca_dev->dev, 0x89, 0xffff, 0xfdff); | 2757 | setsharpness(gspca_dev); |
2758 | sethvflip(gspca_dev); | ||
2759 | reg_w(gspca_dev->dev, 0x89, 0x0400, 0x1415); | ||
2760 | } else if (sd->sensor == SENSOR_MI1310_SOC) { | ||
2761 | reg_w(gspca_dev->dev, 0x89, 0x058c, 0x0000); | ||
2758 | msleep(100); | 2762 | msleep(100); |
2759 | sethvflip(gspca_dev); | 2763 | sethvflip(gspca_dev); |
2760 | setlightfreq(gspca_dev); | 2764 | setlightfreq(gspca_dev); |
2761 | } else { | 2765 | } else { |
2762 | setsharpness(gspca_dev); | 2766 | reg_w(gspca_dev->dev, 0x89, 0xffff, 0xfdff); |
2767 | msleep(100); | ||
2763 | sethvflip(gspca_dev); | 2768 | sethvflip(gspca_dev); |
2764 | reg_w(gspca_dev->dev, 0x89, 0x0400, 0x1415); | 2769 | setlightfreq(gspca_dev); |
2765 | } | 2770 | } |
2766 | } | 2771 | } |
2767 | return 0; | 2772 | return 0; |
@@ -2770,8 +2775,12 @@ static int sd_start(struct gspca_dev *gspca_dev) | |||
2770 | static void sd_stopN(struct gspca_dev *gspca_dev) | 2775 | static void sd_stopN(struct gspca_dev *gspca_dev) |
2771 | { | 2776 | { |
2772 | struct usb_device *dev = gspca_dev->dev; | 2777 | struct usb_device *dev = gspca_dev->dev; |
2778 | struct sd *sd = (struct sd *) gspca_dev; | ||
2773 | 2779 | ||
2774 | reg_w(dev, 0x89, 0xffff, 0xffff); | 2780 | if( sd->sensor == SENSOR_MI1310_SOC) |
2781 | reg_w(dev, 0x89, 0x058c, 0x00ff); | ||
2782 | else | ||
2783 | reg_w(dev, 0x89, 0xffff, 0xffff); | ||
2775 | reg_w(dev, 0xa0, 0x01, 0xb301); | 2784 | reg_w(dev, 0xa0, 0x01, 0xb301); |
2776 | reg_w(dev, 0xa0, 0x09, 0xb003); | 2785 | reg_w(dev, 0xa0, 0x09, 0xb003); |
2777 | } | 2786 | } |
@@ -2780,10 +2789,14 @@ static void sd_stopN(struct gspca_dev *gspca_dev) | |||
2780 | static void sd_stop0(struct gspca_dev *gspca_dev) | 2789 | static void sd_stop0(struct gspca_dev *gspca_dev) |
2781 | { | 2790 | { |
2782 | struct usb_device *dev = gspca_dev->dev; | 2791 | struct usb_device *dev = gspca_dev->dev; |
2792 | struct sd *sd = (struct sd *) gspca_dev; | ||
2783 | 2793 | ||
2784 | if (!gspca_dev->present) | 2794 | if (!gspca_dev->present) |
2785 | return; | 2795 | return; |
2786 | reg_w(dev, 0x89, 0xffff, 0xffff); | 2796 | if( sd->sensor == SENSOR_MI1310_SOC) |
2797 | reg_w(dev, 0x89, 0x058c, 0x00ff); | ||
2798 | else | ||
2799 | reg_w(dev, 0x89, 0xffff, 0xffff); | ||
2787 | } | 2800 | } |
2788 | 2801 | ||
2789 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, | 2802 | static void sd_pkt_scan(struct gspca_dev *gspca_dev, |