]> git.karo-electronics.de Git - karo-tx-linux.git/blob - drivers/media/rc/keymaps/rc-rc5-hauppauge-new.c
[media] rc-rc5-hauppauge-new: Add the old control to the table
[karo-tx-linux.git] / drivers / media / rc / keymaps / rc-rc5-hauppauge-new.c
1 /* rc5-hauppauge-new.h - Keytable for rc5_hauppauge_new Remote Controller
2  *
3  * keymap imported from ir-keymaps.c
4  *
5  * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
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
13 #include <media/rc-map.h>
14
15 /*
16  * Hauppauge:the newer, gray remotes (seems there are multiple
17  * slightly different versions), shipped with cx88+ivtv cards.
18  *
19  * This table contains the complete RC5 code, instead of just the data part
20  */
21
22 static struct rc_map_table rc5_hauppauge_new[] = {
23         /*
24          * Remote Controller Hauppauge Gray found on modern devices
25          * Keycodes start with address = 0x1e
26          */
27         /* Keys 0 to 9 */
28         { 0x1e00, KEY_0 },
29         { 0x1e01, KEY_1 },
30         { 0x1e02, KEY_2 },
31         { 0x1e03, KEY_3 },
32         { 0x1e04, KEY_4 },
33         { 0x1e05, KEY_5 },
34         { 0x1e06, KEY_6 },
35         { 0x1e07, KEY_7 },
36         { 0x1e08, KEY_8 },
37         { 0x1e09, KEY_9 },
38
39         { 0x1e0a, KEY_TEXT },           /* keypad asterisk as well */
40         { 0x1e0b, KEY_RED },            /* red button */
41         { 0x1e0c, KEY_RADIO },
42         { 0x1e0d, KEY_MENU },
43         { 0x1e0e, KEY_SUBTITLE },               /* also the # key */
44         { 0x1e0f, KEY_MUTE },
45         { 0x1e10, KEY_VOLUMEUP },
46         { 0x1e11, KEY_VOLUMEDOWN },
47         { 0x1e12, KEY_PREVIOUS },               /* previous channel */
48         { 0x1e14, KEY_UP },
49         { 0x1e15, KEY_DOWN },
50         { 0x1e16, KEY_LEFT },
51         { 0x1e17, KEY_RIGHT },
52         { 0x1e18, KEY_VCR },            /* Videos */
53         { 0x1e19, KEY_AUDIO },          /* Music */
54         /* 0x1e1a: Pictures - presume this means
55            "Multimedia Home Platform" -
56            no "PICTURES" key in input.h
57          */
58         { 0x1e1a, KEY_CAMERA },
59
60         { 0x1e1b, KEY_EPG },            /* Guide */
61         { 0x1e1c, KEY_TV },
62         { 0x1e1e, KEY_NEXTSONG },               /* skip >| */
63         { 0x1e1f, KEY_EXIT },           /* back/exit */
64         { 0x1e20, KEY_CHANNELUP },      /* channel / program + */
65         { 0x1e21, KEY_CHANNELDOWN },    /* channel / program - */
66         { 0x1e22, KEY_VIDEO },          /* source (old black remote) */
67         { 0x1e24, KEY_PREVIOUSSONG },   /* replay |< */
68         { 0x1e25, KEY_ENTER },          /* OK */
69         { 0x1e26, KEY_SLEEP },          /* minimize (old black remote) */
70         { 0x1e29, KEY_BLUE },           /* blue key */
71         { 0x1e2e, KEY_GREEN },          /* green button */
72         { 0x1e30, KEY_PAUSE },          /* pause */
73         { 0x1e32, KEY_REWIND },         /* backward << */
74         { 0x1e34, KEY_FASTFORWARD },    /* forward >> */
75         { 0x1e35, KEY_PLAY },
76         { 0x1e36, KEY_STOP },
77         { 0x1e37, KEY_RECORD },         /* recording */
78         { 0x1e38, KEY_YELLOW },         /* yellow key */
79         { 0x1e3b, KEY_SELECT },         /* top right button */
80         { 0x1e3c, KEY_ZOOM },           /* full */
81         { 0x1e3d, KEY_POWER },          /* system power (green button) */
82
83         /*
84          * Old Remote Controller Hauppauge Gray with a golden screen
85          * Keycodes start with address = 0x1d
86          */
87         { 0x1f3d, KEY_POWER2 },         /* system power (green button) */
88         { 0x1f3b, KEY_SELECT },         /* GO */
89
90         /* Keys 0 to 9 */
91         { 0x1f00, KEY_0 },
92         { 0x1f01, KEY_1 },
93         { 0x1f02, KEY_2 },
94         { 0x1f03, KEY_3 },
95         { 0x1f04, KEY_4 },
96         { 0x1f05, KEY_5 },
97         { 0x1f06, KEY_6 },
98         { 0x1f07, KEY_7 },
99         { 0x1f08, KEY_8 },
100         { 0x1f09, KEY_9 },
101
102         { 0x1f1f, KEY_EXIT },           /* back/exit */
103         { 0x1f0d, KEY_MENU },
104
105         { 0x1f10, KEY_VOLUMEUP },
106         { 0x1f11, KEY_VOLUMEDOWN },
107         { 0x1f20, KEY_CHANNELUP },      /* channel / program + */
108         { 0x1f21, KEY_CHANNELDOWN },    /* channel / program - */
109         { 0x1f25, KEY_ENTER },          /* OK */
110
111         { 0x1f0b, KEY_RED },            /* red button */
112         { 0x1f2e, KEY_GREEN },          /* green button */
113         { 0x1f38, KEY_YELLOW },         /* yellow key */
114         { 0x1f29, KEY_BLUE },           /* blue key */
115
116         { 0x1f0f, KEY_MUTE },
117         { 0x1f0c, KEY_RADIO },          /* There's no indicator on this key */
118         { 0x1f3c, KEY_ZOOM },           /* full */
119
120         { 0x1f32, KEY_REWIND },         /* backward << */
121         { 0x1f35, KEY_PLAY },
122         { 0x1f34, KEY_FASTFORWARD },    /* forward >> */
123
124         { 0x1f37, KEY_RECORD },         /* recording */
125         { 0x1f36, KEY_STOP },
126         { 0x1f30, KEY_PAUSE },          /* pause */
127
128         { 0x1f24, KEY_PREVIOUSSONG },   /* replay |< */
129         { 0x1f1e, KEY_NEXTSONG },       /* skip >| */
130
131         /*
132          * Keycodes for DSR-0112 remote bundled with Haupauge MiniStick
133          */
134         { 0x1d00, KEY_0 },
135         { 0x1d01, KEY_1 },
136         { 0x1d02, KEY_2 },
137         { 0x1d03, KEY_3 },
138         { 0x1d04, KEY_4 },
139         { 0x1d05, KEY_5 },
140         { 0x1d06, KEY_6 },
141         { 0x1d07, KEY_7 },
142         { 0x1d08, KEY_8 },
143         { 0x1d09, KEY_9 },
144         { 0x1d0a, KEY_TEXT },
145         { 0x1d0d, KEY_MENU },
146         { 0x1d0f, KEY_MUTE },
147         { 0x1d10, KEY_VOLUMEUP },
148         { 0x1d11, KEY_VOLUMEDOWN },
149         { 0x1d12, KEY_PREVIOUS },        /* Prev.Ch .. ??? */
150         { 0x1d14, KEY_UP },
151         { 0x1d15, KEY_DOWN },
152         { 0x1d16, KEY_LEFT },
153         { 0x1d17, KEY_RIGHT },
154         { 0x1d1c, KEY_TV },
155         { 0x1d1e, KEY_NEXT },           /* >|             */
156         { 0x1d1f, KEY_EXIT },
157         { 0x1d20, KEY_CHANNELUP },
158         { 0x1d21, KEY_CHANNELDOWN },
159         { 0x1d24, KEY_LAST },           /* <|             */
160         { 0x1d25, KEY_OK },
161         { 0x1d30, KEY_PAUSE },
162         { 0x1d32, KEY_REWIND },
163         { 0x1d34, KEY_FASTFORWARD },
164         { 0x1d35, KEY_PLAY },
165         { 0x1d36, KEY_STOP },
166         { 0x1d37, KEY_RECORD },
167         { 0x1d3b, KEY_GOTO },
168         { 0x1d3d, KEY_POWER },
169         { 0x1d3f, KEY_HOME },
170 };
171
172 static struct rc_map_list rc5_hauppauge_new_map = {
173         .map = {
174                 .scan    = rc5_hauppauge_new,
175                 .size    = ARRAY_SIZE(rc5_hauppauge_new),
176                 .rc_type = RC_TYPE_RC5,
177                 .name    = RC_MAP_RC5_HAUPPAUGE_NEW,
178         }
179 };
180
181 static int __init init_rc_map_rc5_hauppauge_new(void)
182 {
183         return rc_map_register(&rc5_hauppauge_new_map);
184 }
185
186 static void __exit exit_rc_map_rc5_hauppauge_new(void)
187 {
188         rc_map_unregister(&rc5_hauppauge_new_map);
189 }
190
191 module_init(init_rc_map_rc5_hauppauge_new)
192 module_exit(exit_rc_map_rc5_hauppauge_new)
193
194 MODULE_LICENSE("GPL");
195 MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");