aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/common/Makefile1
-rw-r--r--drivers/media/common/ir-common.c519
-rw-r--r--drivers/media/common/ir-keymaps.c1537
-rw-r--r--drivers/media/video/bttv-input.c245
-rw-r--r--drivers/media/video/cx88/cx88-input.c331
-rw-r--r--drivers/media/video/em28xx/em28xx-input.c85
-rw-r--r--drivers/media/video/ir-kbd-i2c.c41
-rw-r--r--drivers/media/video/saa7134/saa7134-input.c501
8 files changed, 1550 insertions, 1710 deletions
diff --git a/drivers/media/common/Makefile b/drivers/media/common/Makefile
index bd458cb9b4ea..61b89617a967 100644
--- a/drivers/media/common/Makefile
+++ b/drivers/media/common/Makefile
@@ -1,5 +1,6 @@
1saa7146-objs := saa7146_i2c.o saa7146_core.o 1saa7146-objs := saa7146_i2c.o saa7146_core.o
2saa7146_vv-objs := saa7146_vv_ksyms.o saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o 2saa7146_vv-objs := saa7146_vv_ksyms.o saa7146_fops.o saa7146_video.o saa7146_hlp.o saa7146_vbi.o
3ir-common-objs := ir-functions.o ir-keymaps.o
3 4
4obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o 5obj-$(CONFIG_VIDEO_SAA7146) += saa7146.o
5obj-$(CONFIG_VIDEO_SAA7146_VV) += saa7146_vv.o 6obj-$(CONFIG_VIDEO_SAA7146_VV) += saa7146_vv.o
diff --git a/drivers/media/common/ir-common.c b/drivers/media/common/ir-common.c
deleted file mode 100644
index 97fa3fc571c4..000000000000
--- a/drivers/media/common/ir-common.c
+++ /dev/null
@@ -1,519 +0,0 @@
1/*
2 *
3 * some common structs and functions to handle infrared remotes via
4 * input layer ...
5 *
6 * (c) 2003 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23#include <linux/module.h>
24#include <linux/moduleparam.h>
25#include <linux/string.h>
26#include <media/ir-common.h>
27
28/* -------------------------------------------------------------------------- */
29
30MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
31MODULE_LICENSE("GPL");
32
33static int repeat = 1;
34module_param(repeat, int, 0444);
35MODULE_PARM_DESC(repeat,"auto-repeat for IR keys (default: on)");
36
37static int debug = 0; /* debug level (0,1,2) */
38module_param(debug, int, 0644);
39
40#define dprintk(level, fmt, arg...) if (debug >= level) \
41 printk(KERN_DEBUG fmt , ## arg)
42
43/* -------------------------------------------------------------------------- */
44
45/* generic RC5 keytable */
46/* see http://users.pandora.be/nenya/electronics/rc5/codes00.htm */
47/* used by old (black) Hauppauge remotes */
48IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE] = {
49 /* Keys 0 to 9 */
50 [ 0x00 ] = KEY_KP0,
51 [ 0x01 ] = KEY_KP1,
52 [ 0x02 ] = KEY_KP2,
53 [ 0x03 ] = KEY_KP3,
54 [ 0x04 ] = KEY_KP4,
55 [ 0x05 ] = KEY_KP5,
56 [ 0x06 ] = KEY_KP6,
57 [ 0x07 ] = KEY_KP7,
58 [ 0x08 ] = KEY_KP8,
59 [ 0x09 ] = KEY_KP9,
60
61 [ 0x0b ] = KEY_CHANNEL, /* channel / program (japan: 11) */
62 [ 0x0c ] = KEY_POWER, /* standby */
63 [ 0x0d ] = KEY_MUTE, /* mute / demute */
64 [ 0x0f ] = KEY_TV, /* display */
65 [ 0x10 ] = KEY_VOLUMEUP,
66 [ 0x11 ] = KEY_VOLUMEDOWN,
67 [ 0x12 ] = KEY_BRIGHTNESSUP,
68 [ 0x13 ] = KEY_BRIGHTNESSDOWN,
69 [ 0x1e ] = KEY_SEARCH, /* search + */
70 [ 0x20 ] = KEY_CHANNELUP, /* channel / program + */
71 [ 0x21 ] = KEY_CHANNELDOWN, /* channel / program - */
72 [ 0x22 ] = KEY_CHANNEL, /* alt / channel */
73 [ 0x23 ] = KEY_LANGUAGE, /* 1st / 2nd language */
74 [ 0x26 ] = KEY_SLEEP, /* sleeptimer */
75 [ 0x2e ] = KEY_MENU, /* 2nd controls (USA: menu) */
76 [ 0x30 ] = KEY_PAUSE,
77 [ 0x32 ] = KEY_REWIND,
78 [ 0x33 ] = KEY_GOTO,
79 [ 0x35 ] = KEY_PLAY,
80 [ 0x36 ] = KEY_STOP,
81 [ 0x37 ] = KEY_RECORD, /* recording */
82 [ 0x3c ] = KEY_TEXT, /* teletext submode (Japan: 12) */
83 [ 0x3d ] = KEY_SUSPEND, /* system standby */
84
85};
86EXPORT_SYMBOL_GPL(ir_codes_rc5_tv);
87
88/* Table for Leadtek Winfast Remote Controls - used by both bttv and cx88 */
89IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE] = {
90 /* Keys 0 to 9 */
91 [ 18 ] = KEY_KP0,
92 [ 5 ] = KEY_KP1,
93 [ 6 ] = KEY_KP2,
94 [ 7 ] = KEY_KP3,
95 [ 9 ] = KEY_KP4,
96 [ 10 ] = KEY_KP5,
97 [ 11 ] = KEY_KP6,
98 [ 13 ] = KEY_KP7,
99 [ 14 ] = KEY_KP8,
100 [ 15 ] = KEY_KP9,
101
102 [ 0 ] = KEY_POWER,
103 [ 2 ] = KEY_TUNER, /* TV/FM */
104 [ 30 ] = KEY_VIDEO,
105 [ 4 ] = KEY_VOLUMEUP,
106 [ 8 ] = KEY_VOLUMEDOWN,
107 [ 12 ] = KEY_CHANNELUP,
108 [ 16 ] = KEY_CHANNELDOWN,
109 [ 3 ] = KEY_ZOOM, /* fullscreen */
110 [ 31 ] = KEY_SUBTITLE, /* closed caption/teletext */
111 [ 32 ] = KEY_SLEEP,
112 [ 20 ] = KEY_MUTE,
113 [ 43 ] = KEY_RED,
114 [ 44 ] = KEY_GREEN,
115 [ 45 ] = KEY_YELLOW,
116 [ 46 ] = KEY_BLUE,
117 [ 24 ] = KEY_KPPLUS, /* fine tune + */
118 [ 25 ] = KEY_KPMINUS, /* fine tune - */
119 [ 33 ] = KEY_KPDOT,
120 [ 19 ] = KEY_KPENTER,
121 [ 34 ] = KEY_BACK,
122 [ 35 ] = KEY_PLAYPAUSE,
123 [ 36 ] = KEY_NEXT,
124 [ 38 ] = KEY_STOP,
125 [ 39 ] = KEY_RECORD
126};
127EXPORT_SYMBOL_GPL(ir_codes_winfast);
128
129IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE] = {
130 [ 0x59 ] = KEY_MUTE,
131 [ 0x4a ] = KEY_POWER,
132
133 [ 0x18 ] = KEY_TEXT,
134 [ 0x26 ] = KEY_TV,
135 [ 0x3d ] = KEY_PRINT,
136
137 [ 0x48 ] = KEY_RED,
138 [ 0x04 ] = KEY_GREEN,
139 [ 0x11 ] = KEY_YELLOW,
140 [ 0x00 ] = KEY_BLUE,
141
142 [ 0x2d ] = KEY_VOLUMEUP,
143 [ 0x1e ] = KEY_VOLUMEDOWN,
144
145 [ 0x49 ] = KEY_MENU,
146
147 [ 0x16 ] = KEY_CHANNELUP,
148 [ 0x17 ] = KEY_CHANNELDOWN,
149
150 [ 0x20 ] = KEY_UP,
151 [ 0x21 ] = KEY_DOWN,
152 [ 0x22 ] = KEY_LEFT,
153 [ 0x23 ] = KEY_RIGHT,
154 [ 0x0d ] = KEY_SELECT,
155
156
157
158 [ 0x08 ] = KEY_BACK,
159 [ 0x07 ] = KEY_REFRESH,
160
161 [ 0x2f ] = KEY_ZOOM,
162 [ 0x29 ] = KEY_RECORD,
163
164 [ 0x4b ] = KEY_PAUSE,
165 [ 0x4d ] = KEY_REWIND,
166 [ 0x2e ] = KEY_PLAY,
167 [ 0x4e ] = KEY_FORWARD,
168 [ 0x53 ] = KEY_PREVIOUS,
169 [ 0x4c ] = KEY_STOP,
170 [ 0x54 ] = KEY_NEXT,
171
172 [ 0x69 ] = KEY_KP0,
173 [ 0x6a ] = KEY_KP1,
174 [ 0x6b ] = KEY_KP2,
175 [ 0x6c ] = KEY_KP3,
176 [ 0x6d ] = KEY_KP4,
177 [ 0x6e ] = KEY_KP5,
178 [ 0x6f ] = KEY_KP6,
179 [ 0x70 ] = KEY_KP7,
180 [ 0x71 ] = KEY_KP8,
181 [ 0x72 ] = KEY_KP9,
182
183 [ 0x74 ] = KEY_CHANNEL,
184 [ 0x0a ] = KEY_BACKSPACE,
185};
186
187EXPORT_SYMBOL_GPL(ir_codes_pinnacle);
188
189/* empty keytable, can be used as placeholder for not-yet created keytables */
190IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE] = {
191 [ 42 ] = KEY_COFFEE,
192};
193EXPORT_SYMBOL_GPL(ir_codes_empty);
194
195/* Hauppauge: the newer, gray remotes (seems there are multiple
196 * slightly different versions), shipped with cx88+ivtv cards.
197 * almost rc5 coding, but some non-standard keys */
198IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE] = {
199 /* Keys 0 to 9 */
200 [ 0x00 ] = KEY_KP0,
201 [ 0x01 ] = KEY_KP1,
202 [ 0x02 ] = KEY_KP2,
203 [ 0x03 ] = KEY_KP3,
204 [ 0x04 ] = KEY_KP4,
205 [ 0x05 ] = KEY_KP5,
206 [ 0x06 ] = KEY_KP6,
207 [ 0x07 ] = KEY_KP7,
208 [ 0x08 ] = KEY_KP8,
209 [ 0x09 ] = KEY_KP9,
210
211 [ 0x0a ] = KEY_TEXT, /* keypad asterisk as well */
212 [ 0x0b ] = KEY_RED, /* red button */
213 [ 0x0c ] = KEY_RADIO,
214 [ 0x0d ] = KEY_MENU,
215 [ 0x0e ] = KEY_SUBTITLE, /* also the # key */
216 [ 0x0f ] = KEY_MUTE,
217 [ 0x10 ] = KEY_VOLUMEUP,
218 [ 0x11 ] = KEY_VOLUMEDOWN,
219 [ 0x12 ] = KEY_PREVIOUS, /* previous channel */
220 [ 0x14 ] = KEY_UP,
221 [ 0x15 ] = KEY_DOWN,
222 [ 0x16 ] = KEY_LEFT,
223 [ 0x17 ] = KEY_RIGHT,
224 [ 0x18 ] = KEY_VIDEO, /* Videos */
225 [ 0x19 ] = KEY_AUDIO, /* Music */
226 /* 0x1a: Pictures - presume this means
227 "Multimedia Home Platform" -
228 no "PICTURES" key in input.h
229 */
230 [ 0x1a ] = KEY_MHP,
231
232 [ 0x1b ] = KEY_EPG, /* Guide */
233 [ 0x1c ] = KEY_TV,
234 [ 0x1e ] = KEY_NEXTSONG, /* skip >| */
235 [ 0x1f ] = KEY_EXIT, /* back/exit */
236 [ 0x20 ] = KEY_CHANNELUP, /* channel / program + */
237 [ 0x21 ] = KEY_CHANNELDOWN, /* channel / program - */
238 [ 0x22 ] = KEY_CHANNEL, /* source (old black remote) */
239 [ 0x24 ] = KEY_PREVIOUSSONG, /* replay |< */
240 [ 0x25 ] = KEY_ENTER, /* OK */
241 [ 0x26 ] = KEY_SLEEP, /* minimize (old black remote) */
242 [ 0x29 ] = KEY_BLUE, /* blue key */
243 [ 0x2e ] = KEY_GREEN, /* green button */
244 [ 0x30 ] = KEY_PAUSE, /* pause */
245 [ 0x32 ] = KEY_REWIND, /* backward << */
246 [ 0x34 ] = KEY_FASTFORWARD, /* forward >> */
247 [ 0x35 ] = KEY_PLAY,
248 [ 0x36 ] = KEY_STOP,
249 [ 0x37 ] = KEY_RECORD, /* recording */
250 [ 0x38 ] = KEY_YELLOW, /* yellow key */
251 [ 0x3b ] = KEY_SELECT, /* top right button */
252 [ 0x3c ] = KEY_ZOOM, /* full */
253 [ 0x3d ] = KEY_POWER, /* system power (green button) */
254};
255EXPORT_SYMBOL(ir_codes_hauppauge_new);
256
257IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE] = {
258 [ 2 ] = KEY_KP0,
259 [ 1 ] = KEY_KP1,
260 [ 11 ] = KEY_KP2,
261 [ 27 ] = KEY_KP3,
262 [ 5 ] = KEY_KP4,
263 [ 9 ] = KEY_KP5,
264 [ 21 ] = KEY_KP6,
265 [ 6 ] = KEY_KP7,
266 [ 10 ] = KEY_KP8,
267 [ 18 ] = KEY_KP9,
268
269 [ 3 ] = KEY_TUNER, /* TV/FM */
270 [ 7 ] = KEY_SEARCH, /* scan */
271 [ 28 ] = KEY_ZOOM, /* full screen */
272 [ 30 ] = KEY_POWER,
273 [ 23 ] = KEY_VOLUMEDOWN,
274 [ 31 ] = KEY_VOLUMEUP,
275 [ 20 ] = KEY_CHANNELDOWN,
276 [ 22 ] = KEY_CHANNELUP,
277 [ 24 ] = KEY_MUTE,
278
279 [ 0 ] = KEY_LIST, /* source */
280 [ 19 ] = KEY_INFO, /* loop */
281 [ 16 ] = KEY_LAST, /* +100 */
282 [ 13 ] = KEY_CLEAR, /* reset */
283 [ 12 ] = BTN_RIGHT, /* fun++ */
284 [ 4 ] = BTN_LEFT, /* fun-- */
285 [ 14 ] = KEY_GOTO, /* function */
286 [ 15 ] = KEY_STOP, /* freeze */
287};
288EXPORT_SYMBOL(ir_codes_pixelview);
289
290/* -------------------------------------------------------------------------- */
291
292static void ir_input_key_event(struct input_dev *dev, struct ir_input_state *ir)
293{
294 if (KEY_RESERVED == ir->keycode) {
295 printk(KERN_INFO "%s: unknown key: key=0x%02x raw=0x%02x down=%d\n",
296 dev->name,ir->ir_key,ir->ir_raw,ir->keypressed);
297 return;
298 }
299 dprintk(1,"%s: key event code=%d down=%d\n",
300 dev->name,ir->keycode,ir->keypressed);
301 input_report_key(dev,ir->keycode,ir->keypressed);
302 input_sync(dev);
303}
304
305/* -------------------------------------------------------------------------- */
306
307void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
308 int ir_type, IR_KEYTAB_TYPE *ir_codes)
309{
310 int i;
311
312 ir->ir_type = ir_type;
313 if (ir_codes)
314 memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes));
315
316
317 dev->keycode = ir->ir_codes;
318 dev->keycodesize = sizeof(IR_KEYTAB_TYPE);
319 dev->keycodemax = IR_KEYTAB_SIZE;
320 for (i = 0; i < IR_KEYTAB_SIZE; i++)
321 set_bit(ir->ir_codes[i], dev->keybit);
322 clear_bit(0, dev->keybit);
323
324 set_bit(EV_KEY, dev->evbit);
325 if (repeat)
326 set_bit(EV_REP, dev->evbit);
327}
328
329void ir_input_nokey(struct input_dev *dev, struct ir_input_state *ir)
330{
331 if (ir->keypressed) {
332 ir->keypressed = 0;
333 ir_input_key_event(dev,ir);
334 }
335}
336
337void ir_input_keydown(struct input_dev *dev, struct ir_input_state *ir,
338 u32 ir_key, u32 ir_raw)
339{
340 u32 keycode = IR_KEYCODE(ir->ir_codes, ir_key);
341
342 if (ir->keypressed && ir->keycode != keycode) {
343 ir->keypressed = 0;
344 ir_input_key_event(dev,ir);
345 }
346 if (!ir->keypressed) {
347 ir->ir_key = ir_key;
348 ir->ir_raw = ir_raw;
349 ir->keycode = keycode;
350 ir->keypressed = 1;
351 ir_input_key_event(dev,ir);
352 }
353}
354
355/* -------------------------------------------------------------------------- */
356
357u32 ir_extract_bits(u32 data, u32 mask)
358{
359 int mbit, vbit;
360 u32 value;
361
362 value = 0;
363 vbit = 0;
364 for (mbit = 0; mbit < 32; mbit++) {
365 if (!(mask & ((u32)1 << mbit)))
366 continue;
367 if (data & ((u32)1 << mbit))
368 value |= (1 << vbit);
369 vbit++;
370 }
371 return value;
372}
373
374static int inline getbit(u32 *samples, int bit)
375{
376 return (samples[bit/32] & (1 << (31-(bit%32)))) ? 1 : 0;
377}
378
379/* sump raw samples for visual debugging ;) */
380int ir_dump_samples(u32 *samples, int count)
381{
382 int i, bit, start;
383
384 printk(KERN_DEBUG "ir samples: ");
385 start = 0;
386 for (i = 0; i < count * 32; i++) {
387 bit = getbit(samples,i);
388 if (bit)
389 start = 1;
390 if (0 == start)
391 continue;
392 printk("%s", bit ? "#" : "_");
393 }
394 printk("\n");
395 return 0;
396}
397
398/* decode raw samples, pulse distance coding used by NEC remotes */
399int ir_decode_pulsedistance(u32 *samples, int count, int low, int high)
400{
401 int i,last,bit,len;
402 u32 curBit;
403 u32 value;
404
405 /* find start burst */
406 for (i = len = 0; i < count * 32; i++) {
407 bit = getbit(samples,i);
408 if (bit) {
409 len++;
410 } else {
411 if (len >= 29)
412 break;
413 len = 0;
414 }
415 }
416
417 /* start burst to short */
418 if (len < 29)
419 return 0xffffffff;
420
421 /* find start silence */
422 for (len = 0; i < count * 32; i++) {
423 bit = getbit(samples,i);
424 if (bit) {
425 break;
426 } else {
427 len++;
428 }
429 }
430
431 /* silence to short */
432 if (len < 7)
433 return 0xffffffff;
434
435 /* go decoding */
436 len = 0;
437 last = 1;
438 value = 0; curBit = 1;
439 for (; i < count * 32; i++) {
440 bit = getbit(samples,i);
441 if (last) {
442 if(bit) {
443 continue;
444 } else {
445 len = 1;
446 }
447 } else {
448 if (bit) {
449 if (len > (low + high) /2)
450 value |= curBit;
451 curBit <<= 1;
452 if (curBit == 1)
453 break;
454 } else {
455 len++;
456 }
457 }
458 last = bit;
459 }
460
461 return value;
462}
463
464/* decode raw samples, biphase coding, used by rc5 for example */
465int ir_decode_biphase(u32 *samples, int count, int low, int high)
466{
467 int i,last,bit,len,flips;
468 u32 value;
469
470 /* find start bit (1) */
471 for (i = 0; i < 32; i++) {
472 bit = getbit(samples,i);
473 if (bit)
474 break;
475 }
476
477 /* go decoding */
478 len = 0;
479 flips = 0;
480 value = 1;
481 for (; i < count * 32; i++) {
482 if (len > high)
483 break;
484 if (flips > 1)
485 break;
486 last = bit;
487 bit = getbit(samples,i);
488 if (last == bit) {
489 len++;
490 continue;
491 }
492 if (len < low) {
493 len++;
494 flips++;
495 continue;
496 }
497 value <<= 1;
498 value |= bit;
499 flips = 0;
500 len = 1;
501 }
502 return value;
503}
504
505EXPORT_SYMBOL_GPL(ir_input_init);
506EXPORT_SYMBOL_GPL(ir_input_nokey);
507EXPORT_SYMBOL_GPL(ir_input_keydown);
508
509EXPORT_SYMBOL_GPL(ir_extract_bits);
510EXPORT_SYMBOL_GPL(ir_dump_samples);
511EXPORT_SYMBOL_GPL(ir_decode_biphase);
512EXPORT_SYMBOL_GPL(ir_decode_pulsedistance);
513
514/*
515 * Local variables:
516 * c-basic-offset: 8
517 * End:
518 */
519
diff --git a/drivers/media/common/ir-keymaps.c b/drivers/media/common/ir-keymaps.c
new file mode 100644
index 000000000000..468f66013393
--- /dev/null
+++ b/drivers/media/common/ir-keymaps.c
@@ -0,0 +1,1537 @@
1/*
2
3
4 Keytables for supported remote controls. This file is part of
5 video4linux.
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 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
21 */
22#include <linux/module.h>
23#include <linux/moduleparam.h>
24
25#include <linux/input.h>
26#include <media/ir-common.h>
27
28/* empty keytable, can be used as placeholder for not-yet created keytables */
29IR_KEYTAB_TYPE ir_codes_empty[IR_KEYTAB_SIZE] = {
30 [ 0x2a ] = KEY_COFFEE,
31};
32
33EXPORT_SYMBOL_GPL(ir_codes_empty);
34
35IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE] = {
36 [ 0x22 ] = KEY_0,
37 [ 0x28 ] = KEY_1,
38 [ 0x18 ] = KEY_2,
39 [ 0x38 ] = KEY_3,
40 [ 0x24 ] = KEY_4,
41 [ 0x14 ] = KEY_5,
42 [ 0x34 ] = KEY_6,
43 [ 0x2c ] = KEY_7,
44 [ 0x1c ] = KEY_8,
45 [ 0x3c ] = KEY_9,
46
47 [ 0x30 ] = KEY_EJECTCD, // Unmarked on my controller
48 [ 0x00 ] = KEY_POWER,
49 [ 0x12 ] = BTN_LEFT, // DISPLAY/L
50 [ 0x32 ] = BTN_RIGHT, // LOOP/R
51 [ 0x0a ] = KEY_MUTE,
52 [ 0x26 ] = KEY_RECORD,
53 [ 0x16 ] = KEY_PAUSE,
54 [ 0x36 ] = KEY_STOP,
55 [ 0x1e ] = KEY_VOLUMEDOWN,
56 [ 0x3e ] = KEY_VOLUMEUP,
57
58 [ 0x20 ] = KEY_TUNER, // TV/FM
59 [ 0x10 ] = KEY_CD,
60 [ 0x08 ] = KEY_VIDEO,
61 [ 0x04 ] = KEY_AUDIO,
62 [ 0x0c ] = KEY_ZOOM, // full screen
63 [ 0x02 ] = KEY_INFO, // preview
64 [ 0x2a ] = KEY_SEARCH, // autoscan
65 [ 0x1a ] = KEY_STOP, // freeze
66 [ 0x3a ] = KEY_RECORD, // capture
67 [ 0x06 ] = KEY_PLAY, // unmarked
68 [ 0x2e ] = KEY_RED, // unmarked
69 [ 0x0e ] = KEY_GREEN, // unmarked
70
71 [ 0x21 ] = KEY_YELLOW, // unmarked
72 [ 0x11 ] = KEY_CHANNELDOWN,
73 [ 0x31 ] = KEY_CHANNELUP,
74 [ 0x01 ] = KEY_BLUE, // unmarked
75};
76
77EXPORT_SYMBOL_GPL(ir_codes_avermedia);
78
79/* Matt Jesson <dvb@jesson.eclipse.co.uk */
80IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE] = {
81 [ 0x28 ] = KEY_0, //'0' / 'enter'
82 [ 0x22 ] = KEY_1, //'1'
83 [ 0x12 ] = KEY_2, //'2' / 'up arrow'
84 [ 0x32 ] = KEY_3, //'3'
85 [ 0x24 ] = KEY_4, //'4' / 'left arrow'
86 [ 0x14 ] = KEY_5, //'5'
87 [ 0x34 ] = KEY_6, //'6' / 'right arrow'
88 [ 0x26 ] = KEY_7, //'7'
89 [ 0x16 ] = KEY_8, //'8' / 'down arrow'
90 [ 0x36 ] = KEY_9, //'9'
91
92 [ 0x20 ] = KEY_LIST, // 'source'
93 [ 0x10 ] = KEY_TEXT, // 'teletext'
94 [ 0x00 ] = KEY_POWER, // 'power'
95 [ 0x04 ] = KEY_AUDIO, // 'audio'
96 [ 0x06 ] = KEY_ZOOM, // 'full screen'
97 [ 0x18 ] = KEY_VIDEO, // 'display'
98 [ 0x38 ] = KEY_SEARCH, // 'loop'
99 [ 0x08 ] = KEY_INFO, // 'preview'
100 [ 0x2a ] = KEY_REWIND, // 'backward <<'
101 [ 0x1a ] = KEY_FASTFORWARD, // 'forward >>'
102 [ 0x3a ] = KEY_RECORD, // 'capture'
103 [ 0x0a ] = KEY_MUTE, // 'mute'
104 [ 0x2c ] = KEY_RECORD, // 'record'
105 [ 0x1c ] = KEY_PAUSE, // 'pause'
106 [ 0x3c ] = KEY_STOP, // 'stop'
107 [ 0x0c ] = KEY_PLAY, // 'play'
108 [ 0x2e ] = KEY_RED, // 'red'
109 [ 0x01 ] = KEY_BLUE, // 'blue' / 'cancel'
110 [ 0x0e ] = KEY_YELLOW, // 'yellow' / 'ok'
111 [ 0x21 ] = KEY_GREEN, // 'green'
112 [ 0x11 ] = KEY_CHANNELDOWN, // 'channel -'
113 [ 0x31 ] = KEY_CHANNELUP, // 'channel +'
114 [ 0x1e ] = KEY_VOLUMEDOWN, // 'volume -'
115 [ 0x3e ] = KEY_VOLUMEUP, // 'volume +'
116};
117
118EXPORT_SYMBOL_GPL(ir_codes_avermedia_dvbt);
119
120/* Attila Kondoros <attila.kondoros@chello.hu> */
121IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = {
122
123 [ 0x01 ] = KEY_1,
124 [ 0x02 ] = KEY_2,
125 [ 0x03 ] = KEY_3,
126 [ 0x04 ] = KEY_4,
127 [ 0x05 ] = KEY_5,
128 [ 0x06 ] = KEY_6,
129 [ 0x07 ] = KEY_7,
130 [ 0x08 ] = KEY_8,
131 [ 0x09 ] = KEY_9,
132 [ 0x00 ] = KEY_0,
133 [ 0x17 ] = KEY_LAST, // +100
134 [ 0x0a ] = KEY_LIST, // recall
135
136
137 [ 0x1c ] = KEY_TUNER, // TV/FM
138 [ 0x15 ] = KEY_SEARCH, // scan
139 [ 0x12 ] = KEY_POWER, // power
140 [ 0x1f ] = KEY_VOLUMEDOWN, // vol up
141 [ 0x1b ] = KEY_VOLUMEUP, // vol down
142 [ 0x1e ] = KEY_CHANNELDOWN, // chn up
143 [ 0x1a ] = KEY_CHANNELUP, // chn down
144
145 [ 0x11 ] = KEY_VIDEO, // video
146 [ 0x0f ] = KEY_ZOOM, // full screen
147 [ 0x13 ] = KEY_MUTE, // mute/unmute
148 [ 0x10 ] = KEY_TEXT, // min
149
150 [ 0x0d ] = KEY_STOP, // freeze
151 [ 0x0e ] = KEY_RECORD, // record
152 [ 0x1d ] = KEY_PLAYPAUSE, // stop
153 [ 0x19 ] = KEY_PLAY, // play
154
155 [ 0x16 ] = KEY_GOTO, // osd
156 [ 0x14 ] = KEY_REFRESH, // default
157 [ 0x0c ] = KEY_KPPLUS, // fine tune >>>>
158 [ 0x18 ] = KEY_KPMINUS // fine tune <<<<
159};
160
161EXPORT_SYMBOL_GPL(ir_codes_apac_viewcomp);
162
163/* ---------------------------------------------------------------------- */
164
165IR_KEYTAB_TYPE ir_codes_conceptronic[IR_KEYTAB_SIZE] = {
166
167 [ 0x1e ] = KEY_POWER, // power
168 [ 0x07 ] = KEY_MEDIA, // source
169 [ 0x1c ] = KEY_SEARCH, // scan
170
171/* FIXME: duplicate keycodes?
172 *
173 * These four keys seem to share the same GPIO as CH+, CH-, <<< and >>>
174 * The GPIO values are
175 * 6397fb for both "Scan <" and "CH -",
176 * 639ffb for "Scan >" and "CH+",
177 * 6384fb for "Tune <" and "<<<",
178 * 638cfb for "Tune >" and ">>>", regardless of the mask.
179 *
180 * [ 0x17 ] = KEY_BACK, // fm scan <<
181 * [ 0x1f ] = KEY_FORWARD, // fm scan >>
182 *
183 * [ 0x04 ] = KEY_LEFT, // fm tuning <
184 * [ 0x0c ] = KEY_RIGHT, // fm tuning >
185 *
186 * For now, these four keys are disabled. Pressing them will generate
187 * the CH+/CH-/<<</>>> events
188 */
189
190 [ 0x03 ] = KEY_TUNER, // TV/FM
191
192 [ 0x00 ] = KEY_RECORD,
193 [ 0x08 ] = KEY_STOP,
194 [ 0x11 ] = KEY_PLAY,
195
196 [ 0x1a ] = KEY_PLAYPAUSE, // freeze
197 [ 0x19 ] = KEY_ZOOM, // zoom
198 [ 0x0f ] = KEY_TEXT, // min
199
200 [ 0x01 ] = KEY_1,
201 [ 0x0b ] = KEY_2,
202 [ 0x1b ] = KEY_3,
203 [ 0x05 ] = KEY_4,
204 [ 0x09 ] = KEY_5,
205 [ 0x15 ] = KEY_6,
206 [ 0x06 ] = KEY_7,
207 [ 0x0a ] = KEY_8,
208 [ 0x12 ] = KEY_9,
209 [ 0x02 ] = KEY_0,
210 [ 0x10 ] = KEY_LAST, // +100
211 [ 0x13 ] = KEY_LIST, // recall
212
213 [ 0x1f ] = KEY_CHANNELUP, // chn down
214 [ 0x17 ] = KEY_CHANNELDOWN, // chn up
215 [ 0x16 ] = KEY_VOLUMEUP, // vol down
216 [ 0x14 ] = KEY_VOLUMEDOWN, // vol up
217
218 [ 0x04 ] = KEY_KPMINUS, // <<<
219 [ 0x0e ] = KEY_SETUP, // function
220 [ 0x0c ] = KEY_KPPLUS, // >>>
221
222 [ 0x0d ] = KEY_GOTO, // mts
223 [ 0x1d ] = KEY_REFRESH, // reset
224 [ 0x18 ] = KEY_MUTE // mute/unmute
225};
226
227EXPORT_SYMBOL_GPL(ir_codes_conceptronic);
228
229IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE] = {
230 [ 0x00 ] = KEY_0,
231 [ 0x01 ] = KEY_1,
232 [ 0x02 ] = KEY_2,
233 [ 0x03 ] = KEY_3,
234 [ 0x04 ] = KEY_4,
235 [ 0x05 ] = KEY_5,
236 [ 0x06 ] = KEY_6,
237 [ 0x07 ] = KEY_7,
238 [ 0x08 ] = KEY_8,
239 [ 0x09 ] = KEY_9,
240 [ 0x0a ] = KEY_TV,
241 [ 0x0b ] = KEY_AUX,
242 [ 0x0c ] = KEY_DVD,
243 [ 0x0d ] = KEY_POWER,
244 [ 0x0e ] = KEY_MHP, /* labelled 'Picture' */
245 [ 0x0f ] = KEY_AUDIO,
246 [ 0x10 ] = KEY_INFO,
247 [ 0x11 ] = KEY_F13, /* 16:9 */
248 [ 0x12 ] = KEY_F14, /* 14:9 */
249 [ 0x13 ] = KEY_EPG,
250 [ 0x14 ] = KEY_EXIT,
251 [ 0x15 ] = KEY_MENU,
252 [ 0x16 ] = KEY_UP,
253 [ 0x17 ] = KEY_DOWN,
254 [ 0x18 ] = KEY_LEFT,
255 [ 0x19 ] = KEY_RIGHT,
256 [ 0x1a ] = KEY_ENTER,
257 [ 0x1b ] = KEY_CHANNELUP,
258 [ 0x1c ] = KEY_CHANNELDOWN,
259 [ 0x1d ] = KEY_VOLUMEUP,
260 [ 0x1e ] = KEY_VOLUMEDOWN,
261 [ 0x1f ] = KEY_RED,
262 [ 0x20 ] = KEY_GREEN,
263 [ 0x21 ] = KEY_YELLOW,
264 [ 0x22 ] = KEY_BLUE,
265 [ 0x23 ] = KEY_SUBTITLE,
266 [ 0x24 ] = KEY_F15, /* AD */
267 [ 0x25 ] = KEY_TEXT,
268 [ 0x26 ] = KEY_MUTE,
269 [ 0x27 ] = KEY_REWIND,
270 [ 0x28 ] = KEY_STOP,
271 [ 0x29 ] = KEY_PLAY,
272 [ 0x2a ] = KEY_FASTFORWARD,
273 [ 0x2b ] = KEY_F16, /* chapter */
274 [ 0x2c ] = KEY_PAUSE,
275 [ 0x2d ] = KEY_PLAY,
276 [ 0x2e ] = KEY_RECORD,
277 [ 0x2f ] = KEY_F17, /* picture in picture */
278 [ 0x30 ] = KEY_KPPLUS, /* zoom in */
279 [ 0x31 ] = KEY_KPMINUS, /* zoom out */
280 [ 0x32 ] = KEY_F18, /* capture */
281 [ 0x33 ] = KEY_F19, /* web */
282 [ 0x34 ] = KEY_EMAIL,
283 [ 0x35 ] = KEY_PHONE,
284 [ 0x36 ] = KEY_PC
285};
286
287EXPORT_SYMBOL_GPL(ir_codes_nebula);
288
289/* DigitalNow DNTV Live DVB-T Remote */
290IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE] = {
291 [ 0x00 ] = KEY_ESC, /* 'go up a level?' */
292 /* Keys 0 to 9 */
293 [ 0x0a ] = KEY_0,
294 [ 0x01 ] = KEY_1,
295 [ 0x02 ] = KEY_2,
296 [ 0x03 ] = KEY_3,
297 [ 0x04 ] = KEY_4,
298 [ 0x05 ] = KEY_5,
299 [ 0x06 ] = KEY_6,
300 [ 0x07 ] = KEY_7,
301 [ 0x08 ] = KEY_8,
302 [ 0x09 ] = KEY_9,
303
304 [ 0x0b ] = KEY_TUNER, /* tv/fm */
305 [ 0x0c ] = KEY_SEARCH, /* scan */
306 [ 0x0d ] = KEY_STOP,
307 [ 0x0e ] = KEY_PAUSE,
308 [ 0x0f ] = KEY_LIST, /* source */
309
310 [ 0x10 ] = KEY_MUTE,
311 [ 0x11 ] = KEY_REWIND, /* backward << */
312 [ 0x12 ] = KEY_POWER,
313 [ 0x13 ] = KEY_S, /* snap */
314 [ 0x14 ] = KEY_AUDIO, /* stereo */
315 [ 0x15 ] = KEY_CLEAR, /* reset */
316 [ 0x16 ] = KEY_PLAY,
317 [ 0x17 ] = KEY_ENTER,
318 [ 0x18 ] = KEY_ZOOM, /* full screen */
319 [ 0x19 ] = KEY_FASTFORWARD, /* forward >> */
320 [ 0x1a ] = KEY_CHANNELUP,
321 [ 0x1b ] = KEY_VOLUMEUP,
322 [ 0x1c ] = KEY_INFO, /* preview */
323 [ 0x1d ] = KEY_RECORD, /* record */
324 [ 0x1e ] = KEY_CHANNELDOWN,
325 [ 0x1f ] = KEY_VOLUMEDOWN,
326};
327
328EXPORT_SYMBOL_GPL(ir_codes_dntv_live_dvb_t);
329
330/* ---------------------------------------------------------------------- */
331
332/* IO-DATA BCTV7E Remote */
333IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE] = {
334 [ 0x40 ] = KEY_TV,
335 [ 0x20 ] = KEY_RADIO, /* FM */
336 [ 0x60 ] = KEY_EPG,
337 [ 0x00 ] = KEY_POWER,
338
339 /* Keys 0 to 9 */
340 [ 0x44 ] = KEY_0, /* 10 */
341 [ 0x50 ] = KEY_1,
342 [ 0x30 ] = KEY_2,
343 [ 0x70 ] = KEY_3,
344 [ 0x48 ] = KEY_4,
345 [ 0x28 ] = KEY_5,
346 [ 0x68 ] = KEY_6,
347 [ 0x58 ] = KEY_7,
348 [ 0x38 ] = KEY_8,
349 [ 0x78 ] = KEY_9,
350
351 [ 0x10 ] = KEY_L, /* Live */
352 [ 0x08 ] = KEY_T, /* Time Shift */
353
354 [ 0x18 ] = KEY_PLAYPAUSE, /* Play */
355
356 [ 0x24 ] = KEY_ENTER, /* 11 */
357 [ 0x64 ] = KEY_ESC, /* 12 */
358 [ 0x04 ] = KEY_M, /* Multi */
359
360 [ 0x54 ] = KEY_VIDEO,
361 [ 0x34 ] = KEY_CHANNELUP,
362 [ 0x74 ] = KEY_VOLUMEUP,
363 [ 0x14 ] = KEY_MUTE,
364
365 [ 0x4c ] = KEY_S, /* SVIDEO */
366 [ 0x2c ] = KEY_CHANNELDOWN,
367 [ 0x6c ] = KEY_VOLUMEDOWN,
368 [ 0x0c ] = KEY_ZOOM,
369
370 [ 0x5c ] = KEY_PAUSE,
371 [ 0x3c ] = KEY_C, /* || (red) */
372 [ 0x7c ] = KEY_RECORD, /* recording */
373 [ 0x1c ] = KEY_STOP,
374
375 [ 0x41 ] = KEY_REWIND, /* backward << */
376 [ 0x21 ] = KEY_PLAY,
377 [ 0x61 ] = KEY_FASTFORWARD, /* forward >> */
378 [ 0x01 ] = KEY_NEXT, /* skip >| */
379};
380
381EXPORT_SYMBOL_GPL(ir_codes_iodata_bctv7e);
382
383/* ---------------------------------------------------------------------- */
384
385/* ADS Tech Instant TV DVB-T PCI Remote */
386IR_KEYTAB_TYPE ir_codes_adstech_dvb_t_pci[IR_KEYTAB_SIZE] = {
387 /* Keys 0 to 9 */
388 [ 0x4d ] = KEY_0,
389 [ 0x57 ] = KEY_1,
390 [ 0x4f ] = KEY_2,
391 [ 0x53 ] = KEY_3,
392 [ 0x56 ] = KEY_4,
393 [ 0x4e ] = KEY_5,
394 [ 0x5e ] = KEY_6,
395 [ 0x54 ] = KEY_7,
396 [ 0x4c ] = KEY_8,
397 [ 0x5c ] = KEY_9,
398
399 [ 0x5b ] = KEY_POWER,
400 [ 0x5f ] = KEY_MUTE,
401 [ 0x55 ] = KEY_GOTO,
402 [ 0x5d ] = KEY_SEARCH,
403 [ 0x17 ] = KEY_EPG, /* Guide */
404 [ 0x1f ] = KEY_MENU,
405 [ 0x0f ] = KEY_UP,
406 [ 0x46 ] = KEY_DOWN,
407 [ 0x16 ] = KEY_LEFT,
408 [ 0x1e ] = KEY_RIGHT,
409 [ 0x0e ] = KEY_SELECT, /* Enter */
410 [ 0x5a ] = KEY_INFO,
411 [ 0x52 ] = KEY_EXIT,
412 [ 0x59 ] = KEY_PREVIOUS,
413 [ 0x51 ] = KEY_NEXT,
414 [ 0x58 ] = KEY_REWIND,
415 [ 0x50 ] = KEY_FORWARD,
416 [ 0x44 ] = KEY_PLAYPAUSE,
417 [ 0x07 ] = KEY_STOP,
418 [ 0x1b ] = KEY_RECORD,
419 [ 0x13 ] = KEY_TUNER, /* Live */
420 [ 0x0a ] = KEY_A,
421 [ 0x12 ] = KEY_B,
422 [ 0x03 ] = KEY_PROG1, /* 1 */
423 [ 0x01 ] = KEY_PROG2, /* 2 */
424 [ 0x00 ] = KEY_PROG3, /* 3 */
425 [ 0x06 ] = KEY_DVD,
426 [ 0x48 ] = KEY_AUX, /* Photo */
427 [ 0x40 ] = KEY_VIDEO,
428 [ 0x19 ] = KEY_AUDIO, /* Music */
429 [ 0x0b ] = KEY_CHANNELUP,
430 [ 0x08 ] = KEY_CHANNELDOWN,
431 [ 0x15 ] = KEY_VOLUMEUP,
432 [ 0x1c ] = KEY_VOLUMEDOWN,
433};
434
435EXPORT_SYMBOL_GPL(ir_codes_adstech_dvb_t_pci);
436
437/* ---------------------------------------------------------------------- */
438
439/* MSI TV@nywhere remote */
440IR_KEYTAB_TYPE ir_codes_msi_tvanywhere[IR_KEYTAB_SIZE] = {
441 /* Keys 0 to 9 */
442 [ 0x00 ] = KEY_0,
443 [ 0x01 ] = KEY_1,
444 [ 0x02 ] = KEY_2,
445 [ 0x03 ] = KEY_3,
446 [ 0x04 ] = KEY_4,
447 [ 0x05 ] = KEY_5,
448 [ 0x06 ] = KEY_6,
449 [ 0x07 ] = KEY_7,
450 [ 0x08 ] = KEY_8,
451 [ 0x09 ] = KEY_9,
452
453 [ 0x0c ] = KEY_MUTE,
454 [ 0x0f ] = KEY_SCREEN, /* Full Screen */
455 [ 0x10 ] = KEY_F, /* Funtion */
456 [ 0x11 ] = KEY_T, /* Time shift */
457 [ 0x12 ] = KEY_POWER,
458 [ 0x13 ] = KEY_MEDIA, /* MTS */
459 [ 0x14 ] = KEY_SLOW,
460 [ 0x16 ] = KEY_REWIND, /* backward << */
461 [ 0x17 ] = KEY_ENTER, /* Return */
462 [ 0x18 ] = KEY_FASTFORWARD, /* forward >> */
463 [ 0x1a ] = KEY_CHANNELUP,
464 [ 0x1b ] = KEY_VOLUMEUP,
465 [ 0x1e ] = KEY_CHANNELDOWN,
466 [ 0x1f ] = KEY_VOLUMEDOWN,
467};
468
469EXPORT_SYMBOL_GPL(ir_codes_msi_tvanywhere);
470
471/* ---------------------------------------------------------------------- */
472
473/* Cinergy 1400 DVB-T */
474IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE] = {
475 [ 0x01 ] = KEY_POWER,
476 [ 0x02 ] = KEY_1,
477 [ 0x03 ] = KEY_2,
478 [ 0x04 ] = KEY_3,
479 [ 0x05 ] = KEY_4,
480 [ 0x06 ] = KEY_5,
481 [ 0x07 ] = KEY_6,
482 [ 0x08 ] = KEY_7,
483 [ 0x09 ] = KEY_8,
484 [ 0x0a ] = KEY_9,
485 [ 0x0c ] = KEY_0,
486
487 [ 0x0b ] = KEY_VIDEO,
488 [ 0x0d ] = KEY_REFRESH,
489 [ 0x0e ] = KEY_SELECT,
490 [ 0x0f ] = KEY_EPG,
491 [ 0x10 ] = KEY_UP,
492 [ 0x11 ] = KEY_LEFT,
493 [ 0x12 ] = KEY_OK,
494 [ 0x13 ] = KEY_RIGHT,
495 [ 0x14 ] = KEY_DOWN,
496 [ 0x15 ] = KEY_TEXT,
497 [ 0x16 ] = KEY_INFO,
498
499 [ 0x17 ] = KEY_RED,
500 [ 0x18 ] = KEY_GREEN,
501 [ 0x19 ] = KEY_YELLOW,
502 [ 0x1a ] = KEY_BLUE,
503
504 [ 0x1b ] = KEY_CHANNELUP,
505 [ 0x1c ] = KEY_VOLUMEUP,
506 [ 0x1d ] = KEY_MUTE,
507 [ 0x1e ] = KEY_VOLUMEDOWN,
508 [ 0x1f ] = KEY_CHANNELDOWN,
509
510 [ 0x40 ] = KEY_PAUSE,
511 [ 0x4c ] = KEY_PLAY,
512 [ 0x58 ] = KEY_RECORD,
513 [ 0x54 ] = KEY_PREVIOUS,
514 [ 0x48 ] = KEY_STOP,
515 [ 0x5c ] = KEY_NEXT,
516};
517
518EXPORT_SYMBOL_GPL(ir_codes_cinergy_1400);
519
520/* ---------------------------------------------------------------------- */
521
522/* AVERTV STUDIO 303 Remote */
523IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE] = {
524 [ 0x2a ] = KEY_1,
525 [ 0x32 ] = KEY_2,
526 [ 0x3a ] = KEY_3,
527 [ 0x4a ] = KEY_4,
528 [ 0x52 ] = KEY_5,
529 [ 0x5a ] = KEY_6,
530 [ 0x6a ] = KEY_7,
531 [ 0x72 ] = KEY_8,
532 [ 0x7a ] = KEY_9,
533 [ 0x0e ] = KEY_0,
534
535 [ 0x02 ] = KEY_POWER,
536 [ 0x22 ] = KEY_VIDEO,
537 [ 0x42 ] = KEY_AUDIO,
538 [ 0x62 ] = KEY_ZOOM,
539 [ 0x0a ] = KEY_TV,
540 [ 0x12 ] = KEY_CD,
541 [ 0x1a ] = KEY_TEXT,
542
543 [ 0x16 ] = KEY_SUBTITLE,
544 [ 0x1e ] = KEY_REWIND,
545 [ 0x06 ] = KEY_PRINT,
546
547 [ 0x2e ] = KEY_SEARCH,
548 [ 0x36 ] = KEY_SLEEP,
549 [ 0x3e ] = KEY_SHUFFLE,
550 [ 0x26 ] = KEY_MUTE,
551
552 [ 0x4e ] = KEY_RECORD,
553 [ 0x56 ] = KEY_PAUSE,
554 [ 0x5e ] = KEY_STOP,
555 [ 0x46 ] = KEY_PLAY,
556
557 [ 0x6e ] = KEY_RED,
558 [ 0x0b ] = KEY_GREEN,
559 [ 0x66 ] = KEY_YELLOW,
560 [ 0x03 ] = KEY_BLUE,
561
562 [ 0x76 ] = KEY_LEFT,
563 [ 0x7e ] = KEY_RIGHT,
564 [ 0x13 ] = KEY_DOWN,
565 [ 0x1b ] = KEY_UP,
566};
567
568EXPORT_SYMBOL_GPL(ir_codes_avertv_303);
569
570/* ---------------------------------------------------------------------- */
571
572/* DigitalNow DNTV Live! DVB-T Pro Remote */
573IR_KEYTAB_TYPE ir_codes_dntv_live_dvbt_pro[IR_KEYTAB_SIZE] = {
574 [ 0x16 ] = KEY_POWER,
575 [ 0x5b ] = KEY_HOME,
576
577 [ 0x55 ] = KEY_TV, /* live tv */
578 [ 0x58 ] = KEY_TUNER, /* digital Radio */
579 [ 0x5a ] = KEY_RADIO, /* FM radio */
580 [ 0x59 ] = KEY_DVD, /* dvd menu */
581 [ 0x03 ] = KEY_1,
582 [ 0x01 ] = KEY_2,
583 [ 0x06 ] = KEY_3,
584 [ 0x09 ] = KEY_4,
585 [ 0x1d ] = KEY_5,
586 [ 0x1f ] = KEY_6,
587 [ 0x0d ] = KEY_7,
588 [ 0x19 ] = KEY_8,
589 [ 0x1b ] = KEY_9,
590 [ 0x0c ] = KEY_CANCEL,
591 [ 0x15 ] = KEY_0,
592 [ 0x4a ] = KEY_CLEAR,
593 [ 0x13 ] = KEY_BACK,
594 [ 0x00 ] = KEY_TAB,
595 [ 0x4b ] = KEY_UP,
596 [ 0x4e ] = KEY_LEFT,
597 [ 0x4f ] = KEY_OK,
598 [ 0x52 ] = KEY_RIGHT,
599 [ 0x51 ] = KEY_DOWN,
600 [ 0x1e ] = KEY_VOLUMEUP,
601 [ 0x0a ] = KEY_VOLUMEDOWN,
602 [ 0x02 ] = KEY_CHANNELDOWN,
603 [ 0x05 ] = KEY_CHANNELUP,
604 [ 0x11 ] = KEY_RECORD,
605 [ 0x14 ] = KEY_PLAY,
606 [ 0x4c ] = KEY_PAUSE,
607 [ 0x1a ] = KEY_STOP,
608 [ 0x40 ] = KEY_REWIND,
609 [ 0x12 ] = KEY_FASTFORWARD,
610 [ 0x41 ] = KEY_PREVIOUSSONG, /* replay |< */
611 [ 0x42 ] = KEY_NEXTSONG, /* skip >| */
612 [ 0x54 ] = KEY_CAMERA, /* capture */
613 [ 0x50 ] = KEY_LANGUAGE, /* sap */
614 [ 0x47 ] = KEY_TV2, /* pip */
615 [ 0x4d ] = KEY_SCREEN,
616 [ 0x43 ] = KEY_SUBTITLE,
617 [ 0x10 ] = KEY_MUTE,
618 [ 0x49 ] = KEY_AUDIO, /* l/r */
619 [ 0x07 ] = KEY_SLEEP,
620 [ 0x08 ] = KEY_VIDEO, /* a/v */
621 [ 0x0e ] = KEY_PREVIOUS, /* recall */
622 [ 0x45 ] = KEY_ZOOM, /* zoom + */
623 [ 0x46 ] = KEY_ANGLE, /* zoom - */
624 [ 0x56 ] = KEY_RED,
625 [ 0x57 ] = KEY_GREEN,
626 [ 0x5c ] = KEY_YELLOW,
627 [ 0x5d ] = KEY_BLUE,
628};
629
630EXPORT_SYMBOL_GPL(ir_codes_dntv_live_dvbt_pro);
631
632IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE] = {
633 [ 0x01 ] = KEY_CHANNEL,
634 [ 0x02 ] = KEY_SELECT,
635 [ 0x03 ] = KEY_MUTE,
636 [ 0x04 ] = KEY_POWER,
637 [ 0x05 ] = KEY_1,
638 [ 0x06 ] = KEY_2,
639 [ 0x07 ] = KEY_3,
640 [ 0x08 ] = KEY_CHANNELUP,
641 [ 0x09 ] = KEY_4,
642 [ 0x0a ] = KEY_5,
643 [ 0x0b ] = KEY_6,
644 [ 0x0c ] = KEY_CHANNELDOWN,
645 [ 0x0d ] = KEY_7,
646 [ 0x0e ] = KEY_8,
647 [ 0x0f ] = KEY_9,
648 [ 0x10 ] = KEY_VOLUMEUP,
649 [ 0x11 ] = KEY_0,
650 [ 0x12 ] = KEY_MENU,
651 [ 0x13 ] = KEY_PRINT,
652 [ 0x14 ] = KEY_VOLUMEDOWN,
653 [ 0x16 ] = KEY_PAUSE,
654 [ 0x18 ] = KEY_RECORD,
655 [ 0x19 ] = KEY_REWIND,
656 [ 0x1a ] = KEY_PLAY,
657 [ 0x1b ] = KEY_FORWARD,
658 [ 0x1c ] = KEY_BACKSPACE,
659 [ 0x1e ] = KEY_STOP,
660 [ 0x40 ] = KEY_ZOOM,
661};
662
663EXPORT_SYMBOL_GPL(ir_codes_em_terratec);
664
665IR_KEYTAB_TYPE ir_codes_em_pinnacle_usb[IR_KEYTAB_SIZE] = {
666 [ 0x3a ] = KEY_0,
667 [ 0x31 ] = KEY_1,
668 [ 0x32 ] = KEY_2,
669 [ 0x33 ] = KEY_3,
670 [ 0x34 ] = KEY_4,
671 [ 0x35 ] = KEY_5,
672 [ 0x36 ] = KEY_6,
673 [ 0x37 ] = KEY_7,
674 [ 0x38 ] = KEY_8,
675 [ 0x39 ] = KEY_9,
676
677 [ 0x2f ] = KEY_POWER,
678
679 [ 0x2e ] = KEY_P,
680 [ 0x1f ] = KEY_L,
681 [ 0x2b ] = KEY_I,
682
683 [ 0x2d ] = KEY_ZOOM,
684 [ 0x1e ] = KEY_ZOOM,
685 [ 0x1b ] = KEY_VOLUMEUP,
686 [ 0x0f ] = KEY_VOLUMEDOWN,
687 [ 0x17 ] = KEY_CHANNELUP,
688 [ 0x1c ] = KEY_CHANNELDOWN,
689 [ 0x25 ] = KEY_INFO,
690
691 [ 0x3c ] = KEY_MUTE,
692
693 [ 0x3d ] = KEY_LEFT,
694 [ 0x3b ] = KEY_RIGHT,
695
696 [ 0x3f ] = KEY_UP,
697 [ 0x3e ] = KEY_DOWN,
698 [ 0x1a ] = KEY_PAUSE,
699
700 [ 0x1d ] = KEY_MENU,
701 [ 0x19 ] = KEY_PLAY,
702 [ 0x16 ] = KEY_REWIND,
703 [ 0x13 ] = KEY_FORWARD,
704 [ 0x15 ] = KEY_PAUSE,
705 [ 0x0e ] = KEY_REWIND,
706 [ 0x0d ] = KEY_PLAY,
707 [ 0x0b ] = KEY_STOP,
708 [ 0x07 ] = KEY_FORWARD,
709 [ 0x27 ] = KEY_RECORD,
710 [ 0x26 ] = KEY_TUNER,
711 [ 0x29 ] = KEY_TEXT,
712 [ 0x2a ] = KEY_MEDIA,
713 [ 0x18 ] = KEY_EPG,
714 [ 0x27 ] = KEY_RECORD,
715};
716
717EXPORT_SYMBOL_GPL(ir_codes_em_pinnacle_usb);
718
719IR_KEYTAB_TYPE ir_codes_flyvideo[IR_KEYTAB_SIZE] = {
720 [ 0x0f ] = KEY_0,
721 [ 0x03 ] = KEY_1,
722 [ 0x04 ] = KEY_2,
723 [ 0x05 ] = KEY_3,
724 [ 0x07 ] = KEY_4,
725 [ 0x08 ] = KEY_5,
726 [ 0x09 ] = KEY_6,
727 [ 0x0b ] = KEY_7,
728 [ 0x0c ] = KEY_8,
729 [ 0x0d ] = KEY_9,
730
731 [ 0x0e ] = KEY_MODE, // Air/Cable
732 [ 0x11 ] = KEY_VIDEO, // Video
733 [ 0x15 ] = KEY_AUDIO, // Audio
734 [ 0x00 ] = KEY_POWER, // Power
735 [ 0x18 ] = KEY_TUNER, // AV Source
736 [ 0x02 ] = KEY_ZOOM, // Fullscreen
737 [ 0x1a ] = KEY_LANGUAGE, // Stereo
738 [ 0x1b ] = KEY_MUTE, // Mute
739 [ 0x14 ] = KEY_VOLUMEUP, // Volume +
740 [ 0x17 ] = KEY_VOLUMEDOWN, // Volume -
741 [ 0x12 ] = KEY_CHANNELUP, // Channel +
742 [ 0x13 ] = KEY_CHANNELDOWN, // Channel -
743 [ 0x06 ] = KEY_AGAIN, // Recall
744 [ 0x10 ] = KEY_ENTER, // Enter
745};
746
747EXPORT_SYMBOL_GPL(ir_codes_flyvideo);
748
749IR_KEYTAB_TYPE ir_codes_flydvb[IR_KEYTAB_SIZE] = {
750 [ 0x01 ] = KEY_ZOOM, // Full Screen
751 [ 0x00 ] = KEY_POWER, // Power
752
753 [ 0x03 ] = KEY_1,
754 [ 0x04 ] = KEY_2,
755 [ 0x05 ] = KEY_3,
756 [ 0x07 ] = KEY_4,
757 [ 0x08 ] = KEY_5,
758 [ 0x09 ] = KEY_6,
759 [ 0x0b ] = KEY_7,
760 [ 0x0c ] = KEY_8,
761 [ 0x0d ] = KEY_9,
762 [ 0x06 ] = KEY_AGAIN, // Recall
763 [ 0x0f ] = KEY_0,
764 [ 0x10 ] = KEY_MUTE, // Mute
765 [ 0x02 ] = KEY_RADIO, // TV/Radio
766 [ 0x1b ] = KEY_LANGUAGE, // SAP (Second Audio Program)
767
768 [ 0x14 ] = KEY_VOLUMEUP, // VOL+
769 [ 0x17 ] = KEY_VOLUMEDOWN, // VOL-
770 [ 0x12 ] = KEY_CHANNELUP, // CH+
771 [ 0x13 ] = KEY_CHANNELDOWN, // CH-
772 [ 0x1d ] = KEY_ENTER, // Enter
773
774 [ 0x1a ] = KEY_MODE, // PIP
775 [ 0x18 ] = KEY_TUNER, // Source
776
777 [ 0x1e ] = KEY_RECORD, // Record/Pause
778 [ 0x15 ] = KEY_ANGLE, // Swap (no label on key)
779 [ 0x1c ] = KEY_PAUSE, // Timeshift/Pause
780 [ 0x19 ] = KEY_BACK, // Rewind <<
781 [ 0x0a ] = KEY_PLAYPAUSE, // Play/Pause
782 [ 0x1f ] = KEY_FORWARD, // Forward >>
783 [ 0x16 ] = KEY_PREVIOUS, // Back |<<
784 [ 0x11 ] = KEY_STOP, // Stop
785 [ 0x0e ] = KEY_NEXT, // End >>|
786};
787
788EXPORT_SYMBOL_GPL(ir_codes_flydvb);
789
790IR_KEYTAB_TYPE ir_codes_cinergy[IR_KEYTAB_SIZE] = {
791 [ 0x00 ] = KEY_0,
792 [ 0x01 ] = KEY_1,
793 [ 0x02 ] = KEY_2,
794 [ 0x03 ] = KEY_3,
795 [ 0x04 ] = KEY_4,
796 [ 0x05 ] = KEY_5,
797 [ 0x06 ] = KEY_6,
798 [ 0x07 ] = KEY_7,
799 [ 0x08 ] = KEY_8,
800 [ 0x09 ] = KEY_9,
801
802 [ 0x0a ] = KEY_POWER,
803 [ 0x0b ] = KEY_PROG1, // app
804 [ 0x0c ] = KEY_ZOOM, // zoom/fullscreen
805 [ 0x0d ] = KEY_CHANNELUP, // channel
806 [ 0x0e ] = KEY_CHANNELDOWN, // channel-
807 [ 0x0f ] = KEY_VOLUMEUP,
808 [ 0x10 ] = KEY_VOLUMEDOWN,
809 [ 0x11 ] = KEY_TUNER, // AV
810 [ 0x12 ] = KEY_NUMLOCK, // -/--
811 [ 0x13 ] = KEY_AUDIO, // audio
812 [ 0x14 ] = KEY_MUTE,
813 [ 0x15 ] = KEY_UP,
814 [ 0x16 ] = KEY_DOWN,
815 [ 0x17 ] = KEY_LEFT,
816 [ 0x18 ] = KEY_RIGHT,
817 [ 0x19 ] = BTN_LEFT,
818 [ 0x1a ] = BTN_RIGHT,
819 [ 0x1b ] = KEY_WWW, // text
820 [ 0x1c ] = KEY_REWIND,
821 [ 0x1d ] = KEY_FORWARD,
822 [ 0x1e ] = KEY_RECORD,
823 [ 0x1f ] = KEY_PLAY,
824 [ 0x20 ] = KEY_PREVIOUSSONG,
825 [ 0x21 ] = KEY_NEXTSONG,
826 [ 0x22 ] = KEY_PAUSE,
827 [ 0x23 ] = KEY_STOP,
828};
829
830EXPORT_SYMBOL_GPL(ir_codes_cinergy);
831
832/* Alfons Geser <a.geser@cox.net>
833 * updates from Job D. R. Borges <jobdrb@ig.com.br> */
834IR_KEYTAB_TYPE ir_codes_eztv[IR_KEYTAB_SIZE] = {
835 [ 0x12 ] = KEY_POWER,
836 [ 0x01 ] = KEY_TV, // DVR
837 [ 0x15 ] = KEY_DVD, // DVD
838 [ 0x17 ] = KEY_AUDIO, // music
839 // DVR mode / DVD mode / music mode
840
841 [ 0x1b ] = KEY_MUTE, // mute
842 [ 0x02 ] = KEY_LANGUAGE, // MTS/SAP / audio / autoseek
843 [ 0x1e ] = KEY_SUBTITLE, // closed captioning / subtitle / seek
844 [ 0x16 ] = KEY_ZOOM, // full screen
845 [ 0x1c ] = KEY_VIDEO, // video source / eject / delall
846 [ 0x1d ] = KEY_RESTART, // playback / angle / del
847 [ 0x2f ] = KEY_SEARCH, // scan / menu / playlist
848 [ 0x30 ] = KEY_CHANNEL, // CH surfing / bookmark / memo
849
850 [ 0x31 ] = KEY_HELP, // help
851 [ 0x32 ] = KEY_MODE, // num/memo
852 [ 0x33 ] = KEY_ESC, // cancel
853
854 [ 0x0c ] = KEY_UP, // up
855 [ 0x10 ] = KEY_DOWN, // down
856 [ 0x08 ] = KEY_LEFT, // left
857 [ 0x04 ] = KEY_RIGHT, // right
858 [ 0x03 ] = KEY_SELECT, // select
859
860 [ 0x1f ] = KEY_REWIND, // rewind
861 [ 0x20 ] = KEY_PLAYPAUSE, // play/pause
862 [ 0x29 ] = KEY_FORWARD, // forward
863 [ 0x14 ] = KEY_AGAIN, // repeat
864 [ 0x2b ] = KEY_RECORD, // recording
865 [ 0x2c ] = KEY_STOP, // stop
866 [ 0x2d ] = KEY_PLAY, // play
867 [ 0x2e ] = KEY_SHUFFLE, // snapshot / shuffle
868
869 [ 0x00 ] = KEY_0,
870 [ 0x05 ] = KEY_1,
871 [ 0x06 ] = KEY_2,
872 [ 0x07 ] = KEY_3,
873 [ 0x09 ] = KEY_4,
874 [ 0x0a ] = KEY_5,
875 [ 0x0b ] = KEY_6,
876 [ 0x0d ] = KEY_7,
877 [ 0x0e ] = KEY_8,
878 [ 0x0f ] = KEY_9,
879
880 [ 0x2a ] = KEY_VOLUMEUP,
881 [ 0x11 ] = KEY_VOLUMEDOWN,
882 [ 0x18 ] = KEY_CHANNELUP, // CH.tracking up
883 [ 0x19 ] = KEY_CHANNELDOWN, // CH.tracking down
884
885 [ 0x13 ] = KEY_ENTER, // enter
886 [ 0x21 ] = KEY_DOT, // . (decimal dot)
887};
888
889EXPORT_SYMBOL_GPL(ir_codes_eztv);
890
891IR_KEYTAB_TYPE ir_codes_avacssmart[IR_KEYTAB_SIZE] = {
892 [ 0x1e ] = KEY_POWER, // power
893 [ 0x1c ] = KEY_SEARCH, // scan
894 [ 0x07 ] = KEY_SELECT, // source
895
896 [ 0x16 ] = KEY_VOLUMEUP,
897 [ 0x14 ] = KEY_VOLUMEDOWN,
898 [ 0x1f ] = KEY_CHANNELUP,
899 [ 0x17 ] = KEY_CHANNELDOWN,
900 [ 0x18 ] = KEY_MUTE,
901
902 [ 0x02 ] = KEY_0,
903 [ 0x01 ] = KEY_1,
904 [ 0x0b ] = KEY_2,
905 [ 0x1b ] = KEY_3,
906 [ 0x05 ] = KEY_4,
907 [ 0x09 ] = KEY_5,
908 [ 0x15 ] = KEY_6,
909 [ 0x06 ] = KEY_7,
910 [ 0x0a ] = KEY_8,
911 [ 0x12 ] = KEY_9,
912 [ 0x10 ] = KEY_DOT,
913
914 [ 0x03 ] = KEY_TUNER, // tv/fm
915 [ 0x04 ] = KEY_REWIND, // fm tuning left or function left
916 [ 0x0c ] = KEY_FORWARD, // fm tuning right or function right
917
918 [ 0x00 ] = KEY_RECORD,
919 [ 0x08 ] = KEY_STOP,
920 [ 0x11 ] = KEY_PLAY,
921
922 [ 0x19 ] = KEY_ZOOM,
923 [ 0x0e ] = KEY_MENU, // function
924 [ 0x13 ] = KEY_AGAIN, // recall
925 [ 0x1d ] = KEY_RESTART, // reset
926 [ 0x1a ] = KEY_SHUFFLE, // snapshot/shuffle
927
928// FIXME
929 [ 0x0d ] = KEY_F21, // mts
930 [ 0x0f ] = KEY_F22, // min
931};
932
933EXPORT_SYMBOL_GPL(ir_codes_avacssmart);
934
935/* Alex Hermann <gaaf@gmx.net> */
936IR_KEYTAB_TYPE ir_codes_md2819[IR_KEYTAB_SIZE] = {
937 [ 0x28 ] = KEY_1,
938 [ 0x18 ] = KEY_2,
939 [ 0x38 ] = KEY_3,
940 [ 0x24 ] = KEY_4,
941 [ 0x14 ] = KEY_5,
942 [ 0x34 ] = KEY_6,
943 [ 0x2c ] = KEY_7,
944 [ 0x1c ] = KEY_8,
945 [ 0x3c ] = KEY_9,
946 [ 0x22 ] = KEY_0,
947
948 [ 0x20 ] = KEY_TV, // TV/FM
949 [ 0x10 ] = KEY_CD, // CD
950 [ 0x30 ] = KEY_TEXT, // TELETEXT
951 [ 0x00 ] = KEY_POWER, // POWER
952
953 [ 0x08 ] = KEY_VIDEO, // VIDEO
954 [ 0x04 ] = KEY_AUDIO, // AUDIO
955 [ 0x0c ] = KEY_ZOOM, // FULL SCREEN
956
957 [ 0x12 ] = KEY_SUBTITLE, // DISPLAY - ???
958 [ 0x32 ] = KEY_REWIND, // LOOP - ???
959 [ 0x02 ] = KEY_PRINT, // PREVIEW - ???
960
961 [ 0x2a ] = KEY_SEARCH, // AUTOSCAN
962 [ 0x1a ] = KEY_SLEEP, // FREEZE - ???
963 [ 0x3a ] = KEY_SHUFFLE, // SNAPSHOT - ???
964 [ 0x0a ] = KEY_MUTE, // MUTE
965
966 [ 0x26 ] = KEY_RECORD, // RECORD
967 [ 0x16 ] = KEY_PAUSE, // PAUSE
968 [ 0x36 ] = KEY_STOP, // STOP
969 [ 0x06 ] = KEY_PLAY, // PLAY
970
971 [ 0x2e ] = KEY_RED, // <RED>
972 [ 0x21 ] = KEY_GREEN, // <GREEN>
973 [ 0x0e ] = KEY_YELLOW, // <YELLOW>
974 [ 0x01 ] = KEY_BLUE, // <BLUE>
975
976 [ 0x1e ] = KEY_VOLUMEDOWN, // VOLUME-
977 [ 0x3e ] = KEY_VOLUMEUP, // VOLUME+
978 [ 0x11 ] = KEY_CHANNELDOWN, // CHANNEL/PAGE-
979 [ 0x31 ] = KEY_CHANNELUP // CHANNEL/PAGE+
980};
981
982EXPORT_SYMBOL_GPL(ir_codes_md2819);
983
984IR_KEYTAB_TYPE ir_codes_videomate_tv_pvr[IR_KEYTAB_SIZE] = {
985 [ 0x14 ] = KEY_MUTE,
986 [ 0x24 ] = KEY_ZOOM,
987
988 [ 0x01 ] = KEY_DVD,
989 [ 0x23 ] = KEY_RADIO,
990 [ 0x00 ] = KEY_TV,
991
992 [ 0x0a ] = KEY_REWIND,
993 [ 0x08 ] = KEY_PLAYPAUSE,
994 [ 0x0f ] = KEY_FORWARD,
995
996 [ 0x02 ] = KEY_PREVIOUS,
997 [ 0x07 ] = KEY_STOP,
998 [ 0x06 ] = KEY_NEXT,
999
1000 [ 0x0c ] = KEY_UP,
1001 [ 0x0e ] = KEY_DOWN,
1002 [ 0x0b ] = KEY_LEFT,
1003 [ 0x0d ] = KEY_RIGHT,
1004 [ 0x11 ] = KEY_OK,
1005
1006 [ 0x03 ] = KEY_MENU,
1007 [ 0x09 ] = KEY_SETUP,
1008 [ 0x05 ] = KEY_VIDEO,
1009 [ 0x22 ] = KEY_CHANNEL,
1010
1011 [ 0x12 ] = KEY_VOLUMEUP,
1012 [ 0x15 ] = KEY_VOLUMEDOWN,
1013 [ 0x10 ] = KEY_CHANNELUP,
1014 [ 0x13 ] = KEY_CHANNELDOWN,
1015
1016 [ 0x04 ] = KEY_RECORD,
1017
1018 [ 0x16 ] = KEY_1,
1019 [ 0x17 ] = KEY_2,
1020 [ 0x18 ] = KEY_3,
1021 [ 0x19 ] = KEY_4,
1022 [ 0x1a ] = KEY_5,
1023 [ 0x1b ] = KEY_6,
1024 [ 0x1c ] = KEY_7,
1025 [ 0x1d ] = KEY_8,
1026 [ 0x1e ] = KEY_9,
1027 [ 0x1f ] = KEY_0,
1028
1029 [ 0x20 ] = KEY_LANGUAGE,
1030 [ 0x21 ] = KEY_SLEEP,
1031};
1032
1033EXPORT_SYMBOL_GPL(ir_codes_videomate_tv_pvr);
1034
1035/* Michael Tokarev <mjt@tls.msk.ru>
1036 http://www.corpit.ru/mjt/beholdTV/remote_control.jpg
1037 keytable is used by MANLI MTV00[ 0x0c ] and BeholdTV 40[13] at
1038 least, and probably other cards too.
1039 The "ascii-art picture" below (in comments, first row
1040 is the keycode in hex, and subsequent row(s) shows
1041 the button labels (several variants when appropriate)
1042 helps to descide which keycodes to assign to the buttons.
1043 */
1044IR_KEYTAB_TYPE ir_codes_manli[IR_KEYTAB_SIZE] = {
1045
1046 /* 0x1c 0x12 *
1047 * FUNCTION POWER *
1048 * FM (|) *
1049 * */
1050 [ 0x1c ] = KEY_RADIO, /*XXX*/
1051 [ 0x12 ] = KEY_POWER,
1052
1053 /* 0x01 0x02 0x03 *
1054 * 1 2 3 *
1055 * *
1056 * 0x04 0x05 0x06 *
1057 * 4 5 6 *
1058 * *
1059 * 0x07 0x08 0x09 *
1060 * 7 8 9 *
1061 * */
1062 [ 0x01 ] = KEY_1,
1063 [ 0x02 ] = KEY_2,
1064 [ 0x03 ] = KEY_3,
1065 [ 0x04 ] = KEY_4,
1066 [ 0x05 ] = KEY_5,
1067 [ 0x06 ] = KEY_6,
1068 [ 0x07 ] = KEY_7,
1069 [ 0x08 ] = KEY_8,
1070 [ 0x09 ] = KEY_9,
1071
1072 /* 0x0a 0x00 0x17 *
1073 * RECALL 0 +100 *
1074 * PLUS *
1075 * */
1076 [ 0x0a ] = KEY_AGAIN, /*XXX KEY_REWIND? */
1077 [ 0x00 ] = KEY_0,
1078 [ 0x17 ] = KEY_DIGITS, /*XXX*/
1079
1080 /* 0x14 0x10 *
1081 * MENU INFO *
1082 * OSD */
1083 [ 0x14 ] = KEY_MENU,
1084 [ 0x10 ] = KEY_INFO,
1085
1086 /* 0x0b *
1087 * Up *
1088 * *
1089 * 0x18 0x16 0x0c *
1090 * Left Ok Right *
1091 * *
1092 * 0x015 *
1093 * Down *
1094 * */
1095 [ 0x0b ] = KEY_UP, /*XXX KEY_SCROLLUP? */
1096 [ 0x18 ] = KEY_LEFT, /*XXX KEY_BACK? */
1097 [ 0x16 ] = KEY_OK, /*XXX KEY_SELECT? KEY_ENTER? */
1098 [ 0x0c ] = KEY_RIGHT, /*XXX KEY_FORWARD? */
1099 [ 0x15 ] = KEY_DOWN, /*XXX KEY_SCROLLDOWN? */
1100
1101 /* 0x11 0x0d *
1102 * TV/AV MODE *
1103 * SOURCE STEREO *
1104 * */
1105 [ 0x11 ] = KEY_TV, /*XXX*/
1106 [ 0x0d ] = KEY_MODE, /*XXX there's no KEY_STEREO */
1107
1108 /* 0x0f 0x1b 0x1a *
1109 * AUDIO Vol+ Chan+ *
1110 * TIMESHIFT??? *
1111 * *
1112 * 0x0e 0x1f 0x1e *
1113 * SLEEP Vol- Chan- *
1114 * */
1115 [ 0x0f ] = KEY_AUDIO,
1116 [ 0x1b ] = KEY_VOLUMEUP,
1117 [ 0x1a ] = KEY_CHANNELUP,
1118 [ 0x0e ] = KEY_SLEEP, /*XXX maybe KEY_PAUSE */
1119 [ 0x1f ] = KEY_VOLUMEDOWN,
1120 [ 0x1e ] = KEY_CHANNELDOWN,
1121
1122 /* 0x13 0x19 *
1123 * MUTE SNAPSHOT*
1124 * */
1125 [ 0x13 ] = KEY_MUTE,
1126 [ 0x19 ] = KEY_RECORD, /*XXX*/
1127
1128 // 0x1d unused ?
1129};
1130
1131EXPORT_SYMBOL_GPL(ir_codes_manli);
1132
1133/* Mike Baikov <mike@baikov.com> */
1134IR_KEYTAB_TYPE ir_codes_gotview7135[IR_KEYTAB_SIZE] = {
1135
1136 [ 0x21 ] = KEY_POWER,
1137 [ 0x69 ] = KEY_TV,
1138 [ 0x33 ] = KEY_0,
1139 [ 0x51 ] = KEY_1,
1140 [ 0x31 ] = KEY_2,
1141 [ 0x71 ] = KEY_3,
1142 [ 0x3b ] = KEY_4,
1143 [ 0x58 ] = KEY_5,
1144 [ 0x41 ] = KEY_6,
1145 [ 0x48 ] = KEY_7,
1146 [ 0x30 ] = KEY_8,
1147 [ 0x53 ] = KEY_9,
1148 [ 0x73 ] = KEY_AGAIN, /* LOOP */
1149 [ 0x0a ] = KEY_AUDIO,
1150 [ 0x61 ] = KEY_PRINT, /* PREVIEW */
1151 [ 0x7a ] = KEY_VIDEO,
1152 [ 0x20 ] = KEY_CHANNELUP,
1153 [ 0x40 ] = KEY_CHANNELDOWN,
1154 [ 0x18 ] = KEY_VOLUMEDOWN,
1155 [ 0x50 ] = KEY_VOLUMEUP,
1156 [ 0x10 ] = KEY_MUTE,
1157 [ 0x4a ] = KEY_SEARCH,
1158 [ 0x7b ] = KEY_SHUFFLE, /* SNAPSHOT */
1159 [ 0x22 ] = KEY_RECORD,
1160 [ 0x62 ] = KEY_STOP,
1161 [ 0x78 ] = KEY_PLAY,
1162 [ 0x39 ] = KEY_REWIND,
1163 [ 0x59 ] = KEY_PAUSE,
1164 [ 0x19 ] = KEY_FORWARD,
1165 [ 0x09 ] = KEY_ZOOM,
1166
1167 [ 0x52 ] = KEY_F21, /* LIVE TIMESHIFT */
1168 [ 0x1a ] = KEY_F22, /* MIN TIMESHIFT */
1169 [ 0x3a ] = KEY_F23, /* TIMESHIFT */
1170 [ 0x70 ] = KEY_F24, /* NORMAL TIMESHIFT */
1171};
1172
1173EXPORT_SYMBOL_GPL(ir_codes_gotview7135);
1174
1175IR_KEYTAB_TYPE ir_codes_purpletv[IR_KEYTAB_SIZE] = {
1176 [ 0x03 ] = KEY_POWER,
1177 [ 0x6f ] = KEY_MUTE,
1178 [ 0x10 ] = KEY_BACKSPACE, /* Recall */
1179
1180 [ 0x11 ] = KEY_0,
1181 [ 0x04 ] = KEY_1,
1182 [ 0x05 ] = KEY_2,
1183 [ 0x06 ] = KEY_3,
1184 [ 0x08 ] = KEY_4,
1185 [ 0x09 ] = KEY_5,
1186 [ 0x0a ] = KEY_6,
1187 [ 0x0c ] = KEY_7,
1188 [ 0x0d ] = KEY_8,
1189 [ 0x0e ] = KEY_9,
1190 [ 0x12 ] = KEY_DOT, /* 100+ */
1191
1192 [ 0x07 ] = KEY_VOLUMEUP,
1193 [ 0x0b ] = KEY_VOLUMEDOWN,
1194 [ 0x1a ] = KEY_KPPLUS,
1195 [ 0x18 ] = KEY_KPMINUS,
1196 [ 0x15 ] = KEY_UP,
1197 [ 0x1d ] = KEY_DOWN,
1198 [ 0x0f ] = KEY_CHANNELUP,
1199 [ 0x13 ] = KEY_CHANNELDOWN,
1200 [ 0x48 ] = KEY_ZOOM,
1201
1202 [ 0x1b ] = KEY_VIDEO, /* Video source */
1203 [ 0x49 ] = KEY_LANGUAGE, /* MTS Select */
1204 [ 0x19 ] = KEY_SEARCH, /* Auto Scan */
1205
1206 [ 0x4b ] = KEY_RECORD,
1207 [ 0x46 ] = KEY_PLAY,
1208 [ 0x45 ] = KEY_PAUSE, /* Pause */
1209 [ 0x44 ] = KEY_STOP,
1210 [ 0x40 ] = KEY_FORWARD, /* Forward ? */
1211 [ 0x42 ] = KEY_REWIND, /* Backward ? */
1212
1213};
1214
1215EXPORT_SYMBOL_GPL(ir_codes_purpletv);
1216
1217/* Mapping for the 28 key remote control as seen at
1218 http://www.sednacomputer.com/photo/cardbus-tv.jpg
1219 Pavel Mihaylov <bin@bash.info> */
1220IR_KEYTAB_TYPE ir_codes_pctv_sedna[IR_KEYTAB_SIZE] = {
1221 [ 0x00 ] = KEY_0,
1222 [ 0x01 ] = KEY_1,
1223 [ 0x02 ] = KEY_2,
1224 [ 0x03 ] = KEY_3,
1225 [ 0x04 ] = KEY_4,
1226 [ 0x05 ] = KEY_5,
1227 [ 0x06 ] = KEY_6,
1228 [ 0x07 ] = KEY_7,
1229 [ 0x08 ] = KEY_8,
1230 [ 0x09 ] = KEY_9,
1231
1232 [ 0x0a ] = KEY_AGAIN, /* Recall */
1233 [ 0x0b ] = KEY_CHANNELUP,
1234 [ 0x0c ] = KEY_VOLUMEUP,
1235 [ 0x0d ] = KEY_MODE, /* Stereo */
1236 [ 0x0e ] = KEY_STOP,
1237 [ 0x0f ] = KEY_PREVIOUSSONG,
1238 [ 0x10 ] = KEY_ZOOM,
1239 [ 0x11 ] = KEY_TUNER, /* Source */
1240 [ 0x12 ] = KEY_POWER,
1241 [ 0x13 ] = KEY_MUTE,
1242 [ 0x15 ] = KEY_CHANNELDOWN,
1243 [ 0x18 ] = KEY_VOLUMEDOWN,
1244 [ 0x19 ] = KEY_SHUFFLE, /* Snapshot */
1245 [ 0x1a ] = KEY_NEXTSONG,
1246 [ 0x1b ] = KEY_TEXT, /* Time Shift */
1247 [ 0x1c ] = KEY_RADIO, /* FM Radio */
1248 [ 0x1d ] = KEY_RECORD,
1249 [ 0x1e ] = KEY_PAUSE,
1250};
1251
1252EXPORT_SYMBOL_GPL(ir_codes_pctv_sedna);
1253
1254/* Mark Phalan <phalanm@o2.ie> */
1255IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE] = {
1256 [ 0x00 ] = KEY_0,
1257 [ 0x01 ] = KEY_1,
1258 [ 0x02 ] = KEY_2,
1259 [ 0x03 ] = KEY_3,
1260 [ 0x04 ] = KEY_4,
1261 [ 0x05 ] = KEY_5,
1262 [ 0x06 ] = KEY_6,
1263 [ 0x07 ] = KEY_7,
1264 [ 0x08 ] = KEY_8,
1265 [ 0x09 ] = KEY_9,
1266
1267 [ 0x12 ] = KEY_POWER,
1268 [ 0x10 ] = KEY_MUTE,
1269 [ 0x1f ] = KEY_VOLUMEDOWN,
1270 [ 0x1b ] = KEY_VOLUMEUP,
1271 [ 0x1a ] = KEY_CHANNELUP,
1272 [ 0x1e ] = KEY_CHANNELDOWN,
1273 [ 0x0e ] = KEY_PAGEUP,
1274 [ 0x1d ] = KEY_PAGEDOWN,
1275 [ 0x13 ] = KEY_SOUND,
1276
1277 [ 0x18 ] = KEY_KPPLUSMINUS, /* CH +/- */
1278 [ 0x16 ] = KEY_SUBTITLE, /* CC */
1279 [ 0x0d ] = KEY_TEXT, /* TTX */
1280 [ 0x0b ] = KEY_TV, /* AIR/CBL */
1281 [ 0x11 ] = KEY_PC, /* PC/TV */
1282 [ 0x17 ] = KEY_OK, /* CH RTN */
1283 [ 0x19 ] = KEY_MODE, /* FUNC */
1284 [ 0x0c ] = KEY_SEARCH, /* AUTOSCAN */
1285
1286 /* Not sure what to do with these ones! */
1287 [ 0x0f ] = KEY_SELECT, /* SOURCE */
1288 [ 0x0a ] = KEY_KPPLUS, /* +100 */
1289 [ 0x14 ] = KEY_EQUAL, /* SYNC */
1290 [ 0x1c ] = KEY_MEDIA, /* PC/TV */
1291};
1292
1293EXPORT_SYMBOL_GPL(ir_codes_pv951);
1294
1295/* generic RC5 keytable */
1296/* see http://users.pandora.be/nenya/electronics/rc5/codes00.htm */
1297/* used by old (black) Hauppauge remotes */
1298IR_KEYTAB_TYPE ir_codes_rc5_tv[IR_KEYTAB_SIZE] = {
1299 /* Keys 0 to 9 */
1300 [ 0x00 ] = KEY_0,
1301 [ 0x01 ] = KEY_1,
1302 [ 0x02 ] = KEY_2,
1303 [ 0x03 ] = KEY_3,
1304 [ 0x04 ] = KEY_4,
1305 [ 0x05 ] = KEY_5,
1306 [ 0x06 ] = KEY_6,
1307 [ 0x07 ] = KEY_7,
1308 [ 0x08 ] = KEY_8,
1309 [ 0x09 ] = KEY_9,
1310
1311 [ 0x0b ] = KEY_CHANNEL, /* channel / program (japan: 11) */
1312 [ 0x0c ] = KEY_POWER, /* standby */
1313 [ 0x0d ] = KEY_MUTE, /* mute / demute */
1314 [ 0x0f ] = KEY_TV, /* display */
1315 [ 0x10 ] = KEY_VOLUMEUP,
1316 [ 0x11 ] = KEY_VOLUMEDOWN,
1317 [ 0x12 ] = KEY_BRIGHTNESSUP,
1318 [ 0x13 ] = KEY_BRIGHTNESSDOWN,
1319 [ 0x1e ] = KEY_SEARCH, /* search + */
1320 [ 0x20 ] = KEY_CHANNELUP, /* channel / program + */
1321 [ 0x21 ] = KEY_CHANNELDOWN, /* channel / program - */
1322 [ 0x22 ] = KEY_CHANNEL, /* alt / channel */
1323 [ 0x23 ] = KEY_LANGUAGE, /* 1st / 2nd language */
1324 [ 0x26 ] = KEY_SLEEP, /* sleeptimer */
1325 [ 0x2e ] = KEY_MENU, /* 2nd controls (USA: menu) */
1326 [ 0x30 ] = KEY_PAUSE,
1327 [ 0x32 ] = KEY_REWIND,
1328 [ 0x33 ] = KEY_GOTO,
1329 [ 0x35 ] = KEY_PLAY,
1330 [ 0x36 ] = KEY_STOP,
1331 [ 0x37 ] = KEY_RECORD, /* recording */
1332 [ 0x3c ] = KEY_TEXT, /* teletext submode (Japan: 12) */
1333 [ 0x3d ] = KEY_SUSPEND, /* system standby */
1334
1335};
1336
1337EXPORT_SYMBOL_GPL(ir_codes_rc5_tv);
1338
1339/* Table for Leadtek Winfast Remote Controls - used by both bttv and cx88 */
1340IR_KEYTAB_TYPE ir_codes_winfast[IR_KEYTAB_SIZE] = {
1341 /* Keys 0 to 9 */
1342 [ 0x12 ] = KEY_0,
1343 [ 0x05 ] = KEY_1,
1344 [ 0x06 ] = KEY_2,
1345 [ 0x07 ] = KEY_3,
1346 [ 0x09 ] = KEY_4,
1347 [ 0x0a ] = KEY_5,
1348 [ 0x0b ] = KEY_6,
1349 [ 0x0d ] = KEY_7,
1350 [ 0x0e ] = KEY_8,
1351 [ 0x0f ] = KEY_9,
1352
1353 [ 0x00 ] = KEY_POWER,
1354 [ 0x02 ] = KEY_TUNER, /* TV/FM */
1355 [ 0x1e ] = KEY_VIDEO,
1356 [ 0x04 ] = KEY_VOLUMEUP,
1357 [ 0x08 ] = KEY_VOLUMEDOWN,
1358 [ 0x0c ] = KEY_CHANNELUP,
1359 [ 0x10 ] = KEY_CHANNELDOWN,
1360 [ 0x03 ] = KEY_ZOOM, /* fullscreen */
1361 [ 0x1f ] = KEY_SUBTITLE, /* closed caption/teletext */
1362 [ 0x20 ] = KEY_SLEEP,
1363 [ 0x14 ] = KEY_MUTE,
1364 [ 0x2b ] = KEY_RED,
1365 [ 0x2c ] = KEY_GREEN,
1366 [ 0x2d ] = KEY_YELLOW,
1367 [ 0x2e ] = KEY_BLUE,
1368 [ 0x18 ] = KEY_KPPLUS, /* fine tune + */
1369 [ 0x19 ] = KEY_KPMINUS, /* fine tune - */
1370 [ 0x21 ] = KEY_DOT,
1371 [ 0x13 ] = KEY_ENTER,
1372 [ 0x22 ] = KEY_BACK,
1373 [ 0x23 ] = KEY_PLAYPAUSE,
1374 [ 0x24 ] = KEY_NEXT,
1375 [ 0x26 ] = KEY_STOP,
1376 [ 0x27 ] = KEY_RECORD
1377};
1378
1379EXPORT_SYMBOL_GPL(ir_codes_winfast);
1380
1381IR_KEYTAB_TYPE ir_codes_pinnacle[IR_KEYTAB_SIZE] = {
1382 [ 0x59 ] = KEY_MUTE,
1383 [ 0x4a ] = KEY_POWER,
1384
1385 [ 0x18 ] = KEY_TEXT,
1386 [ 0x26 ] = KEY_TV,
1387 [ 0x3d ] = KEY_PRINT,
1388
1389 [ 0x48 ] = KEY_RED,
1390 [ 0x04 ] = KEY_GREEN,
1391 [ 0x11 ] = KEY_YELLOW,
1392 [ 0x00 ] = KEY_BLUE,
1393
1394 [ 0x2d ] = KEY_VOLUMEUP,
1395 [ 0x1e ] = KEY_VOLUMEDOWN,
1396
1397 [ 0x49 ] = KEY_MENU,
1398
1399 [ 0x16 ] = KEY_CHANNELUP,
1400 [ 0x17 ] = KEY_CHANNELDOWN,
1401
1402 [ 0x20 ] = KEY_UP,
1403 [ 0x21 ] = KEY_DOWN,
1404 [ 0x22 ] = KEY_LEFT,
1405 [ 0x23 ] = KEY_RIGHT,
1406 [ 0x0d ] = KEY_SELECT,
1407
1408
1409
1410 [ 0x08 ] = KEY_BACK,
1411 [ 0x07 ] = KEY_REFRESH,
1412
1413 [ 0x2f ] = KEY_ZOOM,
1414 [ 0x29 ] = KEY_RECORD,
1415
1416 [ 0x4b ] = KEY_PAUSE,
1417 [ 0x4d ] = KEY_REWIND,
1418 [ 0x2e ] = KEY_PLAY,
1419 [ 0x4e ] = KEY_FORWARD,
1420 [ 0x53 ] = KEY_PREVIOUS,
1421 [ 0x4c ] = KEY_STOP,
1422 [ 0x54 ] = KEY_NEXT,
1423
1424 [ 0x69 ] = KEY_0,
1425 [ 0x6a ] = KEY_1,
1426 [ 0x6b ] = KEY_2,
1427 [ 0x6c ] = KEY_3,
1428 [ 0x6d ] = KEY_4,
1429 [ 0x6e ] = KEY_5,
1430 [ 0x6f ] = KEY_6,
1431 [ 0x70 ] = KEY_7,
1432 [ 0x71 ] = KEY_8,
1433 [ 0x72 ] = KEY_9,
1434
1435 [ 0x74 ] = KEY_CHANNEL,
1436 [ 0x0a ] = KEY_BACKSPACE,
1437};
1438
1439EXPORT_SYMBOL_GPL(ir_codes_pinnacle);
1440
1441/* Hauppauge: the newer, gray remotes (seems there are multiple
1442 * slightly different versions), shipped with cx88+ivtv cards.
1443 * almost rc5 coding, but some non-standard keys */
1444IR_KEYTAB_TYPE ir_codes_hauppauge_new[IR_KEYTAB_SIZE] = {
1445 /* Keys 0 to 9 */
1446 [ 0x00 ] = KEY_0,
1447 [ 0x01 ] = KEY_1,
1448 [ 0x02 ] = KEY_2,
1449 [ 0x03 ] = KEY_3,
1450 [ 0x04 ] = KEY_4,
1451 [ 0x05 ] = KEY_5,
1452 [ 0x06 ] = KEY_6,
1453 [ 0x07 ] = KEY_7,
1454 [ 0x08 ] = KEY_8,
1455 [ 0x09 ] = KEY_9,
1456
1457 [ 0x0a ] = KEY_TEXT, /* keypad asterisk as well */
1458 [ 0x0b ] = KEY_RED, /* red button */
1459 [ 0x0c ] = KEY_RADIO,
1460 [ 0x0d ] = KEY_MENU,
1461 [ 0x0e ] = KEY_SUBTITLE, /* also the # key */
1462 [ 0x0f ] = KEY_MUTE,
1463 [ 0x10 ] = KEY_VOLUMEUP,
1464 [ 0x11 ] = KEY_VOLUMEDOWN,
1465 [ 0x12 ] = KEY_PREVIOUS, /* previous channel */
1466 [ 0x14 ] = KEY_UP,
1467 [ 0x15 ] = KEY_DOWN,
1468 [ 0x16 ] = KEY_LEFT,
1469 [ 0x17 ] = KEY_RIGHT,
1470 [ 0x18 ] = KEY_VIDEO, /* Videos */
1471 [ 0x19 ] = KEY_AUDIO, /* Music */
1472 /* 0x1a: Pictures - presume this means
1473 "Multimedia Home Platform" -
1474 no "PICTURES" key in input.h
1475 */
1476 [ 0x1a ] = KEY_MHP,
1477
1478 [ 0x1b ] = KEY_EPG, /* Guide */
1479 [ 0x1c ] = KEY_TV,
1480 [ 0x1e ] = KEY_NEXTSONG, /* skip >| */
1481 [ 0x1f ] = KEY_EXIT, /* back/exit */
1482 [ 0x20 ] = KEY_CHANNELUP, /* channel / program + */
1483 [ 0x21 ] = KEY_CHANNELDOWN, /* channel / program - */
1484 [ 0x22 ] = KEY_CHANNEL, /* source (old black remote) */
1485 [ 0x24 ] = KEY_PREVIOUSSONG, /* replay |< */
1486 [ 0x25 ] = KEY_ENTER, /* OK */
1487 [ 0x26 ] = KEY_SLEEP, /* minimize (old black remote) */
1488 [ 0x29 ] = KEY_BLUE, /* blue key */
1489 [ 0x2e ] = KEY_GREEN, /* green button */
1490 [ 0x30 ] = KEY_PAUSE, /* pause */
1491 [ 0x32 ] = KEY_REWIND, /* backward << */
1492 [ 0x34 ] = KEY_FASTFORWARD, /* forward >> */
1493 [ 0x35 ] = KEY_PLAY,
1494 [ 0x36 ] = KEY_STOP,
1495 [ 0x37 ] = KEY_RECORD, /* recording */
1496 [ 0x38 ] = KEY_YELLOW, /* yellow key */
1497 [ 0x3b ] = KEY_SELECT, /* top right button */
1498 [ 0x3c ] = KEY_ZOOM, /* full */
1499 [ 0x3d ] = KEY_POWER, /* system power (green button) */
1500};
1501
1502EXPORT_SYMBOL_GPL(ir_codes_hauppauge_new);
1503
1504IR_KEYTAB_TYPE ir_codes_pixelview[IR_KEYTAB_SIZE] = {
1505 [ 0x02 ] = KEY_0,
1506 [ 0x01 ] = KEY_1,
1507 [ 0x0b ] = KEY_2,
1508 [ 0x1b ] = KEY_3,
1509 [ 0x05 ] = KEY_4,
1510 [ 0x09 ] = KEY_5,
1511 [ 0x15 ] = KEY_6,
1512 [ 0x06 ] = KEY_7,
1513 [ 0x0a ] = KEY_8,
1514 [ 0x12 ] = KEY_9,
1515
1516 [ 0x03 ] = KEY_TUNER, /* TV/FM */
1517 [ 0x07 ] = KEY_SEARCH, /* scan */
1518 [ 0x1c ] = KEY_ZOOM, /* full screen */
1519 [ 0x1e ] = KEY_POWER,
1520 [ 0x17 ] = KEY_VOLUMEDOWN,
1521 [ 0x1f ] = KEY_VOLUMEUP,
1522 [ 0x14 ] = KEY_CHANNELDOWN,
1523 [ 0x16 ] = KEY_CHANNELUP,
1524 [ 0x18 ] = KEY_MUTE,
1525
1526 [ 0x00 ] = KEY_LIST, /* source */
1527 [ 0x13 ] = KEY_INFO, /* loop */
1528 [ 0x10 ] = KEY_LAST, /* +100 */
1529 [ 0x0d ] = KEY_CLEAR, /* reset */
1530 [ 0x0c ] = BTN_RIGHT, /* fun++ */
1531 [ 0x04 ] = BTN_LEFT, /* fun-- */
1532 [ 0x0e ] = KEY_GOTO, /* function */
1533 [ 0x0f ] = KEY_STOP, /* freeze */
1534};
1535
1536EXPORT_SYMBOL_GPL(ir_codes_pixelview);
1537
diff --git a/drivers/media/video/bttv-input.c b/drivers/media/video/bttv-input.c
index 221b36e7f392..42760ae867d6 100644
--- a/drivers/media/video/bttv-input.c
+++ b/drivers/media/video/bttv-input.c
@@ -28,251 +28,6 @@
28#include "bttv.h" 28#include "bttv.h"
29#include "bttvp.h" 29#include "bttvp.h"
30 30
31/* ---------------------------------------------------------------------- */
32
33static IR_KEYTAB_TYPE ir_codes_avermedia[IR_KEYTAB_SIZE] = {
34 [ 34 ] = KEY_KP0,
35 [ 40 ] = KEY_KP1,
36 [ 24 ] = KEY_KP2,
37 [ 56 ] = KEY_KP3,
38 [ 36 ] = KEY_KP4,
39 [ 20 ] = KEY_KP5,
40 [ 52 ] = KEY_KP6,
41 [ 44 ] = KEY_KP7,
42 [ 28 ] = KEY_KP8,
43 [ 60 ] = KEY_KP9,
44
45 [ 48 ] = KEY_EJECTCD, // Unmarked on my controller
46 [ 0 ] = KEY_POWER,
47 [ 18 ] = BTN_LEFT, // DISPLAY/L
48 [ 50 ] = BTN_RIGHT, // LOOP/R
49 [ 10 ] = KEY_MUTE,
50 [ 38 ] = KEY_RECORD,
51 [ 22 ] = KEY_PAUSE,
52 [ 54 ] = KEY_STOP,
53 [ 30 ] = KEY_VOLUMEDOWN,
54 [ 62 ] = KEY_VOLUMEUP,
55
56 [ 32 ] = KEY_TUNER, // TV/FM
57 [ 16 ] = KEY_CD,
58 [ 8 ] = KEY_VIDEO,
59 [ 4 ] = KEY_AUDIO,
60 [ 12 ] = KEY_ZOOM, // full screen
61 [ 2 ] = KEY_INFO, // preview
62 [ 42 ] = KEY_SEARCH, // autoscan
63 [ 26 ] = KEY_STOP, // freeze
64 [ 58 ] = KEY_RECORD, // capture
65 [ 6 ] = KEY_PLAY, // unmarked
66 [ 46 ] = KEY_RED, // unmarked
67 [ 14 ] = KEY_GREEN, // unmarked
68
69 [ 33 ] = KEY_YELLOW, // unmarked
70 [ 17 ] = KEY_CHANNELDOWN,
71 [ 49 ] = KEY_CHANNELUP,
72 [ 1 ] = KEY_BLUE, // unmarked
73};
74
75/* Matt Jesson <dvb@jesson.eclipse.co.uk */
76static IR_KEYTAB_TYPE ir_codes_avermedia_dvbt[IR_KEYTAB_SIZE] = {
77 [ 0x28 ] = KEY_KP0, //'0' / 'enter'
78 [ 0x22 ] = KEY_KP1, //'1'
79 [ 0x12 ] = KEY_KP2, //'2' / 'up arrow'
80 [ 0x32 ] = KEY_KP3, //'3'
81 [ 0x24 ] = KEY_KP4, //'4' / 'left arrow'
82 [ 0x14 ] = KEY_KP5, //'5'
83 [ 0x34 ] = KEY_KP6, //'6' / 'right arrow'
84 [ 0x26 ] = KEY_KP7, //'7'
85 [ 0x16 ] = KEY_KP8, //'8' / 'down arrow'
86 [ 0x36 ] = KEY_KP9, //'9'
87
88 [ 0x20 ] = KEY_LIST, // 'source'
89 [ 0x10 ] = KEY_TEXT, // 'teletext'
90 [ 0x00 ] = KEY_POWER, // 'power'
91 [ 0x04 ] = KEY_AUDIO, // 'audio'
92 [ 0x06 ] = KEY_ZOOM, // 'full screen'
93 [ 0x18 ] = KEY_VIDEO, // 'display'
94 [ 0x38 ] = KEY_SEARCH, // 'loop'
95 [ 0x08 ] = KEY_INFO, // 'preview'
96 [ 0x2a ] = KEY_REWIND, // 'backward <<'
97 [ 0x1a ] = KEY_FASTFORWARD, // 'forward >>'
98 [ 0x3a ] = KEY_RECORD, // 'capture'
99 [ 0x0a ] = KEY_MUTE, // 'mute'
100 [ 0x2c ] = KEY_RECORD, // 'record'
101 [ 0x1c ] = KEY_PAUSE, // 'pause'
102 [ 0x3c ] = KEY_STOP, // 'stop'
103 [ 0x0c ] = KEY_PLAY, // 'play'
104 [ 0x2e ] = KEY_RED, // 'red'
105 [ 0x01 ] = KEY_BLUE, // 'blue' / 'cancel'
106 [ 0x0e ] = KEY_YELLOW, // 'yellow' / 'ok'
107 [ 0x21 ] = KEY_GREEN, // 'green'
108 [ 0x11 ] = KEY_CHANNELDOWN, // 'channel -'
109 [ 0x31 ] = KEY_CHANNELUP, // 'channel +'
110 [ 0x1e ] = KEY_VOLUMEDOWN, // 'volume -'
111 [ 0x3e ] = KEY_VOLUMEUP, // 'volume +'
112};
113
114/* Attila Kondoros <attila.kondoros@chello.hu> */
115static IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = {
116
117 [ 1 ] = KEY_KP1,
118 [ 2 ] = KEY_KP2,
119 [ 3 ] = KEY_KP3,
120 [ 4 ] = KEY_KP4,
121 [ 5 ] = KEY_KP5,
122 [ 6 ] = KEY_KP6,
123 [ 7 ] = KEY_KP7,
124 [ 8 ] = KEY_KP8,
125 [ 9 ] = KEY_KP9,
126 [ 0 ] = KEY_KP0,
127 [ 23 ] = KEY_LAST, // +100
128 [ 10 ] = KEY_LIST, // recall
129
130
131 [ 28 ] = KEY_TUNER, // TV/FM
132 [ 21 ] = KEY_SEARCH, // scan
133 [ 18 ] = KEY_POWER, // power
134 [ 31 ] = KEY_VOLUMEDOWN, // vol up
135 [ 27 ] = KEY_VOLUMEUP, // vol down
136 [ 30 ] = KEY_CHANNELDOWN, // chn up
137 [ 26 ] = KEY_CHANNELUP, // chn down
138
139 [ 17 ] = KEY_VIDEO, // video
140 [ 15 ] = KEY_ZOOM, // full screen
141 [ 19 ] = KEY_MUTE, // mute/unmute
142 [ 16 ] = KEY_TEXT, // min
143
144 [ 13 ] = KEY_STOP, // freeze
145 [ 14 ] = KEY_RECORD, // record
146 [ 29 ] = KEY_PLAYPAUSE, // stop
147 [ 25 ] = KEY_PLAY, // play
148
149 [ 22 ] = KEY_GOTO, // osd
150 [ 20 ] = KEY_REFRESH, // default
151 [ 12 ] = KEY_KPPLUS, // fine tune >>>>
152 [ 24 ] = KEY_KPMINUS // fine tune <<<<
153};
154
155/* ---------------------------------------------------------------------- */
156
157static IR_KEYTAB_TYPE ir_codes_conceptronic[IR_KEYTAB_SIZE] = {
158
159 [ 30 ] = KEY_POWER, // power
160 [ 7 ] = KEY_MEDIA, // source
161 [ 28 ] = KEY_SEARCH, // scan
162
163/* FIXME: duplicate keycodes?
164 *
165 * These four keys seem to share the same GPIO as CH+, CH-, <<< and >>>
166 * The GPIO values are
167 * 6397fb for both "Scan <" and "CH -",
168 * 639ffb for "Scan >" and "CH+",
169 * 6384fb for "Tune <" and "<<<",
170 * 638cfb for "Tune >" and ">>>", regardless of the mask.
171 *
172 * [ 23 ] = KEY_BACK, // fm scan <<
173 * [ 31 ] = KEY_FORWARD, // fm scan >>
174 *
175 * [ 4 ] = KEY_LEFT, // fm tuning <
176 * [ 12 ] = KEY_RIGHT, // fm tuning >
177 *
178 * For now, these four keys are disabled. Pressing them will generate
179 * the CH+/CH-/<<</>>> events
180 */
181
182 [ 3 ] = KEY_TUNER, // TV/FM
183
184 [ 0 ] = KEY_RECORD,
185 [ 8 ] = KEY_STOP,
186 [ 17 ] = KEY_PLAY,
187
188 [ 26 ] = KEY_PLAYPAUSE, // freeze
189 [ 25 ] = KEY_ZOOM, // zoom
190 [ 15 ] = KEY_TEXT, // min
191
192 [ 1 ] = KEY_KP1,
193 [ 11 ] = KEY_KP2,
194 [ 27 ] = KEY_KP3,
195 [ 5 ] = KEY_KP4,
196 [ 9 ] = KEY_KP5,
197 [ 21 ] = KEY_KP6,
198 [ 6 ] = KEY_KP7,
199 [ 10 ] = KEY_KP8,
200 [ 18 ] = KEY_KP9,
201 [ 2 ] = KEY_KP0,
202 [ 16 ] = KEY_LAST, // +100
203 [ 19 ] = KEY_LIST, // recall
204
205 [ 31 ] = KEY_CHANNELUP, // chn down
206 [ 23 ] = KEY_CHANNELDOWN, // chn up
207 [ 22 ] = KEY_VOLUMEUP, // vol down
208 [ 20 ] = KEY_VOLUMEDOWN, // vol up
209
210 [ 4 ] = KEY_KPMINUS, // <<<
211 [ 14 ] = KEY_SETUP, // function
212 [ 12 ] = KEY_KPPLUS, // >>>
213
214 [ 13 ] = KEY_GOTO, // mts
215 [ 29 ] = KEY_REFRESH, // reset
216 [ 24 ] = KEY_MUTE // mute/unmute
217};
218
219static IR_KEYTAB_TYPE ir_codes_nebula[IR_KEYTAB_SIZE] = {
220 [0x00] = KEY_KP0,
221 [0x01] = KEY_KP1,
222 [0x02] = KEY_KP2,
223 [0x03] = KEY_KP3,
224 [0x04] = KEY_KP4,
225 [0x05] = KEY_KP5,
226 [0x06] = KEY_KP6,
227 [0x07] = KEY_KP7,
228 [0x08] = KEY_KP8,
229 [0x09] = KEY_KP9,
230 [0x0a] = KEY_TV,
231 [0x0b] = KEY_AUX,
232 [0x0c] = KEY_DVD,
233 [0x0d] = KEY_POWER,
234 [0x0e] = KEY_MHP, /* labelled 'Picture' */
235 [0x0f] = KEY_AUDIO,
236 [0x10] = KEY_INFO,
237 [0x11] = KEY_F13, /* 16:9 */
238 [0x12] = KEY_F14, /* 14:9 */
239 [0x13] = KEY_EPG,
240 [0x14] = KEY_EXIT,
241 [0x15] = KEY_MENU,
242 [0x16] = KEY_UP,
243 [0x17] = KEY_DOWN,
244 [0x18] = KEY_LEFT,
245 [0x19] = KEY_RIGHT,
246 [0x1a] = KEY_ENTER,
247 [0x1b] = KEY_CHANNELUP,
248 [0x1c] = KEY_CHANNELDOWN,
249 [0x1d] = KEY_VOLUMEUP,
250 [0x1e] = KEY_VOLUMEDOWN,
251 [0x1f] = KEY_RED,
252 [0x20] = KEY_GREEN,
253 [0x21] = KEY_YELLOW,
254 [0x22] = KEY_BLUE,
255 [0x23] = KEY_SUBTITLE,
256 [0x24] = KEY_F15, /* AD */
257 [0x25] = KEY_TEXT,
258 [0x26] = KEY_MUTE,
259 [0x27] = KEY_REWIND,
260 [0x28] = KEY_STOP,
261 [0x29] = KEY_PLAY,
262 [0x2a] = KEY_FASTFORWARD,
263 [0x2b] = KEY_F16, /* chapter */
264 [0x2c] = KEY_PAUSE,
265 [0x2d] = KEY_PLAY,
266 [0x2e] = KEY_RECORD,
267 [0x2f] = KEY_F17, /* picture in picture */
268 [0x30] = KEY_KPPLUS, /* zoom in */
269 [0x31] = KEY_KPMINUS, /* zoom out */
270 [0x32] = KEY_F18, /* capture */
271 [0x33] = KEY_F19, /* web */
272 [0x34] = KEY_EMAIL,
273 [0x35] = KEY_PHONE,
274 [0x36] = KEY_PC
275};
276 31
277static int debug; 32static int debug;
278module_param(debug, int, 0644); /* debug level (0,1,2) */ 33module_param(debug, int, 0644); /* debug level (0,1,2) */
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index da2ad5c4b553..a4fa92c1b0c7 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -34,337 +34,6 @@
34 34
35/* ---------------------------------------------------------------------- */ 35/* ---------------------------------------------------------------------- */
36 36
37/* DigitalNow DNTV Live DVB-T Remote */
38static IR_KEYTAB_TYPE ir_codes_dntv_live_dvb_t[IR_KEYTAB_SIZE] = {
39 [0x00] = KEY_ESC, /* 'go up a level?' */
40 /* Keys 0 to 9 */
41 [0x0a] = KEY_KP0,
42 [0x01] = KEY_KP1,
43 [0x02] = KEY_KP2,
44 [0x03] = KEY_KP3,
45 [0x04] = KEY_KP4,
46 [0x05] = KEY_KP5,
47 [0x06] = KEY_KP6,
48 [0x07] = KEY_KP7,
49 [0x08] = KEY_KP8,
50 [0x09] = KEY_KP9,
51
52 [0x0b] = KEY_TUNER, /* tv/fm */
53 [0x0c] = KEY_SEARCH, /* scan */
54 [0x0d] = KEY_STOP,
55 [0x0e] = KEY_PAUSE,
56 [0x0f] = KEY_LIST, /* source */
57
58 [0x10] = KEY_MUTE,
59 [0x11] = KEY_REWIND, /* backward << */
60 [0x12] = KEY_POWER,
61 [0x13] = KEY_S, /* snap */
62 [0x14] = KEY_AUDIO, /* stereo */
63 [0x15] = KEY_CLEAR, /* reset */
64 [0x16] = KEY_PLAY,
65 [0x17] = KEY_ENTER,
66 [0x18] = KEY_ZOOM, /* full screen */
67 [0x19] = KEY_FASTFORWARD, /* forward >> */
68 [0x1a] = KEY_CHANNELUP,
69 [0x1b] = KEY_VOLUMEUP,
70 [0x1c] = KEY_INFO, /* preview */
71 [0x1d] = KEY_RECORD, /* record */
72 [0x1e] = KEY_CHANNELDOWN,
73 [0x1f] = KEY_VOLUMEDOWN,
74};
75
76/* ---------------------------------------------------------------------- */
77
78/* IO-DATA BCTV7E Remote */
79static IR_KEYTAB_TYPE ir_codes_iodata_bctv7e[IR_KEYTAB_SIZE] = {
80 [0x40] = KEY_TV,
81 [0x20] = KEY_RADIO, /* FM */
82 [0x60] = KEY_EPG,
83 [0x00] = KEY_POWER,
84
85 /* Keys 0 to 9 */
86 [0x44] = KEY_KP0, /* 10 */
87 [0x50] = KEY_KP1,
88 [0x30] = KEY_KP2,
89 [0x70] = KEY_KP3,
90 [0x48] = KEY_KP4,
91 [0x28] = KEY_KP5,
92 [0x68] = KEY_KP6,
93 [0x58] = KEY_KP7,
94 [0x38] = KEY_KP8,
95 [0x78] = KEY_KP9,
96
97 [0x10] = KEY_L, /* Live */
98 [0x08] = KEY_T, /* Time Shift */
99
100 [0x18] = KEY_PLAYPAUSE, /* Play */
101
102 [0x24] = KEY_ENTER, /* 11 */
103 [0x64] = KEY_ESC, /* 12 */
104 [0x04] = KEY_M, /* Multi */
105
106 [0x54] = KEY_VIDEO,
107 [0x34] = KEY_CHANNELUP,
108 [0x74] = KEY_VOLUMEUP,
109 [0x14] = KEY_MUTE,
110
111 [0x4c] = KEY_S, /* SVIDEO */
112 [0x2c] = KEY_CHANNELDOWN,
113 [0x6c] = KEY_VOLUMEDOWN,
114 [0x0c] = KEY_ZOOM,
115
116 [0x5c] = KEY_PAUSE,
117 [0x3c] = KEY_C, /* || (red) */
118 [0x7c] = KEY_RECORD, /* recording */
119 [0x1c] = KEY_STOP,
120
121 [0x41] = KEY_REWIND, /* backward << */
122 [0x21] = KEY_PLAY,
123 [0x61] = KEY_FASTFORWARD, /* forward >> */
124 [0x01] = KEY_NEXT, /* skip >| */
125};
126
127/* ---------------------------------------------------------------------- */
128
129/* ADS Tech Instant TV DVB-T PCI Remote */
130static IR_KEYTAB_TYPE ir_codes_adstech_dvb_t_pci[IR_KEYTAB_SIZE] = {
131 /* Keys 0 to 9 */
132 [0x4d] = KEY_0,
133 [0x57] = KEY_1,
134 [0x4f] = KEY_2,
135 [0x53] = KEY_3,
136 [0x56] = KEY_4,
137 [0x4e] = KEY_5,
138 [0x5e] = KEY_6,
139 [0x54] = KEY_7,
140 [0x4c] = KEY_8,
141 [0x5c] = KEY_9,
142
143 [0x5b] = KEY_POWER,
144 [0x5f] = KEY_MUTE,
145 [0x55] = KEY_GOTO,
146 [0x5d] = KEY_SEARCH,
147 [0x17] = KEY_EPG, /* Guide */
148 [0x1f] = KEY_MENU,
149 [0x0f] = KEY_UP,
150 [0x46] = KEY_DOWN,
151 [0x16] = KEY_LEFT,
152 [0x1e] = KEY_RIGHT,
153 [0x0e] = KEY_SELECT, /* Enter */
154 [0x5a] = KEY_INFO,
155 [0x52] = KEY_EXIT,
156 [0x59] = KEY_PREVIOUS,
157 [0x51] = KEY_NEXT,
158 [0x58] = KEY_REWIND,
159 [0x50] = KEY_FORWARD,
160 [0x44] = KEY_PLAYPAUSE,
161 [0x07] = KEY_STOP,
162 [0x1b] = KEY_RECORD,
163 [0x13] = KEY_TUNER, /* Live */
164 [0x0a] = KEY_A,
165 [0x12] = KEY_B,
166 [0x03] = KEY_PROG1, /* 1 */
167 [0x01] = KEY_PROG2, /* 2 */
168 [0x00] = KEY_PROG3, /* 3 */
169 [0x06] = KEY_DVD,
170 [0x48] = KEY_AUX, /* Photo */
171 [0x40] = KEY_VIDEO,
172 [0x19] = KEY_AUDIO, /* Music */
173 [0x0b] = KEY_CHANNELUP,
174 [0x08] = KEY_CHANNELDOWN,
175 [0x15] = KEY_VOLUMEUP,
176 [0x1c] = KEY_VOLUMEDOWN,
177};
178
179/* ---------------------------------------------------------------------- */
180
181/* MSI TV@nywhere remote */
182static IR_KEYTAB_TYPE ir_codes_msi_tvanywhere[IR_KEYTAB_SIZE] = {
183 /* Keys 0 to 9 */
184 [0x00] = KEY_0,
185 [0x01] = KEY_1,
186 [0x02] = KEY_2,
187 [0x03] = KEY_3,
188 [0x04] = KEY_4,
189 [0x05] = KEY_5,
190 [0x06] = KEY_6,
191 [0x07] = KEY_7,
192 [0x08] = KEY_8,
193 [0x09] = KEY_9,
194
195 [0x0c] = KEY_MUTE,
196 [0x0f] = KEY_SCREEN, /* Full Screen */
197 [0x10] = KEY_F, /* Funtion */
198 [0x11] = KEY_T, /* Time shift */
199 [0x12] = KEY_POWER,
200 [0x13] = KEY_MEDIA, /* MTS */
201 [0x14] = KEY_SLOW,
202 [0x16] = KEY_REWIND, /* backward << */
203 [0x17] = KEY_ENTER, /* Return */
204 [0x18] = KEY_FASTFORWARD, /* forward >> */
205 [0x1a] = KEY_CHANNELUP,
206 [0x1b] = KEY_VOLUMEUP,
207 [0x1e] = KEY_CHANNELDOWN,
208 [0x1f] = KEY_VOLUMEDOWN,
209};
210
211/* ---------------------------------------------------------------------- */
212
213/* Cinergy 1400 DVB-T */
214static IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE] = {
215 [0x01] = KEY_POWER,
216 [0x02] = KEY_1,
217 [0x03] = KEY_2,
218 [0x04] = KEY_3,
219 [0x05] = KEY_4,
220 [0x06] = KEY_5,
221 [0x07] = KEY_6,
222 [0x08] = KEY_7,
223 [0x09] = KEY_8,
224 [0x0a] = KEY_9,
225 [0x0c] = KEY_0,
226
227 [0x0b] = KEY_VIDEO,
228 [0x0d] = KEY_REFRESH,
229 [0x0e] = KEY_SELECT,
230 [0x0f] = KEY_EPG,
231 [0x10] = KEY_UP,
232 [0x11] = KEY_LEFT,
233 [0x12] = KEY_OK,
234 [0x13] = KEY_RIGHT,
235 [0x14] = KEY_DOWN,
236 [0x15] = KEY_TEXT,
237 [0x16] = KEY_INFO,
238
239 [0x17] = KEY_RED,
240 [0x18] = KEY_GREEN,
241 [0x19] = KEY_YELLOW,
242 [0x1a] = KEY_BLUE,
243
244 [0x1b] = KEY_CHANNELUP,
245 [0x1c] = KEY_VOLUMEUP,
246 [0x1d] = KEY_MUTE,
247 [0x1e] = KEY_VOLUMEDOWN,
248 [0x1f] = KEY_CHANNELDOWN,
249
250 [0x40] = KEY_PAUSE,
251 [0x4c] = KEY_PLAY,
252 [0x58] = KEY_RECORD,
253 [0x54] = KEY_PREVIOUS,
254 [0x48] = KEY_STOP,
255 [0x5c] = KEY_NEXT,
256};
257
258/* ---------------------------------------------------------------------- */
259
260/* AVERTV STUDIO 303 Remote */
261static IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE] = {
262 [ 0x2a ] = KEY_KP1,
263 [ 0x32 ] = KEY_KP2,
264 [ 0x3a ] = KEY_KP3,
265 [ 0x4a ] = KEY_KP4,
266 [ 0x52 ] = KEY_KP5,
267 [ 0x5a ] = KEY_KP6,
268 [ 0x6a ] = KEY_KP7,
269 [ 0x72 ] = KEY_KP8,
270 [ 0x7a ] = KEY_KP9,
271 [ 0x0e ] = KEY_KP0,
272
273 [ 0x02 ] = KEY_POWER,
274 [ 0x22 ] = KEY_VIDEO,
275 [ 0x42 ] = KEY_AUDIO,
276 [ 0x62 ] = KEY_ZOOM,
277 [ 0x0a ] = KEY_TV,
278 [ 0x12 ] = KEY_CD,
279 [ 0x1a ] = KEY_TEXT,
280
281 [ 0x16 ] = KEY_SUBTITLE,
282 [ 0x1e ] = KEY_REWIND,
283 [ 0x06 ] = KEY_PRINT,
284
285 [ 0x2e ] = KEY_SEARCH,
286 [ 0x36 ] = KEY_SLEEP,
287 [ 0x3e ] = KEY_SHUFFLE,
288 [ 0x26 ] = KEY_MUTE,
289
290 [ 0x4e ] = KEY_RECORD,
291 [ 0x56 ] = KEY_PAUSE,
292 [ 0x5e ] = KEY_STOP,
293 [ 0x46 ] = KEY_PLAY,
294
295 [ 0x6e ] = KEY_RED,
296 [ 0x0b ] = KEY_GREEN,
297 [ 0x66 ] = KEY_YELLOW,
298 [ 0x03 ] = KEY_BLUE,
299
300 [ 0x76 ] = KEY_LEFT,
301 [ 0x7e ] = KEY_RIGHT,
302 [ 0x13 ] = KEY_DOWN,
303 [ 0x1b ] = KEY_UP,
304};
305
306/* ---------------------------------------------------------------------- */
307
308/* DigitalNow DNTV Live! DVB-T Pro Remote */
309static IR_KEYTAB_TYPE ir_codes_dntv_live_dvbt_pro[IR_KEYTAB_SIZE] = {
310 [ 0x16 ] = KEY_POWER,
311 [ 0x5b ] = KEY_HOME,
312
313 [ 0x55 ] = KEY_TV, /* live tv */
314 [ 0x58 ] = KEY_TUNER, /* digital Radio */
315 [ 0x5a ] = KEY_RADIO, /* FM radio */
316 [ 0x59 ] = KEY_DVD, /* dvd menu */
317 [ 0x03 ] = KEY_1,
318 [ 0x01 ] = KEY_2,
319 [ 0x06 ] = KEY_3,
320 [ 0x09 ] = KEY_4,
321 [ 0x1d ] = KEY_5,
322 [ 0x1f ] = KEY_6,
323 [ 0x0d ] = KEY_7,
324 [ 0x19 ] = KEY_8,
325 [ 0x1b ] = KEY_9,
326 [ 0x0c ] = KEY_CANCEL,
327 [ 0x15 ] = KEY_0,
328 [ 0x4a ] = KEY_CLEAR,
329 [ 0x13 ] = KEY_BACK,
330 [ 0x00 ] = KEY_TAB,
331 [ 0x4b ] = KEY_UP,
332 [ 0x4e ] = KEY_LEFT,
333 [ 0x4f ] = KEY_OK,
334 [ 0x52 ] = KEY_RIGHT,
335 [ 0x51 ] = KEY_DOWN,
336 [ 0x1e ] = KEY_VOLUMEUP,
337 [ 0x0a ] = KEY_VOLUMEDOWN,
338 [ 0x02 ] = KEY_CHANNELDOWN,
339 [ 0x05 ] = KEY_CHANNELUP,
340 [ 0x11 ] = KEY_RECORD,
341 [ 0x14 ] = KEY_PLAY,
342 [ 0x4c ] = KEY_PAUSE,
343 [ 0x1a ] = KEY_STOP,
344 [ 0x40 ] = KEY_REWIND,
345 [ 0x12 ] = KEY_FASTFORWARD,
346 [ 0x41 ] = KEY_PREVIOUSSONG, /* replay |< */
347 [ 0x42 ] = KEY_NEXTSONG, /* skip >| */
348 [ 0x54 ] = KEY_CAMERA, /* capture */
349 [ 0x50 ] = KEY_LANGUAGE, /* sap */
350 [ 0x47 ] = KEY_TV2, /* pip */
351 [ 0x4d ] = KEY_SCREEN,
352 [ 0x43 ] = KEY_SUBTITLE,
353 [ 0x10 ] = KEY_MUTE,
354 [ 0x49 ] = KEY_AUDIO, /* l/r */
355 [ 0x07 ] = KEY_SLEEP,
356 [ 0x08 ] = KEY_VIDEO, /* a/v */
357 [ 0x0e ] = KEY_PREVIOUS, /* recall */
358 [ 0x45 ] = KEY_ZOOM, /* zoom + */
359 [ 0x46 ] = KEY_ANGLE, /* zoom - */
360 [ 0x56 ] = KEY_RED,
361 [ 0x57 ] = KEY_GREEN,
362 [ 0x5c ] = KEY_YELLOW,
363 [ 0x5d ] = KEY_BLUE,
364};
365
366/* ---------------------------------------------------------------------- */
367
368struct cx88_IR { 37struct cx88_IR {
369 struct cx88_core *core; 38 struct cx88_core *core;
370 struct input_dev *input; 39 struct input_dev *input;
diff --git a/drivers/media/video/em28xx/em28xx-input.c b/drivers/media/video/em28xx/em28xx-input.c
index 30dfa5370c73..31e89e4f18be 100644
--- a/drivers/media/video/em28xx/em28xx-input.c
+++ b/drivers/media/video/em28xx/em28xx-input.c
@@ -43,91 +43,6 @@ MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]");
43#define dprintk(fmt, arg...) if (ir_debug) \ 43#define dprintk(fmt, arg...) if (ir_debug) \
44 printk(KERN_DEBUG "%s/ir: " fmt, ir->c.name , ## arg) 44 printk(KERN_DEBUG "%s/ir: " fmt, ir->c.name , ## arg)
45 45
46/* ---------------------------------------------------------------------- */
47
48static IR_KEYTAB_TYPE ir_codes_em_terratec[IR_KEYTAB_SIZE] = {
49 [ 0x01 ] = KEY_CHANNEL,
50 [ 0x02 ] = KEY_SELECT,
51 [ 0x03 ] = KEY_MUTE,
52 [ 0x04 ] = KEY_POWER,
53 [ 0x05 ] = KEY_KP1,
54 [ 0x06 ] = KEY_KP2,
55 [ 0x07 ] = KEY_KP3,
56 [ 0x08 ] = KEY_CHANNELUP,
57 [ 0x09 ] = KEY_KP4,
58 [ 0x0a ] = KEY_KP5,
59 [ 0x0b ] = KEY_KP6,
60 [ 0x0c ] = KEY_CHANNELDOWN,
61 [ 0x0d ] = KEY_KP7,
62 [ 0x0e ] = KEY_KP8,
63 [ 0x0f ] = KEY_KP9,
64 [ 0x10 ] = KEY_VOLUMEUP,
65 [ 0x11 ] = KEY_KP0,
66 [ 0x12 ] = KEY_MENU,
67 [ 0x13 ] = KEY_PRINT,
68 [ 0x14 ] = KEY_VOLUMEDOWN,
69 [ 0x16 ] = KEY_PAUSE,
70 [ 0x18 ] = KEY_RECORD,
71 [ 0x19 ] = KEY_REWIND,
72 [ 0x1a ] = KEY_PLAY,
73 [ 0x1b ] = KEY_FORWARD,
74 [ 0x1c ] = KEY_BACKSPACE,
75 [ 0x1e ] = KEY_STOP,
76 [ 0x40 ] = KEY_ZOOM,
77};
78
79static IR_KEYTAB_TYPE ir_codes_em_pinnacle_usb[IR_KEYTAB_SIZE] = {
80 [ 0x3a ] = KEY_KP0,
81 [ 0x31 ] = KEY_KP1,
82 [ 0x32 ] = KEY_KP2,
83 [ 0x33 ] = KEY_KP3,
84 [ 0x34 ] = KEY_KP4,
85 [ 0x35 ] = KEY_KP5,
86 [ 0x36 ] = KEY_KP6,
87 [ 0x37 ] = KEY_KP7,
88 [ 0x38 ] = KEY_KP8,
89 [ 0x39 ] = KEY_KP9,
90
91 [ 0x2f ] = KEY_POWER,
92
93 [ 0x2e ] = KEY_P,
94 [ 0x1f ] = KEY_L,
95 [ 0x2b ] = KEY_I,
96
97 [ 0x2d ] = KEY_ZOOM,
98 [ 0x1e ] = KEY_ZOOM,
99 [ 0x1b ] = KEY_VOLUMEUP,
100 [ 0x0f ] = KEY_VOLUMEDOWN,
101 [ 0x17 ] = KEY_CHANNELUP,
102 [ 0x1c ] = KEY_CHANNELDOWN,
103 [ 0x25 ] = KEY_INFO,
104
105 [ 0x3c ] = KEY_MUTE,
106
107 [ 0x3d ] = KEY_LEFT,
108 [ 0x3b ] = KEY_RIGHT,
109
110 [ 0x3f ] = KEY_UP,
111 [ 0x3e ] = KEY_DOWN,
112 [ 0x1a ] = KEY_PAUSE,
113
114 [ 0x1d ] = KEY_MENU,
115 [ 0x19 ] = KEY_PLAY,
116 [ 0x16 ] = KEY_REWIND,
117 [ 0x13 ] = KEY_FORWARD,
118 [ 0x15 ] = KEY_PAUSE,
119 [ 0x0e ] = KEY_REWIND,
120 [ 0x0d ] = KEY_PLAY,
121 [ 0x0b ] = KEY_STOP,
122 [ 0x07 ] = KEY_FORWARD,
123 [ 0x27 ] = KEY_RECORD,
124 [ 0x26 ] = KEY_TUNER,
125 [ 0x29 ] = KEY_TEXT,
126 [ 0x2a ] = KEY_MEDIA,
127 [ 0x18 ] = KEY_EPG,
128 [ 0x27 ] = KEY_RECORD,
129};
130
131/* ----------------------------------------------------------------------- */ 46/* ----------------------------------------------------------------------- */
132 47
133static int get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw) 48static int get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
diff --git a/drivers/media/video/ir-kbd-i2c.c b/drivers/media/video/ir-kbd-i2c.c
index 3963481b3130..95bacf435414 100644
--- a/drivers/media/video/ir-kbd-i2c.c
+++ b/drivers/media/video/ir-kbd-i2c.c
@@ -44,45 +44,6 @@
44#include <media/ir-common.h> 44#include <media/ir-common.h>
45#include <media/ir-kbd-i2c.h> 45#include <media/ir-kbd-i2c.h>
46 46
47/* Mark Phalan <phalanm@o2.ie> */
48static IR_KEYTAB_TYPE ir_codes_pv951[IR_KEYTAB_SIZE] = {
49 [ 0 ] = KEY_KP0,
50 [ 1 ] = KEY_KP1,
51 [ 2 ] = KEY_KP2,
52 [ 3 ] = KEY_KP3,
53 [ 4 ] = KEY_KP4,
54 [ 5 ] = KEY_KP5,
55 [ 6 ] = KEY_KP6,
56 [ 7 ] = KEY_KP7,
57 [ 8 ] = KEY_KP8,
58 [ 9 ] = KEY_KP9,
59
60 [ 18 ] = KEY_POWER,
61 [ 16 ] = KEY_MUTE,
62 [ 31 ] = KEY_VOLUMEDOWN,
63 [ 27 ] = KEY_VOLUMEUP,
64 [ 26 ] = KEY_CHANNELUP,
65 [ 30 ] = KEY_CHANNELDOWN,
66 [ 14 ] = KEY_PAGEUP,
67 [ 29 ] = KEY_PAGEDOWN,
68 [ 19 ] = KEY_SOUND,
69
70 [ 24 ] = KEY_KPPLUSMINUS, /* CH +/- */
71 [ 22 ] = KEY_SUBTITLE, /* CC */
72 [ 13 ] = KEY_TEXT, /* TTX */
73 [ 11 ] = KEY_TV, /* AIR/CBL */
74 [ 17 ] = KEY_PC, /* PC/TV */
75 [ 23 ] = KEY_OK, /* CH RTN */
76 [ 25 ] = KEY_MODE, /* FUNC */
77 [ 12 ] = KEY_SEARCH, /* AUTOSCAN */
78
79 /* Not sure what to do with these ones! */
80 [ 15 ] = KEY_SELECT, /* SOURCE */
81 [ 10 ] = KEY_KPPLUS, /* +100 */
82 [ 20 ] = KEY_KPEQUAL, /* SYNC */
83 [ 28 ] = KEY_MEDIA, /* PC/TV */
84};
85
86/* ----------------------------------------------------------------------- */ 47/* ----------------------------------------------------------------------- */
87/* insmod parameters */ 48/* insmod parameters */
88 49
@@ -342,7 +303,7 @@ static int ir_attach(struct i2c_adapter *adap, int addr,
342 ir->get_key = get_key_haup; 303 ir->get_key = get_key_haup;
343 ir_type = IR_TYPE_RC5; 304 ir_type = IR_TYPE_RC5;
344 if (hauppauge == 1) { 305 if (hauppauge == 1) {
345 ir_codes = ir_codes_rc5_tv_grey; 306 ir_codes = ir_codes_hauppauge_new;
346 } else { 307 } else {
347 ir_codes = ir_codes_rc5_tv; 308 ir_codes = ir_codes_rc5_tv;
348 } 309 }
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c
index 82d28cbf289f..342568cf728f 100644
--- a/drivers/media/video/saa7134/saa7134-input.c
+++ b/drivers/media/video/saa7134/saa7134-input.c
@@ -42,485 +42,6 @@ MODULE_PARM_DESC(ir_debug,"enable debug messages [IR]");
42#define i2cdprintk(fmt, arg...) if (ir_debug) \ 42#define i2cdprintk(fmt, arg...) if (ir_debug) \
43 printk(KERN_DEBUG "%s/ir: " fmt, ir->c.name , ## arg) 43 printk(KERN_DEBUG "%s/ir: " fmt, ir->c.name , ## arg)
44 44
45/* ---------------------------------------------------------------------- */
46
47static IR_KEYTAB_TYPE flyvideo_codes[IR_KEYTAB_SIZE] = {
48 [ 15 ] = KEY_KP0,
49 [ 3 ] = KEY_KP1,
50 [ 4 ] = KEY_KP2,
51 [ 5 ] = KEY_KP3,
52 [ 7 ] = KEY_KP4,
53 [ 8 ] = KEY_KP5,
54 [ 9 ] = KEY_KP6,
55 [ 11 ] = KEY_KP7,
56 [ 12 ] = KEY_KP8,
57 [ 13 ] = KEY_KP9,
58
59 [ 14 ] = KEY_MODE, // Air/Cable
60 [ 17 ] = KEY_VIDEO, // Video
61 [ 21 ] = KEY_AUDIO, // Audio
62 [ 0 ] = KEY_POWER, // Power
63 [ 24 ] = KEY_TUNER, // AV Source
64 [ 2 ] = KEY_ZOOM, // Fullscreen
65 [ 26 ] = KEY_LANGUAGE, // Stereo
66 [ 27 ] = KEY_MUTE, // Mute
67 [ 20 ] = KEY_VOLUMEUP, // Volume +
68 [ 23 ] = KEY_VOLUMEDOWN, // Volume -
69 [ 18 ] = KEY_CHANNELUP, // Channel +
70 [ 19 ] = KEY_CHANNELDOWN, // Channel -
71 [ 6 ] = KEY_AGAIN, // Recall
72 [ 16 ] = KEY_ENTER, // Enter
73};
74
75
76static IR_KEYTAB_TYPE cinergy_codes[IR_KEYTAB_SIZE] = {
77 [ 0 ] = KEY_KP0,
78 [ 1 ] = KEY_KP1,
79 [ 2 ] = KEY_KP2,
80 [ 3 ] = KEY_KP3,
81 [ 4 ] = KEY_KP4,
82 [ 5 ] = KEY_KP5,
83 [ 6 ] = KEY_KP6,
84 [ 7 ] = KEY_KP7,
85 [ 8 ] = KEY_KP8,
86 [ 9 ] = KEY_KP9,
87
88 [ 0x0a ] = KEY_POWER,
89 [ 0x0b ] = KEY_PROG1, // app
90 [ 0x0c ] = KEY_ZOOM, // zoom/fullscreen
91 [ 0x0d ] = KEY_CHANNELUP, // channel
92 [ 0x0e ] = KEY_CHANNELDOWN, // channel-
93 [ 0x0f ] = KEY_VOLUMEUP,
94 [ 0x10 ] = KEY_VOLUMEDOWN,
95 [ 0x11 ] = KEY_TUNER, // AV
96 [ 0x12 ] = KEY_NUMLOCK, // -/--
97 [ 0x13 ] = KEY_AUDIO, // audio
98 [ 0x14 ] = KEY_MUTE,
99 [ 0x15 ] = KEY_UP,
100 [ 0x16 ] = KEY_DOWN,
101 [ 0x17 ] = KEY_LEFT,
102 [ 0x18 ] = KEY_RIGHT,
103 [ 0x19 ] = BTN_LEFT,
104 [ 0x1a ] = BTN_RIGHT,
105 [ 0x1b ] = KEY_WWW, // text
106 [ 0x1c ] = KEY_REWIND,
107 [ 0x1d ] = KEY_FORWARD,
108 [ 0x1e ] = KEY_RECORD,
109 [ 0x1f ] = KEY_PLAY,
110 [ 0x20 ] = KEY_PREVIOUSSONG,
111 [ 0x21 ] = KEY_NEXTSONG,
112 [ 0x22 ] = KEY_PAUSE,
113 [ 0x23 ] = KEY_STOP,
114};
115
116/* Alfons Geser <a.geser@cox.net>
117 * updates from Job D. R. Borges <jobdrb@ig.com.br> */
118static IR_KEYTAB_TYPE eztv_codes[IR_KEYTAB_SIZE] = {
119 [ 18 ] = KEY_POWER,
120 [ 1 ] = KEY_TV, // DVR
121 [ 21 ] = KEY_DVD, // DVD
122 [ 23 ] = KEY_AUDIO, // music
123 // DVR mode / DVD mode / music mode
124
125 [ 27 ] = KEY_MUTE, // mute
126 [ 2 ] = KEY_LANGUAGE, // MTS/SAP / audio / autoseek
127 [ 30 ] = KEY_SUBTITLE, // closed captioning / subtitle / seek
128 [ 22 ] = KEY_ZOOM, // full screen
129 [ 28 ] = KEY_VIDEO, // video source / eject / delall
130 [ 29 ] = KEY_RESTART, // playback / angle / del
131 [ 47 ] = KEY_SEARCH, // scan / menu / playlist
132 [ 48 ] = KEY_CHANNEL, // CH surfing / bookmark / memo
133
134 [ 49 ] = KEY_HELP, // help
135 [ 50 ] = KEY_MODE, // num/memo
136 [ 51 ] = KEY_ESC, // cancel
137
138 [ 12 ] = KEY_UP, // up
139 [ 16 ] = KEY_DOWN, // down
140 [ 8 ] = KEY_LEFT, // left
141 [ 4 ] = KEY_RIGHT, // right
142 [ 3 ] = KEY_SELECT, // select
143
144 [ 31 ] = KEY_REWIND, // rewind
145 [ 32 ] = KEY_PLAYPAUSE, // play/pause
146 [ 41 ] = KEY_FORWARD, // forward
147 [ 20 ] = KEY_AGAIN, // repeat
148 [ 43 ] = KEY_RECORD, // recording
149 [ 44 ] = KEY_STOP, // stop
150 [ 45 ] = KEY_PLAY, // play
151 [ 46 ] = KEY_SHUFFLE, // snapshot / shuffle
152
153 [ 0 ] = KEY_KP0,
154 [ 5 ] = KEY_KP1,
155 [ 6 ] = KEY_KP2,
156 [ 7 ] = KEY_KP3,
157 [ 9 ] = KEY_KP4,
158 [ 10 ] = KEY_KP5,
159 [ 11 ] = KEY_KP6,
160 [ 13 ] = KEY_KP7,
161 [ 14 ] = KEY_KP8,
162 [ 15 ] = KEY_KP9,
163
164 [ 42 ] = KEY_VOLUMEUP,
165 [ 17 ] = KEY_VOLUMEDOWN,
166 [ 24 ] = KEY_CHANNELUP, // CH.tracking up
167 [ 25 ] = KEY_CHANNELDOWN, // CH.tracking down
168
169 [ 19 ] = KEY_KPENTER, // enter
170 [ 33 ] = KEY_KPDOT, // . (decimal dot)
171};
172
173static IR_KEYTAB_TYPE avacssmart_codes[IR_KEYTAB_SIZE] = {
174 [ 30 ] = KEY_POWER, // power
175 [ 28 ] = KEY_SEARCH, // scan
176 [ 7 ] = KEY_SELECT, // source
177
178 [ 22 ] = KEY_VOLUMEUP,
179 [ 20 ] = KEY_VOLUMEDOWN,
180 [ 31 ] = KEY_CHANNELUP,
181 [ 23 ] = KEY_CHANNELDOWN,
182 [ 24 ] = KEY_MUTE,
183
184 [ 2 ] = KEY_KP0,
185 [ 1 ] = KEY_KP1,
186 [ 11 ] = KEY_KP2,
187 [ 27 ] = KEY_KP3,
188 [ 5 ] = KEY_KP4,
189 [ 9 ] = KEY_KP5,
190 [ 21 ] = KEY_KP6,
191 [ 6 ] = KEY_KP7,
192 [ 10 ] = KEY_KP8,
193 [ 18 ] = KEY_KP9,
194 [ 16 ] = KEY_KPDOT,
195
196 [ 3 ] = KEY_TUNER, // tv/fm
197 [ 4 ] = KEY_REWIND, // fm tuning left or function left
198 [ 12 ] = KEY_FORWARD, // fm tuning right or function right
199
200 [ 0 ] = KEY_RECORD,
201 [ 8 ] = KEY_STOP,
202 [ 17 ] = KEY_PLAY,
203
204 [ 25 ] = KEY_ZOOM,
205 [ 14 ] = KEY_MENU, // function
206 [ 19 ] = KEY_AGAIN, // recall
207 [ 29 ] = KEY_RESTART, // reset
208 [ 26 ] = KEY_SHUFFLE, // snapshot/shuffle
209
210// FIXME
211 [ 13 ] = KEY_F21, // mts
212 [ 15 ] = KEY_F22, // min
213};
214
215/* Alex Hermann <gaaf@gmx.net> */
216static IR_KEYTAB_TYPE md2819_codes[IR_KEYTAB_SIZE] = {
217 [ 40 ] = KEY_KP1,
218 [ 24 ] = KEY_KP2,
219 [ 56 ] = KEY_KP3,
220 [ 36 ] = KEY_KP4,
221 [ 20 ] = KEY_KP5,
222 [ 52 ] = KEY_KP6,
223 [ 44 ] = KEY_KP7,
224 [ 28 ] = KEY_KP8,
225 [ 60 ] = KEY_KP9,
226 [ 34 ] = KEY_KP0,
227
228 [ 32 ] = KEY_TV, // TV/FM
229 [ 16 ] = KEY_CD, // CD
230 [ 48 ] = KEY_TEXT, // TELETEXT
231 [ 0 ] = KEY_POWER, // POWER
232
233 [ 8 ] = KEY_VIDEO, // VIDEO
234 [ 4 ] = KEY_AUDIO, // AUDIO
235 [ 12 ] = KEY_ZOOM, // FULL SCREEN
236
237 [ 18 ] = KEY_SUBTITLE, // DISPLAY - ???
238 [ 50 ] = KEY_REWIND, // LOOP - ???
239 [ 2 ] = KEY_PRINT, // PREVIEW - ???
240
241 [ 42 ] = KEY_SEARCH, // AUTOSCAN
242 [ 26 ] = KEY_SLEEP, // FREEZE - ???
243 [ 58 ] = KEY_SHUFFLE, // SNAPSHOT - ???
244 [ 10 ] = KEY_MUTE, // MUTE
245
246 [ 38 ] = KEY_RECORD, // RECORD
247 [ 22 ] = KEY_PAUSE, // PAUSE
248 [ 54 ] = KEY_STOP, // STOP
249 [ 6 ] = KEY_PLAY, // PLAY
250
251 [ 46 ] = KEY_RED, // <RED>
252 [ 33 ] = KEY_GREEN, // <GREEN>
253 [ 14 ] = KEY_YELLOW, // <YELLOW>
254 [ 1 ] = KEY_BLUE, // <BLUE>
255
256 [ 30 ] = KEY_VOLUMEDOWN, // VOLUME-
257 [ 62 ] = KEY_VOLUMEUP, // VOLUME+
258 [ 17 ] = KEY_CHANNELDOWN, // CHANNEL/PAGE-
259 [ 49 ] = KEY_CHANNELUP // CHANNEL/PAGE+
260};
261
262static IR_KEYTAB_TYPE videomate_tv_pvr_codes[IR_KEYTAB_SIZE] = {
263 [ 20 ] = KEY_MUTE,
264 [ 36 ] = KEY_ZOOM,
265
266 [ 1 ] = KEY_DVD,
267 [ 35 ] = KEY_RADIO,
268 [ 0 ] = KEY_TV,
269
270 [ 10 ] = KEY_REWIND,
271 [ 8 ] = KEY_PLAYPAUSE,
272 [ 15 ] = KEY_FORWARD,
273
274 [ 2 ] = KEY_PREVIOUS,
275 [ 7 ] = KEY_STOP,
276 [ 6 ] = KEY_NEXT,
277
278 [ 12 ] = KEY_UP,
279 [ 14 ] = KEY_DOWN,
280 [ 11 ] = KEY_LEFT,
281 [ 13 ] = KEY_RIGHT,
282 [ 17 ] = KEY_OK,
283
284 [ 3 ] = KEY_MENU,
285 [ 9 ] = KEY_SETUP,
286 [ 5 ] = KEY_VIDEO,
287 [ 34 ] = KEY_CHANNEL,
288
289 [ 18 ] = KEY_VOLUMEUP,
290 [ 21 ] = KEY_VOLUMEDOWN,
291 [ 16 ] = KEY_CHANNELUP,
292 [ 19 ] = KEY_CHANNELDOWN,
293
294 [ 4 ] = KEY_RECORD,
295
296 [ 22 ] = KEY_KP1,
297 [ 23 ] = KEY_KP2,
298 [ 24 ] = KEY_KP3,
299 [ 25 ] = KEY_KP4,
300 [ 26 ] = KEY_KP5,
301 [ 27 ] = KEY_KP6,
302 [ 28 ] = KEY_KP7,
303 [ 29 ] = KEY_KP8,
304 [ 30 ] = KEY_KP9,
305 [ 31 ] = KEY_KP0,
306
307 [ 32 ] = KEY_LANGUAGE,
308 [ 33 ] = KEY_SLEEP,
309};
310
311/* Michael Tokarev <mjt@tls.msk.ru>
312 http://www.corpit.ru/mjt/beholdTV/remote_control.jpg
313 keytable is used by MANLI MTV00[12] and BeholdTV 40[13] at
314 least, and probably other cards too.
315 The "ascii-art picture" below (in comments, first row
316 is the keycode in hex, and subsequent row(s) shows
317 the button labels (several variants when appropriate)
318 helps to descide which keycodes to assign to the buttons.
319 */
320static IR_KEYTAB_TYPE manli_codes[IR_KEYTAB_SIZE] = {
321
322 /* 0x1c 0x12 *
323 * FUNCTION POWER *
324 * FM (|) *
325 * */
326 [ 0x1c ] = KEY_RADIO, /*XXX*/
327 [ 0x12 ] = KEY_POWER,
328
329 /* 0x01 0x02 0x03 *
330 * 1 2 3 *
331 * *
332 * 0x04 0x05 0x06 *
333 * 4 5 6 *
334 * *
335 * 0x07 0x08 0x09 *
336 * 7 8 9 *
337 * */
338 [ 0x01 ] = KEY_KP1,
339 [ 0x02 ] = KEY_KP2,
340 [ 0x03 ] = KEY_KP3,
341 [ 0x04 ] = KEY_KP4,
342 [ 0x05 ] = KEY_KP5,
343 [ 0x06 ] = KEY_KP6,
344 [ 0x07 ] = KEY_KP7,
345 [ 0x08 ] = KEY_KP8,
346 [ 0x09 ] = KEY_KP9,
347
348 /* 0x0a 0x00 0x17 *
349 * RECALL 0 +100 *
350 * PLUS *
351 * */
352 [ 0x0a ] = KEY_AGAIN, /*XXX KEY_REWIND? */
353 [ 0x00 ] = KEY_KP0,
354 [ 0x17 ] = KEY_DIGITS, /*XXX*/
355
356 /* 0x14 0x10 *
357 * MENU INFO *
358 * OSD */
359 [ 0x14 ] = KEY_MENU,
360 [ 0x10 ] = KEY_INFO,
361
362 /* 0x0b *
363 * Up *
364 * *
365 * 0x18 0x16 0x0c *
366 * Left Ok Right *
367 * *
368 * 0x015 *
369 * Down *
370 * */
371 [ 0x0b ] = KEY_UP, /*XXX KEY_SCROLLUP? */
372 [ 0x18 ] = KEY_LEFT, /*XXX KEY_BACK? */
373 [ 0x16 ] = KEY_OK, /*XXX KEY_SELECT? KEY_ENTER? */
374 [ 0x0c ] = KEY_RIGHT, /*XXX KEY_FORWARD? */
375 [ 0x15 ] = KEY_DOWN, /*XXX KEY_SCROLLDOWN? */
376
377 /* 0x11 0x0d *
378 * TV/AV MODE *
379 * SOURCE STEREO *
380 * */
381 [ 0x11 ] = KEY_TV, /*XXX*/
382 [ 0x0d ] = KEY_MODE, /*XXX there's no KEY_STEREO */
383
384 /* 0x0f 0x1b 0x1a *
385 * AUDIO Vol+ Chan+ *
386 * TIMESHIFT??? *
387 * *
388 * 0x0e 0x1f 0x1e *
389 * SLEEP Vol- Chan- *
390 * */
391 [ 0x0f ] = KEY_AUDIO,
392 [ 0x1b ] = KEY_VOLUMEUP,
393 [ 0x1a ] = KEY_CHANNELUP,
394 [ 0x0e ] = KEY_SLEEP, /*XXX maybe KEY_PAUSE */
395 [ 0x1f ] = KEY_VOLUMEDOWN,
396 [ 0x1e ] = KEY_CHANNELDOWN,
397
398 /* 0x13 0x19 *
399 * MUTE SNAPSHOT*
400 * */
401 [ 0x13 ] = KEY_MUTE,
402 [ 0x19 ] = KEY_RECORD, /*XXX*/
403
404 // 0x1d unused ?
405};
406
407
408/* Mike Baikov <mike@baikov.com> */
409static IR_KEYTAB_TYPE gotview7135_codes[IR_KEYTAB_SIZE] = {
410
411 [ 33 ] = KEY_POWER,
412 [ 105] = KEY_TV,
413 [ 51 ] = KEY_KP0,
414 [ 81 ] = KEY_KP1,
415 [ 49 ] = KEY_KP2,
416 [ 113] = KEY_KP3,
417 [ 59 ] = KEY_KP4,
418 [ 88 ] = KEY_KP5,
419 [ 65 ] = KEY_KP6,
420 [ 72 ] = KEY_KP7,
421 [ 48 ] = KEY_KP8,
422 [ 83 ] = KEY_KP9,
423 [ 115] = KEY_AGAIN, /* LOOP */
424 [ 10 ] = KEY_AUDIO,
425 [ 97 ] = KEY_PRINT, /* PREVIEW */
426 [ 122] = KEY_VIDEO,
427 [ 32 ] = KEY_CHANNELUP,
428 [ 64 ] = KEY_CHANNELDOWN,
429 [ 24 ] = KEY_VOLUMEDOWN,
430 [ 80 ] = KEY_VOLUMEUP,
431 [ 16 ] = KEY_MUTE,
432 [ 74 ] = KEY_SEARCH,
433 [ 123] = KEY_SHUFFLE, /* SNAPSHOT */
434 [ 34 ] = KEY_RECORD,
435 [ 98 ] = KEY_STOP,
436 [ 120] = KEY_PLAY,
437 [ 57 ] = KEY_REWIND,
438 [ 89 ] = KEY_PAUSE,
439 [ 25 ] = KEY_FORWARD,
440 [ 9 ] = KEY_ZOOM,
441
442 [ 82 ] = KEY_F21, /* LIVE TIMESHIFT */
443 [ 26 ] = KEY_F22, /* MIN TIMESHIFT */
444 [ 58 ] = KEY_F23, /* TIMESHIFT */
445 [ 112] = KEY_F24, /* NORMAL TIMESHIFT */
446};
447
448static IR_KEYTAB_TYPE ir_codes_purpletv[IR_KEYTAB_SIZE] = {
449 [ 0x3 ] = KEY_POWER,
450 [ 0x6f ] = KEY_MUTE,
451 [ 0x10 ] = KEY_BACKSPACE, /* Recall */
452
453 [ 0x11 ] = KEY_KP0,
454 [ 0x4 ] = KEY_KP1,
455 [ 0x5 ] = KEY_KP2,
456 [ 0x6 ] = KEY_KP3,
457 [ 0x8 ] = KEY_KP4,
458 [ 0x9 ] = KEY_KP5,
459 [ 0xa ] = KEY_KP6,
460 [ 0xc ] = KEY_KP7,
461 [ 0xd ] = KEY_KP8,
462 [ 0xe ] = KEY_KP9,
463 [ 0x12 ] = KEY_KPDOT, /* 100+ */
464
465 [ 0x7 ] = KEY_VOLUMEUP,
466 [ 0xb ] = KEY_VOLUMEDOWN,
467 [ 0x1a ] = KEY_KPPLUS,
468 [ 0x18 ] = KEY_KPMINUS,
469 [ 0x15 ] = KEY_UP,
470 [ 0x1d ] = KEY_DOWN,
471 [ 0xf ] = KEY_CHANNELUP,
472 [ 0x13 ] = KEY_CHANNELDOWN,
473 [ 0x48 ] = KEY_ZOOM,
474
475 [ 0x1b ] = KEY_VIDEO, /* Video source */
476 [ 0x49 ] = KEY_LANGUAGE, /* MTS Select */
477 [ 0x19 ] = KEY_SEARCH, /* Auto Scan */
478
479 [ 0x4b ] = KEY_RECORD,
480 [ 0x46 ] = KEY_PLAY,
481 [ 0x45 ] = KEY_PAUSE, /* Pause */
482 [ 0x44 ] = KEY_STOP,
483 [ 0x40 ] = KEY_FORWARD, /* Forward ? */
484 [ 0x42 ] = KEY_REWIND, /* Backward ? */
485
486};
487
488/* Mapping for the 28 key remote control as seen at
489 http://www.sednacomputer.com/photo/cardbus-tv.jpg
490 Pavel Mihaylov <bin@bash.info> */
491static IR_KEYTAB_TYPE pctv_sedna_codes[IR_KEYTAB_SIZE] = {
492 [ 0 ] = KEY_KP0,
493 [ 1 ] = KEY_KP1,
494 [ 2 ] = KEY_KP2,
495 [ 3 ] = KEY_KP3,
496 [ 4 ] = KEY_KP4,
497 [ 5 ] = KEY_KP5,
498 [ 6 ] = KEY_KP6,
499 [ 7 ] = KEY_KP7,
500 [ 8 ] = KEY_KP8,
501 [ 9 ] = KEY_KP9,
502
503 [ 0x0a ] = KEY_AGAIN, /* Recall */
504 [ 0x0b ] = KEY_CHANNELUP,
505 [ 0x0c ] = KEY_VOLUMEUP,
506 [ 0x0d ] = KEY_MODE, /* Stereo */
507 [ 0x0e ] = KEY_STOP,
508 [ 0x0f ] = KEY_PREVIOUSSONG,
509 [ 0x10 ] = KEY_ZOOM,
510 [ 0x11 ] = KEY_TUNER, /* Source */
511 [ 0x12 ] = KEY_POWER,
512 [ 0x13 ] = KEY_MUTE,
513 [ 0x15 ] = KEY_CHANNELDOWN,
514 [ 0x18 ] = KEY_VOLUMEDOWN,
515 [ 0x19 ] = KEY_SHUFFLE, /* Snapshot */
516 [ 0x1a ] = KEY_NEXTSONG,
517 [ 0x1b ] = KEY_TEXT, /* Time Shift */
518 [ 0x1c ] = KEY_RADIO, /* FM Radio */
519 [ 0x1d ] = KEY_RECORD,
520 [ 0x1e ] = KEY_PAUSE,
521};
522
523
524/* -------------------- GPIO generic keycode builder -------------------- */ 45/* -------------------- GPIO generic keycode builder -------------------- */
525 46
526static int build_key(struct saa7134_dev *dev) 47static int build_key(struct saa7134_dev *dev)
@@ -628,27 +149,27 @@ int saa7134_input_init1(struct saa7134_dev *dev)
628 case SAA7134_BOARD_FLYVIDEO3000: 149 case SAA7134_BOARD_FLYVIDEO3000:
629 case SAA7134_BOARD_FLYTVPLATINUM_FM: 150 case SAA7134_BOARD_FLYTVPLATINUM_FM:
630 case SAA7134_BOARD_FLYTVPLATINUM_MINI2: 151 case SAA7134_BOARD_FLYTVPLATINUM_MINI2:
631 ir_codes = flyvideo_codes; 152 ir_codes = ir_codes_flyvideo;
632 mask_keycode = 0xEC00000; 153 mask_keycode = 0xEC00000;
633 mask_keydown = 0x0040000; 154 mask_keydown = 0x0040000;
634 break; 155 break;
635 case SAA7134_BOARD_CINERGY400: 156 case SAA7134_BOARD_CINERGY400:
636 case SAA7134_BOARD_CINERGY600: 157 case SAA7134_BOARD_CINERGY600:
637 case SAA7134_BOARD_CINERGY600_MK3: 158 case SAA7134_BOARD_CINERGY600_MK3:
638 ir_codes = cinergy_codes; 159 ir_codes = ir_codes_cinergy;
639 mask_keycode = 0x00003f; 160 mask_keycode = 0x00003f;
640 mask_keyup = 0x040000; 161 mask_keyup = 0x040000;
641 break; 162 break;
642 case SAA7134_BOARD_ECS_TVP3XP: 163 case SAA7134_BOARD_ECS_TVP3XP:
643 case SAA7134_BOARD_ECS_TVP3XP_4CB5: 164 case SAA7134_BOARD_ECS_TVP3XP_4CB5:
644 ir_codes = eztv_codes; 165 ir_codes = ir_codes_eztv;
645 mask_keycode = 0x00017c; 166 mask_keycode = 0x00017c;
646 mask_keyup = 0x000002; 167 mask_keyup = 0x000002;
647 polling = 50; // ms 168 polling = 50; // ms
648 break; 169 break;
649 case SAA7134_BOARD_KWORLD_XPERT: 170 case SAA7134_BOARD_KWORLD_XPERT:
650 case SAA7134_BOARD_AVACSSMARTTV: 171 case SAA7134_BOARD_AVACSSMARTTV:
651 ir_codes = avacssmart_codes; 172 ir_codes = ir_codes_avacssmart;
652 mask_keycode = 0x00001F; 173 mask_keycode = 0x00001F;
653 mask_keyup = 0x000020; 174 mask_keyup = 0x000020;
654 polling = 50; // ms 175 polling = 50; // ms
@@ -660,7 +181,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
660 case SAA7134_BOARD_AVERMEDIA_STUDIO_305: 181 case SAA7134_BOARD_AVERMEDIA_STUDIO_305:
661 case SAA7134_BOARD_AVERMEDIA_STUDIO_307: 182 case SAA7134_BOARD_AVERMEDIA_STUDIO_307:
662 case SAA7134_BOARD_AVERMEDIA_GO_007_FM: 183 case SAA7134_BOARD_AVERMEDIA_GO_007_FM:
663 ir_codes = md2819_codes; 184 ir_codes = ir_codes_md2819;
664 mask_keycode = 0x0007C8; 185 mask_keycode = 0x0007C8;
665 mask_keydown = 0x000010; 186 mask_keydown = 0x000010;
666 polling = 50; // ms 187 polling = 50; // ms
@@ -669,7 +190,7 @@ int saa7134_input_init1(struct saa7134_dev *dev)
669 saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4); 190 saa_setb(SAA7134_GPIO_GPSTATUS0, 0x4);
670 break; 191 break;
671 case SAA7134_BOARD_KWORLD_TERMINATOR: 192 case SAA7134_BOARD_KWORLD_TERMINATOR:
672 ir_codes = avacssmart_codes; 193 ir_codes = ir_codes_avacssmart;
673 mask_keycode = 0x00001f; 194 mask_keycode = 0x00001f;
674 mask_keyup = 0x000060; 195 mask_keyup = 0x000060;
675 polling = 50; // ms 196 polling = 50; // ms
@@ -677,19 +198,19 @@ int saa7134_input_init1(struct saa7134_dev *dev)
677 case SAA7134_BOARD_MANLI_MTV001: 198 case SAA7134_BOARD_MANLI_MTV001:
678 case SAA7134_BOARD_MANLI_MTV002: 199 case SAA7134_BOARD_MANLI_MTV002:
679 case SAA7134_BOARD_BEHOLD_409FM: 200 case SAA7134_BOARD_BEHOLD_409FM:
680 ir_codes = manli_codes; 201 ir_codes = ir_codes_manli;
681 mask_keycode = 0x001f00; 202 mask_keycode = 0x001f00;
682 mask_keyup = 0x004000; 203 mask_keyup = 0x004000;
683 polling = 50; // ms 204 polling = 50; // ms
684 break; 205 break;
685 case SAA7134_BOARD_SEDNA_PC_TV_CARDBUS: 206 case SAA7134_BOARD_SEDNA_PC_TV_CARDBUS:
686 ir_codes = pctv_sedna_codes; 207 ir_codes = ir_codes_pctv_sedna;
687 mask_keycode = 0x001f00; 208 mask_keycode = 0x001f00;
688 mask_keyup = 0x004000; 209 mask_keyup = 0x004000;
689 polling = 50; // ms 210 polling = 50; // ms
690 break; 211 break;
691 case SAA7134_BOARD_GOTVIEW_7135: 212 case SAA7134_BOARD_GOTVIEW_7135:
692 ir_codes = gotview7135_codes; 213 ir_codes = ir_codes_gotview7135;
693 mask_keycode = 0x0003EC; 214 mask_keycode = 0x0003EC;
694 mask_keyup = 0x008000; 215 mask_keyup = 0x008000;
695 mask_keydown = 0x000010; 216 mask_keydown = 0x000010;
@@ -698,14 +219,14 @@ int saa7134_input_init1(struct saa7134_dev *dev)
698 case SAA7134_BOARD_VIDEOMATE_TV_PVR: 219 case SAA7134_BOARD_VIDEOMATE_TV_PVR:
699 case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS: 220 case SAA7134_BOARD_VIDEOMATE_GOLD_PLUS:
700 case SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII: 221 case SAA7134_BOARD_VIDEOMATE_TV_GOLD_PLUSII:
701 ir_codes = videomate_tv_pvr_codes; 222 ir_codes = ir_codes_videomate_tv_pvr;
702 mask_keycode = 0x00003F; 223 mask_keycode = 0x00003F;
703 mask_keyup = 0x400000; 224 mask_keyup = 0x400000;
704 polling = 50; // ms 225 polling = 50; // ms
705 break; 226 break;
706 case SAA7134_BOARD_VIDEOMATE_DVBT_300: 227 case SAA7134_BOARD_VIDEOMATE_DVBT_300:
707 case SAA7134_BOARD_VIDEOMATE_DVBT_200: 228 case SAA7134_BOARD_VIDEOMATE_DVBT_200:
708 ir_codes = videomate_tv_pvr_codes; 229 ir_codes = ir_codes_videomate_tv_pvr;
709 mask_keycode = 0x003F00; 230 mask_keycode = 0x003F00;
710 mask_keyup = 0x040000; 231 mask_keyup = 0x040000;
711 break; 232 break;