diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-11-09 21:00:14 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-29 05:16:36 -0500 |
commit | 32cf86f6d16367db5a10039c1dd938a2427d697c (patch) | |
tree | 21e6716b64d80d280da2561efd873430ca833f08 /drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c | |
parent | 3ffea4988be3f3fa65f2104ba31eff2b5e0e82a0 (diff) |
[media] rename drivers/media/IR to drives/media/rc
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c')
-rw-r--r-- | drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c b/drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c new file mode 100644 index 000000000000..eb8e42c18ff9 --- /dev/null +++ b/drivers/media/rc/keymaps/rc-msi-tvanywhere-plus.c | |||
@@ -0,0 +1,123 @@ | |||
1 | /* msi-tvanywhere-plus.h - Keytable for msi_tvanywhere_plus 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 | /* | ||
16 | Keycodes for remote on the MSI TV@nywhere Plus. The controller IC on the card | ||
17 | is marked "KS003". The controller is I2C at address 0x30, but does not seem | ||
18 | to respond to probes until a read is performed from a valid device. | ||
19 | I don't know why... | ||
20 | |||
21 | Note: This remote may be of similar or identical design to the | ||
22 | Pixelview remote (?). The raw codes and duplicate button codes | ||
23 | appear to be the same. | ||
24 | |||
25 | Henry Wong <henry@stuffedcow.net> | ||
26 | Some changes to formatting and keycodes by Mark Schultz <n9xmj@yahoo.com> | ||
27 | */ | ||
28 | |||
29 | static struct ir_scancode msi_tvanywhere_plus[] = { | ||
30 | |||
31 | /* ---- Remote Button Layout ---- | ||
32 | |||
33 | POWER SOURCE SCAN MUTE | ||
34 | TV/FM 1 2 3 | ||
35 | |> 4 5 6 | ||
36 | <| 7 8 9 | ||
37 | ^^UP 0 + RECALL | ||
38 | vvDN RECORD STOP PLAY | ||
39 | |||
40 | MINIMIZE ZOOM | ||
41 | |||
42 | CH+ | ||
43 | VOL- VOL+ | ||
44 | CH- | ||
45 | |||
46 | SNAPSHOT MTS | ||
47 | |||
48 | << FUNC >> RESET | ||
49 | */ | ||
50 | |||
51 | { 0x01, KEY_1 }, /* 1 */ | ||
52 | { 0x0b, KEY_2 }, /* 2 */ | ||
53 | { 0x1b, KEY_3 }, /* 3 */ | ||
54 | { 0x05, KEY_4 }, /* 4 */ | ||
55 | { 0x09, KEY_5 }, /* 5 */ | ||
56 | { 0x15, KEY_6 }, /* 6 */ | ||
57 | { 0x06, KEY_7 }, /* 7 */ | ||
58 | { 0x0a, KEY_8 }, /* 8 */ | ||
59 | { 0x12, KEY_9 }, /* 9 */ | ||
60 | { 0x02, KEY_0 }, /* 0 */ | ||
61 | { 0x10, KEY_KPPLUS }, /* + */ | ||
62 | { 0x13, KEY_AGAIN }, /* Recall */ | ||
63 | |||
64 | { 0x1e, KEY_POWER }, /* Power */ | ||
65 | { 0x07, KEY_TUNER }, /* Source */ | ||
66 | { 0x1c, KEY_SEARCH }, /* Scan */ | ||
67 | { 0x18, KEY_MUTE }, /* Mute */ | ||
68 | |||
69 | { 0x03, KEY_RADIO }, /* TV/FM */ | ||
70 | /* The next four keys are duplicates that appear to send the | ||
71 | same IR code as Ch+, Ch-, >>, and << . The raw code assigned | ||
72 | to them is the actual code + 0x20 - they will never be | ||
73 | detected as such unless some way is discovered to distinguish | ||
74 | these buttons from those that have the same code. */ | ||
75 | { 0x3f, KEY_RIGHT }, /* |> and Ch+ */ | ||
76 | { 0x37, KEY_LEFT }, /* <| and Ch- */ | ||
77 | { 0x2c, KEY_UP }, /* ^^Up and >> */ | ||
78 | { 0x24, KEY_DOWN }, /* vvDn and << */ | ||
79 | |||
80 | { 0x00, KEY_RECORD }, /* Record */ | ||
81 | { 0x08, KEY_STOP }, /* Stop */ | ||
82 | { 0x11, KEY_PLAY }, /* Play */ | ||
83 | |||
84 | { 0x0f, KEY_CLOSE }, /* Minimize */ | ||
85 | { 0x19, KEY_ZOOM }, /* Zoom */ | ||
86 | { 0x1a, KEY_CAMERA }, /* Snapshot */ | ||
87 | { 0x0d, KEY_LANGUAGE }, /* MTS */ | ||
88 | |||
89 | { 0x14, KEY_VOLUMEDOWN }, /* Vol- */ | ||
90 | { 0x16, KEY_VOLUMEUP }, /* Vol+ */ | ||
91 | { 0x17, KEY_CHANNELDOWN }, /* Ch- */ | ||
92 | { 0x1f, KEY_CHANNELUP }, /* Ch+ */ | ||
93 | |||
94 | { 0x04, KEY_REWIND }, /* << */ | ||
95 | { 0x0e, KEY_MENU }, /* Function */ | ||
96 | { 0x0c, KEY_FASTFORWARD }, /* >> */ | ||
97 | { 0x1d, KEY_RESTART }, /* Reset */ | ||
98 | }; | ||
99 | |||
100 | static struct rc_keymap msi_tvanywhere_plus_map = { | ||
101 | .map = { | ||
102 | .scan = msi_tvanywhere_plus, | ||
103 | .size = ARRAY_SIZE(msi_tvanywhere_plus), | ||
104 | .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */ | ||
105 | .name = RC_MAP_MSI_TVANYWHERE_PLUS, | ||
106 | } | ||
107 | }; | ||
108 | |||
109 | static int __init init_rc_map_msi_tvanywhere_plus(void) | ||
110 | { | ||
111 | return ir_register_map(&msi_tvanywhere_plus_map); | ||
112 | } | ||
113 | |||
114 | static void __exit exit_rc_map_msi_tvanywhere_plus(void) | ||
115 | { | ||
116 | ir_unregister_map(&msi_tvanywhere_plus_map); | ||
117 | } | ||
118 | |||
119 | module_init(init_rc_map_msi_tvanywhere_plus) | ||
120 | module_exit(exit_rc_map_msi_tvanywhere_plus) | ||
121 | |||
122 | MODULE_LICENSE("GPL"); | ||
123 | MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); | ||