aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/video4linux/CARDLIST.saa713413
-rw-r--r--drivers/media/common/ir-keymaps.c104
-rw-r--r--drivers/media/video/ir-kbd-i2c.c3
-rw-r--r--drivers/media/video/saa7134/saa7134-cards.c504
-rw-r--r--drivers/media/video/saa7134/saa7134-i2c.c2
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c60
-rw-r--r--drivers/media/video/saa7134/saa7134.h13
-rw-r--r--include/media/ir-common.h1
8 files changed, 699 insertions, 1 deletions
diff --git a/Documentation/video4linux/CARDLIST.saa7134 b/Documentation/video4linux/CARDLIST.saa7134
index 29ca16cdb713..387c35f2ecd7 100644
--- a/Documentation/video4linux/CARDLIST.saa7134
+++ b/Documentation/video4linux/CARDLIST.saa7134
@@ -116,3 +116,16 @@
116115 -> Sabrent PCMCIA TV-PCB05 [0919:2003] 116115 -> Sabrent PCMCIA TV-PCB05 [0919:2003]
117116 -> 10MOONS TM300 TV Card [1131:2304] 117116 -> 10MOONS TM300 TV Card [1131:2304]
118117 -> Avermedia Super 007 [1461:f01d] 118117 -> Avermedia Super 007 [1461:f01d]
119118 -> Beholder BeholdTV 401 [1131:0000,0000:4016]
120119 -> Beholder BeholdTV 403 [0000:4036]
121120 -> Beholder BeholdTV 403 FM [1131:0000,0000:4037]
122121 -> Beholder BeholdTV 405 [0000:4050]
123122 -> Beholder BeholdTV 405 FM [0000:4051]
124123 -> [0000:4070]
125124 -> Beholder BeholdTV 407 FM [0000:4071]
126125 -> Beholder BeholdTV 409 [0000:4090]
127126 -> Beholder BeholdTV 505 FM/RDS [0000:5051,0000:505B,5ace:5050]
128127 -> Beholder BeholdTV 507 FM/RDS / BeholdTV 509 FM [0000:5071,0000:507B,5ace:5070,5ace:5090]
129128 -> Beholder BeholdTV Columbus TVFM [0000:5201]
130129 -> Beholder BeholdTV 607 / BeholdTV 609 [5ace:6070,5ace:6071,5ace:6072,5ace:6073,5ace:6090,5ace:6091,5ace:6092,5ace:6093]
131130 -> Beholder BeholdTV M6 / BeholdTV M6 Extra [5ace:6190,5ace:6193]
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c
index 42762dfb7387..ee2c69e3152a 100644
--- a/drivers/media/common/ir-keymaps.c
+++ b/drivers/media/common/ir-keymaps.c
@@ -1848,3 +1848,107 @@ IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE] = {
1848}; 1848};
1849 1849
1850EXPORT_SYMBOL_GPL(ir_codes_fusionhdtv_mce); 1850EXPORT_SYMBOL_GPL(ir_codes_fusionhdtv_mce);
1851
1852/*
1853 * Igor Kuznetsov <igk72@ya.ru>
1854 * Andrey J. Melnikov <temnota@kmv.ru>
1855 *
1856 * Keytable is used by BeholdTV 60x series, M6 series at
1857 * least, and probably other cards too.
1858 * The "ascii-art picture" below (in comments, first row
1859 * is the keycode in hex, and subsequent row(s) shows
1860 * the button labels (several variants when appropriate)
1861 * helps to descide which keycodes to assign to the buttons.
1862 */
1863IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE] = {
1864
1865 /* 0x1c 0x12 *
1866 * TV/FM POWER *
1867 * */
1868 [ 0x1c ] = KEY_TUNER, /*XXX KEY_TV KEY_RADIO */
1869 [ 0x12 ] = KEY_POWER,
1870
1871 /* 0x01 0x02 0x03 *
1872 * 1 2 3 *
1873 * *
1874 * 0x04 0x05 0x06 *
1875 * 4 5 6 *
1876 * *
1877 * 0x07 0x08 0x09 *
1878 * 7 8 9 *
1879 * */
1880 [ 0x01 ] = KEY_1,
1881 [ 0x02 ] = KEY_2,
1882 [ 0x03 ] = KEY_3,
1883 [ 0x04 ] = KEY_4,
1884 [ 0x05 ] = KEY_5,
1885 [ 0x06 ] = KEY_6,
1886 [ 0x07 ] = KEY_7,
1887 [ 0x08 ] = KEY_8,
1888 [ 0x09 ] = KEY_9,
1889
1890 /* 0x0a 0x00 0x17 *
1891 * RECALL 0 MODE *
1892 * */
1893 [ 0x0a ] = KEY_AGAIN,
1894 [ 0x00 ] = KEY_0,
1895 [ 0x17 ] = KEY_MODE,
1896
1897 /* 0x14 0x10 *
1898 * ASPECT FULLSCREEN *
1899 * */
1900 [ 0x14 ] = KEY_SCREEN,
1901 [ 0x10 ] = KEY_ZOOM,
1902
1903 /* 0x0b *
1904 * Up *
1905 * *
1906 * 0x18 0x16 0x0c *
1907 * Left Ok Right *
1908 * *
1909 * 0x015 *
1910 * Down *
1911 * */
1912 [ 0x0b ] = KEY_CHANNELUP, /*XXX KEY_UP */
1913 [ 0x18 ] = KEY_VOLUMEDOWN, /*XXX KEY_LEFT */
1914 [ 0x16 ] = KEY_OK, /*XXX KEY_ENTER */
1915 [ 0x0c ] = KEY_VOLUMEUP, /*XXX KEY_RIGHT */
1916 [ 0x15 ] = KEY_CHANNELDOWN, /*XXX KEY_DOWN */
1917
1918 /* 0x11 0x0d *
1919 * MUTE INFO *
1920 * */
1921 [ 0x11 ] = KEY_MUTE,
1922 [ 0x0d ] = KEY_INFO,
1923
1924 /* 0x0f 0x1b 0x1a *
1925 * RECORD PLAY/PAUSE STOP *
1926 * *
1927 * 0x0e 0x1f 0x1e *
1928 *TELETEXT AUDIO SOURCE *
1929 * RED YELLOW *
1930 * */
1931 [ 0x0f ] = KEY_RECORD,
1932 [ 0x1b ] = KEY_PLAYPAUSE,
1933 [ 0x1a ] = KEY_STOP,
1934 [ 0x0e ] = KEY_TEXT,
1935 [ 0x1f ] = KEY_RED, /*XXX KEY_AUDIO */
1936 [ 0x1e ] = KEY_YELLOW, /*XXX KEY_SOURCE */
1937
1938 /* 0x1d 0x13 0x19 *
1939 * SLEEP PREVIEW DVB *
1940 * GREEN BLUE *
1941 * */
1942 [ 0x1d ] = KEY_SLEEP,
1943 [ 0x13 ] = KEY_GREEN,
1944 [ 0x19 ] = KEY_BLUE, /*XXX KEY_SAT */
1945
1946 /* 0x58 0x5c *
1947 * FREEZE SNAPSHOT *
1948 * */
1949 [ 0x58 ] = KEY_SLOW,
1950 [ 0x5c ] = KEY_SAVE,
1951
1952};
1953
1954EXPORT_SYMBOL_GPL(ir_codes_behold);
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 29779d8bf7fb..9851987b95fb 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -398,6 +398,7 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
398 case 0x7a: 398 case 0x7a:
399 case 0x47: 399 case 0x47:
400 case 0x71: 400 case 0x71:
401 case 0x2d:
401 if (adap->id == I2C_HW_B_CX2388x) { 402 if (adap->id == I2C_HW_B_CX2388x) {
402 /* Handled by cx88-input */ 403 /* Handled by cx88-input */
403 name = "CX2388x remote"; 404 name = "CX2388x remote";
@@ -504,7 +505,7 @@ static int ir_probe(struct i2c_adapter *adap)
504 */ 505 */
505 506
506 static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1}; 507 static const int probe_bttv[] = { 0x1a, 0x18, 0x4b, 0x64, 0x30, -1};
507 static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, -1 }; 508 static const int probe_saa7134[] = { 0x7a, 0x47, 0x71, 0x2d, -1 };
508 static const int probe_em28XX[] = { 0x30, 0x47, -1 }; 509 static const int probe_em28XX[] = { 0x30, 0x47, -1 };
509 static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 }; 510 static const int probe_cx88[] = { 0x18, 0x6b, 0x71, -1 };
510 static const int probe_cx23885[] = { 0x6b, -1 }; 511 static const int probe_cx23885[] = { 0x6b, -1 };
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c
index b29427aaa88d..6a35d88fdbb2 100644
--- a/drivers/media/video/saa7134/saa7134-cards.c
+++ b/drivers/media/video/saa7134/saa7134-cards.c
@@ -3562,6 +3562,329 @@ struct saa7134_board saa7134_boards[] = {
3562 .tv = 1, 3562 .tv = 1,
3563 }}, 3563 }},
3564 }, 3564 },
3565 [SAA7134_BOARD_BEHOLD_401] = {
3566 .name = "Beholder BeholdTV 401",
3567 .audio_clock = 0x00187de7,
3568 .tuner_type = TUNER_PHILIPS_FQ1216ME,
3569 .radio_type = UNSET,
3570 .tuner_addr = ADDR_UNSET,
3571 .radio_addr = ADDR_UNSET,
3572 .inputs = {{
3573 .name = name_svideo,
3574 .vmux = 8,
3575 .amux = LINE1,
3576 },{
3577 .name = name_comp1,
3578 .vmux = 1,
3579 .amux = LINE1,
3580 },{
3581 .name = name_tv,
3582 .vmux = 3,
3583 .amux = LINE2,
3584 .tv = 1,
3585 }},
3586 .mute = {
3587 .name = name_mute,
3588 .amux = LINE1,
3589 },
3590 },
3591 [SAA7134_BOARD_BEHOLD_403] = {
3592 .name = "Beholder BeholdTV 403",
3593 .audio_clock = 0x00187de7,
3594 .tuner_type = TUNER_PHILIPS_FQ1216ME,
3595 .radio_type = UNSET,
3596 .tuner_addr = ADDR_UNSET,
3597 .radio_addr = ADDR_UNSET,
3598 .inputs = {{
3599 .name = name_svideo,
3600 .vmux = 8,
3601 .amux = LINE1,
3602 },{
3603 .name = name_comp1,
3604 .vmux = 1,
3605 .amux = LINE1,
3606 },{
3607 .name = name_tv,
3608 .vmux = 3,
3609 .amux = LINE2,
3610 .tv = 1,
3611 }},
3612 },
3613 [SAA7134_BOARD_BEHOLD_403FM] = {
3614 .name = "Beholder BeholdTV 403 FM",
3615 .audio_clock = 0x00187de7,
3616 .tuner_type = TUNER_PHILIPS_FQ1216ME,
3617 .radio_type = UNSET,
3618 .tuner_addr = ADDR_UNSET,
3619 .radio_addr = ADDR_UNSET,
3620 .inputs = {{
3621 .name = name_svideo,
3622 .vmux = 8,
3623 .amux = LINE1,
3624 },{
3625 .name = name_comp1,
3626 .vmux = 1,
3627 .amux = LINE1,
3628 },{
3629 .name = name_tv,
3630 .vmux = 3,
3631 .amux = LINE2,
3632 .tv = 1,
3633 }},
3634 .radio = {
3635 .name = name_radio,
3636 .amux = LINE2,
3637 },
3638 },
3639 [SAA7134_BOARD_BEHOLD_405] = {
3640 .name = "Beholder BeholdTV 405",
3641 .audio_clock = 0x00187de7,
3642 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
3643 .radio_type = UNSET,
3644 .tuner_addr = ADDR_UNSET,
3645 .radio_addr = ADDR_UNSET,
3646 .tda9887_conf = TDA9887_PRESENT,
3647 .inputs = {{
3648 .name = name_svideo,
3649 .vmux = 8,
3650 .amux = LINE1,
3651 },{
3652 .name = name_comp1,
3653 .vmux = 3,
3654 .amux = LINE1,
3655 },{
3656 .name = name_tv,
3657 .vmux = 3,
3658 .amux = LINE2,
3659 .tv = 1,
3660 }},
3661 },
3662 [SAA7134_BOARD_BEHOLD_405FM] = {
3663 /* Sergey <skiv@orel.ru> */
3664 .name = "Beholder BeholdTV 405 FM",
3665 .audio_clock = 0x00187de7,
3666 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
3667 .radio_type = UNSET,
3668 .tuner_addr = ADDR_UNSET,
3669 .radio_addr = ADDR_UNSET,
3670 .tda9887_conf = TDA9887_PRESENT,
3671 .inputs = {{
3672 .name = name_svideo,
3673 .vmux = 8,
3674 .amux = LINE1,
3675 },{
3676 .name = name_comp1,
3677 .vmux = 3,
3678 .amux = LINE1,
3679 },{
3680 .name = name_tv,
3681 .vmux = 3,
3682 .amux = LINE2,
3683 .tv = 1,
3684 }},
3685 .radio = {
3686 .name = name_radio,
3687 .amux = LINE2,
3688 },
3689 },
3690 [SAA7134_BOARD_BEHOLD_407FM] = {
3691 .name = "Beholder BeholdTV 407 FM",
3692 .audio_clock = 0x00187de7,
3693 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
3694 .radio_type = UNSET,
3695 .tuner_addr = ADDR_UNSET,
3696 .radio_addr = ADDR_UNSET,
3697 .tda9887_conf = TDA9887_PRESENT,
3698 .gpiomask = 0xc0c000,
3699 .inputs = {{
3700 .name = name_svideo,
3701 .vmux = 8,
3702 .amux = LINE1,
3703 .gpio = 0xc0c000,
3704 },{
3705 .name = name_comp1,
3706 .vmux = 1,
3707 .amux = LINE1,
3708 .gpio = 0xc0c000,
3709 },{
3710 .name = name_tv,
3711 .vmux = 3,
3712 .amux = TV,
3713 .tv = 1,
3714 .gpio = 0xc0c000,
3715 }},
3716 .radio = {
3717 .name = name_radio,
3718 .amux = LINE2,
3719 .gpio = 0xc0c000,
3720 },
3721 },
3722 [SAA7134_BOARD_BEHOLD_409] = {
3723 .name = "Beholder BeholdTV 409",
3724 .audio_clock = 0x00187de7,
3725 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
3726 .radio_type = UNSET,
3727 .tuner_addr = ADDR_UNSET,
3728 .radio_addr = ADDR_UNSET,
3729 .tda9887_conf = TDA9887_PRESENT,
3730 .inputs = {{
3731 .name = name_tv,
3732 .vmux = 3,
3733 .amux = TV,
3734 .tv = 1,
3735 },{
3736 .name = name_comp1,
3737 .vmux = 1,
3738 .amux = LINE1,
3739 },{
3740 .name = name_svideo,
3741 .vmux = 8,
3742 .amux = LINE1,
3743 }},
3744 },
3745 [SAA7134_BOARD_BEHOLD_505FM] = {
3746 .name = "Beholder BeholdTV 505 FM/RDS",
3747 .audio_clock = 0x00200000,
3748 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
3749 .radio_type = UNSET,
3750 .tuner_addr = ADDR_UNSET,
3751 .radio_addr = ADDR_UNSET,
3752 .tda9887_conf = TDA9887_PRESENT,
3753 .inputs = {{
3754 .name = name_tv,
3755 .vmux = 3,
3756 .amux = LINE2,
3757 .tv = 1,
3758 },{
3759 .name = name_comp1,
3760 .vmux = 1,
3761 .amux = LINE1,
3762 },{
3763 .name = name_svideo,
3764 .vmux = 8,
3765 .amux = LINE1,
3766 }},
3767 .mute = {
3768 .name = name_mute,
3769 .amux = LINE1,
3770 },
3771 .radio = {
3772 .name = name_radio,
3773 .amux = LINE2,
3774 },
3775 },
3776 [SAA7134_BOARD_BEHOLD_507_9FM] = {
3777 .name = "Beholder BeholdTV 507 FM/RDS / BeholdTV 509 FM",
3778 .audio_clock = 0x00187de7,
3779 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
3780 .radio_type = UNSET,
3781 .tuner_addr = ADDR_UNSET,
3782 .radio_addr = ADDR_UNSET,
3783 .tda9887_conf = TDA9887_PRESENT,
3784 .inputs = {{
3785 .name = name_tv,
3786 .vmux = 3,
3787 .amux = TV,
3788 .tv = 1,
3789 },{
3790 .name = name_comp1,
3791 .vmux = 1,
3792 .amux = LINE1,
3793 },{
3794 .name = name_svideo,
3795 .vmux = 8,
3796 .amux = LINE1,
3797 }},
3798 .radio = {
3799 .name = name_radio,
3800 .amux = LINE2,
3801 },
3802 },
3803 [SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM] = {
3804 .name = "Beholder BeholdTV Columbus TVFM",
3805 .audio_clock = 0x00187de7,
3806 .tuner_type = TUNER_ALPS_TSBE5_PAL,
3807 .radio_type = UNSET,
3808 .tuner_addr = ADDR_UNSET,
3809 .radio_addr = ADDR_UNSET,
3810 .tda9887_conf = TDA9887_PRESENT,
3811 .inputs = {{
3812 .name = name_tv,
3813 .vmux = 3,
3814 .amux = TV,
3815 .tv = 1,
3816 },{
3817 .name = name_comp1,
3818 .vmux = 1,
3819 .amux = LINE1,
3820 },{
3821 .name = name_svideo,
3822 .vmux = 8,
3823 .amux = LINE1,
3824 }},
3825 .radio = {
3826 .name = name_radio,
3827 .amux = LINE2,
3828 },
3829 },
3830 [SAA7134_BOARD_BEHOLD_607_9FM] = {
3831 /* Andrey Melnikoff <temnota@kmv.ru> */
3832 .name = "Beholder BeholdTV 607 / BeholdTV 609",
3833 .audio_clock = 0x00187de7,
3834 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
3835 .radio_type = UNSET,
3836 .tuner_addr = ADDR_UNSET,
3837 .radio_addr = ADDR_UNSET,
3838 .tda9887_conf = TDA9887_PRESENT,
3839 .inputs = {{
3840 .name = name_tv,
3841 .vmux = 3,
3842 .amux = TV,
3843 .tv = 1,
3844 },{
3845 .name = name_comp1,
3846 .vmux = 1,
3847 .amux = LINE1,
3848 },{
3849 .name = name_svideo,
3850 .vmux = 8,
3851 .amux = LINE1,
3852 }},
3853 .radio = {
3854 .name = name_radio,
3855 .amux = LINE2,
3856 },
3857 },
3858 [SAA7134_BOARD_BEHOLD_M6] = {
3859 /* Igor Kuznetsov <igk@igk.ru> */
3860 /* Andrey Melnikoff <temnota@kmv.ru> */
3861 .name = "Beholder BeholdTV M6 / BeholdTV M6 Extra",
3862 .audio_clock = 0x00187de7,
3863 .tuner_type = TUNER_PHILIPS_FM1216ME_MK3,
3864 .radio_type = UNSET,
3865 .tuner_addr = ADDR_UNSET,
3866 .radio_addr = ADDR_UNSET,
3867 .tda9887_conf = TDA9887_PRESENT,
3868 .inputs = {{
3869 .name = name_tv,
3870 .vmux = 3,
3871 .amux = TV,
3872 .tv = 1,
3873 },{
3874 .name = name_comp1,
3875 .vmux = 1,
3876 .amux = LINE1,
3877 },{
3878 .name = name_svideo,
3879 .vmux = 8,
3880 .amux = LINE1,
3881 }},
3882 .radio = {
3883 .name = name_radio,
3884 .amux = LINE2,
3885 },
3886 .mpeg = SAA7134_MPEG_EMPRESS,
3887 },
3565}; 3888};
3566 3889
3567const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards); 3890const unsigned int saa7134_bcount = ARRAY_SIZE(saa7134_boards);
@@ -4328,6 +4651,174 @@ struct pci_device_id saa7134_pci_tbl[] = {
4328 .driver_data = SAA7134_BOARD_AVERMEDIA_SUPER_007, 4651 .driver_data = SAA7134_BOARD_AVERMEDIA_SUPER_007,
4329 },{ 4652 },{
4330 .vendor = PCI_VENDOR_ID_PHILIPS, 4653 .vendor = PCI_VENDOR_ID_PHILIPS,
4654 .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
4655 .subvendor = 0x1131,
4656 .subdevice = 0x0000,
4657 .driver_data = SAA7134_BOARD_BEHOLD_401,
4658 },{
4659 .vendor = PCI_VENDOR_ID_PHILIPS,
4660 .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
4661 .subvendor = 0x0000,
4662 .subdevice = 0x4016,
4663 .driver_data = SAA7134_BOARD_BEHOLD_401,
4664 },{
4665 .vendor = PCI_VENDOR_ID_PHILIPS,
4666 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
4667 .subvendor = 0x1131,
4668 .subdevice = 0x0000,
4669 .driver_data = SAA7134_BOARD_BEHOLD_403FM,
4670 },{
4671 .vendor = PCI_VENDOR_ID_PHILIPS,
4672 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
4673 .subvendor = 0x0000,
4674 .subdevice = 0x4036,
4675 .driver_data = SAA7134_BOARD_BEHOLD_403,
4676 },{
4677 .vendor = PCI_VENDOR_ID_PHILIPS,
4678 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
4679 .subvendor = 0x0000,
4680 .subdevice = 0x4037,
4681 .driver_data = SAA7134_BOARD_BEHOLD_403FM,
4682 },{
4683 .vendor = PCI_VENDOR_ID_PHILIPS,
4684 .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
4685 .subvendor = 0x0000,
4686 .subdevice = 0x4050,
4687 .driver_data = SAA7134_BOARD_BEHOLD_405,
4688 },{
4689 .vendor = PCI_VENDOR_ID_PHILIPS,
4690 .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
4691 .subvendor = 0x0000,
4692 .subdevice = 0x4051,
4693 .driver_data = SAA7134_BOARD_BEHOLD_405FM,
4694 },{
4695 .vendor = PCI_VENDOR_ID_PHILIPS,
4696 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
4697 .subvendor = 0x0000,
4698 .subdevice = 0x4070,
4699 .driver_data = SAA7134_BOARD_BEHOLD_407,
4700 },{
4701 .vendor = PCI_VENDOR_ID_PHILIPS,
4702 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
4703 .subvendor = 0x0000,
4704 .subdevice = 0x4071,
4705 .driver_data = SAA7134_BOARD_BEHOLD_407FM,
4706 },{
4707 .vendor = PCI_VENDOR_ID_PHILIPS,
4708 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4709 .subvendor = 0x0000,
4710 .subdevice = 0x4090,
4711 .driver_data = SAA7134_BOARD_BEHOLD_409,
4712 },{
4713 .vendor = PCI_VENDOR_ID_PHILIPS,
4714 .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
4715 .subvendor = 0x0000,
4716 .subdevice = 0x5051,
4717 .driver_data = SAA7134_BOARD_BEHOLD_505FM,
4718 },{
4719 .vendor = PCI_VENDOR_ID_PHILIPS,
4720 .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
4721 .subvendor = 0x0000,
4722 .subdevice = 0x505B,
4723 .driver_data = SAA7134_BOARD_BEHOLD_505FM,
4724 },{
4725 .vendor = PCI_VENDOR_ID_PHILIPS,
4726 .device = PCI_DEVICE_ID_PHILIPS_SAA7130,
4727 .subvendor = 0x5ace,
4728 .subdevice = 0x5050,
4729 .driver_data = SAA7134_BOARD_BEHOLD_505FM,
4730 },{
4731 .vendor = PCI_VENDOR_ID_PHILIPS,
4732 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4733 .subvendor = 0x0000,
4734 .subdevice = 0x5071,
4735 .driver_data = SAA7134_BOARD_BEHOLD_507_9FM,
4736 },{
4737 .vendor = PCI_VENDOR_ID_PHILIPS,
4738 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4739 .subvendor = 0x0000,
4740 .subdevice = 0x507B,
4741 .driver_data = SAA7134_BOARD_BEHOLD_507_9FM,
4742 },{
4743 .vendor = PCI_VENDOR_ID_PHILIPS,
4744 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
4745 .subvendor = 0x5ace,
4746 .subdevice = 0x5070,
4747 .driver_data = SAA7134_BOARD_BEHOLD_507_9FM,
4748 },{
4749 .vendor = PCI_VENDOR_ID_PHILIPS,
4750 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4751 .subvendor = 0x5ace,
4752 .subdevice = 0x5090,
4753 .driver_data = SAA7134_BOARD_BEHOLD_507_9FM,
4754 },{
4755 .vendor = PCI_VENDOR_ID_PHILIPS,
4756 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4757 .subvendor = 0x0000,
4758 .subdevice = 0x5201,
4759 .driver_data = SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM,
4760 },{
4761 .vendor = PCI_VENDOR_ID_PHILIPS,
4762 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
4763 .subvendor = 0x5ace,
4764 .subdevice = 0x6070,
4765 .driver_data = SAA7134_BOARD_BEHOLD_607_9FM,
4766 },{
4767 .vendor = PCI_VENDOR_ID_PHILIPS,
4768 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
4769 .subvendor = 0x5ace,
4770 .subdevice = 0x6071,
4771 .driver_data = SAA7134_BOARD_BEHOLD_607_9FM,
4772 },{
4773 .vendor = PCI_VENDOR_ID_PHILIPS,
4774 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
4775 .subvendor = 0x5ace,
4776 .subdevice = 0x6072,
4777 .driver_data = SAA7134_BOARD_BEHOLD_607_9FM,
4778 },{
4779 .vendor = PCI_VENDOR_ID_PHILIPS,
4780 .device = PCI_DEVICE_ID_PHILIPS_SAA7134,
4781 .subvendor = 0x5ace,
4782 .subdevice = 0x6073,
4783 .driver_data = SAA7134_BOARD_BEHOLD_607_9FM,
4784 },{
4785 .vendor = PCI_VENDOR_ID_PHILIPS,
4786 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4787 .subvendor = 0x5ace,
4788 .subdevice = 0x6090,
4789 .driver_data = SAA7134_BOARD_BEHOLD_607_9FM,
4790 },{
4791 .vendor = PCI_VENDOR_ID_PHILIPS,
4792 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4793 .subvendor = 0x5ace,
4794 .subdevice = 0x6091,
4795 .driver_data = SAA7134_BOARD_BEHOLD_607_9FM,
4796 },{
4797 .vendor = PCI_VENDOR_ID_PHILIPS,
4798 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4799 .subvendor = 0x5ace,
4800 .subdevice = 0x6092,
4801 .driver_data = SAA7134_BOARD_BEHOLD_607_9FM,
4802 },{
4803 .vendor = PCI_VENDOR_ID_PHILIPS,
4804 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4805 .subvendor = 0x5ace,
4806 .subdevice = 0x6093,
4807 .driver_data = SAA7134_BOARD_BEHOLD_607_9FM,
4808 },{
4809 .vendor = PCI_VENDOR_ID_PHILIPS,
4810 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4811 .subvendor = 0x5ace,
4812 .subdevice = 0x6190,
4813 .driver_data = SAA7134_BOARD_BEHOLD_M6,
4814 },{
4815 .vendor = PCI_VENDOR_ID_PHILIPS,
4816 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4817 .subvendor = 0x5ace,
4818 .subdevice = 0x6193,
4819 .driver_data = SAA7134_BOARD_BEHOLD_M6,
4820 },{
4821 .vendor = PCI_VENDOR_ID_PHILIPS,
4331 .device = PCI_DEVICE_ID_PHILIPS_SAA7133, 4822 .device = PCI_DEVICE_ID_PHILIPS_SAA7133,
4332 .subvendor = 0x4e42, 4823 .subvendor = 0x4e42,
4333 .subdevice = 0x3502, 4824 .subdevice = 0x3502,
@@ -4473,6 +4964,16 @@ int saa7134_board_init1(struct saa7134_dev *dev)
4473 case SAA7134_BOARD_ENCORE_ENLTV: 4964 case SAA7134_BOARD_ENCORE_ENLTV:
4474 case SAA7134_BOARD_ENCORE_ENLTV_FM: 4965 case SAA7134_BOARD_ENCORE_ENLTV_FM:
4475 case SAA7134_BOARD_10MOONSTVMASTER3: 4966 case SAA7134_BOARD_10MOONSTVMASTER3:
4967 case SAA7134_BOARD_BEHOLD_401:
4968 case SAA7134_BOARD_BEHOLD_403:
4969 case SAA7134_BOARD_BEHOLD_403FM:
4970 case SAA7134_BOARD_BEHOLD_405:
4971 case SAA7134_BOARD_BEHOLD_405FM:
4972 case SAA7134_BOARD_BEHOLD_407:
4973 case SAA7134_BOARD_BEHOLD_407FM:
4974 case SAA7134_BOARD_BEHOLD_409:
4975 case SAA7134_BOARD_BEHOLD_505FM:
4976 case SAA7134_BOARD_BEHOLD_507_9FM:
4476 dev->has_remote = SAA7134_REMOTE_GPIO; 4977 dev->has_remote = SAA7134_REMOTE_GPIO;
4477 break; 4978 break;
4478 case SAA7134_BOARD_FLYDVBS_LR300: 4979 case SAA7134_BOARD_FLYDVBS_LR300:
@@ -4512,6 +5013,7 @@ int saa7134_board_init1(struct saa7134_dev *dev)
4512 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x08000000, 0x00000000); 5013 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0x08000000, 0x00000000);
4513 break; 5014 break;
4514 case SAA7134_BOARD_AVERMEDIA_CARDBUS: 5015 case SAA7134_BOARD_AVERMEDIA_CARDBUS:
5016 case SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM:
4515 /* power-up tuner chip */ 5017 /* power-up tuner chip */
4516 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff); 5018 saa_andorl(SAA7134_GPIO_GPMODE0 >> 2, 0xffffffff, 0xffffffff);
4517 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff); 5019 saa_andorl(SAA7134_GPIO_GPSTATUS0 >> 2, 0xffffffff, 0xffffffff);
@@ -4533,6 +5035,8 @@ int saa7134_board_init1(struct saa7134_dev *dev)
4533 case SAA7134_BOARD_PINNACLE_PCTV_310i: 5035 case SAA7134_BOARD_PINNACLE_PCTV_310i:
4534 case SAA7134_BOARD_UPMOST_PURPLE_TV: 5036 case SAA7134_BOARD_UPMOST_PURPLE_TV:
4535 case SAA7134_BOARD_HAUPPAUGE_HVR1110: 5037 case SAA7134_BOARD_HAUPPAUGE_HVR1110:
5038 case SAA7134_BOARD_BEHOLD_607_9FM:
5039 case SAA7134_BOARD_BEHOLD_M6:
4536 dev->has_remote = SAA7134_REMOTE_I2C; 5040 dev->has_remote = SAA7134_REMOTE_I2C;
4537 break; 5041 break;
4538 case SAA7134_BOARD_AVERMEDIA_A169_B: 5042 case SAA7134_BOARD_AVERMEDIA_A169_B:
diff --git a/drivers/media/video/saa7134/saa7134-i2c.c b/drivers/media/video/saa7134/saa7134-i2c.c
index 800b397f8f16..d3322c3018f2 100644
--- a/drivers/media/video/saa7134/saa7134-i2c.c
+++ b/drivers/media/video/saa7134/saa7134-i2c.c
@@ -334,6 +334,7 @@ static int attach_inform(struct i2c_client *client)
334 case 0x7a: 334 case 0x7a:
335 case 0x47: 335 case 0x47:
336 case 0x71: 336 case 0x71:
337 case 0x2d:
337 { 338 {
338 struct IR_i2c *ir = i2c_get_clientdata(client); 339 struct IR_i2c *ir = i2c_get_clientdata(client);
339 d1printk("%s i2c IR detected (%s).\n", 340 d1printk("%s i2c IR detected (%s).\n",
@@ -439,6 +440,7 @@ static char *i2c_devs[128] = {
439 [ 0xa0 >> 1 ] = "eeprom", 440 [ 0xa0 >> 1 ] = "eeprom",
440 [ 0xc0 >> 1 ] = "tuner (analog)", 441 [ 0xc0 >> 1 ] = "tuner (analog)",
441 [ 0x86 >> 1 ] = "tda9887", 442 [ 0x86 >> 1 ] = "tda9887",
443 [ 0x5a >> 1 ] = "remote control",
442}; 444};
443 445
444static void do_i2c_scan(char *name, struct i2c_client *c) 446static void do_i2c_scan(char *name, struct i2c_client *c)
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 8cfeb2bde90f..7f4212928e9f 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -52,6 +52,11 @@ module_param(repeat_period, int, 0644);
52MODULE_PARM_DESC(repeat_period, "repeat period between " 52MODULE_PARM_DESC(repeat_period, "repeat period between "
53 "keypresses when key is down"); 53 "keypresses when key is down");
54 54
55static unsigned int disable_other_ir;
56module_param(disable_other_ir, int, 0644);
57MODULE_PARM_DESC(disable_other_ir, "disable full codes of "
58 "alternative remotes from other manufacturers");
59
55#define dprintk(fmt, arg...) if (ir_debug) \ 60#define dprintk(fmt, arg...) if (ir_debug) \
56 printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg) 61 printk(KERN_DEBUG "%s/ir: " fmt, dev->name , ## arg)
57#define i2cdprintk(fmt, arg...) if (ir_debug) \ 62#define i2cdprintk(fmt, arg...) if (ir_debug) \
@@ -154,6 +159,45 @@ static int get_key_hvr1110(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
154 return 1; 159 return 1;
155} 160}
156 161
162
163static int get_key_beholdm6xx(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
164{
165 unsigned char data[12];
166 u32 gpio;
167
168 struct saa7134_dev *dev = ir->c.adapter->algo_data;
169
170 /* rising SAA7134_GPIO_GPRESCAN reads the status */
171 saa_clearb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN);
172 saa_setb(SAA7134_GPIO_GPMODE3, SAA7134_GPIO_GPRESCAN);
173
174 gpio = saa_readl(SAA7134_GPIO_GPSTATUS0 >> 2);
175
176 if (0x400000 &~ gpio)
177 return 0; /* No button press */
178
179 ir->c.addr = 0x5a >> 1;
180
181 if (12 != i2c_master_recv(&ir->c, data, 12)) {
182 i2cdprintk("read error\n");
183 return -EIO;
184 }
185 /* IR of this card normally decode signals NEC-standard from
186 * - Sven IHOO MT 5.1R remote. xxyye718
187 * - Sven DVD HD-10xx remote. xxyyf708
188 * - BBK ...
189 * - mayby others
190 * So, skip not our, if disable full codes mode.
191 */
192 if (data[10] != 0x6b && data[11] != 0x86 && disable_other_ir)
193 return 0;
194
195 *ir_key = data[9];
196 *ir_raw = data[9];
197
198 return 1;
199}
200
157void saa7134_input_irq(struct saa7134_dev *dev) 201void saa7134_input_irq(struct saa7134_dev *dev)
158{ 202{
159 struct card_ir *ir = dev->remote; 203 struct card_ir *ir = dev->remote;
@@ -288,6 +332,16 @@ int saa7134_input_init1(struct saa7134_dev *dev)
288 case SAA7134_BOARD_MANLI_MTV001: 332 case SAA7134_BOARD_MANLI_MTV001:
289 case SAA7134_BOARD_MANLI_MTV002: 333 case SAA7134_BOARD_MANLI_MTV002:
290 case SAA7134_BOARD_BEHOLD_409FM: 334 case SAA7134_BOARD_BEHOLD_409FM:
335 case SAA7134_BOARD_BEHOLD_401:
336 case SAA7134_BOARD_BEHOLD_403:
337 case SAA7134_BOARD_BEHOLD_403FM:
338 case SAA7134_BOARD_BEHOLD_405:
339 case SAA7134_BOARD_BEHOLD_405FM:
340 case SAA7134_BOARD_BEHOLD_407:
341 case SAA7134_BOARD_BEHOLD_407FM:
342 case SAA7134_BOARD_BEHOLD_409:
343 case SAA7134_BOARD_BEHOLD_505FM:
344 case SAA7134_BOARD_BEHOLD_507_9FM:
291 ir_codes = ir_codes_manli; 345 ir_codes = ir_codes_manli;
292 mask_keycode = 0x001f00; 346 mask_keycode = 0x001f00;
293 mask_keyup = 0x004000; 347 mask_keyup = 0x004000;
@@ -458,6 +512,12 @@ void saa7134_set_i2c_ir(struct saa7134_dev *dev, struct IR_i2c *ir)
458 ir->get_key = get_key_hvr1110; 512 ir->get_key = get_key_hvr1110;
459 ir->ir_codes = ir_codes_hauppauge_new; 513 ir->ir_codes = ir_codes_hauppauge_new;
460 break; 514 break;
515 case SAA7134_BOARD_BEHOLD_607_9FM:
516 case SAA7134_BOARD_BEHOLD_M6:
517 snprintf(ir->c.name, sizeof(ir->c.name), "BeholdTV");
518 ir->get_key = get_key_beholdm6xx;
519 ir->ir_codes = ir_codes_behold;
520 break;
461 default: 521 default:
462 dprintk("Shouldn't get here: Unknown board %x for I2C IR?\n",dev->board); 522 dprintk("Shouldn't get here: Unknown board %x for I2C IR?\n",dev->board);
463 break; 523 break;
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h
index 3e77aeb7974f..ce450304fb53 100644
--- a/drivers/media/video/saa7134/saa7134.h
+++ b/drivers/media/video/saa7134/saa7134.h
@@ -240,6 +240,19 @@ struct saa7134_format {
240#define SAA7134_BOARD_SABRENT_TV_PCB05 115 240#define SAA7134_BOARD_SABRENT_TV_PCB05 115
241#define SAA7134_BOARD_10MOONSTVMASTER3 116 241#define SAA7134_BOARD_10MOONSTVMASTER3 116
242#define SAA7134_BOARD_AVERMEDIA_SUPER_007 117 242#define SAA7134_BOARD_AVERMEDIA_SUPER_007 117
243#define SAA7134_BOARD_BEHOLD_401 118
244#define SAA7134_BOARD_BEHOLD_403 119
245#define SAA7134_BOARD_BEHOLD_403FM 120
246#define SAA7134_BOARD_BEHOLD_405 121
247#define SAA7134_BOARD_BEHOLD_405FM 122
248#define SAA7134_BOARD_BEHOLD_407 123
249#define SAA7134_BOARD_BEHOLD_407FM 124
250#define SAA7134_BOARD_BEHOLD_409 125
251#define SAA7134_BOARD_BEHOLD_505FM 126
252#define SAA7134_BOARD_BEHOLD_507_9FM 127
253#define SAA7134_BOARD_BEHOLD_COLUMBUS_TVFM 128
254#define SAA7134_BOARD_BEHOLD_607_9FM 129
255#define SAA7134_BOARD_BEHOLD_M6 130
243 256
244#define SAA7134_MAXBOARDS 8 257#define SAA7134_MAXBOARDS 8
245#define SAA7134_INPUT_MAX 8 258#define SAA7134_INPUT_MAX 8
diff --git a/include/media/ir-common.h b/include/media/ir-common.h
index b904d3257260..9c2fc09a7133 100644
--- a/include/media/ir-common.h
+++ b/include/media/ir-common.h
@@ -140,6 +140,7 @@ extern IR_KEYTAB_TYPE ir_codes_asus_pc39[IR_KEYTAB_SIZE];
140extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE]; 140extern IR_KEYTAB_TYPE ir_codes_encore_enltv[IR_KEYTAB_SIZE];
141extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE]; 141extern IR_KEYTAB_TYPE ir_codes_tt_1500[IR_KEYTAB_SIZE];
142extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE]; 142extern IR_KEYTAB_TYPE ir_codes_fusionhdtv_mce[IR_KEYTAB_SIZE];
143extern IR_KEYTAB_TYPE ir_codes_behold[IR_KEYTAB_SIZE];
143 144
144#endif 145#endif
145 146