aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/ati_remote.c111
-rw-r--r--drivers/media/rc/keymaps/rc-ati-x10.c96
-rw-r--r--drivers/media/rc/keymaps/rc-medion-x10.c128
-rw-r--r--drivers/media/rc/keymaps/rc-snapstream-firefly.c114
4 files changed, 220 insertions, 229 deletions
diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c
index 303f22ea04c0..01bb8daf4b09 100644
--- a/drivers/media/rc/ati_remote.c
+++ b/drivers/media/rc/ati_remote.c
@@ -189,7 +189,7 @@ struct ati_remote {
189 dma_addr_t inbuf_dma; 189 dma_addr_t inbuf_dma;
190 dma_addr_t outbuf_dma; 190 dma_addr_t outbuf_dma;
191 191
192 unsigned char old_data[2]; /* Detect duplicate events */ 192 unsigned char old_data; /* Detect duplicate events */
193 unsigned long old_jiffies; 193 unsigned long old_jiffies;
194 unsigned long acc_jiffies; /* handle acceleration */ 194 unsigned long acc_jiffies; /* handle acceleration */
195 unsigned long first_jiffies; 195 unsigned long first_jiffies;
@@ -221,35 +221,35 @@ struct ati_remote {
221/* Translation table from hardware messages to input events. */ 221/* Translation table from hardware messages to input events. */
222static const struct { 222static const struct {
223 short kind; 223 short kind;
224 unsigned char data1, data2; 224 unsigned char data;
225 int type; 225 int type;
226 unsigned int code; 226 unsigned int code;
227 int value; 227 int value;
228} ati_remote_tbl[] = { 228} ati_remote_tbl[] = {
229 /* Directional control pad axes */ 229 /* Directional control pad axes */
230 {KIND_ACCEL, 0x35, 0x70, EV_REL, REL_X, -1}, /* left */ 230 {KIND_ACCEL, 0x70, EV_REL, REL_X, -1}, /* left */
231 {KIND_ACCEL, 0x36, 0x71, EV_REL, REL_X, 1}, /* right */ 231 {KIND_ACCEL, 0x71, EV_REL, REL_X, 1}, /* right */
232 {KIND_ACCEL, 0x37, 0x72, EV_REL, REL_Y, -1}, /* up */ 232 {KIND_ACCEL, 0x72, EV_REL, REL_Y, -1}, /* up */
233 {KIND_ACCEL, 0x38, 0x73, EV_REL, REL_Y, 1}, /* down */ 233 {KIND_ACCEL, 0x73, EV_REL, REL_Y, 1}, /* down */
234 /* Directional control pad diagonals */ 234 /* Directional control pad diagonals */
235 {KIND_LU, 0x39, 0x74, EV_REL, 0, 0}, /* left up */ 235 {KIND_LU, 0x74, EV_REL, 0, 0}, /* left up */
236 {KIND_RU, 0x3a, 0x75, EV_REL, 0, 0}, /* right up */ 236 {KIND_RU, 0x75, EV_REL, 0, 0}, /* right up */
237 {KIND_LD, 0x3c, 0x77, EV_REL, 0, 0}, /* left down */ 237 {KIND_LD, 0x77, EV_REL, 0, 0}, /* left down */
238 {KIND_RD, 0x3b, 0x76, EV_REL, 0, 0}, /* right down */ 238 {KIND_RD, 0x76, EV_REL, 0, 0}, /* right down */
239 239
240 /* "Mouse button" buttons */ 240 /* "Mouse button" buttons */
241 {KIND_LITERAL, 0x3d, 0x78, EV_KEY, BTN_LEFT, 1}, /* left btn down */ 241 {KIND_LITERAL, 0x78, EV_KEY, BTN_LEFT, 1}, /* left btn down */
242 {KIND_LITERAL, 0x3e, 0x79, EV_KEY, BTN_LEFT, 0}, /* left btn up */ 242 {KIND_LITERAL, 0x79, EV_KEY, BTN_LEFT, 0}, /* left btn up */
243 {KIND_LITERAL, 0x41, 0x7c, EV_KEY, BTN_RIGHT, 1},/* right btn down */ 243 {KIND_LITERAL, 0x7c, EV_KEY, BTN_RIGHT, 1},/* right btn down */
244 {KIND_LITERAL, 0x42, 0x7d, EV_KEY, BTN_RIGHT, 0},/* right btn up */ 244 {KIND_LITERAL, 0x7d, EV_KEY, BTN_RIGHT, 0},/* right btn up */
245 245
246 /* Artificial "doubleclick" events are generated by the hardware. 246 /* Artificial "doubleclick" events are generated by the hardware.
247 * They are mapped to the "side" and "extra" mouse buttons here. */ 247 * They are mapped to the "side" and "extra" mouse buttons here. */
248 {KIND_FILTERED, 0x3f, 0x7a, EV_KEY, BTN_SIDE, 1}, /* left dblclick */ 248 {KIND_FILTERED, 0x7a, EV_KEY, BTN_SIDE, 1}, /* left dblclick */
249 {KIND_FILTERED, 0x43, 0x7e, EV_KEY, BTN_EXTRA, 1},/* right dblclick */ 249 {KIND_FILTERED, 0x7e, EV_KEY, BTN_EXTRA, 1},/* right dblclick */
250 250
251 /* Non-mouse events are handled by rc-core */ 251 /* Non-mouse events are handled by rc-core */
252 {KIND_END, 0x00, 0x00, EV_MAX + 1, 0, 0} 252 {KIND_END, 0x00, EV_MAX + 1, 0, 0}
253}; 253};
254 254
255/* Local function prototypes */ 255/* Local function prototypes */
@@ -397,25 +397,6 @@ static int ati_remote_sendpacket(struct ati_remote *ati_remote, u16 cmd, unsigne
397} 397}
398 398
399/* 399/*
400 * ati_remote_event_lookup
401 */
402static int ati_remote_event_lookup(int rem, unsigned char d1, unsigned char d2)
403{
404 int i;
405
406 for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) {
407 /*
408 * Decide if the table entry matches the remote input.
409 */
410 if (ati_remote_tbl[i].data1 == d1 &&
411 ati_remote_tbl[i].data2 == d2)
412 return i;
413
414 }
415 return -1;
416}
417
418/*
419 * ati_remote_compute_accel 400 * ati_remote_compute_accel
420 * 401 *
421 * Implements acceleration curve for directional control pad 402 * Implements acceleration curve for directional control pad
@@ -463,7 +444,15 @@ static void ati_remote_input_report(struct urb *urb)
463 int index = -1; 444 int index = -1;
464 int acc; 445 int acc;
465 int remote_num; 446 int remote_num;
466 unsigned char scancode[2]; 447 unsigned char scancode;
448 int i;
449
450 /*
451 * data[0] = 0x14
452 * data[1] = data[2] + data[3] + 0xd5 (a checksum byte)
453 * data[2] = the key code (with toggle bit in MSB with some models)
454 * data[3] = channel << 4 (the low 4 bits must be zero)
455 */
467 456
468 /* Deal with strange looking inputs */ 457 /* Deal with strange looking inputs */
469 if ( (urb->actual_length != 4) || (data[0] != 0x14) || 458 if ( (urb->actual_length != 4) || (data[0] != 0x14) ||
@@ -472,6 +461,13 @@ static void ati_remote_input_report(struct urb *urb)
472 return; 461 return;
473 } 462 }
474 463
464 if (data[1] != ((data[2] + data[3] + 0xd5) & 0xff)) {
465 dbginfo(&ati_remote->interface->dev,
466 "wrong checksum in input: %02x %02x %02x %02x\n",
467 data[0], data[1], data[2], data[3]);
468 return;
469 }
470
475 /* Mask unwanted remote channels. */ 471 /* Mask unwanted remote channels. */
476 /* note: remote_num is 0-based, channel 1 on remote == 0 here */ 472 /* note: remote_num is 0-based, channel 1 on remote == 0 here */
477 remote_num = (data[3] >> 4) & 0x0f; 473 remote_num = (data[3] >> 4) & 0x0f;
@@ -482,31 +478,30 @@ static void ati_remote_input_report(struct urb *urb)
482 return; 478 return;
483 } 479 }
484 480
485 scancode[0] = (((data[1] - ((remote_num + 1) << 4)) & 0xf0) | (data[1] & 0x0f));
486
487 /* 481 /*
488 * Some devices (e.g. SnapStream Firefly) use 8080 as toggle code, 482 * MSB is a toggle code, though only used by some devices
489 * so we have to clear them. The first bit is a bit tricky as the 483 * (e.g. SnapStream Firefly)
490 * "non-toggled" state depends on remote_num, so we xor it with the
491 * second bit which is only used for toggle.
492 */ 484 */
493 scancode[0] ^= (data[2] & 0x80); 485 scancode = data[2] & 0x7f;
494
495 scancode[1] = data[2] & ~0x80;
496 486
497 /* Look up event code index in mouse translation table. */ 487 /* Look up event code index in the mouse translation table. */
498 index = ati_remote_event_lookup(remote_num, scancode[0], scancode[1]); 488 for (i = 0; ati_remote_tbl[i].kind != KIND_END; i++) {
489 if (scancode == ati_remote_tbl[i].data) {
490 index = i;
491 break;
492 }
493 }
499 494
500 if (index >= 0) { 495 if (index >= 0) {
501 dbginfo(&ati_remote->interface->dev, 496 dbginfo(&ati_remote->interface->dev,
502 "channel 0x%02x; mouse data %02x,%02x; index %d; keycode %d\n", 497 "channel 0x%02x; mouse data %02x; index %d; keycode %d\n",
503 remote_num, data[1], data[2], index, ati_remote_tbl[index].code); 498 remote_num, data[2], index, ati_remote_tbl[index].code);
504 if (!dev) 499 if (!dev)
505 return; /* no mouse device */ 500 return; /* no mouse device */
506 } else 501 } else
507 dbginfo(&ati_remote->interface->dev, 502 dbginfo(&ati_remote->interface->dev,
508 "channel 0x%02x; key data %02x,%02x, scancode %02x,%02x\n", 503 "channel 0x%02x; key data %02x, scancode %02x\n",
509 remote_num, data[1], data[2], scancode[0], scancode[1]); 504 remote_num, data[2], scancode);
510 505
511 506
512 if (index >= 0 && ati_remote_tbl[index].kind == KIND_LITERAL) { 507 if (index >= 0 && ati_remote_tbl[index].kind == KIND_LITERAL) {
@@ -523,8 +518,7 @@ static void ati_remote_input_report(struct urb *urb)
523 unsigned long now = jiffies; 518 unsigned long now = jiffies;
524 519
525 /* Filter duplicate events which happen "too close" together. */ 520 /* Filter duplicate events which happen "too close" together. */
526 if (ati_remote->old_data[0] == data[1] && 521 if (ati_remote->old_data == data[2] &&
527 ati_remote->old_data[1] == data[2] &&
528 time_before(now, ati_remote->old_jiffies + 522 time_before(now, ati_remote->old_jiffies +
529 msecs_to_jiffies(repeat_filter))) { 523 msecs_to_jiffies(repeat_filter))) {
530 ati_remote->repeat_count++; 524 ati_remote->repeat_count++;
@@ -533,8 +527,7 @@ static void ati_remote_input_report(struct urb *urb)
533 ati_remote->first_jiffies = now; 527 ati_remote->first_jiffies = now;
534 } 528 }
535 529
536 ati_remote->old_data[0] = data[1]; 530 ati_remote->old_data = data[2];
537 ati_remote->old_data[1] = data[2];
538 ati_remote->old_jiffies = now; 531 ati_remote->old_jiffies = now;
539 532
540 /* Ensure we skip at least the 4 first duplicate events (generated 533 /* Ensure we skip at least the 4 first duplicate events (generated
@@ -549,14 +542,13 @@ static void ati_remote_input_report(struct urb *urb)
549 542
550 if (index < 0) { 543 if (index < 0) {
551 /* Not a mouse event, hand it to rc-core. */ 544 /* Not a mouse event, hand it to rc-core. */
552 u32 rc_code = (scancode[0] << 8) | scancode[1];
553 545
554 /* 546 /*
555 * We don't use the rc-core repeat handling yet as 547 * We don't use the rc-core repeat handling yet as
556 * it would cause ghost repeats which would be a 548 * it would cause ghost repeats which would be a
557 * regression for this driver. 549 * regression for this driver.
558 */ 550 */
559 rc_keydown_notimeout(ati_remote->rdev, rc_code, 551 rc_keydown_notimeout(ati_remote->rdev, scancode,
560 data[2]); 552 data[2]);
561 rc_keyup(ati_remote->rdev); 553 rc_keyup(ati_remote->rdev);
562 return; 554 return;
@@ -607,8 +599,7 @@ static void ati_remote_input_report(struct urb *urb)
607 input_sync(dev); 599 input_sync(dev);
608 600
609 ati_remote->old_jiffies = jiffies; 601 ati_remote->old_jiffies = jiffies;
610 ati_remote->old_data[0] = data[1]; 602 ati_remote->old_data = data[2];
611 ati_remote->old_data[1] = data[2];
612 } 603 }
613} 604}
614 605
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
29static struct rc_map_table ati_x10[] = { 29static 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
81static struct rc_map_list ati_x10_map = { 81static 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
27static struct rc_map_table medion_x10[] = { 27static 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
94static struct rc_map_list medion_x10_map = { 94static 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
24static struct rc_map_table snapstream_firefly[] = { 24static 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
84static struct rc_map_list snapstream_firefly_map = { 84static struct rc_map_list snapstream_firefly_map = {