V4L/DVB: ir-core: Make use of the new IR keymap modules
[safe/jmp/linux-2.6] / include / media / keycodes / kworld-plus-tv-analog.h
1 /* kworld-plus-tv-analog.h - Keytable for kworld_plus_tv_analog Remote Controller
2  *
3  * Imported from ir-keymaps.c
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  */
10
11 /* Kworld Plus TV Analog Lite PCI IR
12    Mauro Carvalho Chehab <mchehab@infradead.org>
13  */
14
15 #ifdef IR_KEYMAPS
16 static struct ir_scancode kworld_plus_tv_analog[] = {
17         { 0x0c, KEY_PROG1 },            /* Kworld key */
18         { 0x16, KEY_CLOSECD },          /* -> ) */
19         { 0x1d, KEY_POWER2 },
20
21         { 0x00, KEY_1 },
22         { 0x01, KEY_2 },
23         { 0x02, KEY_3 },                /* Two keys have the same code: 3 and left */
24         { 0x03, KEY_4 },                /* Two keys have the same code: 3 and right */
25         { 0x04, KEY_5 },
26         { 0x05, KEY_6 },
27         { 0x06, KEY_7 },
28         { 0x07, KEY_8 },
29         { 0x08, KEY_9 },
30         { 0x0a, KEY_0 },
31
32         { 0x09, KEY_AGAIN },
33         { 0x14, KEY_MUTE },
34
35         { 0x20, KEY_UP },
36         { 0x21, KEY_DOWN },
37         { 0x0b, KEY_ENTER },
38
39         { 0x10, KEY_CHANNELUP },
40         { 0x11, KEY_CHANNELDOWN },
41
42         /* Couldn't map key left/key right since those
43            conflict with '3' and '4' scancodes
44            I dunno what the original driver does
45          */
46
47         { 0x13, KEY_VOLUMEUP },
48         { 0x12, KEY_VOLUMEDOWN },
49
50         /* The lower part of the IR
51            There are several duplicated keycodes there.
52            Most of them conflict with digits.
53            Add mappings just to the unused scancodes.
54            Somehow, the original driver has a way to know,
55            but this doesn't seem to be on some GPIO.
56            Also, it is not related to the time between keyup
57            and keydown.
58          */
59         { 0x19, KEY_TIME},              /* Timeshift */
60         { 0x1a, KEY_STOP},
61         { 0x1b, KEY_RECORD},
62
63         { 0x22, KEY_TEXT},
64
65         { 0x15, KEY_AUDIO},             /* ((*)) */
66         { 0x0f, KEY_ZOOM},
67         { 0x1c, KEY_CAMERA},            /* snapshot */
68
69         { 0x18, KEY_RED},               /* B */
70         { 0x23, KEY_GREEN},             /* C */
71 };
72 DEFINE_LEGACY_IR_KEYTABLE(kworld_plus_tv_analog);
73 #else
74 DECLARE_IR_KEYTABLE(kworld_plus_tv_analog);
75 #endif