1 // SPDX-License-Identifier: GPL-2.0+
2 // budget-ci-old.h - Keytable for budget_ci_old Remote Controller
3 //
4 // keymap imported from ir-keymaps.c
5 //
6 // Copyright (c) 2010 by Mauro Carvalho Chehab
7
8 #include <media/rc-map.h>
9 #include <linux/module.h>
10
11 /*
12 * From reading the following remotes:
13 * Zenith Universal 7 / TV Mode 807 / VCR Mode 837
14 * Hauppauge (from NOVA-CI-s box product)
15 * This is a "middle of the road" approach, differences are noted
16 */
17
18 static struct rc_map_table budget_ci_old[] = {
19 { 0x00, KEY_NUMERIC_0 },
20 { 0x01, KEY_NUMERIC_1 },
21 { 0x02, KEY_NUMERIC_2 },
22 { 0x03, KEY_NUMERIC_3 },
23 { 0x04, KEY_NUMERIC_4 },
24 { 0x05, KEY_NUMERIC_5 },
25 { 0x06, KEY_NUMERIC_6 },
26 { 0x07, KEY_NUMERIC_7 },
27 { 0x08, KEY_NUMERIC_8 },
28 { 0x09, KEY_NUMERIC_9 },
29 { 0x0a, KEY_ENTER },
30 { 0x0b, KEY_RED },
31 { 0x0c, KEY_POWER }, /* RADIO on Hauppauge */
32 { 0x0d, KEY_MUTE },
33 { 0x0f, KEY_A }, /* TV on Hauppauge */
34 { 0x10, KEY_VOLUMEUP },
35 { 0x11, KEY_VOLUMEDOWN },
36 { 0x14, KEY_B },
37 { 0x1c, KEY_UP },
38 { 0x1d, KEY_DOWN },
39 { 0x1e, KEY_OPTION }, /* RESERVED on Hauppauge */
40 { 0x1f, KEY_BREAK },
41 { 0x20, KEY_CHANNELUP },
42 { 0x21, KEY_CHANNELDOWN },
43 { 0x22, KEY_PREVIOUS }, /* Prev Ch on Zenith, SOURCE on Hauppauge */
44 { 0x24, KEY_RESTART },
45 { 0x25, KEY_OK },
46 { 0x26, KEY_CYCLEWINDOWS }, /* MINIMIZE on Hauppauge */
47 { 0x28, KEY_ENTER }, /* VCR mode on Zenith */
48 { 0x29, KEY_PAUSE },
49 { 0x2b, KEY_RIGHT },
50 { 0x2c, KEY_LEFT },
51 { 0x2e, KEY_MENU }, /* FULL SCREEN on Hauppauge */
52 { 0x30, KEY_SLOW },
53 { 0x31, KEY_PREVIOUS }, /* VCR mode on Zenith */
54 { 0x32, KEY_REWIND },
55 { 0x34, KEY_FASTFORWARD },
56 { 0x35, KEY_PLAY },
57 { 0x36, KEY_STOP },
58 { 0x37, KEY_RECORD },
59 { 0x38, KEY_TUNER }, /* TV/VCR on Zenith */
60 { 0x3a, KEY_C },
61 { 0x3c, KEY_EXIT },
62 { 0x3d, KEY_POWER2 },
63 { 0x3e, KEY_TUNER },
64 };
65
66 static struct rc_map_list budget_ci_old_map = {
67 .map = {
68 .scan = budget_ci_old,
69 .size = ARRAY_SIZE(budget_ci_old),
70 .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
71 .name = RC_MAP_BUDGET_CI_OLD,
72 }
73 };
74
init_rc_map_budget_ci_old(void)75 static int __init init_rc_map_budget_ci_old(void)
76 {
77 return rc_map_register(&budget_ci_old_map);
78 }
79
exit_rc_map_budget_ci_old(void)80 static void __exit exit_rc_map_budget_ci_old(void)
81 {
82 rc_map_unregister(&budget_ci_old_map);
83 }
84
85 module_init(init_rc_map_budget_ci_old)
86 module_exit(exit_rc_map_budget_ci_old)
87
88 MODULE_LICENSE("GPL");
89 MODULE_AUTHOR("Mauro Carvalho Chehab");
90 MODULE_DESCRIPTION("budget-ci-old remote controller keytable");
91