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 | |
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')
-rw-r--r-- | drivers/media/rc/keymaps/rc-ati-x10.c | 96 | ||||
-rw-r--r-- | drivers/media/rc/keymaps/rc-medion-x10.c | 128 | ||||
-rw-r--r-- | drivers/media/rc/keymaps/rc-snapstream-firefly.c | 114 |
3 files changed, 169 insertions, 169 deletions
diff --git a/drivers/media/rc/keymaps/rc-ati-x10.c b/drivers/media/rc/keymaps/rc-ati-x10.c index e1b8b2605c48..81506440eded 100644 --- a/drivers/media/rc/keymaps/rc-ati-x10.c +++ b/drivers/media/rc/keymaps/rc-ati-x10.c | |||
@@ -27,55 +27,55 @@ | |||
27 | #include <media/rc-map.h> | 27 | #include <media/rc-map.h> |
28 | 28 | ||
29 | static struct rc_map_table ati_x10[] = { | 29 | static struct rc_map_table ati_x10[] = { |
30 | { 0xd20d, KEY_1 }, | 30 | { 0x0d, KEY_1 }, |
31 | { 0xd30e, KEY_2 }, | 31 | { 0x0e, KEY_2 }, |
32 | { 0xd40f, KEY_3 }, | 32 | { 0x0f, KEY_3 }, |
33 | { 0xd510, KEY_4 }, | 33 | { 0x10, KEY_4 }, |
34 | { 0xd611, KEY_5 }, | 34 | { 0x11, KEY_5 }, |
35 | { 0xd712, KEY_6 }, | 35 | { 0x12, KEY_6 }, |
36 | { 0xd813, KEY_7 }, | 36 | { 0x13, KEY_7 }, |
37 | { 0xd914, KEY_8 }, | 37 | { 0x14, KEY_8 }, |
38 | { 0xda15, KEY_9 }, | 38 | { 0x15, KEY_9 }, |
39 | { 0xdc17, KEY_0 }, | 39 | { 0x17, KEY_0 }, |
40 | { 0xc500, KEY_A }, | 40 | { 0x00, KEY_A }, |
41 | { 0xc601, KEY_B }, | 41 | { 0x01, KEY_B }, |
42 | { 0xde19, KEY_C }, | 42 | { 0x19, KEY_C }, |
43 | { 0xe01b, KEY_D }, | 43 | { 0x1b, KEY_D }, |
44 | { 0xe621, KEY_E }, | 44 | { 0x21, KEY_E }, |
45 | { 0xe823, KEY_F }, | 45 | { 0x23, KEY_F }, |
46 | 46 | ||
47 | { 0xdd18, KEY_KPENTER }, /* "check" */ | 47 | { 0x18, KEY_KPENTER }, /* "check" */ |
48 | { 0xdb16, KEY_MENU }, /* "menu" */ | 48 | { 0x16, KEY_MENU }, /* "menu" */ |
49 | { 0xc702, KEY_POWER }, /* Power */ | 49 | { 0x02, KEY_POWER }, /* Power */ |
50 | { 0xc803, KEY_TV }, /* TV */ | 50 | { 0x03, KEY_TV }, /* TV */ |
51 | { 0xc904, KEY_DVD }, /* DVD */ | 51 | { 0x04, KEY_DVD }, /* DVD */ |
52 | { 0xca05, KEY_WWW }, /* WEB */ | 52 | { 0x05, KEY_WWW }, /* WEB */ |
53 | { 0xcb06, KEY_BOOKMARKS }, /* "book" */ | 53 | { 0x06, KEY_BOOKMARKS }, /* "book" */ |
54 | { 0xcc07, KEY_EDIT }, /* "hand" */ | 54 | { 0x07, KEY_EDIT }, /* "hand" */ |
55 | { 0xe11c, KEY_COFFEE }, /* "timer" */ | 55 | { 0x1c, KEY_COFFEE }, /* "timer" */ |
56 | { 0xe520, KEY_FRONT }, /* "max" */ | 56 | { 0x20, KEY_FRONT }, /* "max" */ |
57 | { 0xe21d, KEY_LEFT }, /* left */ | 57 | { 0x1d, KEY_LEFT }, /* left */ |
58 | { 0xe41f, KEY_RIGHT }, /* right */ | 58 | { 0x1f, KEY_RIGHT }, /* right */ |
59 | { 0xe722, KEY_DOWN }, /* down */ | 59 | { 0x22, KEY_DOWN }, /* down */ |
60 | { 0xdf1a, KEY_UP }, /* up */ | 60 | { 0x1a, KEY_UP }, /* up */ |
61 | { 0xe31e, KEY_OK }, /* "OK" */ | 61 | { 0x1e, KEY_OK }, /* "OK" */ |
62 | { 0xce09, KEY_VOLUMEDOWN }, /* VOL + */ | 62 | { 0x09, KEY_VOLUMEDOWN }, /* VOL + */ |
63 | { 0xcd08, KEY_VOLUMEUP }, /* VOL - */ | 63 | { 0x08, KEY_VOLUMEUP }, /* VOL - */ |
64 | { 0xcf0a, KEY_MUTE }, /* MUTE */ | 64 | { 0x0a, KEY_MUTE }, /* MUTE */ |
65 | { 0xd00b, KEY_CHANNELUP }, /* CH + */ | 65 | { 0x0b, KEY_CHANNELUP }, /* CH + */ |
66 | { 0xd10c, KEY_CHANNELDOWN },/* CH - */ | 66 | { 0x0c, KEY_CHANNELDOWN },/* CH - */ |
67 | { 0xec27, KEY_RECORD }, /* ( o) red */ | 67 | { 0x27, KEY_RECORD }, /* ( o) red */ |
68 | { 0xea25, KEY_PLAY }, /* ( >) */ | 68 | { 0x25, KEY_PLAY }, /* ( >) */ |
69 | { 0xe924, KEY_REWIND }, /* (<<) */ | 69 | { 0x24, KEY_REWIND }, /* (<<) */ |
70 | { 0xeb26, KEY_FORWARD }, /* (>>) */ | 70 | { 0x26, KEY_FORWARD }, /* (>>) */ |
71 | { 0xed28, KEY_STOP }, /* ([]) */ | 71 | { 0x28, KEY_STOP }, /* ([]) */ |
72 | { 0xee29, KEY_PAUSE }, /* ('') */ | 72 | { 0x29, KEY_PAUSE }, /* ('') */ |
73 | { 0xf02b, KEY_PREVIOUS }, /* (<-) */ | 73 | { 0x2b, KEY_PREVIOUS }, /* (<-) */ |
74 | { 0xef2a, KEY_NEXT }, /* (>+) */ | 74 | { 0x2a, KEY_NEXT }, /* (>+) */ |
75 | { 0xf22d, KEY_INFO }, /* PLAYING */ | 75 | { 0x2d, KEY_INFO }, /* PLAYING */ |
76 | { 0xf32e, KEY_HOME }, /* TOP */ | 76 | { 0x2e, KEY_HOME }, /* TOP */ |
77 | { 0xf42f, KEY_END }, /* END */ | 77 | { 0x2f, KEY_END }, /* END */ |
78 | { 0xf530, KEY_SELECT }, /* SELECT */ | 78 | { 0x30, KEY_SELECT }, /* SELECT */ |
79 | }; | 79 | }; |
80 | 80 | ||
81 | static struct rc_map_list ati_x10_map = { | 81 | static struct rc_map_list ati_x10_map = { |
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 = { |
diff --git a/drivers/media/rc/keymaps/rc-snapstream-firefly.c b/drivers/media/rc/keymaps/rc-snapstream-firefly.c index ef146520931c..c7f33ec719b4 100644 --- a/drivers/media/rc/keymaps/rc-snapstream-firefly.c +++ b/drivers/media/rc/keymaps/rc-snapstream-firefly.c | |||
@@ -22,63 +22,63 @@ | |||
22 | #include <media/rc-map.h> | 22 | #include <media/rc-map.h> |
23 | 23 | ||
24 | static struct rc_map_table snapstream_firefly[] = { | 24 | static struct rc_map_table snapstream_firefly[] = { |
25 | { 0xf12c, KEY_ZOOM }, /* Maximize */ | 25 | { 0x2c, KEY_ZOOM }, /* Maximize */ |
26 | { 0xc702, KEY_CLOSE }, | 26 | { 0x02, KEY_CLOSE }, |
27 | 27 | ||
28 | { 0xd20d, KEY_1 }, | 28 | { 0x0d, KEY_1 }, |
29 | { 0xd30e, KEY_2 }, | 29 | { 0x0e, KEY_2 }, |
30 | { 0xd40f, KEY_3 }, | 30 | { 0x0f, KEY_3 }, |
31 | { 0xd510, KEY_4 }, | 31 | { 0x10, KEY_4 }, |
32 | { 0xd611, KEY_5 }, | 32 | { 0x11, KEY_5 }, |
33 | { 0xd712, KEY_6 }, | 33 | { 0x12, KEY_6 }, |
34 | { 0xd813, KEY_7 }, | 34 | { 0x13, KEY_7 }, |
35 | { 0xd914, KEY_8 }, | 35 | { 0x14, KEY_8 }, |
36 | { 0xda15, KEY_9 }, | 36 | { 0x15, KEY_9 }, |
37 | { 0xdc17, KEY_0 }, | 37 | { 0x17, KEY_0 }, |
38 | { 0xdb16, KEY_BACK }, | 38 | { 0x16, KEY_BACK }, |
39 | { 0xdd18, KEY_KPENTER }, /* ent */ | 39 | { 0x18, KEY_KPENTER }, /* ent */ |
40 | 40 | ||
41 | { 0xce09, KEY_VOLUMEUP }, | 41 | { 0x09, KEY_VOLUMEUP }, |
42 | { 0xcd08, KEY_VOLUMEDOWN }, | 42 | { 0x08, KEY_VOLUMEDOWN }, |
43 | { 0xcf0a, KEY_MUTE }, | 43 | { 0x0a, KEY_MUTE }, |
44 | { 0xd00b, KEY_CHANNELUP }, | 44 | { 0x0b, KEY_CHANNELUP }, |
45 | { 0xd10c, KEY_CHANNELDOWN }, | 45 | { 0x0c, KEY_CHANNELDOWN }, |
46 | { 0xc500, KEY_VENDOR }, /* firefly */ | 46 | { 0x00, KEY_VENDOR }, /* firefly */ |
47 | 47 | ||
48 | { 0xf32e, KEY_INFO }, | 48 | { 0x2e, KEY_INFO }, |
49 | { 0xf42f, KEY_OPTION }, | 49 | { 0x2f, KEY_OPTION }, |
50 | 50 | ||
51 | { 0xe21d, KEY_LEFT }, | 51 | { 0x1d, KEY_LEFT }, |
52 | { 0xe41f, KEY_RIGHT }, | 52 | { 0x1f, KEY_RIGHT }, |
53 | { 0xe722, KEY_DOWN }, | 53 | { 0x22, KEY_DOWN }, |
54 | { 0xdf1a, KEY_UP }, | 54 | { 0x1a, KEY_UP }, |
55 | { 0xe31e, KEY_OK }, | 55 | { 0x1e, KEY_OK }, |
56 | 56 | ||
57 | { 0xe11c, KEY_MENU }, | 57 | { 0x1c, KEY_MENU }, |
58 | { 0xe520, KEY_EXIT }, | 58 | { 0x20, KEY_EXIT }, |
59 | 59 | ||
60 | { 0xec27, KEY_RECORD }, | 60 | { 0x27, KEY_RECORD }, |
61 | { 0xea25, KEY_PLAY }, | 61 | { 0x25, KEY_PLAY }, |
62 | { 0xed28, KEY_STOP }, | 62 | { 0x28, KEY_STOP }, |
63 | { 0xe924, KEY_REWIND }, | 63 | { 0x24, KEY_REWIND }, |
64 | { 0xeb26, KEY_FORWARD }, | 64 | { 0x26, KEY_FORWARD }, |
65 | { 0xee29, KEY_PAUSE }, | 65 | { 0x29, KEY_PAUSE }, |
66 | { 0xf02b, KEY_PREVIOUS }, | 66 | { 0x2b, KEY_PREVIOUS }, |
67 | { 0xef2a, KEY_NEXT }, | 67 | { 0x2a, KEY_NEXT }, |
68 | 68 | ||
69 | { 0xcb06, KEY_AUDIO }, /* Music */ | 69 | { 0x06, KEY_AUDIO }, /* Music */ |
70 | { 0xca05, KEY_IMAGES }, /* Photos */ | 70 | { 0x05, KEY_IMAGES }, /* Photos */ |
71 | { 0xc904, KEY_DVD }, | 71 | { 0x04, KEY_DVD }, |
72 | { 0xc803, KEY_TV }, | 72 | { 0x03, KEY_TV }, |
73 | { 0xcc07, KEY_VIDEO }, | 73 | { 0x07, KEY_VIDEO }, |
74 | 74 | ||
75 | { 0xc601, KEY_HELP }, | 75 | { 0x01, KEY_HELP }, |
76 | { 0xf22d, KEY_MODE }, /* Mouse */ | 76 | { 0x2d, KEY_MODE }, /* Mouse */ |
77 | 77 | ||
78 | { 0xde19, KEY_A }, | 78 | { 0x19, KEY_A }, |
79 | { 0xe01b, KEY_B }, | 79 | { 0x1b, KEY_B }, |
80 | { 0xe621, KEY_C }, | 80 | { 0x21, KEY_C }, |
81 | { 0xe823, KEY_D }, | 81 | { 0x23, KEY_D }, |
82 | }; | 82 | }; |
83 | 83 | ||
84 | static struct rc_map_list snapstream_firefly_map = { | 84 | static struct rc_map_list snapstream_firefly_map = { |