1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /* rc-streamzap.c - Keytable for Streamzap PC Remote, for use
3 * with the Streamzap PC Remote IR Receiver.
4 *
5 * Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
6 */
7
8 #include <media/rc-map.h>
9 #include <linux/module.h>
10
11 static struct rc_map_table streamzap[] = {
12 /*
13 * The Streamzap remote is almost, but not quite, RC-5, as it has an extra
14 * bit in it.
15 */
16 { 0x28c0, KEY_NUMERIC_0 },
17 { 0x28c1, KEY_NUMERIC_1 },
18 { 0x28c2, KEY_NUMERIC_2 },
19 { 0x28c3, KEY_NUMERIC_3 },
20 { 0x28c4, KEY_NUMERIC_4 },
21 { 0x28c5, KEY_NUMERIC_5 },
22 { 0x28c6, KEY_NUMERIC_6 },
23 { 0x28c7, KEY_NUMERIC_7 },
24 { 0x28c8, KEY_NUMERIC_8 },
25 { 0x28c9, KEY_NUMERIC_9 },
26 { 0x28ca, KEY_POWER },
27 { 0x28cb, KEY_MUTE },
28 { 0x28cc, KEY_CHANNELUP },
29 { 0x28cd, KEY_VOLUMEUP },
30 { 0x28ce, KEY_CHANNELDOWN },
31 { 0x28cf, KEY_VOLUMEDOWN },
32 { 0x28d0, KEY_UP },
33 { 0x28d1, KEY_LEFT },
34 { 0x28d2, KEY_OK },
35 { 0x28d3, KEY_RIGHT },
36 { 0x28d4, KEY_DOWN },
37 { 0x28d5, KEY_MENU },
38 { 0x28d6, KEY_EXIT },
39 { 0x28d7, KEY_PLAY },
40 { 0x28d8, KEY_PAUSE },
41 { 0x28d9, KEY_STOP },
42 { 0x28da, KEY_BACK },
43 { 0x28db, KEY_FORWARD },
44 { 0x28dc, KEY_RECORD },
45 { 0x28dd, KEY_REWIND },
46 { 0x28de, KEY_FASTFORWARD },
47 { 0x28e0, KEY_RED },
48 { 0x28e1, KEY_GREEN },
49 { 0x28e2, KEY_YELLOW },
50 { 0x28e3, KEY_BLUE },
51
52 };
53
54 static struct rc_map_list streamzap_map = {
55 .map = {
56 .scan = streamzap,
57 .size = ARRAY_SIZE(streamzap),
58 .rc_proto = RC_PROTO_RC5_SZ,
59 .name = RC_MAP_STREAMZAP,
60 }
61 };
62
init_rc_map_streamzap(void)63 static int __init init_rc_map_streamzap(void)
64 {
65 return rc_map_register(&streamzap_map);
66 }
67
exit_rc_map_streamzap(void)68 static void __exit exit_rc_map_streamzap(void)
69 {
70 rc_map_unregister(&streamzap_map);
71 }
72
73 module_init(init_rc_map_streamzap)
74 module_exit(exit_rc_map_streamzap)
75
76 MODULE_LICENSE("GPL");
77 MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");
78