xref: /linux/drivers/media/rc/keymaps/rc-manli.c (revision 32cf86f6d16367db5a10039c1dd938a2427d697c)
1*32cf86f6SMauro Carvalho Chehab /* manli.h - Keytable for manli Remote Controller
2*32cf86f6SMauro Carvalho Chehab  *
3*32cf86f6SMauro Carvalho Chehab  * keymap imported from ir-keymaps.c
4*32cf86f6SMauro Carvalho Chehab  *
5*32cf86f6SMauro Carvalho Chehab  * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
6*32cf86f6SMauro Carvalho Chehab  *
7*32cf86f6SMauro Carvalho Chehab  * This program is free software; you can redistribute it and/or modify
8*32cf86f6SMauro Carvalho Chehab  * it under the terms of the GNU General Public License as published by
9*32cf86f6SMauro Carvalho Chehab  * the Free Software Foundation; either version 2 of the License, or
10*32cf86f6SMauro Carvalho Chehab  * (at your option) any later version.
11*32cf86f6SMauro Carvalho Chehab  */
12*32cf86f6SMauro Carvalho Chehab 
13*32cf86f6SMauro Carvalho Chehab #include <media/rc-map.h>
14*32cf86f6SMauro Carvalho Chehab 
15*32cf86f6SMauro Carvalho Chehab /* Michael Tokarev <mjt@tls.msk.ru>
16*32cf86f6SMauro Carvalho Chehab    keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at
17*32cf86f6SMauro Carvalho Chehab    least, and probably other cards too.
18*32cf86f6SMauro Carvalho Chehab    The "ascii-art picture" below (in comments, first row
19*32cf86f6SMauro Carvalho Chehab    is the keycode in hex, and subsequent row(s) shows
20*32cf86f6SMauro Carvalho Chehab    the button labels (several variants when appropriate)
21*32cf86f6SMauro Carvalho Chehab    helps to descide which keycodes to assign to the buttons.
22*32cf86f6SMauro Carvalho Chehab  */
23*32cf86f6SMauro Carvalho Chehab 
24*32cf86f6SMauro Carvalho Chehab static struct ir_scancode manli[] = {
25*32cf86f6SMauro Carvalho Chehab 
26*32cf86f6SMauro Carvalho Chehab 	/*  0x1c            0x12  *
27*32cf86f6SMauro Carvalho Chehab 	 * FUNCTION         POWER *
28*32cf86f6SMauro Carvalho Chehab 	 *   FM              (|)  *
29*32cf86f6SMauro Carvalho Chehab 	 *                        */
30*32cf86f6SMauro Carvalho Chehab 	{ 0x1c, KEY_RADIO },	/*XXX*/
31*32cf86f6SMauro Carvalho Chehab 	{ 0x12, KEY_POWER },
32*32cf86f6SMauro Carvalho Chehab 
33*32cf86f6SMauro Carvalho Chehab 	/*  0x01    0x02    0x03  *
34*32cf86f6SMauro Carvalho Chehab 	 *   1       2       3    *
35*32cf86f6SMauro Carvalho Chehab 	 *                        *
36*32cf86f6SMauro Carvalho Chehab 	 *  0x04    0x05    0x06  *
37*32cf86f6SMauro Carvalho Chehab 	 *   4       5       6    *
38*32cf86f6SMauro Carvalho Chehab 	 *                        *
39*32cf86f6SMauro Carvalho Chehab 	 *  0x07    0x08    0x09  *
40*32cf86f6SMauro Carvalho Chehab 	 *   7       8       9    *
41*32cf86f6SMauro Carvalho Chehab 	 *                        */
42*32cf86f6SMauro Carvalho Chehab 	{ 0x01, KEY_1 },
43*32cf86f6SMauro Carvalho Chehab 	{ 0x02, KEY_2 },
44*32cf86f6SMauro Carvalho Chehab 	{ 0x03, KEY_3 },
45*32cf86f6SMauro Carvalho Chehab 	{ 0x04, KEY_4 },
46*32cf86f6SMauro Carvalho Chehab 	{ 0x05, KEY_5 },
47*32cf86f6SMauro Carvalho Chehab 	{ 0x06, KEY_6 },
48*32cf86f6SMauro Carvalho Chehab 	{ 0x07, KEY_7 },
49*32cf86f6SMauro Carvalho Chehab 	{ 0x08, KEY_8 },
50*32cf86f6SMauro Carvalho Chehab 	{ 0x09, KEY_9 },
51*32cf86f6SMauro Carvalho Chehab 
52*32cf86f6SMauro Carvalho Chehab 	/*  0x0a    0x00    0x17  *
53*32cf86f6SMauro Carvalho Chehab 	 * RECALL    0      +100  *
54*32cf86f6SMauro Carvalho Chehab 	 *                  PLUS  *
55*32cf86f6SMauro Carvalho Chehab 	 *                        */
56*32cf86f6SMauro Carvalho Chehab 	{ 0x0a, KEY_AGAIN },	/*XXX KEY_REWIND? */
57*32cf86f6SMauro Carvalho Chehab 	{ 0x00, KEY_0 },
58*32cf86f6SMauro Carvalho Chehab 	{ 0x17, KEY_DIGITS },	/*XXX*/
59*32cf86f6SMauro Carvalho Chehab 
60*32cf86f6SMauro Carvalho Chehab 	/*  0x14            0x10  *
61*32cf86f6SMauro Carvalho Chehab 	 *  MENU            INFO  *
62*32cf86f6SMauro Carvalho Chehab 	 *  OSD                   */
63*32cf86f6SMauro Carvalho Chehab 	{ 0x14, KEY_MENU },
64*32cf86f6SMauro Carvalho Chehab 	{ 0x10, KEY_INFO },
65*32cf86f6SMauro Carvalho Chehab 
66*32cf86f6SMauro Carvalho Chehab 	/*          0x0b          *
67*32cf86f6SMauro Carvalho Chehab 	 *           Up           *
68*32cf86f6SMauro Carvalho Chehab 	 *                        *
69*32cf86f6SMauro Carvalho Chehab 	 *  0x18    0x16    0x0c  *
70*32cf86f6SMauro Carvalho Chehab 	 *  Left     Ok     Right *
71*32cf86f6SMauro Carvalho Chehab 	 *                        *
72*32cf86f6SMauro Carvalho Chehab 	 *         0x015          *
73*32cf86f6SMauro Carvalho Chehab 	 *         Down           *
74*32cf86f6SMauro Carvalho Chehab 	 *                        */
75*32cf86f6SMauro Carvalho Chehab 	{ 0x0b, KEY_UP },
76*32cf86f6SMauro Carvalho Chehab 	{ 0x18, KEY_LEFT },
77*32cf86f6SMauro Carvalho Chehab 	{ 0x16, KEY_OK },	/*XXX KEY_SELECT? KEY_ENTER? */
78*32cf86f6SMauro Carvalho Chehab 	{ 0x0c, KEY_RIGHT },
79*32cf86f6SMauro Carvalho Chehab 	{ 0x15, KEY_DOWN },
80*32cf86f6SMauro Carvalho Chehab 
81*32cf86f6SMauro Carvalho Chehab 	/*  0x11            0x0d  *
82*32cf86f6SMauro Carvalho Chehab 	 *  TV/AV           MODE  *
83*32cf86f6SMauro Carvalho Chehab 	 *  SOURCE         STEREO *
84*32cf86f6SMauro Carvalho Chehab 	 *                        */
85*32cf86f6SMauro Carvalho Chehab 	{ 0x11, KEY_TV },	/*XXX*/
86*32cf86f6SMauro Carvalho Chehab 	{ 0x0d, KEY_MODE },	/*XXX there's no KEY_STEREO	*/
87*32cf86f6SMauro Carvalho Chehab 
88*32cf86f6SMauro Carvalho Chehab 	/*  0x0f    0x1b    0x1a  *
89*32cf86f6SMauro Carvalho Chehab 	 *  AUDIO   Vol+    Chan+ *
90*32cf86f6SMauro Carvalho Chehab 	 *        TIMESHIFT???    *
91*32cf86f6SMauro Carvalho Chehab 	 *                        *
92*32cf86f6SMauro Carvalho Chehab 	 *  0x0e    0x1f    0x1e  *
93*32cf86f6SMauro Carvalho Chehab 	 *  SLEEP   Vol-    Chan- *
94*32cf86f6SMauro Carvalho Chehab 	 *                        */
95*32cf86f6SMauro Carvalho Chehab 	{ 0x0f, KEY_AUDIO },
96*32cf86f6SMauro Carvalho Chehab 	{ 0x1b, KEY_VOLUMEUP },
97*32cf86f6SMauro Carvalho Chehab 	{ 0x1a, KEY_CHANNELUP },
98*32cf86f6SMauro Carvalho Chehab 	{ 0x0e, KEY_TIME },
99*32cf86f6SMauro Carvalho Chehab 	{ 0x1f, KEY_VOLUMEDOWN },
100*32cf86f6SMauro Carvalho Chehab 	{ 0x1e, KEY_CHANNELDOWN },
101*32cf86f6SMauro Carvalho Chehab 
102*32cf86f6SMauro Carvalho Chehab 	/*         0x13     0x19  *
103*32cf86f6SMauro Carvalho Chehab 	 *         MUTE   SNAPSHOT*
104*32cf86f6SMauro Carvalho Chehab 	 *                        */
105*32cf86f6SMauro Carvalho Chehab 	{ 0x13, KEY_MUTE },
106*32cf86f6SMauro Carvalho Chehab 	{ 0x19, KEY_CAMERA },
107*32cf86f6SMauro Carvalho Chehab 
108*32cf86f6SMauro Carvalho Chehab 	/* 0x1d unused ? */
109*32cf86f6SMauro Carvalho Chehab };
110*32cf86f6SMauro Carvalho Chehab 
111*32cf86f6SMauro Carvalho Chehab static struct rc_keymap manli_map = {
112*32cf86f6SMauro Carvalho Chehab 	.map = {
113*32cf86f6SMauro Carvalho Chehab 		.scan    = manli,
114*32cf86f6SMauro Carvalho Chehab 		.size    = ARRAY_SIZE(manli),
115*32cf86f6SMauro Carvalho Chehab 		.ir_type = IR_TYPE_UNKNOWN,	/* Legacy IR type */
116*32cf86f6SMauro Carvalho Chehab 		.name    = RC_MAP_MANLI,
117*32cf86f6SMauro Carvalho Chehab 	}
118*32cf86f6SMauro Carvalho Chehab };
119*32cf86f6SMauro Carvalho Chehab 
120*32cf86f6SMauro Carvalho Chehab static int __init init_rc_map_manli(void)
121*32cf86f6SMauro Carvalho Chehab {
122*32cf86f6SMauro Carvalho Chehab 	return ir_register_map(&manli_map);
123*32cf86f6SMauro Carvalho Chehab }
124*32cf86f6SMauro Carvalho Chehab 
125*32cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_manli(void)
126*32cf86f6SMauro Carvalho Chehab {
127*32cf86f6SMauro Carvalho Chehab 	ir_unregister_map(&manli_map);
128*32cf86f6SMauro Carvalho Chehab }
129*32cf86f6SMauro Carvalho Chehab 
130*32cf86f6SMauro Carvalho Chehab module_init(init_rc_map_manli)
131*32cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_manli)
132*32cf86f6SMauro Carvalho Chehab 
133*32cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL");
134*32cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
135