diff options
-rw-r--r-- | drivers/media/rc/keymaps/Makefile | 1 | ||||
-rw-r--r-- | drivers/media/rc/keymaps/rc-asus-ps3-100.c | 91 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-cards.c | 51 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-dvb.c | 39 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 7 | ||||
-rw-r--r-- | drivers/media/video/saa7134/saa7134.h | 1 | ||||
-rw-r--r-- | include/media/rc-map.h | 1 |
7 files changed, 191 insertions, 0 deletions
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 6d41a29861ac..ab84d66c67c1 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile | |||
@@ -3,6 +3,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ | |||
3 | rc-anysee.o \ | 3 | rc-anysee.o \ |
4 | rc-apac-viewcomp.o \ | 4 | rc-apac-viewcomp.o \ |
5 | rc-asus-pc39.o \ | 5 | rc-asus-pc39.o \ |
6 | rc-asus-ps3-100.o \ | ||
6 | rc-ati-tv-wonder-hd-600.o \ | 7 | rc-ati-tv-wonder-hd-600.o \ |
7 | rc-ati-x10.o \ | 8 | rc-ati-x10.o \ |
8 | rc-avermedia-a16d.o \ | 9 | rc-avermedia-a16d.o \ |
diff --git a/drivers/media/rc/keymaps/rc-asus-ps3-100.c b/drivers/media/rc/keymaps/rc-asus-ps3-100.c new file mode 100644 index 000000000000..ba76609c5936 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-asus-ps3-100.c | |||
@@ -0,0 +1,91 @@ | |||
1 | /* asus-ps3-100.h - Keytable for asus_ps3_100 Remote Controller | ||
2 | * | ||
3 | * Copyright (c) 2012 by Mauro Carvalho Chehab <mchehab@redhat.com> | ||
4 | * | ||
5 | * Based on a previous patch from Remi Schwartz <remi.schwartz@gmail.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | */ | ||
12 | |||
13 | #include <media/rc-map.h> | ||
14 | #include <linux/module.h> | ||
15 | |||
16 | static struct rc_map_table asus_ps3_100[] = { | ||
17 | { 0x081c, KEY_HOME }, /* home */ | ||
18 | { 0x081e, KEY_TV }, /* tv */ | ||
19 | { 0x0803, KEY_TEXT }, /* teletext */ | ||
20 | { 0x0829, KEY_POWER }, /* close */ | ||
21 | |||
22 | { 0x080b, KEY_RED }, /* red */ | ||
23 | { 0x080d, KEY_YELLOW }, /* yellow */ | ||
24 | { 0x0806, KEY_BLUE }, /* blue */ | ||
25 | { 0x0807, KEY_GREEN }, /* green */ | ||
26 | |||
27 | /* Keys 0 to 9 */ | ||
28 | { 0x082a, KEY_0 }, | ||
29 | { 0x0816, KEY_1 }, | ||
30 | { 0x0812, KEY_2 }, | ||
31 | { 0x0814, KEY_3 }, | ||
32 | { 0x0836, KEY_4 }, | ||
33 | { 0x0832, KEY_5 }, | ||
34 | { 0x0834, KEY_6 }, | ||
35 | { 0x080e, KEY_7 }, | ||
36 | { 0x080a, KEY_8 }, | ||
37 | { 0x080c, KEY_9 }, | ||
38 | |||
39 | { 0x0815, KEY_VOLUMEUP }, | ||
40 | { 0x0826, KEY_VOLUMEDOWN }, | ||
41 | { 0x0835, KEY_CHANNELUP }, /* channel / program + */ | ||
42 | { 0x0824, KEY_CHANNELDOWN }, /* channel / program - */ | ||
43 | |||
44 | { 0x0808, KEY_UP }, | ||
45 | { 0x0804, KEY_DOWN }, | ||
46 | { 0x0818, KEY_LEFT }, | ||
47 | { 0x0810, KEY_RIGHT }, | ||
48 | { 0x0825, KEY_ENTER }, /* enter */ | ||
49 | |||
50 | { 0x0822, KEY_EXIT }, /* back */ | ||
51 | { 0x082c, KEY_AB }, /* recall */ | ||
52 | |||
53 | { 0x0820, KEY_AUDIO }, /* TV audio */ | ||
54 | { 0x0837, KEY_SCREEN }, /* snapshot */ | ||
55 | { 0x082e, KEY_ZOOM }, /* full screen */ | ||
56 | { 0x0802, KEY_MUTE }, /* mute */ | ||
57 | |||
58 | { 0x0831, KEY_REWIND }, /* backward << */ | ||
59 | { 0x0811, KEY_RECORD }, /* recording */ | ||
60 | { 0x0809, KEY_STOP }, | ||
61 | { 0x0805, KEY_FASTFORWARD }, /* forward >> */ | ||
62 | { 0x0821, KEY_PREVIOUS }, /* rew */ | ||
63 | { 0x081a, KEY_PAUSE }, /* pause */ | ||
64 | { 0x0839, KEY_PLAY }, /* play */ | ||
65 | { 0x0819, KEY_NEXT }, /* forward */ | ||
66 | }; | ||
67 | |||
68 | static struct rc_map_list asus_ps3_100_map = { | ||
69 | .map = { | ||
70 | .scan = asus_ps3_100, | ||
71 | .size = ARRAY_SIZE(asus_ps3_100), | ||
72 | .rc_type = RC_TYPE_RC5, | ||
73 | .name = RC_MAP_ASUS_PS3_100, | ||
74 | } | ||
75 | }; | ||
76 | |||
77 | static int __init init_rc_map_asus_ps3_100(void) | ||
78 | { | ||
79 | return rc_map_register(&asus_ps3_100_map); | ||
80 | } | ||
81 | |||
82 | static void __exit exit_rc_map_asus_ps3_100(void) | ||
83 | { | ||
84 | rc_map_unregister(&asus_ps3_100_map); | ||
85 | } | ||
86 | |||
87 | module_init(init_rc_map_asus_ps3_100) | ||
88 | module_exit(exit_rc_map_asus_ps3_100) | ||
89 | |||
90 | MODULE_LICENSE("GPL"); | ||
91 | MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); | ||
diff --git a/drivers/media/video/saa7134/saa7134-cards.c b/drivers/media/video/saa7134/saa7134-cards.c index 53aae5968ffb..0d3cfcf7a1fd 100644 --- a/drivers/media/video/saa7134/saa7134-cards.c +++ b/drivers/media/video/saa7134/saa7134-cards.c | |||
@@ -5080,6 +5080,36 @@ struct saa7134_board saa7134_boards[] = { | |||
5080 | .gpio = 0x0200000, | 5080 | .gpio = 0x0200000, |
5081 | }, | 5081 | }, |
5082 | }, | 5082 | }, |
5083 | [SAA7134_BOARD_ASUSTeK_PS3_100] = { | ||
5084 | .name = "Asus My Cinema PS3-100", | ||
5085 | .audio_clock = 0x00187de7, | ||
5086 | .tuner_type = TUNER_PHILIPS_TDA8290, | ||
5087 | .radio_type = UNSET, | ||
5088 | .tuner_addr = ADDR_UNSET, | ||
5089 | .radio_addr = ADDR_UNSET, | ||
5090 | .tuner_config = 2, | ||
5091 | .gpiomask = 1 << 21, | ||
5092 | .mpeg = SAA7134_MPEG_DVB, | ||
5093 | .inputs = {{ | ||
5094 | .name = name_tv, | ||
5095 | .vmux = 1, | ||
5096 | .amux = TV, | ||
5097 | .tv = 1, | ||
5098 | }, { | ||
5099 | .name = name_comp, | ||
5100 | .vmux = 0, | ||
5101 | .amux = LINE2, | ||
5102 | }, { | ||
5103 | .name = name_svideo, | ||
5104 | .vmux = 8, | ||
5105 | .amux = LINE2, | ||
5106 | } }, | ||
5107 | .radio = { | ||
5108 | .name = name_radio, | ||
5109 | .amux = TV, | ||
5110 | .gpio = 0x0200000, | ||
5111 | }, | ||
5112 | }, | ||
5083 | [SAA7134_BOARD_REAL_ANGEL_220] = { | 5113 | [SAA7134_BOARD_REAL_ANGEL_220] = { |
5084 | .name = "Zogis Real Angel 220", | 5114 | .name = "Zogis Real Angel 220", |
5085 | .audio_clock = 0x00187de7, | 5115 | .audio_clock = 0x00187de7, |
@@ -6877,6 +6907,18 @@ struct pci_device_id saa7134_pci_tbl[] = { | |||
6877 | .driver_data = SAA7134_BOARD_ASUSTeK_TIGER_3IN1, | 6907 | .driver_data = SAA7134_BOARD_ASUSTeK_TIGER_3IN1, |
6878 | }, { | 6908 | }, { |
6879 | .vendor = PCI_VENDOR_ID_PHILIPS, | 6909 | .vendor = PCI_VENDOR_ID_PHILIPS, |
6910 | .device = PCI_DEVICE_ID_PHILIPS_SAA7133, | ||
6911 | .subvendor = 0x1043, | ||
6912 | .subdevice = 0x48cd, | ||
6913 | .driver_data = SAA7134_BOARD_ASUSTeK_PS3_100, | ||
6914 | }, { | ||
6915 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
6916 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | ||
6917 | .subvendor = 0x17de, | ||
6918 | .subdevice = 0x7128, | ||
6919 | .driver_data = SAA7134_BOARD_ASUSTeK_TIGER_3IN1, | ||
6920 | }, { | ||
6921 | .vendor = PCI_VENDOR_ID_PHILIPS, | ||
6880 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, | 6922 | .device = PCI_DEVICE_ID_PHILIPS_SAA7134, |
6881 | .subvendor = 0x17de, | 6923 | .subvendor = 0x17de, |
6882 | .subdevice = 0x7128, | 6924 | .subdevice = 0x7128, |
@@ -7347,6 +7389,7 @@ int saa7134_board_init1(struct saa7134_dev *dev) | |||
7347 | case SAA7134_BOARD_KWORLD_TERMINATOR: | 7389 | case SAA7134_BOARD_KWORLD_TERMINATOR: |
7348 | case SAA7134_BOARD_SEDNA_PC_TV_CARDBUS: | 7390 | case SAA7134_BOARD_SEDNA_PC_TV_CARDBUS: |
7349 | case SAA7134_BOARD_FLYDVBT_LR301: | 7391 | case SAA7134_BOARD_FLYDVBT_LR301: |
7392 | case SAA7134_BOARD_ASUSTeK_PS3_100: | ||
7350 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: | 7393 | case SAA7134_BOARD_ASUSTeK_P7131_DUAL: |
7351 | case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA: | 7394 | case SAA7134_BOARD_ASUSTeK_P7131_HYBRID_LNA: |
7352 | case SAA7134_BOARD_ASUSTeK_P7131_ANALOG: | 7395 | case SAA7134_BOARD_ASUSTeK_P7131_ANALOG: |
@@ -7811,6 +7854,14 @@ int saa7134_board_init2(struct saa7134_dev *dev) | |||
7811 | i2c_transfer(&dev->i2c_adap, &msg, 1); | 7854 | i2c_transfer(&dev->i2c_adap, &msg, 1); |
7812 | break; | 7855 | break; |
7813 | } | 7856 | } |
7857 | case SAA7134_BOARD_ASUSTeK_PS3_100: | ||
7858 | { | ||
7859 | u8 data[] = { 0x3c, 0x33, 0x60}; | ||
7860 | struct i2c_msg msg = {.addr = 0x0b, .flags = 0, .buf = data, | ||
7861 | .len = sizeof(data)}; | ||
7862 | i2c_transfer(&dev->i2c_adap, &msg, 1); | ||
7863 | break; | ||
7864 | } | ||
7814 | case SAA7134_BOARD_FLYDVB_TRIO: | 7865 | case SAA7134_BOARD_FLYDVB_TRIO: |
7815 | { | 7866 | { |
7816 | u8 temp = 0; | 7867 | u8 temp = 0; |
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c index aaa5c97a7216..5dfd826d734e 100644 --- a/drivers/media/video/saa7134/saa7134-dvb.c +++ b/drivers/media/video/saa7134/saa7134-dvb.c | |||
@@ -881,6 +881,20 @@ static struct tda1004x_config asus_tiger_3in1_config = { | |||
881 | .request_firmware = philips_tda1004x_request_firmware | 881 | .request_firmware = philips_tda1004x_request_firmware |
882 | }; | 882 | }; |
883 | 883 | ||
884 | static struct tda1004x_config asus_ps3_100_config = { | ||
885 | .demod_address = 0x0b, | ||
886 | .invert = 1, | ||
887 | .invert_oclk = 0, | ||
888 | .xtal_freq = TDA10046_XTAL_16M, | ||
889 | .agc_config = TDA10046_AGC_TDA827X, | ||
890 | .gpio_config = TDA10046_GP11_I, | ||
891 | .if_freq = TDA10046_FREQ_045, | ||
892 | .i2c_gate = 0x4b, | ||
893 | .tuner_address = 0x61, | ||
894 | .antenna_switch = 1, | ||
895 | .request_firmware = philips_tda1004x_request_firmware | ||
896 | }; | ||
897 | |||
884 | /* ------------------------------------------------------------------ | 898 | /* ------------------------------------------------------------------ |
885 | * special case: this card uses saa713x GPIO22 for the mode switch | 899 | * special case: this card uses saa713x GPIO22 for the mode switch |
886 | */ | 900 | */ |
@@ -1647,6 +1661,31 @@ static int dvb_init(struct saa7134_dev *dev) | |||
1647 | &dev->i2c_adap, 0, 0) == NULL) { | 1661 | &dev->i2c_adap, 0, 0) == NULL) { |
1648 | wprintk("%s: Asus Tiger 3in1, no lnbp21" | 1662 | wprintk("%s: Asus Tiger 3in1, no lnbp21" |
1649 | " found!\n", __func__); | 1663 | " found!\n", __func__); |
1664 | goto dettach_frontend; | ||
1665 | } | ||
1666 | } | ||
1667 | } | ||
1668 | break; | ||
1669 | case SAA7134_BOARD_ASUSTeK_PS3_100: | ||
1670 | if (!use_frontend) { /* terrestrial */ | ||
1671 | if (configure_tda827x_fe(dev, &asus_ps3_100_config, | ||
1672 | &tda827x_cfg_2) < 0) | ||
1673 | goto dettach_frontend; | ||
1674 | } else { /* satellite */ | ||
1675 | fe0->dvb.frontend = dvb_attach(tda10086_attach, | ||
1676 | &flydvbs, &dev->i2c_adap); | ||
1677 | if (fe0->dvb.frontend) { | ||
1678 | if (dvb_attach(tda826x_attach, | ||
1679 | fe0->dvb.frontend, 0x60, | ||
1680 | &dev->i2c_adap, 0) == NULL) { | ||
1681 | wprintk("%s: Asus My Cinema PS3-100, no " | ||
1682 | "tda826x found!\n", __func__); | ||
1683 | goto dettach_frontend; | ||
1684 | } | ||
1685 | if (dvb_attach(lnbp21_attach, fe0->dvb.frontend, | ||
1686 | &dev->i2c_adap, 0, 0) == NULL) { | ||
1687 | wprintk("%s: Asus My Cinema PS3-100, no lnbp21" | ||
1688 | " found!\n", __func__); | ||
1650 | goto dettach_frontend; | 1689 | goto dettach_frontend; |
1651 | } | 1690 | } |
1652 | } | 1691 | } |
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 48d2878699b7..05c6e217d8a7 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c | |||
@@ -753,6 +753,13 @@ int saa7134_input_init1(struct saa7134_dev *dev) | |||
753 | mask_keycode = 0xffff; | 753 | mask_keycode = 0xffff; |
754 | raw_decode = true; | 754 | raw_decode = true; |
755 | break; | 755 | break; |
756 | case SAA7134_BOARD_ASUSTeK_PS3_100: | ||
757 | ir_codes = RC_MAP_ASUS_PS3_100; | ||
758 | mask_keydown = 0x0040000; | ||
759 | mask_keyup = 0x0040000; | ||
760 | mask_keycode = 0xffff; | ||
761 | raw_decode = true; | ||
762 | break; | ||
756 | case SAA7134_BOARD_ENCORE_ENLTV: | 763 | case SAA7134_BOARD_ENCORE_ENLTV: |
757 | case SAA7134_BOARD_ENCORE_ENLTV_FM: | 764 | case SAA7134_BOARD_ENCORE_ENLTV_FM: |
758 | ir_codes = RC_MAP_ENCORE_ENLTV; | 765 | ir_codes = RC_MAP_ENCORE_ENLTV; |
diff --git a/drivers/media/video/saa7134/saa7134.h b/drivers/media/video/saa7134/saa7134.h index f625060e6a0f..89c8333736a2 100644 --- a/drivers/media/video/saa7134/saa7134.h +++ b/drivers/media/video/saa7134/saa7134.h | |||
@@ -332,6 +332,7 @@ struct saa7134_card_ir { | |||
332 | #define SAA7134_BOARD_BEHOLD_503FM 187 | 332 | #define SAA7134_BOARD_BEHOLD_503FM 187 |
333 | #define SAA7134_BOARD_SENSORAY811_911 188 | 333 | #define SAA7134_BOARD_SENSORAY811_911 188 |
334 | #define SAA7134_BOARD_KWORLD_PC150U 189 | 334 | #define SAA7134_BOARD_KWORLD_PC150U 189 |
335 | #define SAA7134_BOARD_ASUSTeK_PS3_100 190 | ||
335 | 336 | ||
336 | #define SAA7134_MAXBOARDS 32 | 337 | #define SAA7134_MAXBOARDS 32 |
337 | #define SAA7134_INPUT_MAX 8 | 338 | #define SAA7134_INPUT_MAX 8 |
diff --git a/include/media/rc-map.h b/include/media/rc-map.h index 2e0f67db666f..cfd5163ff7f3 100644 --- a/include/media/rc-map.h +++ b/include/media/rc-map.h | |||
@@ -62,6 +62,7 @@ void rc_map_init(void); | |||
62 | #define RC_MAP_ANYSEE "rc-anysee" | 62 | #define RC_MAP_ANYSEE "rc-anysee" |
63 | #define RC_MAP_APAC_VIEWCOMP "rc-apac-viewcomp" | 63 | #define RC_MAP_APAC_VIEWCOMP "rc-apac-viewcomp" |
64 | #define RC_MAP_ASUS_PC39 "rc-asus-pc39" | 64 | #define RC_MAP_ASUS_PC39 "rc-asus-pc39" |
65 | #define RC_MAP_ASUS_PS3_100 "rc-asus-ps3-100" | ||
65 | #define RC_MAP_ATI_TV_WONDER_HD_600 "rc-ati-tv-wonder-hd-600" | 66 | #define RC_MAP_ATI_TV_WONDER_HD_600 "rc-ati-tv-wonder-hd-600" |
66 | #define RC_MAP_ATI_X10 "rc-ati-x10" | 67 | #define RC_MAP_ATI_X10 "rc-ati-x10" |
67 | #define RC_MAP_AVERMEDIA_A16D "rc-avermedia-a16d" | 68 | #define RC_MAP_AVERMEDIA_A16D "rc-avermedia-a16d" |