1 // SPDX-License-Identifier: GPL-2.0+
2 // avermedia-m135a.c - Keytable for Avermedia M135A Remote Controllers
4 // Copyright (c) 2010 by Mauro Carvalho Chehab
5 // Copyright (c) 2010 by Herton Ronaldo Krzesinski <herton@mandriva.com.br>
7 #include <media/rc-map.h>
8 #include <linux/module.h>
11 * Avermedia M135A with RM-JX and RM-K6 remote controls
13 * On Avermedia M135A with IR model RM-JX, the same codes exist on both
14 * Positivo (BR) and original IR, initial version and remote control codes
15 * added by Mauro Carvalho Chehab <mchehab@kernel.org>
17 * Positivo also ships Avermedia M135A with model RM-K6, extra control
18 * codes added by Herton Ronaldo Krzesinski <herton@mandriva.com.br>
21 static struct rc_map_table avermedia_m135a
[] = {
23 { 0x0200, KEY_POWER2
},
24 { 0x022e, KEY_DOT
}, /* '.' */
25 { 0x0201, KEY_MODE
}, /* TV/FM or SOURCE */
27 { 0x0205, KEY_NUMERIC_1
},
28 { 0x0206, KEY_NUMERIC_2
},
29 { 0x0207, KEY_NUMERIC_3
},
30 { 0x0209, KEY_NUMERIC_4
},
31 { 0x020a, KEY_NUMERIC_5
},
32 { 0x020b, KEY_NUMERIC_6
},
33 { 0x020d, KEY_NUMERIC_7
},
34 { 0x020e, KEY_NUMERIC_8
},
35 { 0x020f, KEY_NUMERIC_9
},
36 { 0x0211, KEY_NUMERIC_0
},
38 { 0x0213, KEY_RIGHT
}, /* -> or L */
39 { 0x0212, KEY_LEFT
}, /* <- or R */
42 { 0x0217, KEY_CAMERA
}, /* Capturar Imagem or Snapshot */
43 { 0x0210, KEY_SHUFFLE
}, /* Amostra or 16 chan prev */
45 { 0x0303, KEY_CHANNELUP
},
46 { 0x0302, KEY_CHANNELDOWN
},
47 { 0x021f, KEY_VOLUMEUP
},
48 { 0x021e, KEY_VOLUMEDOWN
},
49 { 0x020c, KEY_ENTER
}, /* Full Screen */
52 { 0x0208, KEY_AUDIO
},
54 { 0x0203, KEY_TEXT
}, /* Teletext */
56 { 0x022b, KEY_TV2
}, /* TV2 or PIP */
59 { 0x021c, KEY_YELLOW
},
60 { 0x0301, KEY_GREEN
},
63 { 0x021a, KEY_PLAYPAUSE
},
64 { 0x0219, KEY_RECORD
},
69 { 0x0401, KEY_POWER2
},
71 { 0x0408, KEY_MODE
}, /* TV/FM */
73 { 0x0409, KEY_NUMERIC_1
},
74 { 0x040a, KEY_NUMERIC_2
},
75 { 0x040b, KEY_NUMERIC_3
},
76 { 0x040c, KEY_NUMERIC_4
},
77 { 0x040d, KEY_NUMERIC_5
},
78 { 0x040e, KEY_NUMERIC_6
},
79 { 0x040f, KEY_NUMERIC_7
},
80 { 0x0410, KEY_NUMERIC_8
},
81 { 0x0411, KEY_NUMERIC_9
},
82 { 0x044c, KEY_DOT
}, /* '.' */
83 { 0x0412, KEY_NUMERIC_0
},
84 { 0x0407, KEY_REFRESH
}, /* Refresh/Reload */
86 { 0x0413, KEY_AUDIO
},
87 { 0x0440, KEY_SCREEN
}, /* Full Screen toggle */
93 { 0x044a, KEY_RIGHT
},
95 { 0x0404, KEY_VOLUMEUP
},
96 { 0x0405, KEY_VOLUMEDOWN
},
97 { 0x0402, KEY_CHANNELUP
},
98 { 0x0403, KEY_CHANNELDOWN
},
101 { 0x0444, KEY_GREEN
},
102 { 0x0445, KEY_YELLOW
},
103 { 0x0446, KEY_BLUE
},
105 { 0x0414, KEY_TEXT
},
107 { 0x041a, KEY_TV2
}, /* PIP */
108 { 0x041b, KEY_CAMERA
}, /* Snapshot */
110 { 0x0417, KEY_RECORD
},
111 { 0x0416, KEY_PLAYPAUSE
},
112 { 0x0418, KEY_STOP
},
113 { 0x0419, KEY_PAUSE
},
115 { 0x041f, KEY_PREVIOUS
},
116 { 0x041c, KEY_REWIND
},
117 { 0x041d, KEY_FORWARD
},
118 { 0x041e, KEY_NEXT
},
121 static struct rc_map_list avermedia_m135a_map
= {
123 .scan
= avermedia_m135a
,
124 .size
= ARRAY_SIZE(avermedia_m135a
),
125 .rc_proto
= RC_PROTO_NEC
,
126 .name
= RC_MAP_AVERMEDIA_M135A
,
130 static int __init
init_rc_map_avermedia_m135a(void)
132 return rc_map_register(&avermedia_m135a_map
);
135 static void __exit
exit_rc_map_avermedia_m135a(void)
137 rc_map_unregister(&avermedia_m135a_map
);
140 module_init(init_rc_map_avermedia_m135a
)
141 module_exit(exit_rc_map_avermedia_m135a
)
143 MODULE_LICENSE("GPL");
144 MODULE_AUTHOR("Mauro Carvalho Chehab");