blob: 4106008c7f98aad04d5def83b138c5025cc44cbb [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 Chehab6686fa62010-04-02 03:05:46 -030027 /* 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 },
Mauro Carvalho Chehab6f9e46b2011-01-24 12:18:37 -030052 { 0x1e18, KEY_VCR }, /* Videos */
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -030053 { 0x1e19, KEY_AUDIO }, /* Music */
54 /* 0x1e1a: Pictures - presume this means
55 "Multimedia Home Platform" -
56 no "PICTURES" key in input.h
57 */
Mauro Carvalho Chehab444cc202011-01-24 12:18:36 -030058 { 0x1e1a, KEY_CAMERA },
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -030059
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 - */
Mauro Carvalho Chehab6f9e46b2011-01-24 12:18:37 -030066 { 0x1e22, KEY_VIDEO }, /* source (old black remote) */
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -030067 { 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) */
Richard Zidlickydd89aec2010-12-01 20:52:49 -030082
Mauro Carvalho Chehab0684f5b2011-01-24 12:18:43 -030083 /*
84 * Old Remote Controller Hauppauge Gray with a golden screen
Mauro Carvalho Chehab9890a9e2011-01-24 12:18:44 -030085 * Keycodes start with address = 0x1f
Mauro Carvalho Chehab0684f5b2011-01-24 12:18:43 -030086 */
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
Mauro Carvalho Chehab9890a9e2011-01-24 12:18:44 -0300133 * Keycodes start with address = 0x1d
Mauro Carvalho Chehab0684f5b2011-01-24 12:18:43 -0300134 */
Richard Zidlickydd89aec2010-12-01 20:52:49 -0300135 { 0x1d00, KEY_0 },
136 { 0x1d01, KEY_1 },
137 { 0x1d02, KEY_2 },
138 { 0x1d03, KEY_3 },
139 { 0x1d04, KEY_4 },
140 { 0x1d05, KEY_5 },
141 { 0x1d06, KEY_6 },
142 { 0x1d07, KEY_7 },
143 { 0x1d08, KEY_8 },
144 { 0x1d09, KEY_9 },
145 { 0x1d0a, KEY_TEXT },
146 { 0x1d0d, KEY_MENU },
147 { 0x1d0f, KEY_MUTE },
148 { 0x1d10, KEY_VOLUMEUP },
149 { 0x1d11, KEY_VOLUMEDOWN },
150 { 0x1d12, KEY_PREVIOUS }, /* Prev.Ch .. ??? */
151 { 0x1d14, KEY_UP },
152 { 0x1d15, KEY_DOWN },
153 { 0x1d16, KEY_LEFT },
154 { 0x1d17, KEY_RIGHT },
155 { 0x1d1c, KEY_TV },
156 { 0x1d1e, KEY_NEXT }, /* >| */
157 { 0x1d1f, KEY_EXIT },
158 { 0x1d20, KEY_CHANNELUP },
159 { 0x1d21, KEY_CHANNELDOWN },
160 { 0x1d24, KEY_LAST }, /* <| */
161 { 0x1d25, KEY_OK },
162 { 0x1d30, KEY_PAUSE },
163 { 0x1d32, KEY_REWIND },
164 { 0x1d34, KEY_FASTFORWARD },
165 { 0x1d35, KEY_PLAY },
166 { 0x1d36, KEY_STOP },
167 { 0x1d37, KEY_RECORD },
168 { 0x1d3b, KEY_GOTO },
169 { 0x1d3d, KEY_POWER },
170 { 0x1d3f, KEY_HOME },
Mauro Carvalho Chehab9890a9e2011-01-24 12:18:44 -0300171
172 /*
173 * Keycodes for the old Black Remote Controller
174 * This one also uses RC-5 protocol
175 * Keycodes start with address = 0x00
176 */
177 { 0x001f, KEY_TV },
178 { 0x0020, KEY_CHANNELUP },
179 { 0x000c, KEY_RADIO },
180
181 { 0x0011, KEY_VOLUMEDOWN },
182 { 0x002e, KEY_ZOOM }, /* full screen */
183 { 0x0010, KEY_VOLUMEUP },
184
185 { 0x000d, KEY_MUTE },
186 { 0x0021, KEY_CHANNELDOWN },
187 { 0x0022, KEY_VIDEO }, /* source */
188
189 { 0x0001, KEY_1 },
190 { 0x0002, KEY_2 },
191 { 0x0003, KEY_3 },
192
193 { 0x0004, KEY_4 },
194 { 0x0005, KEY_5 },
195 { 0x0006, KEY_6 },
196
197 { 0x0007, KEY_7 },
198 { 0x0008, KEY_8 },
199 { 0x0009, KEY_9 },
200
201 { 0x001e, KEY_RED }, /* Reserved */
202 { 0x0000, KEY_0 },
203 { 0x0026, KEY_SLEEP }, /* Minimize */
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300204};
205
Mauro Carvalho Chehabd100e652010-11-17 15:56:53 -0300206static struct rc_map_list rc5_hauppauge_new_map = {
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300207 .map = {
208 .scan = rc5_hauppauge_new,
209 .size = ARRAY_SIZE(rc5_hauppauge_new),
Mauro Carvalho Chehab52b66142010-11-17 14:20:52 -0300210 .rc_type = RC_TYPE_RC5,
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300211 .name = RC_MAP_RC5_HAUPPAUGE_NEW,
212 }
213};
214
215static int __init init_rc_map_rc5_hauppauge_new(void)
216{
Mauro Carvalho Chehabd100e652010-11-17 15:56:53 -0300217 return rc_map_register(&rc5_hauppauge_new_map);
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300218}
219
220static void __exit exit_rc_map_rc5_hauppauge_new(void)
221{
Mauro Carvalho Chehabd100e652010-11-17 15:56:53 -0300222 rc_map_unregister(&rc5_hauppauge_new_map);
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300223}
224
225module_init(init_rc_map_rc5_hauppauge_new)
226module_exit(exit_rc_map_rc5_hauppauge_new)
227
228MODULE_LICENSE("GPL");
229MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");