blob: dcbf3bddc826af552a185330e4d1add7c8772c61 [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
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 */
Richard Zidlickydd89aec2010-12-01 20:52:49 -0300134 { 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 },
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300170};
171
Mauro Carvalho Chehabd100e652010-11-17 15:56:53 -0300172static struct rc_map_list rc5_hauppauge_new_map = {
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300173 .map = {
174 .scan = rc5_hauppauge_new,
175 .size = ARRAY_SIZE(rc5_hauppauge_new),
Mauro Carvalho Chehab52b66142010-11-17 14:20:52 -0300176 .rc_type = RC_TYPE_RC5,
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300177 .name = RC_MAP_RC5_HAUPPAUGE_NEW,
178 }
179};
180
181static int __init init_rc_map_rc5_hauppauge_new(void)
182{
Mauro Carvalho Chehabd100e652010-11-17 15:56:53 -0300183 return rc_map_register(&rc5_hauppauge_new_map);
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300184}
185
186static void __exit exit_rc_map_rc5_hauppauge_new(void)
187{
Mauro Carvalho Chehabd100e652010-11-17 15:56:53 -0300188 rc_map_unregister(&rc5_hauppauge_new_map);
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -0300189}
190
191module_init(init_rc_map_rc5_hauppauge_new)
192module_exit(exit_rc_map_rc5_hauppauge_new)
193
194MODULE_LICENSE("GPL");
195MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");