blob: cb312dae6fac499d0aebd8a9c2ec34c6ad91f40b [file] [log] [blame]
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -03001/* 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
Mauro Carvalho Chehab2f4f58d2010-11-17 15:46:09 -030022static struct rc_map_table rc5_hauppauge_new[] = {
Mauro Carvalho Chehab0684f5b2011-01-24 12:18:43 -030023 /*
24 * Remote Controller Hauppauge Gray found on modern devices
25 * Keycodes start with address = 0x1e
26 */
Mauro Carvalho Chehab05487572011-01-24 12:18:45 -030027
28 { 0x1e3b, KEY_SELECT }, /* GO / house symbol */
29 { 0x1e3d, KEY_POWER2 }, /* system power (green button) */
30
31 { 0x1e1c, KEY_TV },
32 { 0x1e18, KEY_VIDEO }, /* Videos */
33 { 0x1e19, KEY_AUDIO }, /* Music */
34 { 0x1e1a, KEY_CAMERA }, /* Pictures */
35
36 { 0x1e1b, KEY_EPG }, /* Guide */
37 { 0x1e0c, KEY_RADIO },
38
39 { 0x1e14, KEY_UP },
40 { 0x1e15, KEY_DOWN },
41 { 0x1e16, KEY_LEFT },
42 { 0x1e17, KEY_RIGHT },
43 { 0x1e25, KEY_OK }, /* OK */
44
45 { 0x1e1f, KEY_EXIT }, /* back/exit */
46 { 0x1e0d, KEY_MENU },
47
48 { 0x1e10, KEY_VOLUMEUP },
49 { 0x1e11, KEY_VOLUMEDOWN },
50
51 { 0x1e12, KEY_PREVIOUS }, /* previous channel */
52 { 0x1e0f, KEY_MUTE },
53
54 { 0x1e20, KEY_CHANNELUP }, /* channel / program + */
55 { 0x1e21, KEY_CHANNELDOWN }, /* channel / program - */
56
57 { 0x1e37, KEY_RECORD }, /* recording */
58 { 0x1e36, KEY_STOP },
59
60 { 0x1e32, KEY_REWIND }, /* backward << */
61 { 0x1e35, KEY_PLAY },
62 { 0x1e34, KEY_FASTFORWARD }, /* forward >> */
63
64 { 0x1e24, KEY_PREVIOUSSONG }, /* replay |< */
65 { 0x1e30, KEY_PAUSE }, /* pause */
66 { 0x1e1e, KEY_NEXTSONG }, /* skip >| */
67
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -030068 { 0x1e01, KEY_1 },
69 { 0x1e02, KEY_2 },
70 { 0x1e03, KEY_3 },
Mauro Carvalho Chehab05487572011-01-24 12:18:45 -030071
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -030072 { 0x1e04, KEY_4 },
73 { 0x1e05, KEY_5 },
74 { 0x1e06, KEY_6 },
Mauro Carvalho Chehab05487572011-01-24 12:18:45 -030075
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -030076 { 0x1e07, KEY_7 },
77 { 0x1e08, KEY_8 },
78 { 0x1e09, KEY_9 },
79
80 { 0x1e0a, KEY_TEXT }, /* keypad asterisk as well */
Mauro Carvalho Chehab05487572011-01-24 12:18:45 -030081 { 0x1e00, KEY_0 },
82 { 0x1e0e, KEY_SUBTITLE }, /* also the Pound key (#) */
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -030083
Mauro Carvalho Chehab05487572011-01-24 12:18:45 -030084 { 0x1e0b, KEY_RED }, /* red button */
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -030085 { 0x1e2e, KEY_GREEN }, /* green button */
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -030086 { 0x1e38, KEY_YELLOW }, /* yellow key */
Mauro Carvalho Chehab05487572011-01-24 12:18:45 -030087 { 0x1e29, KEY_BLUE }, /* blue key */
Richard Zidlickydd89aec2010-12-01 20:52:49 -030088
Mauro Carvalho Chehab0684f5b2011-01-24 12:18:43 -030089 /*
90 * Old Remote Controller Hauppauge Gray with a golden screen
Mauro Carvalho Chehab9890a9e2011-01-24 12:18:44 -030091 * Keycodes start with address = 0x1f
Mauro Carvalho Chehab0684f5b2011-01-24 12:18:43 -030092 */
93 { 0x1f3d, KEY_POWER2 }, /* system power (green button) */
94 { 0x1f3b, KEY_SELECT }, /* GO */
95
96 /* Keys 0 to 9 */
97 { 0x1f00, KEY_0 },
98 { 0x1f01, KEY_1 },
99 { 0x1f02, KEY_2 },
100 { 0x1f03, KEY_3 },
101 { 0x1f04, KEY_4 },
102 { 0x1f05, KEY_5 },
103 { 0x1f06, KEY_6 },
104 { 0x1f07, KEY_7 },
105 { 0x1f08, KEY_8 },
106 { 0x1f09, KEY_9 },
107
108 { 0x1f1f, KEY_EXIT }, /* back/exit */
109 { 0x1f0d, KEY_MENU },
110
111 { 0x1f10, KEY_VOLUMEUP },
112 { 0x1f11, KEY_VOLUMEDOWN },
113 { 0x1f20, KEY_CHANNELUP }, /* channel / program + */
114 { 0x1f21, KEY_CHANNELDOWN }, /* channel / program - */
115 { 0x1f25, KEY_ENTER }, /* OK */
116
117 { 0x1f0b, KEY_RED }, /* red button */
118 { 0x1f2e, KEY_GREEN }, /* green button */
119 { 0x1f38, KEY_YELLOW }, /* yellow key */
120 { 0x1f29, KEY_BLUE }, /* blue key */
121
122 { 0x1f0f, KEY_MUTE },
123 { 0x1f0c, KEY_RADIO }, /* There's no indicator on this key */
124 { 0x1f3c, KEY_ZOOM }, /* full */
125
126 { 0x1f32, KEY_REWIND }, /* backward << */
127 { 0x1f35, KEY_PLAY },
128 { 0x1f34, KEY_FASTFORWARD }, /* forward >> */
129
130 { 0x1f37, KEY_RECORD }, /* recording */
131 { 0x1f36, KEY_STOP },
132 { 0x1f30, KEY_PAUSE }, /* pause */
133
134 { 0x1f24, KEY_PREVIOUSSONG }, /* replay |< */
135 { 0x1f1e, KEY_NEXTSONG }, /* skip >| */
136
137 /*
138 * Keycodes for DSR-0112 remote bundled with Haupauge MiniStick
Mauro Carvalho Chehab9890a9e2011-01-24 12:18:44 -0300139 * Keycodes start with address = 0x1d
Mauro Carvalho Chehab0684f5b2011-01-24 12:18:43 -0300140 */
Richard Zidlickydd89aec2010-12-01 20:52:49 -0300141 { 0x1d00, KEY_0 },
142 { 0x1d01, KEY_1 },
143 { 0x1d02, KEY_2 },
144 { 0x1d03, KEY_3 },
145 { 0x1d04, KEY_4 },
146 { 0x1d05, KEY_5 },
147 { 0x1d06, KEY_6 },
148 { 0x1d07, KEY_7 },
149 { 0x1d08, KEY_8 },
150 { 0x1d09, KEY_9 },
151 { 0x1d0a, KEY_TEXT },
152 { 0x1d0d, KEY_MENU },
153 { 0x1d0f, KEY_MUTE },
154 { 0x1d10, KEY_VOLUMEUP },
155 { 0x1d11, KEY_VOLUMEDOWN },
156 { 0x1d12, KEY_PREVIOUS }, /* Prev.Ch .. ??? */
157 { 0x1d14, KEY_UP },
158 { 0x1d15, KEY_DOWN },
159 { 0x1d16, KEY_LEFT },
160 { 0x1d17, KEY_RIGHT },
161 { 0x1d1c, KEY_TV },
162 { 0x1d1e, KEY_NEXT }, /* >| */
163 { 0x1d1f, KEY_EXIT },
164 { 0x1d20, KEY_CHANNELUP },
165 { 0x1d21, KEY_CHANNELDOWN },
166 { 0x1d24, KEY_LAST }, /* <| */
167 { 0x1d25, KEY_OK },
168 { 0x1d30, KEY_PAUSE },
169 { 0x1d32, KEY_REWIND },
170 { 0x1d34, KEY_FASTFORWARD },
171 { 0x1d35, KEY_PLAY },
172 { 0x1d36, KEY_STOP },
173 { 0x1d37, KEY_RECORD },
174 { 0x1d3b, KEY_GOTO },
175 { 0x1d3d, KEY_POWER },
176 { 0x1d3f, KEY_HOME },
Mauro Carvalho Chehab9890a9e2011-01-24 12:18:44 -0300177
178 /*
179 * Keycodes for the old Black Remote Controller
180 * This one also uses RC-5 protocol
181 * Keycodes start with address = 0x00
182 */
183 { 0x001f, KEY_TV },
184 { 0x0020, KEY_CHANNELUP },
185 { 0x000c, KEY_RADIO },
186
187 { 0x0011, KEY_VOLUMEDOWN },
188 { 0x002e, KEY_ZOOM }, /* full screen */
189 { 0x0010, KEY_VOLUMEUP },
190
191 { 0x000d, KEY_MUTE },
192 { 0x0021, KEY_CHANNELDOWN },
193 { 0x0022, KEY_VIDEO }, /* source */
194
195 { 0x0001, KEY_1 },
196 { 0x0002, KEY_2 },
197 { 0x0003, KEY_3 },
198
199 { 0x0004, KEY_4 },
200 { 0x0005, KEY_5 },
201 { 0x0006, KEY_6 },
202
203 { 0x0007, KEY_7 },
204 { 0x0008, KEY_8 },
205 { 0x0009, KEY_9 },
206
207 { 0x001e, KEY_RED }, /* Reserved */
208 { 0x0000, KEY_0 },
209 { 0x0026, KEY_SLEEP }, /* Minimize */
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300210};
211
Mauro Carvalho Chehabd100e652010-11-17 15:56:53 -0300212static struct rc_map_list rc5_hauppauge_new_map = {
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300213 .map = {
214 .scan = rc5_hauppauge_new,
215 .size = ARRAY_SIZE(rc5_hauppauge_new),
Mauro Carvalho Chehab52b66142010-11-17 14:20:52 -0300216 .rc_type = RC_TYPE_RC5,
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300217 .name = RC_MAP_RC5_HAUPPAUGE_NEW,
218 }
219};
220
221static int __init init_rc_map_rc5_hauppauge_new(void)
222{
Mauro Carvalho Chehabd100e652010-11-17 15:56:53 -0300223 return rc_map_register(&rc5_hauppauge_new_map);
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300224}
225
226static void __exit exit_rc_map_rc5_hauppauge_new(void)
227{
Mauro Carvalho Chehabd100e652010-11-17 15:56:53 -0300228 rc_map_unregister(&rc5_hauppauge_new_map);
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300229}
230
231module_init(init_rc_map_rc5_hauppauge_new)
232module_exit(exit_rc_map_rc5_hauppauge_new)
233
234MODULE_LICENSE("GPL");
235MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");