aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-input.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-04-01 20:27:04 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:56:45 -0400
commitd705d2ab7596b4661a2f13172f4f93ad11bd761f (patch)
treeb5c143a8a03bb056f1ce4f1a7431ca03dbdb97be /drivers/media/video/saa7134/saa7134-input.c
parent165344bd43b1410d10dc9dc8a376da31178d1694 (diff)
V4L/DVB: ir: use IR_KEYTABLE where an IR table is needed
Replaces most of the occurences of IR keytables on V4L drivers by a macro that evaluates to provide the name of the exported symbol. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-input.c')
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index c8c1c9ae6a79..eaafed181d50 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -610,27 +610,27 @@ int saa7134_input_init1(struct saa7134_dev *dev)
610 case SAA7134_BOARD_FLYTVPLATINUM_FM: 610 case SAA7134_BOARD_FLYTVPLATINUM_FM:
611 case SAA7134_BOARD_FLYTVPLATINUM_MINI2: 611 case SAA7134_BOARD_FLYTVPLATINUM_MINI2:
612 case SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM: 612 case SAA7134_BOARD_ROVERMEDIA_LINK_PRO_FM:
613 ir_codes = &ir_codes_flyvideo_table; 613 ir_codes = &IR_KEYTABLE(flyvideo);
614 mask_keycode = 0xEC00000; 614 mask_keycode = 0xEC00000;
615 mask_keydown = 0x0040000; 615 mask_keydown = 0x0040000;
616 break; 616 break;
617 case SAA7134_BOARD_CINERGY400: 617 case SAA7134_BOARD_CINERGY400:
618 case SAA7134_BOARD_CINERGY600: 618 case SAA7134_BOARD_CINERGY600:
619 case SAA7134_BOARD_CINERGY600_MK3: 619 case SAA7134_BOARD_CINERGY600_MK3:
620 ir_codes = &ir_codes_cinergy_table; 620 ir_codes = &IR_KEYTABLE(cinergy);
621 mask_keycode = 0x00003f; 621 mask_keycode = 0x00003f;
622 mask_keyup = 0x040000; 622 mask_keyup = 0x040000;
623 break; 623 break;
624 case SAA7134_BOARD_ECS_TVP3XP: 624 case SAA7134_BOARD_ECS_TVP3XP:
625 case SAA7134_BOARD_ECS_TVP3XP_4CB5: 625 case SAA7134_BOARD_ECS_TVP3XP_4CB5:
626 ir_codes = &ir_codes_eztv_table; 626 ir_codes = &IR_KEYTABLE(eztv);
627 mask_keycode = 0x00017c; 627 mask_keycode = 0x00017c;
628 mask_keyup = 0x000002; 628 mask_keyup = 0x000002;
629 polling = 50; // ms 629 polling = 50; // ms
630 break; 630 break;
631 case SAA7134_BOARD_KWORLD_XPERT: 631 case SAA7134_BOARD_KWORLD_XPERT:
632 case SAA7134_BOARD_AVACSSMARTTV: 632 case SAA7134_BOARD_AVACSSMARTTV:
633 ir_codes = &ir_codes_pixelview_table; 633 ir_codes = &IR_KEYTABLE(pixelview);
634 mask_keycode = 0x00001F; 634 mask_keycode = 0x00001F;
635 mask_keyup = 0x000020; 635 mask_keyup = 0x000020;
636 polling = 50; // ms 636 polling = 50; // ms
@@ -647,7 +647,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
647 case SAA7134_BOARD_AVERMEDIA_GO_007_FM: 647 case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
648 case SAA7134_BOARD_AVERMEDIA_M102: 648 case SAA7134_BOARD_AVERMEDIA_M102:
649 case SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS: 649 case SAA7134_BOARD_AVERMEDIA_GO_007_FM_PLUS:
650 ir_codes = &ir_codes_avermedia_table; 650 ir_codes = &IR_KEYTABLE(avermedia);
651 mask_keycode = 0x0007C8; 651 mask_keycode = 0x0007C8;
652 mask_keydown = 0x000010; 652 mask_keydown = 0x000010;
653 polling = 50; // ms 653 polling = 50; // ms
@@ -656,14 +656,14 @@ int saa7134_input_init1(struct saa7134_dev *dev)
656 saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); 656 saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4);
657 break; 657 break;
658 case SAA7134_BOARD_AVERMEDIA_M135A: 658 case SAA7134_BOARD_AVERMEDIA_M135A:
659 ir_codes = &ir_codes_avermedia_m135a_rm_jx_table; 659 ir_codes = &IR_KEYTABLE(avermedia_m135a_rm_jx);
660 mask_keydown = 0x0040000; 660 mask_keydown = 0x0040000;
661 mask_keycode = 0xffff; 661 mask_keycode = 0xffff;
662 raw_decode = 1; 662 raw_decode = 1;
663 break; 663 break;
664 case SAA7134_BOARD_AVERMEDIA_777: 664 case SAA7134_BOARD_AVERMEDIA_777:
665 case SAA7134_BOARD_AVERMEDIA_A16AR: 665 case SAA7134_BOARD_AVERMEDIA_A16AR:
666 ir_codes = &ir_codes_avermedia_table; 666 ir_codes = &IR_KEYTABLE(avermedia);
667 mask_keycode = 0x02F200; 667 mask_keycode = 0x02F200;
668 mask_keydown = 0x000400; 668 mask_keydown = 0x000400;
669 polling = 50; // ms 669 polling = 50; // ms
@@ -672,7 +672,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
672 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1); 672 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1);
673 break; 673 break;
674 case SAA7134_BOARD_AVERMEDIA_A16D: 674 case SAA7134_BOARD_AVERMEDIA_A16D:
675 ir_codes = &ir_codes_avermedia_a16d_table; 675 ir_codes = &IR_KEYTABLE(avermedia_a16d);
676 mask_keycode = 0x02F200; 676 mask_keycode = 0x02F200;
677 mask_keydown = 0x000400; 677 mask_keydown = 0x000400;
678 polling = 50; /* ms */ 678 polling = 50; /* ms */
@@ -681,14 +681,14 @@ int saa7134_input_init1(struct saa7134_dev *dev)
681 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1); 681 saa_setb(SAA7134_GPIO_GPSTATUS1, 0x1);
682 break; 682 break;
683 case SAA7134_BOARD_KWORLD_TERMINATOR: 683 case SAA7134_BOARD_KWORLD_TERMINATOR:
684 ir_codes = &ir_codes_pixelview_table; 684 ir_codes = &IR_KEYTABLE(pixelview);
685 mask_keycode = 0x00001f; 685 mask_keycode = 0x00001f;
686 mask_keyup = 0x000060; 686 mask_keyup = 0x000060;
687 polling = 50; // ms 687 polling = 50; // ms
688 break; 688 break;
689 case SAA7134_BOARD_MANLI_MTV001: 689 case SAA7134_BOARD_MANLI_MTV001:
690 case SAA7134_BOARD_MANLI_MTV002: 690 case SAA7134_BOARD_MANLI_MTV002:
691 ir_codes = &ir_codes_manli_table; 691 ir_codes = &IR_KEYTABLE(manli);
692 mask_keycode = 0x001f00; 692 mask_keycode = 0x001f00;
693 mask_keyup = 0x004000; 693 mask_keyup = 0x004000;
694 polling = 50; /* ms */ 694 polling = 50; /* ms */
@@ -708,25 +708,25 @@ int saa7134_input_init1(struct saa7134_dev *dev)
708 case SAA7134_BOARD_BEHOLD_507_9FM: 708 case SAA7134_BOARD_BEHOLD_507_9FM:
709 case SAA7134_BOARD_BEHOLD_507RDS_MK3: 709 case SAA7134_BOARD_BEHOLD_507RDS_MK3:
710 case SAA7134_BOARD_BEHOLD_507RDS_MK5: 710 case SAA7134_BOARD_BEHOLD_507RDS_MK5:
711 ir_codes = &ir_codes_manli_table; 711 ir_codes = &IR_KEYTABLE(manli);
712 mask_keycode = 0x003f00; 712 mask_keycode = 0x003f00;
713 mask_keyup = 0x004000; 713 mask_keyup = 0x004000;
714 polling = 50; /* ms */ 714 polling = 50; /* ms */
715 break; 715 break;
716 case SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM: 716 case SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM:
717 ir_codes = &ir_codes_behold_columbus_table; 717 ir_codes = &IR_KEYTABLE(behold_columbus);
718 mask_keycode = 0x003f00; 718 mask_keycode = 0x003f00;
719 mask_keyup = 0x004000; 719 mask_keyup = 0x004000;
720 polling = 50; // ms 720 polling = 50; // ms
721 break; 721 break;
722 case SAA7134_BOARD_SEDNA_PC_TV_CARDBUS: 722 case SAA7134_BOARD_SEDNA_PC_TV_CARDBUS:
723 ir_codes = &ir_codes_pctv_sedna_table; 723 ir_codes = &IR_KEYTABLE(pctv_sedna);
724 mask_keycode = 0x001f00; 724 mask_keycode = 0x001f00;
725 mask_keyup = 0x004000; 725 mask_keyup = 0x004000;
726 polling = 50; // ms 726 polling = 50; // ms
727 break; 727 break;
728 case SAA7134_BOARD_GOTVIEW_7135: 728 case SAA7134_BOARD_GOTVIEW_7135:
729 ir_codes = &ir_codes_gotview7135_table; 729 ir_codes = &IR_KEYTABLE(gotview7135);
730 mask_keycode = 0x0003CC; 730 mask_keycode = 0x0003CC;
731 mask_keydown = 0x000010; 731 mask_keydown = 0x000010;
732 polling = 5; /* ms */ 732 polling = 5; /* ms */
@@ -735,80 +735,80 @@ int saa7134_input_init1(struct saa7134_dev *dev)
735 case SAA7134_BOARD_VIDEOMATE_TV_PVR: 735 case SAA7134_BOARD_VIDEOMATE_TV_PVR:
736 case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: 736 case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS:
737 case SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII: 737 case SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII:
738 ir_codes = &ir_codes_videomate_tv_pvr_table; 738 ir_codes = &IR_KEYTABLE(videomate_tv_pvr);
739 mask_keycode = 0x00003F; 739 mask_keycode = 0x00003F;
740 mask_keyup = 0x400000; 740 mask_keyup = 0x400000;
741 polling = 50; // ms 741 polling = 50; // ms
742 break; 742 break;
743 case SAA7134_BOARD_PROTEUS_2309: 743 case SAA7134_BOARD_PROTEUS_2309:
744 ir_codes = &ir_codes_proteus_2309_table; 744 ir_codes = &IR_KEYTABLE(proteus_2309);
745 mask_keycode = 0x00007F; 745 mask_keycode = 0x00007F;
746 mask_keyup = 0x000080; 746 mask_keyup = 0x000080;
747 polling = 50; // ms 747 polling = 50; // ms
748 break; 748 break;
749 case SAA7134_BOARD_VIDEOMATE_DVBT_300: 749 case SAA7134_BOARD_VIDEOMATE_DVBT_300:
750 case SAA7134_BOARD_VIDEOMATE_DVBT_200: 750 case SAA7134_BOARD_VIDEOMATE_DVBT_200:
751 ir_codes = &ir_codes_videomate_tv_pvr_table; 751 ir_codes = &IR_KEYTABLE(videomate_tv_pvr);
752 mask_keycode = 0x003F00; 752 mask_keycode = 0x003F00;
753 mask_keyup = 0x040000; 753 mask_keyup = 0x040000;
754 break; 754 break;
755 case SAA7134_BOARD_FLYDVBS_LR300: 755 case SAA7134_BOARD_FLYDVBS_LR300:
756 case SAA7134_BOARD_FLYDVBT_LR301: 756 case SAA7134_BOARD_FLYDVBT_LR301:
757 case SAA7134_BOARD_FLYDVBTDUO: 757 case SAA7134_BOARD_FLYDVBTDUO:
758 ir_codes = &ir_codes_flydvb_table; 758 ir_codes = &IR_KEYTABLE(flydvb);
759 mask_keycode = 0x0001F00; 759 mask_keycode = 0x0001F00;
760 mask_keydown = 0x0040000; 760 mask_keydown = 0x0040000;
761 break; 761 break;
762 case SAA7134_BOARD_ASUSTeK_P7131_DUAL: 762 case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
763 case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA: 763 case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA:
764 case SAA7134_BOARD_ASUSTeK_P7131_ANALOG: 764 case SAA7134_BOARD_ASUSTeK_P7131_ANALOG:
765 ir_codes = &ir_codes_asus_pc39_table; 765 ir_codes = &IR_KEYTABLE(asus_pc39);
766 mask_keydown = 0x0040000; 766 mask_keydown = 0x0040000;
767 rc5_gpio = 1; 767 rc5_gpio = 1;
768 break; 768 break;
769 case SAA7134_BOARD_ENCORE_ENLTV: 769 case SAA7134_BOARD_ENCORE_ENLTV:
770 case SAA7134_BOARD_ENCORE_ENLTV_FM: 770 case SAA7134_BOARD_ENCORE_ENLTV_FM:
771 ir_codes = &ir_codes_encore_enltv_table; 771 ir_codes = &IR_KEYTABLE(encore_enltv);
772 mask_keycode = 0x00007f; 772 mask_keycode = 0x00007f;
773 mask_keyup = 0x040000; 773 mask_keyup = 0x040000;
774 polling = 50; // ms 774 polling = 50; // ms
775 break; 775 break;
776 case SAA7134_BOARD_ENCORE_ENLTV_FM53: 776 case SAA7134_BOARD_ENCORE_ENLTV_FM53:
777 ir_codes = &ir_codes_encore_enltv_fm53_table; 777 ir_codes = &IR_KEYTABLE(encore_enltv_fm53);
778 mask_keydown = 0x0040000; 778 mask_keydown = 0x0040000;
779 mask_keycode = 0x00007f; 779 mask_keycode = 0x00007f;
780 nec_gpio = 1; 780 nec_gpio = 1;
781 break; 781 break;
782 case SAA7134_BOARD_10MOONSTVMASTER3: 782 case SAA7134_BOARD_10MOONSTVMASTER3:
783 ir_codes = &ir_codes_encore_enltv_table; 783 ir_codes = &IR_KEYTABLE(encore_enltv);
784 mask_keycode = 0x5f80000; 784 mask_keycode = 0x5f80000;
785 mask_keyup = 0x8000000; 785 mask_keyup = 0x8000000;
786 polling = 50; //ms 786 polling = 50; //ms
787 break; 787 break;
788 case SAA7134_BOARD_GENIUS_TVGO_A11MCE: 788 case SAA7134_BOARD_GENIUS_TVGO_A11MCE:
789 ir_codes = &ir_codes_genius_tvgo_a11mce_table; 789 ir_codes = &IR_KEYTABLE(genius_tvgo_a11mce);
790 mask_keycode = 0xff; 790 mask_keycode = 0xff;
791 mask_keydown = 0xf00000; 791 mask_keydown = 0xf00000;
792 polling = 50; /* ms */ 792 polling = 50; /* ms */
793 break; 793 break;
794 case SAA7134_BOARD_REAL_ANGEL_220: 794 case SAA7134_BOARD_REAL_ANGEL_220:
795 ir_codes = &ir_codes_real_audio_220_32_keys_table; 795 ir_codes = &IR_KEYTABLE(real_audio_220_32_keys);
796 mask_keycode = 0x3f00; 796 mask_keycode = 0x3f00;
797 mask_keyup = 0x4000; 797 mask_keyup = 0x4000;
798 polling = 50; /* ms */ 798 polling = 50; /* ms */
799 break; 799 break;
800 case SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG: 800 case SAA7134_BOARD_KWORLD_PLUS_TV_ANALOG:
801 ir_codes = &ir_codes_kworld_plus_tv_analog_table; 801 ir_codes = &IR_KEYTABLE(kworld_plus_tv_analog);
802 mask_keycode = 0x7f; 802 mask_keycode = 0x7f;
803 polling = 40; /* ms */ 803 polling = 40; /* ms */
804 break; 804 break;
805 case SAA7134_BOARD_VIDEOMATE_S350: 805 case SAA7134_BOARD_VIDEOMATE_S350:
806 ir_codes = &ir_codes_videomate_s350_table; 806 ir_codes = &IR_KEYTABLE(videomate_s350);
807 mask_keycode = 0x003f00; 807 mask_keycode = 0x003f00;
808 mask_keydown = 0x040000; 808 mask_keydown = 0x040000;
809 break; 809 break;
810 case SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S: 810 case SAA7134_BOARD_LEADTEK_WINFAST_DTV1000S:
811 ir_codes = &ir_codes_winfast_table; 811 ir_codes = &IR_KEYTABLE(winfast);
812 mask_keycode = 0x5f00; 812 mask_keycode = 0x5f00;
813 mask_keyup = 0x020000; 813 mask_keyup = 0x020000;
814 polling = 50; /* ms */ 814 polling = 50; /* ms */
@@ -938,24 +938,24 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
938 dev->init_data.name = "Pinnacle PCTV"; 938 dev->init_data.name = "Pinnacle PCTV";
939 if (pinnacle_remote == 0) { 939 if (pinnacle_remote == 0) {
940 dev->init_data.get_key = get_key_pinnacle_color; 940 dev->init_data.get_key = get_key_pinnacle_color;
941 dev->init_data.ir_codes = &ir_codes_pinnacle_color_table; 941 dev->init_data.ir_codes = &IR_KEYTABLE(pinnacle_color);
942 info.addr = 0x47; 942 info.addr = 0x47;
943 } else { 943 } else {
944 dev->init_data.get_key = get_key_pinnacle_grey; 944 dev->init_data.get_key = get_key_pinnacle_grey;
945 dev->init_data.ir_codes = &ir_codes_pinnacle_grey_table; 945 dev->init_data.ir_codes = &IR_KEYTABLE(pinnacle_grey);
946 info.addr = 0x47; 946 info.addr = 0x47;
947 } 947 }
948 break; 948 break;
949 case SAA7134_BOARD_UPMOST_PURPLE_TV: 949 case SAA7134_BOARD_UPMOST_PURPLE_TV:
950 dev->init_data.name = "Purple TV"; 950 dev->init_data.name = "Purple TV";
951 dev->init_data.get_key = get_key_purpletv; 951 dev->init_data.get_key = get_key_purpletv;
952 dev->init_data.ir_codes = &ir_codes_purpletv_table; 952 dev->init_data.ir_codes = &IR_KEYTABLE(purpletv);
953 info.addr = 0x7a; 953 info.addr = 0x7a;
954 break; 954 break;
955 case SAA7134_BOARD_MSI_TVATANYWHERE_PLUS: 955 case SAA7134_BOARD_MSI_TVATANYWHERE_PLUS:
956 dev->init_data.name = "MSI TV@nywhere Plus"; 956 dev->init_data.name = "MSI TV@nywhere Plus";
957 dev->init_data.get_key = get_key_msi_tvanywhere_plus; 957 dev->init_data.get_key = get_key_msi_tvanywhere_plus;
958 dev->init_data.ir_codes = &ir_codes_msi_tvanywhere_plus_table; 958 dev->init_data.ir_codes = &IR_KEYTABLE(msi_tvanywhere_plus);
959 info.addr = 0x30; 959 info.addr = 0x30;
960 /* MSI TV@nywhere Plus controller doesn't seem to 960 /* MSI TV@nywhere Plus controller doesn't seem to
961 respond to probes unless we read something from 961 respond to probes unless we read something from
@@ -969,7 +969,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
969 case SAA7134_BOARD_HAUPPAUGE_HVR1110: 969 case SAA7134_BOARD_HAUPPAUGE_HVR1110:
970 dev->init_data.name = "HVR 1110"; 970 dev->init_data.name = "HVR 1110";
971 dev->init_data.get_key = get_key_hvr1110; 971 dev->init_data.get_key = get_key_hvr1110;
972 dev->init_data.ir_codes = &ir_codes_hauppauge_new_table; 972 dev->init_data.ir_codes = &IR_KEYTABLE(hauppauge_new);
973 info.addr = 0x71; 973 info.addr = 0x71;
974 break; 974 break;
975 case SAA7134_BOARD_BEHOLD_607FM_MK3: 975 case SAA7134_BOARD_BEHOLD_607FM_MK3:
@@ -987,7 +987,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
987 case SAA7134_BOARD_BEHOLD_X7: 987 case SAA7134_BOARD_BEHOLD_X7:
988 dev->init_data.name = "BeholdTV"; 988 dev->init_data.name = "BeholdTV";
989 dev->init_data.get_key = get_key_beholdm6xx; 989 dev->init_data.get_key = get_key_beholdm6xx;
990 dev->init_data.ir_codes = &ir_codes_behold_table; 990 dev->init_data.ir_codes = &IR_KEYTABLE(behold);
991 dev->init_data.type = IR_TYPE_NEC; 991 dev->init_data.type = IR_TYPE_NEC;
992 info.addr = 0x2d; 992 info.addr = 0x2d;
993 break; 993 break;
@@ -998,7 +998,7 @@ void saa7134_probe_i2c_ir(struct saa7134_dev *dev)
998 case SAA7134_BOARD_FLYDVB_TRIO: 998 case SAA7134_BOARD_FLYDVB_TRIO:
999 dev->init_data.name = "FlyDVB Trio"; 999 dev->init_data.name = "FlyDVB Trio";
1000 dev->init_data.get_key = get_key_flydvb_trio; 1000 dev->init_data.get_key = get_key_flydvb_trio;
1001 dev->init_data.ir_codes = &ir_codes_flydvb_table; 1001 dev->init_data.ir_codes = &IR_KEYTABLE(flydvb);
1002 info.addr = 0x0b; 1002 info.addr = 0x0b;
1003 break; 1003 break;
1004 default: 1004 default: