diff options
author | Jarod Wilson <jarod@redhat.com> | 2011-03-24 11:58:48 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-05-20 08:27:29 -0400 |
commit | d0ff237133bf05c16d5604906cfb8774c5751b81 (patch) | |
tree | 487b15d2bcf5c5b198a74fef0a841baade8bb7e1 /drivers/media/rc/keymaps | |
parent | 6612155a1dce344fb609c9487a879c693150ebb1 (diff) |
[media] rc: add tivo/nero liquidtv keymap
Signed-off-by: Jarod Wilson <jarod@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc/keymaps')
-rw-r--r-- | drivers/media/rc/keymaps/Makefile | 1 | ||||
-rw-r--r-- | drivers/media/rc/keymaps/rc-tivo.c | 98 |
2 files changed, 99 insertions, 0 deletions
diff --git a/drivers/media/rc/keymaps/Makefile b/drivers/media/rc/keymaps/Makefile index 85cac7ddbcec..b57fc83fb4d2 100644 --- a/drivers/media/rc/keymaps/Makefile +++ b/drivers/media/rc/keymaps/Makefile | |||
@@ -77,6 +77,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \ | |||
77 | rc-terratec-slim.o \ | 77 | rc-terratec-slim.o \ |
78 | rc-terratec-slim-2.o \ | 78 | rc-terratec-slim-2.o \ |
79 | rc-tevii-nec.o \ | 79 | rc-tevii-nec.o \ |
80 | rc-tivo.o \ | ||
80 | rc-total-media-in-hand.o \ | 81 | rc-total-media-in-hand.o \ |
81 | rc-trekstor.o \ | 82 | rc-trekstor.o \ |
82 | rc-tt-1500.o \ | 83 | rc-tt-1500.o \ |
diff --git a/drivers/media/rc/keymaps/rc-tivo.c b/drivers/media/rc/keymaps/rc-tivo.c new file mode 100644 index 000000000000..98ad085531fd --- /dev/null +++ b/drivers/media/rc/keymaps/rc-tivo.c | |||
@@ -0,0 +1,98 @@ | |||
1 | /* rc-tivo.c - Keytable for TiVo remotes | ||
2 | * | ||
3 | * Copyright (c) 2011 by Jarod Wilson <jarod@redhat.com> | ||
4 | * | ||
5 | * This program is free software; you can redistribute it and/or modify | ||
6 | * it under the terms of the GNU General Public License as published by | ||
7 | * the Free Software Foundation; either version 2 of the License, or | ||
8 | * (at your option) any later version. | ||
9 | */ | ||
10 | |||
11 | #include <media/rc-map.h> | ||
12 | |||
13 | /* | ||
14 | * Initial mapping is for the TiVo remote included in the Nero LiquidTV bundle, | ||
15 | * which also ships with a TiVo-branded IR transceiver, supported by the mceusb | ||
16 | * driver. Note that the remote uses an NEC-ish protocol, but instead of having | ||
17 | * a command/not_command pair, it has a vendor ID of 0xa10c, but some keys, the | ||
18 | * NEC extended checksums do pass, so the table presently has the intended | ||
19 | * values and the checksum-passed versions for those keys. | ||
20 | */ | ||
21 | static struct rc_map_table tivo[] = { | ||
22 | { 0xa10c900f, KEY_MEDIA }, /* TiVo Button */ | ||
23 | { 0xa10c0807, KEY_POWER2 }, /* TV Power */ | ||
24 | { 0xa10c8807, KEY_TV }, /* Live TV/Swap */ | ||
25 | { 0xa10c2c03, KEY_VIDEO_NEXT }, /* TV Input */ | ||
26 | { 0xa10cc807, KEY_INFO }, | ||
27 | { 0xa10cfa05, KEY_CYCLEWINDOWS }, /* Window */ | ||
28 | { 0x0085305f, KEY_CYCLEWINDOWS }, | ||
29 | { 0xa10c6c03, KEY_EPG }, /* Guide */ | ||
30 | |||
31 | { 0xa10c2807, KEY_UP }, | ||
32 | { 0xa10c6807, KEY_DOWN }, | ||
33 | { 0xa10ce807, KEY_LEFT }, | ||
34 | { 0xa10ca807, KEY_RIGHT }, | ||
35 | |||
36 | { 0xa10c1807, KEY_SCROLLDOWN }, /* Red Thumbs Down */ | ||
37 | { 0xa10c9807, KEY_SELECT }, | ||
38 | { 0xa10c5807, KEY_SCROLLUP }, /* Green Thumbs Up */ | ||
39 | |||
40 | { 0xa10c3807, KEY_VOLUMEUP }, | ||
41 | { 0xa10cb807, KEY_VOLUMEDOWN }, | ||
42 | { 0xa10cd807, KEY_MUTE }, | ||
43 | { 0xa10c040b, KEY_RECORD }, | ||
44 | { 0xa10c7807, KEY_CHANNELUP }, | ||
45 | { 0xa10cf807, KEY_CHANNELDOWN }, | ||
46 | { 0x0085301f, KEY_CHANNELDOWN }, | ||
47 | |||
48 | { 0xa10c840b, KEY_PLAY }, | ||
49 | { 0xa10cc40b, KEY_PAUSE }, | ||
50 | { 0xa10ca40b, KEY_SLOW }, | ||
51 | { 0xa10c440b, KEY_REWIND }, | ||
52 | { 0xa10c240b, KEY_FASTFORWARD }, | ||
53 | { 0xa10c640b, KEY_PREVIOUS }, | ||
54 | { 0xa10ce40b, KEY_NEXT }, /* ->| */ | ||
55 | |||
56 | { 0xa10c220d, KEY_ZOOM }, /* Aspect */ | ||
57 | { 0xa10c120d, KEY_STOP }, | ||
58 | { 0xa10c520d, KEY_DVD }, /* DVD Menu */ | ||
59 | |||
60 | { 0xa10c140b, KEY_NUMERIC_1 }, | ||
61 | { 0xa10c940b, KEY_NUMERIC_2 }, | ||
62 | { 0xa10c540b, KEY_NUMERIC_3 }, | ||
63 | { 0xa10cd40b, KEY_NUMERIC_4 }, | ||
64 | { 0xa10c340b, KEY_NUMERIC_5 }, | ||
65 | { 0xa10cb40b, KEY_NUMERIC_6 }, | ||
66 | { 0xa10c740b, KEY_NUMERIC_7 }, | ||
67 | { 0xa10cf40b, KEY_NUMERIC_8 }, | ||
68 | { 0x0085302f, KEY_NUMERIC_8 }, | ||
69 | { 0xa10c0c03, KEY_NUMERIC_9 }, | ||
70 | { 0xa10c8c03, KEY_NUMERIC_0 }, | ||
71 | { 0xa10ccc03, KEY_ENTER }, | ||
72 | { 0xa10c4c03, KEY_CLEAR }, | ||
73 | }; | ||
74 | |||
75 | static struct rc_map_list tivo_map = { | ||
76 | .map = { | ||
77 | .scan = tivo, | ||
78 | .size = ARRAY_SIZE(tivo), | ||
79 | .rc_type = RC_TYPE_NEC, | ||
80 | .name = RC_MAP_TIVO, | ||
81 | } | ||
82 | }; | ||
83 | |||
84 | static int __init init_rc_map_tivo(void) | ||
85 | { | ||
86 | return rc_map_register(&tivo_map); | ||
87 | } | ||
88 | |||
89 | static void __exit exit_rc_map_tivo(void) | ||
90 | { | ||
91 | rc_map_unregister(&tivo_map); | ||
92 | } | ||
93 | |||
94 | module_init(init_rc_map_tivo) | ||
95 | module_exit(exit_rc_map_tivo) | ||
96 | |||
97 | MODULE_LICENSE("GPL"); | ||
98 | MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>"); | ||