aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/IR/keymaps
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2010-04-16 17:28:35 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-05-19 11:57:41 -0400
commit1159f838c0a334855c05c7c94f7a20799c57442d (patch)
tree4a4d808ac46424204276e74c1e5f44e459e3ebbf /drivers/media/IR/keymaps
parent1c0e0ee580c476234b5ea410f5263fcb27d96389 (diff)
V4L/DVB: ir-core: add imon pad and mce keymaps
This adds the keymaps for the hardware decode scancodes imon devices create for their native imon pad (and mini) remotes, and the hardware scancodes generated by the imon devices when used with an rc6 windows media center ed. remote. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/IR/keymaps')
-rw-r--r--drivers/media/IR/keymaps/Makefile2
-rw-r--r--drivers/media/IR/keymaps/rc-imon-mce.c142
-rw-r--r--drivers/media/IR/keymaps/rc-imon-pad.c155
3 files changed, 299 insertions, 0 deletions
diff --git a/drivers/media/IR/keymaps/Makefile b/drivers/media/IR/keymaps/Makefile
index c4d891d79491..ec25258a955f 100644
--- a/drivers/media/IR/keymaps/Makefile
+++ b/drivers/media/IR/keymaps/Makefile
@@ -30,6 +30,8 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
30 rc-genius-tvgo-a11mce.o \ 30 rc-genius-tvgo-a11mce.o \
31 rc-gotview7135.o \ 31 rc-gotview7135.o \
32 rc-hauppauge-new.o \ 32 rc-hauppauge-new.o \
33 rc-imon-mce.o \
34 rc-imon-pad.o \
33 rc-iodata-bctv7e.o \ 35 rc-iodata-bctv7e.o \
34 rc-kaiomy.o \ 36 rc-kaiomy.o \
35 rc-kworld-315u.o \ 37 rc-kworld-315u.o \
diff --git a/drivers/media/IR/keymaps/rc-imon-mce.c b/drivers/media/IR/keymaps/rc-imon-mce.c
new file mode 100644
index 000000000000..9c6dda30c649
--- /dev/null
+++ b/drivers/media/IR/keymaps/rc-imon-mce.c
@@ -0,0 +1,142 @@
1/* rc5-imon-mce.c - Keytable for Windows Media Center RC-6 remotes for use
2 * with the SoundGraph iMON/Antec Veris hardware IR decoder
3 *
4 * Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11
12#include <media/rc-map.h>
13
14/* mce-mode imon mce remote key table */
15static struct ir_scancode imon_mce[] = {
16 /* keys sorted mostly by frequency of use to optimize lookups */
17 { 0x800ff415, KEY_REWIND },
18 { 0x800ff414, KEY_FASTFORWARD },
19 { 0x800ff41b, KEY_PREVIOUS },
20 { 0x800ff41a, KEY_NEXT },
21
22 { 0x800ff416, KEY_PLAY },
23 { 0x800ff418, KEY_PAUSE },
24 { 0x800ff419, KEY_STOP },
25 { 0x800ff417, KEY_RECORD },
26
27 { 0x02000052, KEY_UP },
28 { 0x02000051, KEY_DOWN },
29 { 0x02000050, KEY_LEFT },
30 { 0x0200004f, KEY_RIGHT },
31
32 { 0x800ff41e, KEY_UP },
33 { 0x800ff41f, KEY_DOWN },
34 { 0x800ff420, KEY_LEFT },
35 { 0x800ff421, KEY_RIGHT },
36
37 /* 0x800ff40b also KEY_NUMERIC_POUND on some receivers */
38 { 0x800ff40b, KEY_ENTER },
39 { 0x02000028, KEY_ENTER },
40/* the OK and Enter buttons decode to the same value on some remotes
41 { 0x02000028, KEY_OK }, */
42 { 0x800ff422, KEY_OK },
43 { 0x0200002a, KEY_EXIT },
44 { 0x800ff423, KEY_EXIT },
45 { 0x02000029, KEY_DELETE },
46 /* 0x800ff40a also KEY_NUMERIC_STAR on some receivers */
47 { 0x800ff40a, KEY_DELETE },
48
49 { 0x800ff40e, KEY_MUTE },
50 { 0x800ff410, KEY_VOLUMEUP },
51 { 0x800ff411, KEY_VOLUMEDOWN },
52 { 0x800ff412, KEY_CHANNELUP },
53 { 0x800ff413, KEY_CHANNELDOWN },
54
55 { 0x0200001e, KEY_NUMERIC_1 },
56 { 0x0200001f, KEY_NUMERIC_2 },
57 { 0x02000020, KEY_NUMERIC_3 },
58 { 0x02000021, KEY_NUMERIC_4 },
59 { 0x02000022, KEY_NUMERIC_5 },
60 { 0x02000023, KEY_NUMERIC_6 },
61 { 0x02000024, KEY_NUMERIC_7 },
62 { 0x02000025, KEY_NUMERIC_8 },
63 { 0x02000026, KEY_NUMERIC_9 },
64 { 0x02000027, KEY_NUMERIC_0 },
65
66 { 0x800ff401, KEY_NUMERIC_1 },
67 { 0x800ff402, KEY_NUMERIC_2 },
68 { 0x800ff403, KEY_NUMERIC_3 },
69 { 0x800ff404, KEY_NUMERIC_4 },
70 { 0x800ff405, KEY_NUMERIC_5 },
71 { 0x800ff406, KEY_NUMERIC_6 },
72 { 0x800ff407, KEY_NUMERIC_7 },
73 { 0x800ff408, KEY_NUMERIC_8 },
74 { 0x800ff409, KEY_NUMERIC_9 },
75 { 0x800ff400, KEY_NUMERIC_0 },
76
77 { 0x02200025, KEY_NUMERIC_STAR },
78 { 0x02200020, KEY_NUMERIC_POUND },
79 /* 0x800ff41d also KEY_BLUE on some receivers */
80 { 0x800ff41d, KEY_NUMERIC_STAR },
81 /* 0x800ff41c also KEY_PREVIOUS on some receivers */
82 { 0x800ff41c, KEY_NUMERIC_POUND },
83
84 { 0x800ff446, KEY_TV },
85 { 0x800ff447, KEY_AUDIO }, /* My Music */
86 { 0x800ff448, KEY_PVR }, /* RecordedTV */
87 { 0x800ff449, KEY_CAMERA },
88 { 0x800ff44a, KEY_VIDEO },
89 /* 0x800ff424 also KEY_MENU on some receivers */
90 { 0x800ff424, KEY_DVD },
91 /* 0x800ff425 also KEY_GREEN on some receivers */
92 { 0x800ff425, KEY_TUNER }, /* LiveTV */
93 { 0x800ff450, KEY_RADIO },
94
95 { 0x800ff44c, KEY_LANGUAGE },
96 { 0x800ff427, KEY_ZOOM }, /* Aspect */
97
98 { 0x800ff45b, KEY_RED },
99 { 0x800ff45c, KEY_GREEN },
100 { 0x800ff45d, KEY_YELLOW },
101 { 0x800ff45e, KEY_BLUE },
102
103 { 0x800ff466, KEY_RED },
104 /* { 0x800ff425, KEY_GREEN }, */
105 { 0x800ff468, KEY_YELLOW },
106 /* { 0x800ff41d, KEY_BLUE }, */
107
108 { 0x800ff40f, KEY_INFO },
109 { 0x800ff426, KEY_EPG }, /* Guide */
110 { 0x800ff45a, KEY_SUBTITLE }, /* Caption/Teletext */
111 { 0x800ff44d, KEY_TITLE },
112
113 { 0x800ff40c, KEY_POWER },
114 { 0x800ff40d, KEY_PROG1 }, /* Windows MCE button */
115
116};
117
118static struct rc_keymap imon_mce_map = {
119 .map = {
120 .scan = imon_mce,
121 .size = ARRAY_SIZE(imon_mce),
122 /* its actually RC6, but w/a hardware decoder */
123 .ir_type = IR_TYPE_UNKNOWN,
124 .name = RC_MAP_IMON_MCE,
125 }
126};
127
128static int __init init_rc_map_imon_mce(void)
129{
130 return ir_register_map(&imon_mce_map);
131}
132
133static void __exit exit_rc_map_imon_mce(void)
134{
135 ir_unregister_map(&imon_mce_map);
136}
137
138module_init(init_rc_map_imon_mce)
139module_exit(exit_rc_map_imon_mce)
140
141MODULE_LICENSE("GPL");
142MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
diff --git a/drivers/media/IR/keymaps/rc-imon-pad.c b/drivers/media/IR/keymaps/rc-imon-pad.c
new file mode 100644
index 000000000000..331ba9066b46
--- /dev/null
+++ b/drivers/media/IR/keymaps/rc-imon-pad.c
@@ -0,0 +1,155 @@
1/* rc5-imon-pad.c - Keytable for SoundGraph iMON PAD and Antec Veris
2 * RM-200 Remote Control
3 *
4 * Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 */
11
12#include <media/rc-map.h>
13
14/*
15 * standard imon remote key table, which isn't really entirely
16 * "standard", as different receivers decode the same key on the
17 * same remote to different hex codes, and the silkscreened names
18 * vary a bit between the SoundGraph and Antec remotes... ugh.
19 */
20static struct ir_scancode imon_pad[] = {
21 /* keys sorted mostly by frequency of use to optimize lookups */
22 { 0x2a8195b7, KEY_REWIND },
23 { 0x298315b7, KEY_REWIND },
24 { 0x2b8115b7, KEY_FASTFORWARD },
25 { 0x2b8315b7, KEY_FASTFORWARD },
26 { 0x2b9115b7, KEY_PREVIOUS },
27 { 0x298195b7, KEY_NEXT },
28
29 { 0x2a8115b7, KEY_PLAY },
30 { 0x2a8315b7, KEY_PLAY },
31 { 0x2a9115b7, KEY_PAUSE },
32 { 0x2b9715b7, KEY_STOP },
33 { 0x298115b7, KEY_RECORD },
34
35 { 0x01008000, KEY_UP },
36 { 0x01007f00, KEY_DOWN },
37 { 0x01000080, KEY_LEFT },
38 { 0x0100007f, KEY_RIGHT },
39
40 { 0x2aa515b7, KEY_UP },
41 { 0x289515b7, KEY_DOWN },
42 { 0x29a515b7, KEY_LEFT },
43 { 0x2ba515b7, KEY_RIGHT },
44
45 { 0x0200002c, KEY_SPACE }, /* Select/Space */
46 { 0x2a9315b7, KEY_SPACE }, /* Select/Space */
47 { 0x02000028, KEY_ENTER },
48 { 0x28a195b7, KEY_ENTER },
49 { 0x288195b7, KEY_EXIT },
50 { 0x02000029, KEY_ESC },
51 { 0x2bb715b7, KEY_ESC },
52 { 0x0200002a, KEY_BACKSPACE },
53 { 0x28a115b7, KEY_BACKSPACE },
54
55 { 0x2b9595b7, KEY_MUTE },
56 { 0x28a395b7, KEY_VOLUMEUP },
57 { 0x28a595b7, KEY_VOLUMEDOWN },
58 { 0x289395b7, KEY_CHANNELUP },
59 { 0x288795b7, KEY_CHANNELDOWN },
60
61 { 0x0200001e, KEY_NUMERIC_1 },
62 { 0x0200001f, KEY_NUMERIC_2 },
63 { 0x02000020, KEY_NUMERIC_3 },
64 { 0x02000021, KEY_NUMERIC_4 },
65 { 0x02000022, KEY_NUMERIC_5 },
66 { 0x02000023, KEY_NUMERIC_6 },
67 { 0x02000024, KEY_NUMERIC_7 },
68 { 0x02000025, KEY_NUMERIC_8 },
69 { 0x02000026, KEY_NUMERIC_9 },
70 { 0x02000027, KEY_NUMERIC_0 },
71
72 { 0x28b595b7, KEY_NUMERIC_1 },
73 { 0x2bb195b7, KEY_NUMERIC_2 },
74 { 0x28b195b7, KEY_NUMERIC_3 },
75 { 0x2a8595b7, KEY_NUMERIC_4 },
76 { 0x299595b7, KEY_NUMERIC_5 },
77 { 0x2aa595b7, KEY_NUMERIC_6 },
78 { 0x2b9395b7, KEY_NUMERIC_7 },
79 { 0x2a8515b7, KEY_NUMERIC_8 },
80 { 0x2aa115b7, KEY_NUMERIC_9 },
81 { 0x2ba595b7, KEY_NUMERIC_0 },
82
83 { 0x02200025, KEY_NUMERIC_STAR },
84 { 0x28b515b7, KEY_NUMERIC_STAR },
85 { 0x02200020, KEY_NUMERIC_POUND },
86 { 0x29a115b7, KEY_NUMERIC_POUND },
87
88 { 0x2b8515b7, KEY_VIDEO },
89 { 0x299195b7, KEY_AUDIO },
90 { 0x2ba115b7, KEY_CAMERA },
91 { 0x28a515b7, KEY_TV },
92 { 0x29a395b7, KEY_DVD },
93 { 0x29a295b7, KEY_DVD },
94
95 /* the Menu key between DVD and Subtitle on the RM-200... */
96 { 0x2ba385b7, KEY_MENU },
97 { 0x2ba395b7, KEY_MENU },
98
99 { 0x288515b7, KEY_BOOKMARKS },
100 { 0x2ab715b7, KEY_MEDIA }, /* Thumbnail */
101 { 0x298595b7, KEY_SUBTITLE },
102 { 0x2b8595b7, KEY_LANGUAGE },
103
104 { 0x29a595b7, KEY_ZOOM },
105 { 0x2aa395b7, KEY_SCREEN }, /* FullScreen */
106
107 { 0x299115b7, KEY_KEYBOARD },
108 { 0x299135b7, KEY_KEYBOARD },
109
110 { 0x01010000, BTN_LEFT },
111 { 0x01020000, BTN_RIGHT },
112 { 0x01010080, BTN_LEFT },
113 { 0x01020080, BTN_RIGHT },
114 { 0x688301b7, BTN_LEFT },
115 { 0x688481b7, BTN_RIGHT },
116
117 { 0x2a9395b7, KEY_CYCLEWINDOWS }, /* TaskSwitcher */
118 { 0x2b8395b7, KEY_TIME }, /* Timer */
119
120 { 0x289115b7, KEY_POWER },
121 { 0x29b195b7, KEY_EJECTCD }, /* the one next to play */
122 { 0x299395b7, KEY_EJECTCLOSECD }, /* eject (by TaskSw) */
123
124 { 0x02800000, KEY_CONTEXT_MENU }, /* Left Menu */
125 { 0x2b8195b7, KEY_CONTEXT_MENU }, /* Left Menu*/
126 { 0x02000065, KEY_COMPOSE }, /* RightMenu */
127 { 0x28b715b7, KEY_COMPOSE }, /* RightMenu */
128 { 0x2ab195b7, KEY_PROG1 }, /* Go or MultiMon */
129 { 0x29b715b7, KEY_DASHBOARD }, /* AppLauncher */
130};
131
132static struct rc_keymap imon_pad_map = {
133 .map = {
134 .scan = imon_pad,
135 .size = ARRAY_SIZE(imon_pad),
136 .ir_type = IR_TYPE_UNKNOWN,
137 .name = RC_MAP_IMON_PAD,
138 }
139};
140
141static int __init init_rc_map_imon_pad(void)
142{
143 return ir_register_map(&imon_pad_map);
144}
145
146static void __exit exit_rc_map_imon_pad(void)
147{
148 ir_unregister_map(&imon_pad_map);
149}
150
151module_init(init_rc_map_imon_pad)
152module_exit(exit_rc_map_imon_pad)
153
154MODULE_LICENSE("GPL");
155MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");