aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2010-07-31 18:24:49 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 15:43:46 -0400
commitd700226902a62a3b6f3563782d569c0e2af74397 (patch)
tree17fe92bf6ecde80581141d1adf7c82c8f4895da7 /drivers/media
parent6520342ba9a8f81f3f0f1e33439462ee60468558 (diff)
V4L/DVB: Add a keymap file with dib0700 table
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/IR/keymaps/Makefile1
-rw-r--r--drivers/media/IR/keymaps/rc-dib0700-big.c314
2 files changed, 315 insertions, 0 deletions
diff --git a/drivers/media/IR/keymaps/Makefile b/drivers/media/IR/keymaps/Makefile
index 86d3d1f2eaa9..85330d171c4e 100644
--- a/drivers/media/IR/keymaps/Makefile
+++ b/drivers/media/IR/keymaps/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_RC_MAP) += rc-adstech-dvb-t-pci.o \
14 rc-budget-ci-old.o \ 14 rc-budget-ci-old.o \
15 rc-cinergy-1400.o \ 15 rc-cinergy-1400.o \
16 rc-cinergy.o \ 16 rc-cinergy.o \
17 rc-dib0700-big.o \
17 rc-dm1105-nec.o \ 18 rc-dm1105-nec.o \
18 rc-dntv-live-dvb-t.o \ 19 rc-dntv-live-dvb-t.o \
19 rc-dntv-live-dvbt-pro.o \ 20 rc-dntv-live-dvbt-pro.o \
diff --git a/drivers/media/IR/keymaps/rc-dib0700-big.c b/drivers/media/IR/keymaps/rc-dib0700-big.c
new file mode 100644
index 000000000000..2e83820d3e59
--- /dev/null
+++ b/drivers/media/IR/keymaps/rc-dib0700-big.c
@@ -0,0 +1,314 @@
1/* rc-dvb0700-big.c - Keytable for devices in dvb0700
2 *
3 * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
4 *
5 * TODO: This table is a real mess, as it merges RC codes from several
6 * devices into a big table. It also has both RC-5 and NEC codes inside.
7 * It should be broken into small tables, and the protocols should properly
8 * be indentificated.
9 *
10 * The table were imported from dib0700_devices.c.
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 */
17
18#include <media/rc-map.h>
19
20static struct ir_scancode dib0700_table[] = {
21 /* Key codes for the tiny Pinnacle remote*/
22 { 0x0700, KEY_MUTE },
23 { 0x0701, KEY_MENU }, /* Pinnacle logo */
24 { 0x0739, KEY_POWER },
25 { 0x0703, KEY_VOLUMEUP },
26 { 0x0709, KEY_VOLUMEDOWN },
27 { 0x0706, KEY_CHANNELUP },
28 { 0x070c, KEY_CHANNELDOWN },
29 { 0x070f, KEY_1 },
30 { 0x0715, KEY_2 },
31 { 0x0710, KEY_3 },
32 { 0x0718, KEY_4 },
33 { 0x071b, KEY_5 },
34 { 0x071e, KEY_6 },
35 { 0x0711, KEY_7 },
36 { 0x0721, KEY_8 },
37 { 0x0712, KEY_9 },
38 { 0x0727, KEY_0 },
39 { 0x0724, KEY_SCREEN }, /* 'Square' key */
40 { 0x072a, KEY_TEXT }, /* 'T' key */
41 { 0x072d, KEY_REWIND },
42 { 0x0730, KEY_PLAY },
43 { 0x0733, KEY_FASTFORWARD },
44 { 0x0736, KEY_RECORD },
45 { 0x073c, KEY_STOP },
46 { 0x073f, KEY_CANCEL }, /* '?' key */
47 /* Key codes for the Terratec Cinergy DT XS Diversity, similar to cinergyT2.c */
48 { 0xeb01, KEY_POWER },
49 { 0xeb02, KEY_1 },
50 { 0xeb03, KEY_2 },
51 { 0xeb04, KEY_3 },
52 { 0xeb05, KEY_4 },
53 { 0xeb06, KEY_5 },
54 { 0xeb07, KEY_6 },
55 { 0xeb08, KEY_7 },
56 { 0xeb09, KEY_8 },
57 { 0xeb0a, KEY_9 },
58 { 0xeb0b, KEY_VIDEO },
59 { 0xeb0c, KEY_0 },
60 { 0xeb0d, KEY_REFRESH },
61 { 0xeb0f, KEY_EPG },
62 { 0xeb10, KEY_UP },
63 { 0xeb11, KEY_LEFT },
64 { 0xeb12, KEY_OK },
65 { 0xeb13, KEY_RIGHT },
66 { 0xeb14, KEY_DOWN },
67 { 0xeb16, KEY_INFO },
68 { 0xeb17, KEY_RED },
69 { 0xeb18, KEY_GREEN },
70 { 0xeb19, KEY_YELLOW },
71 { 0xeb1a, KEY_BLUE },
72 { 0xeb1b, KEY_CHANNELUP },
73 { 0xeb1c, KEY_VOLUMEUP },
74 { 0xeb1d, KEY_MUTE },
75 { 0xeb1e, KEY_VOLUMEDOWN },
76 { 0xeb1f, KEY_CHANNELDOWN },
77 { 0xeb40, KEY_PAUSE },
78 { 0xeb41, KEY_HOME },
79 { 0xeb42, KEY_MENU }, /* DVD Menu */
80 { 0xeb43, KEY_SUBTITLE },
81 { 0xeb44, KEY_TEXT }, /* Teletext */
82 { 0xeb45, KEY_DELETE },
83 { 0xeb46, KEY_TV },
84 { 0xeb47, KEY_DVD },
85 { 0xeb48, KEY_STOP },
86 { 0xeb49, KEY_VIDEO },
87 { 0xeb4a, KEY_AUDIO }, /* Music */
88 { 0xeb4b, KEY_SCREEN }, /* Pic */
89 { 0xeb4c, KEY_PLAY },
90 { 0xeb4d, KEY_BACK },
91 { 0xeb4e, KEY_REWIND },
92 { 0xeb4f, KEY_FASTFORWARD },
93 { 0xeb54, KEY_PREVIOUS },
94 { 0xeb58, KEY_RECORD },
95 { 0xeb5c, KEY_NEXT },
96
97 /* Key codes for the Haupauge WinTV Nova-TD, copied from nova-t-usb2.c (Nova-T USB2) */
98 { 0x1e00, KEY_0 },
99 { 0x1e01, KEY_1 },
100 { 0x1e02, KEY_2 },
101 { 0x1e03, KEY_3 },
102 { 0x1e04, KEY_4 },
103 { 0x1e05, KEY_5 },
104 { 0x1e06, KEY_6 },
105 { 0x1e07, KEY_7 },
106 { 0x1e08, KEY_8 },
107 { 0x1e09, KEY_9 },
108 { 0x1e0a, KEY_KPASTERISK },
109 { 0x1e0b, KEY_RED },
110 { 0x1e0c, KEY_RADIO },
111 { 0x1e0d, KEY_MENU },
112 { 0x1e0e, KEY_GRAVE }, /* # */
113 { 0x1e0f, KEY_MUTE },
114 { 0x1e10, KEY_VOLUMEUP },
115 { 0x1e11, KEY_VOLUMEDOWN },
116 { 0x1e12, KEY_CHANNEL },
117 { 0x1e14, KEY_UP },
118 { 0x1e15, KEY_DOWN },
119 { 0x1e16, KEY_LEFT },
120 { 0x1e17, KEY_RIGHT },
121 { 0x1e18, KEY_VIDEO },
122 { 0x1e19, KEY_AUDIO },
123 { 0x1e1a, KEY_MEDIA },
124 { 0x1e1b, KEY_EPG },
125 { 0x1e1c, KEY_TV },
126 { 0x1e1e, KEY_NEXT },
127 { 0x1e1f, KEY_BACK },
128 { 0x1e20, KEY_CHANNELUP },
129 { 0x1e21, KEY_CHANNELDOWN },
130 { 0x1e24, KEY_LAST }, /* Skip backwards */
131 { 0x1e25, KEY_OK },
132 { 0x1e29, KEY_BLUE},
133 { 0x1e2e, KEY_GREEN },
134 { 0x1e30, KEY_PAUSE },
135 { 0x1e32, KEY_REWIND },
136 { 0x1e34, KEY_FASTFORWARD },
137 { 0x1e35, KEY_PLAY },
138 { 0x1e36, KEY_STOP },
139 { 0x1e37, KEY_RECORD },
140 { 0x1e38, KEY_YELLOW },
141 { 0x1e3b, KEY_GOTO },
142 { 0x1e3d, KEY_POWER },
143
144 /* Key codes for the Leadtek Winfast DTV Dongle */
145 { 0x0042, KEY_POWER },
146 { 0x077c, KEY_TUNER },
147 { 0x0f4e, KEY_PRINT }, /* PREVIEW */
148 { 0x0840, KEY_SCREEN }, /* full screen toggle*/
149 { 0x0f71, KEY_DOT }, /* frequency */
150 { 0x0743, KEY_0 },
151 { 0x0c41, KEY_1 },
152 { 0x0443, KEY_2 },
153 { 0x0b7f, KEY_3 },
154 { 0x0e41, KEY_4 },
155 { 0x0643, KEY_5 },
156 { 0x097f, KEY_6 },
157 { 0x0d7e, KEY_7 },
158 { 0x057c, KEY_8 },
159 { 0x0a40, KEY_9 },
160 { 0x0e4e, KEY_CLEAR },
161 { 0x047c, KEY_CHANNEL }, /* show channel number */
162 { 0x0f41, KEY_LAST }, /* recall */
163 { 0x0342, KEY_MUTE },
164 { 0x064c, KEY_RESERVED }, /* PIP button*/
165 { 0x0172, KEY_SHUFFLE }, /* SNAPSHOT */
166 { 0x0c4e, KEY_PLAYPAUSE }, /* TIMESHIFT */
167 { 0x0b70, KEY_RECORD },
168 { 0x037d, KEY_VOLUMEUP },
169 { 0x017d, KEY_VOLUMEDOWN },
170 { 0x0242, KEY_CHANNELUP },
171 { 0x007d, KEY_CHANNELDOWN },
172
173 /* Key codes for Nova-TD "credit card" remote control. */
174 { 0x1d00, KEY_0 },
175 { 0x1d01, KEY_1 },
176 { 0x1d02, KEY_2 },
177 { 0x1d03, KEY_3 },
178 { 0x1d04, KEY_4 },
179 { 0x1d05, KEY_5 },
180 { 0x1d06, KEY_6 },
181 { 0x1d07, KEY_7 },
182 { 0x1d08, KEY_8 },
183 { 0x1d09, KEY_9 },
184 { 0x1d0a, KEY_TEXT },
185 { 0x1d0d, KEY_MENU },
186 { 0x1d0f, KEY_MUTE },
187 { 0x1d10, KEY_VOLUMEUP },
188 { 0x1d11, KEY_VOLUMEDOWN },
189 { 0x1d12, KEY_CHANNEL },
190 { 0x1d14, KEY_UP },
191 { 0x1d15, KEY_DOWN },
192 { 0x1d16, KEY_LEFT },
193 { 0x1d17, KEY_RIGHT },
194 { 0x1d1c, KEY_TV },
195 { 0x1d1e, KEY_NEXT },
196 { 0x1d1f, KEY_BACK },
197 { 0x1d20, KEY_CHANNELUP },
198 { 0x1d21, KEY_CHANNELDOWN },
199 { 0x1d24, KEY_LAST },
200 { 0x1d25, KEY_OK },
201 { 0x1d30, KEY_PAUSE },
202 { 0x1d32, KEY_REWIND },
203 { 0x1d34, KEY_FASTFORWARD },
204 { 0x1d35, KEY_PLAY },
205 { 0x1d36, KEY_STOP },
206 { 0x1d37, KEY_RECORD },
207 { 0x1d3b, KEY_GOTO },
208 { 0x1d3d, KEY_POWER },
209
210 /* Key codes for the Pixelview SBTVD remote (proto NEC) */
211 { 0x8613, KEY_MUTE },
212 { 0x8612, KEY_POWER },
213 { 0x8601, KEY_1 },
214 { 0x8602, KEY_2 },
215 { 0x8603, KEY_3 },
216 { 0x8604, KEY_4 },
217 { 0x8605, KEY_5 },
218 { 0x8606, KEY_6 },
219 { 0x8607, KEY_7 },
220 { 0x8608, KEY_8 },
221 { 0x8609, KEY_9 },
222 { 0x8600, KEY_0 },
223 { 0x860d, KEY_CHANNELUP },
224 { 0x8619, KEY_CHANNELDOWN },
225 { 0x8610, KEY_VOLUMEUP },
226 { 0x860c, KEY_VOLUMEDOWN },
227
228 { 0x860a, KEY_CAMERA },
229 { 0x860b, KEY_ZOOM },
230 { 0x861b, KEY_BACKSPACE },
231 { 0x8615, KEY_ENTER },
232
233 { 0x861d, KEY_UP },
234 { 0x861e, KEY_DOWN },
235 { 0x860e, KEY_LEFT },
236 { 0x860f, KEY_RIGHT },
237
238 { 0x8618, KEY_RECORD },
239 { 0x861a, KEY_STOP },
240
241 /* Key codes for the EvolutePC TVWay+ remote (proto NEC) */
242 { 0x7a00, KEY_MENU },
243 { 0x7a01, KEY_RECORD },
244 { 0x7a02, KEY_PLAY },
245 { 0x7a03, KEY_STOP },
246 { 0x7a10, KEY_CHANNELUP },
247 { 0x7a11, KEY_CHANNELDOWN },
248 { 0x7a12, KEY_VOLUMEUP },
249 { 0x7a13, KEY_VOLUMEDOWN },
250 { 0x7a40, KEY_POWER },
251 { 0x7a41, KEY_MUTE },
252
253 /* Key codes for the Elgato EyeTV Diversity silver remote,
254 set dvb_usb_dib0700_ir_proto=0 */
255 { 0x4501, KEY_POWER },
256 { 0x4502, KEY_MUTE },
257 { 0x4503, KEY_1 },
258 { 0x4504, KEY_2 },
259 { 0x4505, KEY_3 },
260 { 0x4506, KEY_4 },
261 { 0x4507, KEY_5 },
262 { 0x4508, KEY_6 },
263 { 0x4509, KEY_7 },
264 { 0x450a, KEY_8 },
265 { 0x450b, KEY_9 },
266 { 0x450c, KEY_LAST },
267 { 0x450d, KEY_0 },
268 { 0x450e, KEY_ENTER },
269 { 0x450f, KEY_RED },
270 { 0x4510, KEY_CHANNELUP },
271 { 0x4511, KEY_GREEN },
272 { 0x4512, KEY_VOLUMEDOWN },
273 { 0x4513, KEY_OK },
274 { 0x4514, KEY_VOLUMEUP },
275 { 0x4515, KEY_YELLOW },
276 { 0x4516, KEY_CHANNELDOWN },
277 { 0x4517, KEY_BLUE },
278 { 0x4518, KEY_LEFT }, /* Skip backwards */
279 { 0x4519, KEY_PLAYPAUSE },
280 { 0x451a, KEY_RIGHT }, /* Skip forward */
281 { 0x451b, KEY_REWIND },
282 { 0x451c, KEY_L }, /* Live */
283 { 0x451d, KEY_FASTFORWARD },
284 { 0x451e, KEY_STOP }, /* 'Reveal' for Teletext */
285 { 0x451f, KEY_MENU }, /* KEY_TEXT for Teletext */
286 { 0x4540, KEY_RECORD }, /* Font 'Size' for Teletext */
287 { 0x4541, KEY_SCREEN }, /* Full screen toggle, 'Hold' for Teletext */
288 { 0x4542, KEY_SELECT }, /* Select video input, 'Select' for Teletext */
289};
290
291static struct rc_keymap dib0700_map = {
292 .map = {
293 .scan = dib0700_table,
294 .size = ARRAY_SIZE(dib0700_table),
295 .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
296 .name = RC_MAP_DIB0700_BIG_TABLE,
297 }
298};
299
300static int __init init_rc_map(void)
301{
302 return ir_register_map(&dib0700_map);
303}
304
305static void __exit exit_rc_map(void)
306{
307 ir_unregister_map(&dib0700_map);
308}
309
310module_init(init_rc_map)
311module_exit(exit_rc_map)
312
313MODULE_LICENSE("GPL");
314MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");