1 // SPDX-License-Identifier: GPL-2.0+
2 // msi-tvanywhere-plus.h - Keytable for msi_tvanywhere_plus Remote Controller
4 // keymap imported from ir-keymaps.c
6 // Copyright (c) 2010 by Mauro Carvalho Chehab
8 #include <media/rc-map.h>
9 #include <linux/module.h>
12 Keycodes for remote on the MSI TV@nywhere Plus. The controller IC on the card
13 is marked "KS003". The controller is I2C at address 0x30, but does not seem
14 to respond to probes until a read is performed from a valid device.
17 Note: This remote may be of similar or identical design to the
18 Pixelview remote (?). The raw codes and duplicate button codes
19 appear to be the same.
21 Henry Wong <henry@stuffedcow.net>
22 Some changes to formatting and keycodes by Mark Schultz <n9xmj@yahoo.com>
25 static struct rc_map_table msi_tvanywhere_plus
[] = {
27 /* ---- Remote Button Layout ----
29 POWER SOURCE SCAN MUTE
47 { 0x01, KEY_NUMERIC_1
}, /* 1 */
48 { 0x0b, KEY_NUMERIC_2
}, /* 2 */
49 { 0x1b, KEY_NUMERIC_3
}, /* 3 */
50 { 0x05, KEY_NUMERIC_4
}, /* 4 */
51 { 0x09, KEY_NUMERIC_5
}, /* 5 */
52 { 0x15, KEY_NUMERIC_6
}, /* 6 */
53 { 0x06, KEY_NUMERIC_7
}, /* 7 */
54 { 0x0a, KEY_NUMERIC_8
}, /* 8 */
55 { 0x12, KEY_NUMERIC_9
}, /* 9 */
56 { 0x02, KEY_NUMERIC_0
}, /* 0 */
57 { 0x10, KEY_KPPLUS
}, /* + */
58 { 0x13, KEY_AGAIN
}, /* Recall */
60 { 0x1e, KEY_POWER
}, /* Power */
61 { 0x07, KEY_VIDEO
}, /* Source */
62 { 0x1c, KEY_SEARCH
}, /* Scan */
63 { 0x18, KEY_MUTE
}, /* Mute */
65 { 0x03, KEY_RADIO
}, /* TV/FM */
66 /* The next four keys are duplicates that appear to send the
67 same IR code as Ch+, Ch-, >>, and << . The raw code assigned
68 to them is the actual code + 0x20 - they will never be
69 detected as such unless some way is discovered to distinguish
70 these buttons from those that have the same code. */
71 { 0x3f, KEY_RIGHT
}, /* |> and Ch+ */
72 { 0x37, KEY_LEFT
}, /* <| and Ch- */
73 { 0x2c, KEY_UP
}, /* ^^Up and >> */
74 { 0x24, KEY_DOWN
}, /* vvDn and << */
76 { 0x00, KEY_RECORD
}, /* Record */
77 { 0x08, KEY_STOP
}, /* Stop */
78 { 0x11, KEY_PLAY
}, /* Play */
80 { 0x0f, KEY_CLOSE
}, /* Minimize */
81 { 0x19, KEY_ZOOM
}, /* Zoom */
82 { 0x1a, KEY_CAMERA
}, /* Snapshot */
83 { 0x0d, KEY_LANGUAGE
}, /* MTS */
85 { 0x14, KEY_VOLUMEDOWN
}, /* Vol- */
86 { 0x16, KEY_VOLUMEUP
}, /* Vol+ */
87 { 0x17, KEY_CHANNELDOWN
}, /* Ch- */
88 { 0x1f, KEY_CHANNELUP
}, /* Ch+ */
90 { 0x04, KEY_REWIND
}, /* << */
91 { 0x0e, KEY_MENU
}, /* Function */
92 { 0x0c, KEY_FASTFORWARD
}, /* >> */
93 { 0x1d, KEY_RESTART
}, /* Reset */
96 static struct rc_map_list msi_tvanywhere_plus_map
= {
98 .scan
= msi_tvanywhere_plus
,
99 .size
= ARRAY_SIZE(msi_tvanywhere_plus
),
100 .rc_proto
= RC_PROTO_UNKNOWN
, /* Legacy IR type */
101 .name
= RC_MAP_MSI_TVANYWHERE_PLUS
,
105 static int __init
init_rc_map_msi_tvanywhere_plus(void)
107 return rc_map_register(&msi_tvanywhere_plus_map
);
110 static void __exit
exit_rc_map_msi_tvanywhere_plus(void)
112 rc_map_unregister(&msi_tvanywhere_plus_map
);
115 module_init(init_rc_map_msi_tvanywhere_plus
)
116 module_exit(exit_rc_map_msi_tvanywhere_plus
)
118 MODULE_LICENSE("GPL");
119 MODULE_AUTHOR("Mauro Carvalho Chehab");