diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-11-27 05:42:26 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-29 14:53:42 -0500 |
commit | 122b77e59ed2de0692dfe45c87a93e98156fe03a (patch) | |
tree | dd48299537ee437914e94e33bf8e827aba0410eb /drivers/media/video/em28xx | |
parent | 0ec202d183b4e3d3e4d06612a29e25466889c328 (diff) |
V4L/DVB (9760): em28xx: move gpio lines into board table description
Instead of a large, ugly switch specifying the gpio tables for each
device, let's move it into the boards struct. This also helps to see
what boards have already the gpio's for DVB.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-cards.c | 123 | ||||
-rw-r--r-- | drivers/media/video/em28xx/em28xx.h | 15 |
2 files changed, 67 insertions, 71 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c index 9b921fd846eb..51fa348514ee 100644 --- a/drivers/media/video/em28xx/em28xx-cards.c +++ b/drivers/media/video/em28xx/em28xx-cards.c | |||
@@ -89,17 +89,9 @@ static struct em28xx_reg_seq em2880_msi_digivox_ad_analog[] = { | |||
89 | }; | 89 | }; |
90 | 90 | ||
91 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ | 91 | /* Boards - EM2880 MSI DIGIVOX AD and EM2880_BOARD_MSI_DIGIVOX_AD_II */ |
92 | static struct em28xx_reg_seq em2880_msi_digivox_ad_digital[] = { | ||
93 | {EM28XX_R08_GPIO, 0x6a, ~EM_GPIO_4, 10}, | ||
94 | { -1, -1, -1, -1}, | ||
95 | }; | ||
96 | 92 | ||
97 | /* Board - EM2870 Kworld 355u | 93 | /* Board - EM2870 Kworld 355u |
98 | Analog - No input analog */ | 94 | Analog - No input analog */ |
99 | static struct em28xx_reg_seq em2870_kworld_355u_digital[] = { | ||
100 | {EM2880_R04_GPO, 0x01, 0xff, 10}, | ||
101 | { -1, -1, -1, -1}, | ||
102 | }; | ||
103 | 95 | ||
104 | /* Callback for the most boards */ | 96 | /* Callback for the most boards */ |
105 | static struct em28xx_reg_seq default_callback[] = { | 97 | static struct em28xx_reg_seq default_callback[] = { |
@@ -467,14 +459,17 @@ struct em28xx_board em28xx_boards[] = { | |||
467 | .type = EM28XX_VMUX_TELEVISION, | 459 | .type = EM28XX_VMUX_TELEVISION, |
468 | .vmux = TVP5150_COMPOSITE0, | 460 | .vmux = TVP5150_COMPOSITE0, |
469 | .amux = EM28XX_AMUX_VIDEO, | 461 | .amux = EM28XX_AMUX_VIDEO, |
462 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
470 | }, { | 463 | }, { |
471 | .type = EM28XX_VMUX_COMPOSITE1, | 464 | .type = EM28XX_VMUX_COMPOSITE1, |
472 | .vmux = TVP5150_COMPOSITE1, | 465 | .vmux = TVP5150_COMPOSITE1, |
473 | .amux = EM28XX_AMUX_LINE_IN, | 466 | .amux = EM28XX_AMUX_LINE_IN, |
467 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
474 | }, { | 468 | }, { |
475 | .type = EM28XX_VMUX_SVIDEO, | 469 | .type = EM28XX_VMUX_SVIDEO, |
476 | .vmux = TVP5150_SVIDEO, | 470 | .vmux = TVP5150_SVIDEO, |
477 | .amux = EM28XX_AMUX_LINE_IN, | 471 | .amux = EM28XX_AMUX_LINE_IN, |
472 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
478 | } }, | 473 | } }, |
479 | }, | 474 | }, |
480 | [EM2861_BOARD_KWORLD_PVRTV_300U] = { | 475 | [EM2861_BOARD_KWORLD_PVRTV_300U] = { |
@@ -576,14 +571,17 @@ struct em28xx_board em28xx_boards[] = { | |||
576 | .type = EM28XX_VMUX_TELEVISION, | 571 | .type = EM28XX_VMUX_TELEVISION, |
577 | .vmux = TVP5150_COMPOSITE0, | 572 | .vmux = TVP5150_COMPOSITE0, |
578 | .amux = EM28XX_AMUX_VIDEO, | 573 | .amux = EM28XX_AMUX_VIDEO, |
574 | .gpio = default_analog, | ||
579 | }, { | 575 | }, { |
580 | .type = EM28XX_VMUX_COMPOSITE1, | 576 | .type = EM28XX_VMUX_COMPOSITE1, |
581 | .vmux = TVP5150_COMPOSITE1, | 577 | .vmux = TVP5150_COMPOSITE1, |
582 | .amux = EM28XX_AMUX_LINE_IN, | 578 | .amux = EM28XX_AMUX_LINE_IN, |
579 | .gpio = default_analog, | ||
583 | }, { | 580 | }, { |
584 | .type = EM28XX_VMUX_SVIDEO, | 581 | .type = EM28XX_VMUX_SVIDEO, |
585 | .vmux = TVP5150_SVIDEO, | 582 | .vmux = TVP5150_SVIDEO, |
586 | .amux = EM28XX_AMUX_LINE_IN, | 583 | .amux = EM28XX_AMUX_LINE_IN, |
584 | .gpio = default_analog, | ||
587 | } }, | 585 | } }, |
588 | }, | 586 | }, |
589 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = { | 587 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900] = { |
@@ -592,19 +590,23 @@ struct em28xx_board em28xx_boards[] = { | |||
592 | .tuner_type = TUNER_XC2028, | 590 | .tuner_type = TUNER_XC2028, |
593 | .mts_firmware = 1, | 591 | .mts_firmware = 1, |
594 | .has_dvb = 1, | 592 | .has_dvb = 1, |
593 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, | ||
595 | .decoder = EM28XX_TVP5150, | 594 | .decoder = EM28XX_TVP5150, |
596 | .input = { { | 595 | .input = { { |
597 | .type = EM28XX_VMUX_TELEVISION, | 596 | .type = EM28XX_VMUX_TELEVISION, |
598 | .vmux = TVP5150_COMPOSITE0, | 597 | .vmux = TVP5150_COMPOSITE0, |
599 | .amux = EM28XX_AMUX_VIDEO, | 598 | .amux = EM28XX_AMUX_VIDEO, |
599 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
600 | }, { | 600 | }, { |
601 | .type = EM28XX_VMUX_COMPOSITE1, | 601 | .type = EM28XX_VMUX_COMPOSITE1, |
602 | .vmux = TVP5150_COMPOSITE1, | 602 | .vmux = TVP5150_COMPOSITE1, |
603 | .amux = EM28XX_AMUX_LINE_IN, | 603 | .amux = EM28XX_AMUX_LINE_IN, |
604 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
604 | }, { | 605 | }, { |
605 | .type = EM28XX_VMUX_SVIDEO, | 606 | .type = EM28XX_VMUX_SVIDEO, |
606 | .vmux = TVP5150_SVIDEO, | 607 | .vmux = TVP5150_SVIDEO, |
607 | .amux = EM28XX_AMUX_LINE_IN, | 608 | .amux = EM28XX_AMUX_LINE_IN, |
609 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
608 | } }, | 610 | } }, |
609 | }, | 611 | }, |
610 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = { | 612 | [EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2] = { |
@@ -617,14 +619,17 @@ struct em28xx_board em28xx_boards[] = { | |||
617 | .type = EM28XX_VMUX_TELEVISION, | 619 | .type = EM28XX_VMUX_TELEVISION, |
618 | .vmux = TVP5150_COMPOSITE0, | 620 | .vmux = TVP5150_COMPOSITE0, |
619 | .amux = EM28XX_AMUX_VIDEO, | 621 | .amux = EM28XX_AMUX_VIDEO, |
622 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
620 | }, { | 623 | }, { |
621 | .type = EM28XX_VMUX_COMPOSITE1, | 624 | .type = EM28XX_VMUX_COMPOSITE1, |
622 | .vmux = TVP5150_COMPOSITE1, | 625 | .vmux = TVP5150_COMPOSITE1, |
623 | .amux = 3, | 626 | .amux = 3, |
627 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
624 | }, { | 628 | }, { |
625 | .type = EM28XX_VMUX_SVIDEO, | 629 | .type = EM28XX_VMUX_SVIDEO, |
626 | .vmux = TVP5150_SVIDEO, | 630 | .vmux = TVP5150_SVIDEO, |
627 | .amux = EM28XX_AMUX_LINE_IN, | 631 | .amux = EM28XX_AMUX_LINE_IN, |
632 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
628 | } }, | 633 | } }, |
629 | }, | 634 | }, |
630 | [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = { | 635 | [EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950] = { |
@@ -632,20 +637,24 @@ struct em28xx_board em28xx_boards[] = { | |||
632 | .tuner_type = TUNER_XC2028, | 637 | .tuner_type = TUNER_XC2028, |
633 | .mts_firmware = 1, | 638 | .mts_firmware = 1, |
634 | .has_dvb = 1, | 639 | .has_dvb = 1, |
640 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, | ||
635 | .ir_codes = ir_codes_hauppauge_new, | 641 | .ir_codes = ir_codes_hauppauge_new, |
636 | .decoder = EM28XX_TVP5150, | 642 | .decoder = EM28XX_TVP5150, |
637 | .input = { { | 643 | .input = { { |
638 | .type = EM28XX_VMUX_TELEVISION, | 644 | .type = EM28XX_VMUX_TELEVISION, |
639 | .vmux = TVP5150_COMPOSITE0, | 645 | .vmux = TVP5150_COMPOSITE0, |
640 | .amux = EM28XX_AMUX_VIDEO, | 646 | .amux = EM28XX_AMUX_VIDEO, |
647 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
641 | }, { | 648 | }, { |
642 | .type = EM28XX_VMUX_COMPOSITE1, | 649 | .type = EM28XX_VMUX_COMPOSITE1, |
643 | .vmux = TVP5150_COMPOSITE1, | 650 | .vmux = TVP5150_COMPOSITE1, |
644 | .amux = EM28XX_AMUX_LINE_IN, | 651 | .amux = EM28XX_AMUX_LINE_IN, |
652 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
645 | }, { | 653 | }, { |
646 | .type = EM28XX_VMUX_SVIDEO, | 654 | .type = EM28XX_VMUX_SVIDEO, |
647 | .vmux = TVP5150_SVIDEO, | 655 | .vmux = TVP5150_SVIDEO, |
648 | .amux = EM28XX_AMUX_LINE_IN, | 656 | .amux = EM28XX_AMUX_LINE_IN, |
657 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
649 | } }, | 658 | } }, |
650 | }, | 659 | }, |
651 | [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = { | 660 | [EM2880_BOARD_PINNACLE_PCTV_HD_PRO] = { |
@@ -653,20 +662,24 @@ struct em28xx_board em28xx_boards[] = { | |||
653 | .tuner_type = TUNER_XC2028, | 662 | .tuner_type = TUNER_XC2028, |
654 | .mts_firmware = 1, | 663 | .mts_firmware = 1, |
655 | .has_dvb = 1, | 664 | .has_dvb = 1, |
665 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, | ||
656 | .ir_codes = ir_codes_pinnacle_pctv_hd, | 666 | .ir_codes = ir_codes_pinnacle_pctv_hd, |
657 | .decoder = EM28XX_TVP5150, | 667 | .decoder = EM28XX_TVP5150, |
658 | .input = { { | 668 | .input = { { |
659 | .type = EM28XX_VMUX_TELEVISION, | 669 | .type = EM28XX_VMUX_TELEVISION, |
660 | .vmux = TVP5150_COMPOSITE0, | 670 | .vmux = TVP5150_COMPOSITE0, |
661 | .amux = EM28XX_AMUX_VIDEO, | 671 | .amux = EM28XX_AMUX_VIDEO, |
672 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
662 | }, { | 673 | }, { |
663 | .type = EM28XX_VMUX_COMPOSITE1, | 674 | .type = EM28XX_VMUX_COMPOSITE1, |
664 | .vmux = TVP5150_COMPOSITE1, | 675 | .vmux = TVP5150_COMPOSITE1, |
665 | .amux = EM28XX_AMUX_LINE_IN, | 676 | .amux = EM28XX_AMUX_LINE_IN, |
677 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
666 | }, { | 678 | }, { |
667 | .type = EM28XX_VMUX_SVIDEO, | 679 | .type = EM28XX_VMUX_SVIDEO, |
668 | .vmux = TVP5150_SVIDEO, | 680 | .vmux = TVP5150_SVIDEO, |
669 | .amux = EM28XX_AMUX_LINE_IN, | 681 | .amux = EM28XX_AMUX_LINE_IN, |
682 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
670 | } }, | 683 | } }, |
671 | }, | 684 | }, |
672 | [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = { | 685 | [EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600] = { |
@@ -674,20 +687,24 @@ struct em28xx_board em28xx_boards[] = { | |||
674 | .tuner_type = TUNER_XC2028, | 687 | .tuner_type = TUNER_XC2028, |
675 | .mts_firmware = 1, | 688 | .mts_firmware = 1, |
676 | .has_dvb = 1, | 689 | .has_dvb = 1, |
690 | .dvb_gpio = hauppauge_wintv_hvr_900_digital, | ||
677 | .ir_codes = ir_codes_ati_tv_wonder_hd_600, | 691 | .ir_codes = ir_codes_ati_tv_wonder_hd_600, |
678 | .decoder = EM28XX_TVP5150, | 692 | .decoder = EM28XX_TVP5150, |
679 | .input = { { | 693 | .input = { { |
680 | .type = EM28XX_VMUX_TELEVISION, | 694 | .type = EM28XX_VMUX_TELEVISION, |
681 | .vmux = TVP5150_COMPOSITE0, | 695 | .vmux = TVP5150_COMPOSITE0, |
682 | .amux = EM28XX_AMUX_VIDEO, | 696 | .amux = EM28XX_AMUX_VIDEO, |
697 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
683 | }, { | 698 | }, { |
684 | .type = EM28XX_VMUX_COMPOSITE1, | 699 | .type = EM28XX_VMUX_COMPOSITE1, |
685 | .vmux = TVP5150_COMPOSITE1, | 700 | .vmux = TVP5150_COMPOSITE1, |
686 | .amux = EM28XX_AMUX_LINE_IN, | 701 | .amux = EM28XX_AMUX_LINE_IN, |
702 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
687 | }, { | 703 | }, { |
688 | .type = EM28XX_VMUX_SVIDEO, | 704 | .type = EM28XX_VMUX_SVIDEO, |
689 | .vmux = TVP5150_SVIDEO, | 705 | .vmux = TVP5150_SVIDEO, |
690 | .amux = EM28XX_AMUX_LINE_IN, | 706 | .amux = EM28XX_AMUX_LINE_IN, |
707 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
691 | } }, | 708 | } }, |
692 | }, | 709 | }, |
693 | [EM2880_BOARD_TERRATEC_HYBRID_XS] = { | 710 | [EM2880_BOARD_TERRATEC_HYBRID_XS] = { |
@@ -695,18 +712,22 @@ struct em28xx_board em28xx_boards[] = { | |||
695 | .tuner_type = TUNER_XC2028, | 712 | .tuner_type = TUNER_XC2028, |
696 | .decoder = EM28XX_TVP5150, | 713 | .decoder = EM28XX_TVP5150, |
697 | .has_dvb = 1, | 714 | .has_dvb = 1, |
715 | .dvb_gpio = default_analog, | ||
698 | .input = { { | 716 | .input = { { |
699 | .type = EM28XX_VMUX_TELEVISION, | 717 | .type = EM28XX_VMUX_TELEVISION, |
700 | .vmux = TVP5150_COMPOSITE0, | 718 | .vmux = TVP5150_COMPOSITE0, |
701 | .amux = EM28XX_AMUX_VIDEO, | 719 | .amux = EM28XX_AMUX_VIDEO, |
720 | .gpio = default_analog, | ||
702 | }, { | 721 | }, { |
703 | .type = EM28XX_VMUX_COMPOSITE1, | 722 | .type = EM28XX_VMUX_COMPOSITE1, |
704 | .vmux = TVP5150_COMPOSITE1, | 723 | .vmux = TVP5150_COMPOSITE1, |
705 | .amux = EM28XX_AMUX_LINE_IN, | 724 | .amux = EM28XX_AMUX_LINE_IN, |
725 | .gpio = default_analog, | ||
706 | }, { | 726 | }, { |
707 | .type = EM28XX_VMUX_SVIDEO, | 727 | .type = EM28XX_VMUX_SVIDEO, |
708 | .vmux = TVP5150_SVIDEO, | 728 | .vmux = TVP5150_SVIDEO, |
709 | .amux = EM28XX_AMUX_LINE_IN, | 729 | .amux = EM28XX_AMUX_LINE_IN, |
730 | .gpio = default_analog, | ||
710 | } }, | 731 | } }, |
711 | }, | 732 | }, |
712 | /* maybe there's a reason behind it why Terratec sells the Hybrid XS | 733 | /* maybe there's a reason behind it why Terratec sells the Hybrid XS |
@@ -720,14 +741,17 @@ struct em28xx_board em28xx_boards[] = { | |||
720 | .type = EM28XX_VMUX_TELEVISION, | 741 | .type = EM28XX_VMUX_TELEVISION, |
721 | .vmux = TVP5150_COMPOSITE0, | 742 | .vmux = TVP5150_COMPOSITE0, |
722 | .amux = EM28XX_AMUX_VIDEO, | 743 | .amux = EM28XX_AMUX_VIDEO, |
744 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
723 | }, { | 745 | }, { |
724 | .type = EM28XX_VMUX_COMPOSITE1, | 746 | .type = EM28XX_VMUX_COMPOSITE1, |
725 | .vmux = TVP5150_COMPOSITE1, | 747 | .vmux = TVP5150_COMPOSITE1, |
726 | .amux = EM28XX_AMUX_LINE_IN, | 748 | .amux = EM28XX_AMUX_LINE_IN, |
749 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
727 | }, { | 750 | }, { |
728 | .type = EM28XX_VMUX_SVIDEO, | 751 | .type = EM28XX_VMUX_SVIDEO, |
729 | .vmux = TVP5150_SVIDEO, | 752 | .vmux = TVP5150_SVIDEO, |
730 | .amux = EM28XX_AMUX_LINE_IN, | 753 | .amux = EM28XX_AMUX_LINE_IN, |
754 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
731 | } }, | 755 | } }, |
732 | }, | 756 | }, |
733 | [EM2820_BOARD_MSI_VOX_USB_2] = { | 757 | [EM2820_BOARD_MSI_VOX_USB_2] = { |
@@ -902,14 +926,17 @@ struct em28xx_board em28xx_boards[] = { | |||
902 | .type = EM28XX_VMUX_TELEVISION, | 926 | .type = EM28XX_VMUX_TELEVISION, |
903 | .vmux = TVP5150_COMPOSITE0, | 927 | .vmux = TVP5150_COMPOSITE0, |
904 | .amux = EM28XX_AMUX_VIDEO, | 928 | .amux = EM28XX_AMUX_VIDEO, |
929 | .gpio = em2880_msi_digivox_ad_analog, | ||
905 | }, { | 930 | }, { |
906 | .type = EM28XX_VMUX_COMPOSITE1, | 931 | .type = EM28XX_VMUX_COMPOSITE1, |
907 | .vmux = TVP5150_COMPOSITE1, | 932 | .vmux = TVP5150_COMPOSITE1, |
908 | .amux = EM28XX_AMUX_LINE_IN, | 933 | .amux = EM28XX_AMUX_LINE_IN, |
934 | .gpio = em2880_msi_digivox_ad_analog, | ||
909 | }, { | 935 | }, { |
910 | .type = EM28XX_VMUX_SVIDEO, | 936 | .type = EM28XX_VMUX_SVIDEO, |
911 | .vmux = TVP5150_SVIDEO, | 937 | .vmux = TVP5150_SVIDEO, |
912 | .amux = EM28XX_AMUX_LINE_IN, | 938 | .amux = EM28XX_AMUX_LINE_IN, |
939 | .gpio = em2880_msi_digivox_ad_analog, | ||
913 | } }, | 940 | } }, |
914 | }, | 941 | }, |
915 | [EM2880_BOARD_MSI_DIGIVOX_AD_II] = { | 942 | [EM2880_BOARD_MSI_DIGIVOX_AD_II] = { |
@@ -921,14 +948,17 @@ struct em28xx_board em28xx_boards[] = { | |||
921 | .type = EM28XX_VMUX_TELEVISION, | 948 | .type = EM28XX_VMUX_TELEVISION, |
922 | .vmux = TVP5150_COMPOSITE0, | 949 | .vmux = TVP5150_COMPOSITE0, |
923 | .amux = EM28XX_AMUX_VIDEO, | 950 | .amux = EM28XX_AMUX_VIDEO, |
951 | .gpio = em2880_msi_digivox_ad_analog, | ||
924 | }, { | 952 | }, { |
925 | .type = EM28XX_VMUX_COMPOSITE1, | 953 | .type = EM28XX_VMUX_COMPOSITE1, |
926 | .vmux = TVP5150_COMPOSITE1, | 954 | .vmux = TVP5150_COMPOSITE1, |
927 | .amux = EM28XX_AMUX_LINE_IN, | 955 | .amux = EM28XX_AMUX_LINE_IN, |
956 | .gpio = em2880_msi_digivox_ad_analog, | ||
928 | }, { | 957 | }, { |
929 | .type = EM28XX_VMUX_SVIDEO, | 958 | .type = EM28XX_VMUX_SVIDEO, |
930 | .vmux = TVP5150_SVIDEO, | 959 | .vmux = TVP5150_SVIDEO, |
931 | .amux = EM28XX_AMUX_LINE_IN, | 960 | .amux = EM28XX_AMUX_LINE_IN, |
961 | .gpio = em2880_msi_digivox_ad_analog, | ||
932 | } }, | 962 | } }, |
933 | }, | 963 | }, |
934 | [EM2880_BOARD_KWORLD_DVB_305U] = { | 964 | [EM2880_BOARD_KWORLD_DVB_305U] = { |
@@ -954,20 +984,24 @@ struct em28xx_board em28xx_boards[] = { | |||
954 | .name = "KWorld DVB-T 310U", | 984 | .name = "KWorld DVB-T 310U", |
955 | .tuner_type = TUNER_XC2028, | 985 | .tuner_type = TUNER_XC2028, |
956 | .has_dvb = 1, | 986 | .has_dvb = 1, |
987 | .dvb_gpio = default_digital, | ||
957 | .mts_firmware = 1, | 988 | .mts_firmware = 1, |
958 | .decoder = EM28XX_TVP5150, | 989 | .decoder = EM28XX_TVP5150, |
959 | .input = { { | 990 | .input = { { |
960 | .type = EM28XX_VMUX_TELEVISION, | 991 | .type = EM28XX_VMUX_TELEVISION, |
961 | .vmux = TVP5150_COMPOSITE0, | 992 | .vmux = TVP5150_COMPOSITE0, |
962 | .amux = EM28XX_AMUX_VIDEO, | 993 | .amux = EM28XX_AMUX_VIDEO, |
994 | .gpio = default_analog, | ||
963 | }, { | 995 | }, { |
964 | .type = EM28XX_VMUX_COMPOSITE1, | 996 | .type = EM28XX_VMUX_COMPOSITE1, |
965 | .vmux = TVP5150_COMPOSITE1, | 997 | .vmux = TVP5150_COMPOSITE1, |
966 | .amux = EM28XX_AMUX_LINE_IN, | 998 | .amux = EM28XX_AMUX_LINE_IN, |
999 | .gpio = default_analog, | ||
967 | }, { /* S-video has not been tested yet */ | 1000 | }, { /* S-video has not been tested yet */ |
968 | .type = EM28XX_VMUX_SVIDEO, | 1001 | .type = EM28XX_VMUX_SVIDEO, |
969 | .vmux = TVP5150_SVIDEO, | 1002 | .vmux = TVP5150_SVIDEO, |
970 | .amux = EM28XX_AMUX_LINE_IN, | 1003 | .amux = EM28XX_AMUX_LINE_IN, |
1004 | .gpio = default_analog, | ||
971 | } }, | 1005 | } }, |
972 | }, | 1006 | }, |
973 | [EM2881_BOARD_DNT_DA2_HYBRID] = { | 1007 | [EM2881_BOARD_DNT_DA2_HYBRID] = { |
@@ -979,14 +1013,17 @@ struct em28xx_board em28xx_boards[] = { | |||
979 | .type = EM28XX_VMUX_TELEVISION, | 1013 | .type = EM28XX_VMUX_TELEVISION, |
980 | .vmux = TVP5150_COMPOSITE0, | 1014 | .vmux = TVP5150_COMPOSITE0, |
981 | .amux = EM28XX_AMUX_VIDEO, | 1015 | .amux = EM28XX_AMUX_VIDEO, |
1016 | .gpio = default_analog, | ||
982 | }, { | 1017 | }, { |
983 | .type = EM28XX_VMUX_COMPOSITE1, | 1018 | .type = EM28XX_VMUX_COMPOSITE1, |
984 | .vmux = TVP5150_COMPOSITE1, | 1019 | .vmux = TVP5150_COMPOSITE1, |
985 | .amux = EM28XX_AMUX_LINE_IN, | 1020 | .amux = EM28XX_AMUX_LINE_IN, |
1021 | .gpio = default_analog, | ||
986 | }, { | 1022 | }, { |
987 | .type = EM28XX_VMUX_SVIDEO, | 1023 | .type = EM28XX_VMUX_SVIDEO, |
988 | .vmux = TVP5150_SVIDEO, | 1024 | .vmux = TVP5150_SVIDEO, |
989 | .amux = EM28XX_AMUX_LINE_IN, | 1025 | .amux = EM28XX_AMUX_LINE_IN, |
1026 | .gpio = default_analog, | ||
990 | } }, | 1027 | } }, |
991 | }, | 1028 | }, |
992 | [EM2881_BOARD_PINNACLE_HYBRID_PRO] = { | 1029 | [EM2881_BOARD_PINNACLE_HYBRID_PRO] = { |
@@ -998,14 +1035,17 @@ struct em28xx_board em28xx_boards[] = { | |||
998 | .type = EM28XX_VMUX_TELEVISION, | 1035 | .type = EM28XX_VMUX_TELEVISION, |
999 | .vmux = TVP5150_COMPOSITE0, | 1036 | .vmux = TVP5150_COMPOSITE0, |
1000 | .amux = EM28XX_AMUX_VIDEO, | 1037 | .amux = EM28XX_AMUX_VIDEO, |
1038 | .gpio = default_analog, | ||
1001 | }, { | 1039 | }, { |
1002 | .type = EM28XX_VMUX_COMPOSITE1, | 1040 | .type = EM28XX_VMUX_COMPOSITE1, |
1003 | .vmux = TVP5150_COMPOSITE1, | 1041 | .vmux = TVP5150_COMPOSITE1, |
1004 | .amux = EM28XX_AMUX_LINE_IN, | 1042 | .amux = EM28XX_AMUX_LINE_IN, |
1043 | .gpio = default_analog, | ||
1005 | }, { | 1044 | }, { |
1006 | .type = EM28XX_VMUX_SVIDEO, | 1045 | .type = EM28XX_VMUX_SVIDEO, |
1007 | .vmux = TVP5150_SVIDEO, | 1046 | .vmux = TVP5150_SVIDEO, |
1008 | .amux = EM28XX_AMUX_LINE_IN, | 1047 | .amux = EM28XX_AMUX_LINE_IN, |
1048 | .gpio = default_analog, | ||
1009 | } }, | 1049 | } }, |
1010 | }, | 1050 | }, |
1011 | [EM2882_BOARD_PINNACLE_HYBRID_PRO] = { | 1051 | [EM2882_BOARD_PINNACLE_HYBRID_PRO] = { |
@@ -1018,14 +1058,17 @@ struct em28xx_board em28xx_boards[] = { | |||
1018 | .type = EM28XX_VMUX_TELEVISION, | 1058 | .type = EM28XX_VMUX_TELEVISION, |
1019 | .vmux = TVP5150_COMPOSITE0, | 1059 | .vmux = TVP5150_COMPOSITE0, |
1020 | .amux = EM28XX_AMUX_VIDEO, | 1060 | .amux = EM28XX_AMUX_VIDEO, |
1061 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
1021 | }, { | 1062 | }, { |
1022 | .type = EM28XX_VMUX_COMPOSITE1, | 1063 | .type = EM28XX_VMUX_COMPOSITE1, |
1023 | .vmux = TVP5150_COMPOSITE1, | 1064 | .vmux = TVP5150_COMPOSITE1, |
1024 | .amux = EM28XX_AMUX_LINE_IN, | 1065 | .amux = EM28XX_AMUX_LINE_IN, |
1066 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
1025 | }, { | 1067 | }, { |
1026 | .type = EM28XX_VMUX_SVIDEO, | 1068 | .type = EM28XX_VMUX_SVIDEO, |
1027 | .vmux = TVP5150_SVIDEO, | 1069 | .vmux = TVP5150_SVIDEO, |
1028 | .amux = EM28XX_AMUX_LINE_IN, | 1070 | .amux = EM28XX_AMUX_LINE_IN, |
1071 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
1029 | } }, | 1072 | } }, |
1030 | }, | 1073 | }, |
1031 | [EM2882_BOARD_KWORLD_VS_DVBT] = { | 1074 | [EM2882_BOARD_KWORLD_VS_DVBT] = { |
@@ -1056,14 +1099,17 @@ struct em28xx_board em28xx_boards[] = { | |||
1056 | .type = EM28XX_VMUX_TELEVISION, | 1099 | .type = EM28XX_VMUX_TELEVISION, |
1057 | .vmux = TVP5150_COMPOSITE0, | 1100 | .vmux = TVP5150_COMPOSITE0, |
1058 | .amux = EM28XX_AMUX_VIDEO, | 1101 | .amux = EM28XX_AMUX_VIDEO, |
1102 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
1059 | }, { | 1103 | }, { |
1060 | .type = EM28XX_VMUX_COMPOSITE1, | 1104 | .type = EM28XX_VMUX_COMPOSITE1, |
1061 | .vmux = TVP5150_COMPOSITE1, | 1105 | .vmux = TVP5150_COMPOSITE1, |
1062 | .amux = EM28XX_AMUX_LINE_IN, | 1106 | .amux = EM28XX_AMUX_LINE_IN, |
1107 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
1063 | }, { | 1108 | }, { |
1064 | .type = EM28XX_VMUX_SVIDEO, | 1109 | .type = EM28XX_VMUX_SVIDEO, |
1065 | .vmux = TVP5150_SVIDEO, | 1110 | .vmux = TVP5150_SVIDEO, |
1066 | .amux = EM28XX_AMUX_LINE_IN, | 1111 | .amux = EM28XX_AMUX_LINE_IN, |
1112 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
1067 | } }, | 1113 | } }, |
1068 | }, | 1114 | }, |
1069 | [EM2883_BOARD_KWORLD_HYBRID_A316] = { | 1115 | [EM2883_BOARD_KWORLD_HYBRID_A316] = { |
@@ -1075,14 +1121,17 @@ struct em28xx_board em28xx_boards[] = { | |||
1075 | .type = EM28XX_VMUX_TELEVISION, | 1121 | .type = EM28XX_VMUX_TELEVISION, |
1076 | .vmux = TVP5150_COMPOSITE0, | 1122 | .vmux = TVP5150_COMPOSITE0, |
1077 | .amux = EM28XX_AMUX_VIDEO, | 1123 | .amux = EM28XX_AMUX_VIDEO, |
1124 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
1078 | }, { | 1125 | }, { |
1079 | .type = EM28XX_VMUX_COMPOSITE1, | 1126 | .type = EM28XX_VMUX_COMPOSITE1, |
1080 | .vmux = TVP5150_COMPOSITE1, | 1127 | .vmux = TVP5150_COMPOSITE1, |
1081 | .amux = EM28XX_AMUX_LINE_IN, | 1128 | .amux = EM28XX_AMUX_LINE_IN, |
1129 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
1082 | }, { | 1130 | }, { |
1083 | .type = EM28XX_VMUX_SVIDEO, | 1131 | .type = EM28XX_VMUX_SVIDEO, |
1084 | .vmux = TVP5150_SVIDEO, | 1132 | .vmux = TVP5150_SVIDEO, |
1085 | .amux = EM28XX_AMUX_LINE_IN, | 1133 | .amux = EM28XX_AMUX_LINE_IN, |
1134 | .gpio = hauppauge_wintv_hvr_900_analog, | ||
1086 | } }, | 1135 | } }, |
1087 | }, | 1136 | }, |
1088 | [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = { | 1137 | [EM2820_BOARD_COMPRO_VIDEOMATE_FORYOU] = { |
@@ -1104,6 +1153,7 @@ struct em28xx_board em28xx_boards[] = { | |||
1104 | .name = "Pinnacle PCTV HD Mini", | 1153 | .name = "Pinnacle PCTV HD Mini", |
1105 | .tuner_type = TUNER_ABSENT, | 1154 | .tuner_type = TUNER_ABSENT, |
1106 | .has_dvb = 1, | 1155 | .has_dvb = 1, |
1156 | .dvb_gpio = em2874_pinnacle_80e_digital, | ||
1107 | .ir_codes = ir_codes_pinnacle_pctv_hd, | 1157 | .ir_codes = ir_codes_pinnacle_pctv_hd, |
1108 | .decoder = EM28XX_NODECODER, | 1158 | .decoder = EM28XX_NODECODER, |
1109 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | | 1159 | .i2c_speed = EM28XX_I2C_CLK_WAIT_ENABLE | |
@@ -1329,55 +1379,11 @@ void em28xx_pre_card_setup(struct em28xx *dev) | |||
1329 | 1379 | ||
1330 | /* request some modules */ | 1380 | /* request some modules */ |
1331 | switch (dev->model) { | 1381 | switch (dev->model) { |
1332 | case EM2880_BOARD_TERRATEC_PRODIGY_XS: | ||
1333 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900: | ||
1334 | case EM2880_BOARD_HAUPPAUGE_WINTV_HVR_900_R2: | ||
1335 | case EM2860_BOARD_TERRATEC_HYBRID_XS: | ||
1336 | case EM2883_BOARD_HAUPPAUGE_WINTV_HVR_950: | ||
1337 | case EM2880_BOARD_PINNACLE_PCTV_HD_PRO: | ||
1338 | case EM2882_BOARD_PINNACLE_HYBRID_PRO: | ||
1339 | case EM2883_BOARD_KWORLD_HYBRID_A316: | ||
1340 | case EM2880_BOARD_AMD_ATI_TV_WONDER_HD_600: | ||
1341 | /* Sets GPO/GPIO sequences for this device */ | ||
1342 | dev->analog_gpio = hauppauge_wintv_hvr_900_analog; | ||
1343 | dev->digital_gpio = hauppauge_wintv_hvr_900_digital; | ||
1344 | break; | ||
1345 | |||
1346 | case EM2882_BOARD_TERRATEC_HYBRID_XS: | ||
1347 | /* Sets GPO/GPIO sequences for this device */ | ||
1348 | dev->analog_gpio = hauppauge_wintv_hvr_900_analog; | ||
1349 | dev->digital_gpio = hauppauge_wintv_hvr_900_digital; | ||
1350 | break; | ||
1351 | |||
1352 | case EM2880_BOARD_TERRATEC_HYBRID_XS_FR: | ||
1353 | case EM2880_BOARD_TERRATEC_HYBRID_XS: | ||
1354 | case EM2870_BOARD_TERRATEC_XS: | ||
1355 | case EM2881_BOARD_PINNACLE_HYBRID_PRO: | ||
1356 | case EM2880_BOARD_KWORLD_DVB_310U: | ||
1357 | case EM2870_BOARD_KWORLD_350U: | ||
1358 | case EM2881_BOARD_DNT_DA2_HYBRID: | ||
1359 | /* NOTE: EM2881_DNT_DA2_HYBRID spend 140 msleep for digital | ||
1360 | and analog commands. If this commands doesn't work, | ||
1361 | add this timer. */ | ||
1362 | |||
1363 | /* Sets GPO/GPIO sequences for this device */ | ||
1364 | dev->analog_gpio = default_analog; | ||
1365 | dev->digital_gpio = default_digital; | ||
1366 | break; | ||
1367 | |||
1368 | case EM2880_BOARD_MSI_DIGIVOX_AD: | ||
1369 | case EM2880_BOARD_MSI_DIGIVOX_AD_II: | ||
1370 | /* Sets GPO/GPIO sequences for this device */ | ||
1371 | dev->analog_gpio = em2880_msi_digivox_ad_analog; | ||
1372 | dev->digital_gpio = em2880_msi_digivox_ad_digital; | ||
1373 | break; | ||
1374 | |||
1375 | case EM2861_BOARD_PLEXTOR_PX_TV100U: | 1382 | case EM2861_BOARD_PLEXTOR_PX_TV100U: |
1376 | /* FIXME guess */ | 1383 | /* FIXME guess */ |
1377 | /* Turn on analog audio output */ | 1384 | /* Turn on analog audio output */ |
1378 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); | 1385 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); |
1379 | break; | 1386 | break; |
1380 | |||
1381 | case EM2861_BOARD_KWORLD_PVRTV_300U: | 1387 | case EM2861_BOARD_KWORLD_PVRTV_300U: |
1382 | case EM2880_BOARD_KWORLD_DVB_305U: | 1388 | case EM2880_BOARD_KWORLD_DVB_305U: |
1383 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x6d); | 1389 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x6d); |
@@ -1385,12 +1391,6 @@ void em28xx_pre_card_setup(struct em28xx *dev) | |||
1385 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x7d); | 1391 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0x7d); |
1386 | msleep(10); | 1392 | msleep(10); |
1387 | break; | 1393 | break; |
1388 | |||
1389 | case EM2870_BOARD_KWORLD_355U: | ||
1390 | /* Sets GPO/GPIO sequences for this device */ | ||
1391 | dev->digital_gpio = em2870_kworld_355u_digital; | ||
1392 | break; | ||
1393 | |||
1394 | case EM2870_BOARD_COMPRO_VIDEOMATE: | 1394 | case EM2870_BOARD_COMPRO_VIDEOMATE: |
1395 | /* TODO: someone can do some cleanup here... | 1395 | /* TODO: someone can do some cleanup here... |
1396 | not everything's needed */ | 1396 | not everything's needed */ |
@@ -1407,7 +1407,6 @@ void em28xx_pre_card_setup(struct em28xx *dev) | |||
1407 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfc); | 1407 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfc); |
1408 | mdelay(70); | 1408 | mdelay(70); |
1409 | break; | 1409 | break; |
1410 | |||
1411 | case EM2870_BOARD_TERRATEC_XS_MT2060: | 1410 | case EM2870_BOARD_TERRATEC_XS_MT2060: |
1412 | /* this device needs some gpio writes to get the DVB-T | 1411 | /* this device needs some gpio writes to get the DVB-T |
1413 | demod work */ | 1412 | demod work */ |
@@ -1418,7 +1417,6 @@ void em28xx_pre_card_setup(struct em28xx *dev) | |||
1418 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); | 1417 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); |
1419 | mdelay(70); | 1418 | mdelay(70); |
1420 | break; | 1419 | break; |
1421 | |||
1422 | case EM2870_BOARD_PINNACLE_PCTV_DVB: | 1420 | case EM2870_BOARD_PINNACLE_PCTV_DVB: |
1423 | /* this device needs some gpio writes to get the | 1421 | /* this device needs some gpio writes to get the |
1424 | DVB-T demod work */ | 1422 | DVB-T demod work */ |
@@ -1429,16 +1427,11 @@ void em28xx_pre_card_setup(struct em28xx *dev) | |||
1429 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); | 1427 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfe); |
1430 | mdelay(70); | 1428 | mdelay(70); |
1431 | break; | 1429 | break; |
1432 | |||
1433 | case EM2820_BOARD_GADMEI_UTV310: | 1430 | case EM2820_BOARD_GADMEI_UTV310: |
1434 | case EM2820_BOARD_MSI_VOX_USB_2: | 1431 | case EM2820_BOARD_MSI_VOX_USB_2: |
1435 | /* enables audio for that devices */ | 1432 | /* enables audio for that devices */ |
1436 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); | 1433 | em28xx_write_reg(dev, EM28XX_R08_GPIO, 0xfd); |
1437 | break; | 1434 | break; |
1438 | |||
1439 | case EM2874_BOARD_PINNACLE_PCTV_80E: | ||
1440 | dev->digital_gpio = em2874_pinnacle_80e_digital; | ||
1441 | break; | ||
1442 | } | 1435 | } |
1443 | 1436 | ||
1444 | /* Sets the default callback. Used only for certain tuners */ | 1437 | /* Sets the default callback. Used only for certain tuners */ |
diff --git a/drivers/media/video/em28xx/em28xx.h b/drivers/media/video/em28xx/em28xx.h index e41015d2e722..fdc225c617ef 100644 --- a/drivers/media/video/em28xx/em28xx.h +++ b/drivers/media/video/em28xx/em28xx.h | |||
@@ -304,11 +304,18 @@ enum em28xx_aout { | |||
304 | EM28XX_AOUT_SURR = 1 << 4, | 304 | EM28XX_AOUT_SURR = 1 << 4, |
305 | }; | 305 | }; |
306 | 306 | ||
307 | struct em28xx_reg_seq { | ||
308 | int reg; | ||
309 | unsigned char val, mask; | ||
310 | int sleep; | ||
311 | }; | ||
312 | |||
307 | struct em28xx_input { | 313 | struct em28xx_input { |
308 | enum enum28xx_itype type; | 314 | enum enum28xx_itype type; |
309 | unsigned int vmux; | 315 | unsigned int vmux; |
310 | enum em28xx_amux amux; | 316 | enum em28xx_amux amux; |
311 | enum em28xx_aout aout; | 317 | enum em28xx_aout aout; |
318 | struct em28xx_reg_seq *gpio; | ||
312 | }; | 319 | }; |
313 | 320 | ||
314 | #define INPUT(nr) (&em28xx_boards[dev->model].input[nr]) | 321 | #define INPUT(nr) (&em28xx_boards[dev->model].input[nr]) |
@@ -319,12 +326,6 @@ enum em28xx_decoder { | |||
319 | EM28XX_SAA711X, | 326 | EM28XX_SAA711X, |
320 | }; | 327 | }; |
321 | 328 | ||
322 | struct em28xx_reg_seq { | ||
323 | int reg; | ||
324 | unsigned char val, mask; | ||
325 | int sleep; | ||
326 | }; | ||
327 | |||
328 | struct em28xx_board { | 329 | struct em28xx_board { |
329 | char *name; | 330 | char *name; |
330 | int vchannels; | 331 | int vchannels; |
@@ -334,6 +335,8 @@ struct em28xx_board { | |||
334 | /* i2c flags */ | 335 | /* i2c flags */ |
335 | unsigned int tda9887_conf; | 336 | unsigned int tda9887_conf; |
336 | 337 | ||
338 | struct em28xx_reg_seq *dvb_gpio; | ||
339 | |||
337 | unsigned int is_em2800:1; | 340 | unsigned int is_em2800:1; |
338 | unsigned int has_msp34xx:1; | 341 | unsigned int has_msp34xx:1; |
339 | unsigned int mts_firmware:1; | 342 | unsigned int mts_firmware:1; |