diff options
author | Anssi Hannula <anssi.hannula@iki.fi> | 2011-12-06 20:34:29 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-11 07:51:59 -0500 |
commit | 5eefb4f09bd8b250421fbd055e67d136d57f4030 (patch) | |
tree | 7463a7dc35dd9c5dc40b55dad92f7b2552468d38 /drivers/media/rc/keymaps/rc-medion-x10.c | |
parent | 6b806e30a3149816454a7ab71d50c244ebdb27d1 (diff) |
[media] ati_remote: switch to single-byte scancodes
The ati_remote driver currently uses 2-byte scancodes. However, one of
those bytes is actually a checksum and therefore shouldn't be considered
as part of the scancode.
Fix the driver to only use the actual data byte as a scancode and to
check the checksum itself. Update the bundled keymaps accordingly.
Since ati_remote was only migrated to the rc subsystem for 3.2, the
previous scancodes weren't emitted on any stable kernel.
Reported-by: George Spelvin <linux@horizon.com>
Signed-off-by: Anssi Hannula <anssi.hannula@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc/keymaps/rc-medion-x10.c')
-rw-r--r-- | drivers/media/rc/keymaps/rc-medion-x10.c | 128 |
1 files changed, 64 insertions, 64 deletions
diff --git a/drivers/media/rc/keymaps/rc-medion-x10.c b/drivers/media/rc/keymaps/rc-medion-x10.c index 09e2cc01d110..479cdb897810 100644 --- a/drivers/media/rc/keymaps/rc-medion-x10.c +++ b/drivers/media/rc/keymaps/rc-medion-x10.c | |||
@@ -25,70 +25,70 @@ | |||
25 | #include <media/rc-map.h> | 25 | #include <media/rc-map.h> |
26 | 26 | ||
27 | static struct rc_map_table medion_x10[] = { | 27 | static struct rc_map_table medion_x10[] = { |
28 | { 0xf12c, KEY_TV }, /* TV */ | 28 | { 0x2c, KEY_TV }, /* TV */ |
29 | { 0xf22d, KEY_VCR }, /* VCR */ | 29 | { 0x2d, KEY_VCR }, /* VCR */ |
30 | { 0xc904, KEY_DVD }, /* DVD */ | 30 | { 0x04, KEY_DVD }, /* DVD */ |
31 | { 0xcb06, KEY_AUDIO }, /* MUSIC */ | 31 | { 0x06, KEY_AUDIO }, /* MUSIC */ |
32 | 32 | ||
33 | { 0xf32e, KEY_RADIO }, /* RADIO */ | 33 | { 0x2e, KEY_RADIO }, /* RADIO */ |
34 | { 0xca05, KEY_DIRECTORY }, /* PHOTO */ | 34 | { 0x05, KEY_DIRECTORY }, /* PHOTO */ |
35 | { 0xf42f, KEY_INFO }, /* TV-PREVIEW */ | 35 | { 0x2f, KEY_INFO }, /* TV-PREVIEW */ |
36 | { 0xf530, KEY_LIST }, /* CHANNEL-LST */ | 36 | { 0x30, KEY_LIST }, /* CHANNEL-LST */ |
37 | 37 | ||
38 | { 0xe01b, KEY_SETUP }, /* SETUP */ | 38 | { 0x1b, KEY_SETUP }, /* SETUP */ |
39 | { 0xf631, KEY_VIDEO }, /* VIDEO DESKTOP */ | 39 | { 0x31, KEY_VIDEO }, /* VIDEO DESKTOP */ |
40 | 40 | ||
41 | { 0xcd08, KEY_VOLUMEDOWN }, /* VOL - */ | 41 | { 0x08, KEY_VOLUMEDOWN }, /* VOL - */ |
42 | { 0xce09, KEY_VOLUMEUP }, /* VOL + */ | 42 | { 0x09, KEY_VOLUMEUP }, /* VOL + */ |
43 | { 0xd00b, KEY_CHANNELUP }, /* CHAN + */ | 43 | { 0x0b, KEY_CHANNELUP }, /* CHAN + */ |
44 | { 0xd10c, KEY_CHANNELDOWN }, /* CHAN - */ | 44 | { 0x0c, KEY_CHANNELDOWN }, /* CHAN - */ |
45 | { 0xc500, KEY_MUTE }, /* MUTE */ | 45 | { 0x00, KEY_MUTE }, /* MUTE */ |
46 | 46 | ||
47 | { 0xf732, KEY_RED }, /* red */ | 47 | { 0x32, KEY_RED }, /* red */ |
48 | { 0xf833, KEY_GREEN }, /* green */ | 48 | { 0x33, KEY_GREEN }, /* green */ |
49 | { 0xf934, KEY_YELLOW }, /* yellow */ | 49 | { 0x34, KEY_YELLOW }, /* yellow */ |
50 | { 0xfa35, KEY_BLUE }, /* blue */ | 50 | { 0x35, KEY_BLUE }, /* blue */ |
51 | { 0xdb16, KEY_TEXT }, /* TXT */ | 51 | { 0x16, KEY_TEXT }, /* TXT */ |
52 | 52 | ||
53 | { 0xd20d, KEY_1 }, | 53 | { 0x0d, KEY_1 }, |
54 | { 0xd30e, KEY_2 }, | 54 | { 0x0e, KEY_2 }, |
55 | { 0xd40f, KEY_3 }, | 55 | { 0x0f, KEY_3 }, |
56 | { 0xd510, KEY_4 }, | 56 | { 0x10, KEY_4 }, |
57 | { 0xd611, KEY_5 }, | 57 | { 0x11, KEY_5 }, |
58 | { 0xd712, KEY_6 }, | 58 | { 0x12, KEY_6 }, |
59 | { 0xd813, KEY_7 }, | 59 | { 0x13, KEY_7 }, |
60 | { 0xd914, KEY_8 }, | 60 | { 0x14, KEY_8 }, |
61 | { 0xda15, KEY_9 }, | 61 | { 0x15, KEY_9 }, |
62 | { 0xdc17, KEY_0 }, | 62 | { 0x17, KEY_0 }, |
63 | { 0xe11c, KEY_SEARCH }, /* TV/RAD, CH SRC */ | 63 | { 0x1c, KEY_SEARCH }, /* TV/RAD, CH SRC */ |
64 | { 0xe520, KEY_DELETE }, /* DELETE */ | 64 | { 0x20, KEY_DELETE }, /* DELETE */ |
65 | 65 | ||
66 | { 0xfb36, KEY_KEYBOARD }, /* RENAME */ | 66 | { 0x36, KEY_KEYBOARD }, /* RENAME */ |
67 | { 0xdd18, KEY_SCREEN }, /* SNAPSHOT */ | 67 | { 0x18, KEY_SCREEN }, /* SNAPSHOT */ |
68 | 68 | ||
69 | { 0xdf1a, KEY_UP }, /* up */ | 69 | { 0x1a, KEY_UP }, /* up */ |
70 | { 0xe722, KEY_DOWN }, /* down */ | 70 | { 0x22, KEY_DOWN }, /* down */ |
71 | { 0xe21d, KEY_LEFT }, /* left */ | 71 | { 0x1d, KEY_LEFT }, /* left */ |
72 | { 0xe41f, KEY_RIGHT }, /* right */ | 72 | { 0x1f, KEY_RIGHT }, /* right */ |
73 | { 0xe31e, KEY_OK }, /* OK */ | 73 | { 0x1e, KEY_OK }, /* OK */ |
74 | 74 | ||
75 | { 0xfc37, KEY_SELECT }, /* ACQUIRE IMAGE */ | 75 | { 0x37, KEY_SELECT }, /* ACQUIRE IMAGE */ |
76 | { 0xfd38, KEY_EDIT }, /* EDIT IMAGE */ | 76 | { 0x38, KEY_EDIT }, /* EDIT IMAGE */ |
77 | 77 | ||
78 | { 0xe924, KEY_REWIND }, /* rewind (<<) */ | 78 | { 0x24, KEY_REWIND }, /* rewind (<<) */ |
79 | { 0xea25, KEY_PLAY }, /* play ( >) */ | 79 | { 0x25, KEY_PLAY }, /* play ( >) */ |
80 | { 0xeb26, KEY_FORWARD }, /* forward (>>) */ | 80 | { 0x26, KEY_FORWARD }, /* forward (>>) */ |
81 | { 0xec27, KEY_RECORD }, /* record ( o) */ | 81 | { 0x27, KEY_RECORD }, /* record ( o) */ |
82 | { 0xed28, KEY_STOP }, /* stop ([]) */ | 82 | { 0x28, KEY_STOP }, /* stop ([]) */ |
83 | { 0xee29, KEY_PAUSE }, /* pause ('') */ | 83 | { 0x29, KEY_PAUSE }, /* pause ('') */ |
84 | 84 | ||
85 | { 0xe621, KEY_PREVIOUS }, /* prev */ | 85 | { 0x21, KEY_PREVIOUS }, /* prev */ |
86 | { 0xfe39, KEY_SWITCHVIDEOMODE }, /* F SCR */ | 86 | { 0x39, KEY_SWITCHVIDEOMODE }, /* F SCR */ |
87 | { 0xe823, KEY_NEXT }, /* next */ | 87 | { 0x23, KEY_NEXT }, /* next */ |
88 | { 0xde19, KEY_MENU }, /* MENU */ | 88 | { 0x19, KEY_MENU }, /* MENU */ |
89 | { 0xff3a, KEY_LANGUAGE }, /* AUDIO */ | 89 | { 0x3a, KEY_LANGUAGE }, /* AUDIO */ |
90 | 90 | ||
91 | { 0xc702, KEY_POWER }, /* POWER */ | 91 | { 0x02, KEY_POWER }, /* POWER */ |
92 | }; | 92 | }; |
93 | 93 | ||
94 | static struct rc_map_list medion_x10_map = { | 94 | static struct rc_map_list medion_x10_map = { |