blob: 0e90a3bd9499bf57f67c81192773e4ab43091e40 [file] [log] [blame]
Mauro Carvalho Chehab6686fa62010-04-02 03:05:46 -03001/* winfast.h - Keytable for winfast Remote Controller
2 *
3 * keymap imported from ir-keymaps.c
4 *
5 * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 */
12
13#include <media/rc-map.h>
14
15/* Table for Leadtek Winfast Remote Controls - used by both bttv and cx88 */
16
17static struct ir_scancode winfast[] = {
18 /* Keys 0 to 9 */
19 { 0x12, KEY_0 },
20 { 0x05, KEY_1 },
21 { 0x06, KEY_2 },
22 { 0x07, KEY_3 },
23 { 0x09, KEY_4 },
24 { 0x0a, KEY_5 },
25 { 0x0b, KEY_6 },
26 { 0x0d, KEY_7 },
27 { 0x0e, KEY_8 },
28 { 0x0f, KEY_9 },
29
30 { 0x00, KEY_POWER },
31 { 0x1b, KEY_AUDIO }, /* Audio Source */
32 { 0x02, KEY_TUNER }, /* TV/FM, not on Y0400052 */
33 { 0x1e, KEY_VIDEO }, /* Video Source */
34 { 0x16, KEY_INFO }, /* Display information */
35 { 0x04, KEY_VOLUMEUP },
36 { 0x08, KEY_VOLUMEDOWN },
37 { 0x0c, KEY_CHANNELUP },
38 { 0x10, KEY_CHANNELDOWN },
39 { 0x03, KEY_ZOOM }, /* fullscreen */
40 { 0x1f, KEY_TEXT }, /* closed caption/teletext */
41 { 0x20, KEY_SLEEP },
42 { 0x29, KEY_CLEAR }, /* boss key */
43 { 0x14, KEY_MUTE },
44 { 0x2b, KEY_RED },
45 { 0x2c, KEY_GREEN },
46 { 0x2d, KEY_YELLOW },
47 { 0x2e, KEY_BLUE },
48 { 0x18, KEY_KPPLUS }, /* fine tune + , not on Y040052 */
49 { 0x19, KEY_KPMINUS }, /* fine tune - , not on Y040052 */
50 { 0x2a, KEY_MEDIA }, /* PIP (Picture in picture */
51 { 0x21, KEY_DOT },
52 { 0x13, KEY_ENTER },
53 { 0x11, KEY_LAST }, /* Recall (last channel */
54 { 0x22, KEY_PREVIOUS },
55 { 0x23, KEY_PLAYPAUSE },
56 { 0x24, KEY_NEXT },
57 { 0x25, KEY_TIME }, /* Time Shifting */
58 { 0x26, KEY_STOP },
59 { 0x27, KEY_RECORD },
60 { 0x28, KEY_SAVE }, /* Screenshot */
61 { 0x2f, KEY_MENU },
62 { 0x30, KEY_CANCEL },
63 { 0x31, KEY_CHANNEL }, /* Channel Surf */
64 { 0x32, KEY_SUBTITLE },
65 { 0x33, KEY_LANGUAGE },
66 { 0x34, KEY_REWIND },
67 { 0x35, KEY_FASTFORWARD },
68 { 0x36, KEY_TV },
69 { 0x37, KEY_RADIO }, /* FM */
70 { 0x38, KEY_DVD },
71
72 { 0x1a, KEY_MODE}, /* change to MCE mode on Y04G0051 */
73 { 0x3e, KEY_F21 }, /* MCE +VOL, on Y04G0033 */
74 { 0x3a, KEY_F22 }, /* MCE -VOL, on Y04G0033 */
75 { 0x3b, KEY_F23 }, /* MCE +CH, on Y04G0033 */
76 { 0x3f, KEY_F24 } /* MCE -CH, on Y04G0033 */
77};
78
79static struct rc_keymap winfast_map = {
80 .map = {
81 .scan = winfast,
82 .size = ARRAY_SIZE(winfast),
83 .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */
84 .name = RC_MAP_WINFAST,
85 }
86};
87
88static int __init init_rc_map_winfast(void)
89{
90 return ir_register_map(&winfast_map);
91}
92
93static void __exit exit_rc_map_winfast(void)
94{
95 ir_unregister_map(&winfast_map);
96}
97
98module_init(init_rc_map_winfast)
99module_exit(exit_rc_map_winfast)
100
101MODULE_LICENSE("GPL");
102MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");