Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] lmedm04: NEC scancode cleanup

This changes the keymap back to the state before commit 616a4b83
and changes the driver to use full NEC32 scancodes following the
instructions provided by Malcolm Priestley <tvboxspy@gmail.com>.

Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

David Härdeman and committed by
Mauro Carvalho Chehab
f459aec2 275ddb40

+77 -76
+66 -66
drivers/media/rc/keymaps/rc-lme2510.c
··· 15 15 16 16 static struct rc_map_table lme2510_rc[] = { 17 17 /* Type 1 - 26 buttons */ 18 - { 0x10ed45, KEY_0 }, 19 - { 0x10ed5f, KEY_1 }, 20 - { 0x10ed50, KEY_2 }, 21 - { 0x10ed5d, KEY_3 }, 22 - { 0x10ed41, KEY_4 }, 23 - { 0x10ed0a, KEY_5 }, 24 - { 0x10ed42, KEY_6 }, 25 - { 0x10ed47, KEY_7 }, 26 - { 0x10ed49, KEY_8 }, 27 - { 0x10ed05, KEY_9 }, 28 - { 0x10ed43, KEY_POWER }, 29 - { 0x10ed46, KEY_SUBTITLE }, 30 - { 0x10ed06, KEY_PAUSE }, 31 - { 0x10ed03, KEY_MEDIA_REPEAT}, 32 - { 0x10ed02, KEY_PAUSE }, 33 - { 0x10ed5e, KEY_VOLUMEUP }, 34 - { 0x10ed5c, KEY_VOLUMEDOWN }, 35 - { 0x10ed09, KEY_CHANNELUP }, 36 - { 0x10ed1a, KEY_CHANNELDOWN }, 37 - { 0x10ed1e, KEY_PLAY }, 38 - { 0x10ed1b, KEY_ZOOM }, 39 - { 0x10ed59, KEY_MUTE }, 40 - { 0x10ed5a, KEY_TV }, 41 - { 0x10ed18, KEY_RECORD }, 42 - { 0x10ed07, KEY_EPG }, 43 - { 0x10ed01, KEY_STOP }, 18 + { 0xef12ba45, KEY_0 }, 19 + { 0xef12a05f, KEY_1 }, 20 + { 0xef12af50, KEY_2 }, 21 + { 0xef12a25d, KEY_3 }, 22 + { 0xef12be41, KEY_4 }, 23 + { 0xef12f50a, KEY_5 }, 24 + { 0xef12bd42, KEY_6 }, 25 + { 0xef12b847, KEY_7 }, 26 + { 0xef12b649, KEY_8 }, 27 + { 0xef12fa05, KEY_9 }, 28 + { 0xef12bc43, KEY_POWER }, 29 + { 0xef12b946, KEY_SUBTITLE }, 30 + { 0xef12f906, KEY_PAUSE }, 31 + { 0xef12fc03, KEY_MEDIA_REPEAT}, 32 + { 0xef12fd02, KEY_PAUSE }, 33 + { 0xef12a15e, KEY_VOLUMEUP }, 34 + { 0xef12a35c, KEY_VOLUMEDOWN }, 35 + { 0xef12f609, KEY_CHANNELUP }, 36 + { 0xef12e51a, KEY_CHANNELDOWN }, 37 + { 0xef12e11e, KEY_PLAY }, 38 + { 0xef12e41b, KEY_ZOOM }, 39 + { 0xef12a659, KEY_MUTE }, 40 + { 0xef12a55a, KEY_TV }, 41 + { 0xef12e718, KEY_RECORD }, 42 + { 0xef12f807, KEY_EPG }, 43 + { 0xef12fe01, KEY_STOP }, 44 44 /* Type 2 - 20 buttons */ 45 - { 0xbf15, KEY_0 }, 46 - { 0xbf08, KEY_1 }, 47 - { 0xbf09, KEY_2 }, 48 - { 0xbf0a, KEY_3 }, 49 - { 0xbf0c, KEY_4 }, 50 - { 0xbf0d, KEY_5 }, 51 - { 0xbf0e, KEY_6 }, 52 - { 0xbf10, KEY_7 }, 53 - { 0xbf11, KEY_8 }, 54 - { 0xbf12, KEY_9 }, 55 - { 0xbf00, KEY_POWER }, 56 - { 0xbf04, KEY_MEDIA_REPEAT}, /* Recall */ 57 - { 0xbf1a, KEY_PAUSE }, /* Timeshift */ 58 - { 0xbf02, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ 59 - { 0xbf06, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ 60 - { 0xbf01, KEY_CHANNELUP }, 61 - { 0xbf05, KEY_CHANNELDOWN }, 62 - { 0xbf14, KEY_ZOOM }, 63 - { 0xbf18, KEY_RECORD }, 64 - { 0xbf16, KEY_STOP }, 45 + { 0xff40ea15, KEY_0 }, 46 + { 0xff40f708, KEY_1 }, 47 + { 0xff40f609, KEY_2 }, 48 + { 0xff40f50a, KEY_3 }, 49 + { 0xff40f30c, KEY_4 }, 50 + { 0xff40f20d, KEY_5 }, 51 + { 0xff40f10e, KEY_6 }, 52 + { 0xff40ef10, KEY_7 }, 53 + { 0xff40ee11, KEY_8 }, 54 + { 0xff40ed12, KEY_9 }, 55 + { 0xff40ff00, KEY_POWER }, 56 + { 0xff40fb04, KEY_MEDIA_REPEAT}, /* Recall */ 57 + { 0xff40e51a, KEY_PAUSE }, /* Timeshift */ 58 + { 0xff40fd02, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ 59 + { 0xff40f906, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ 60 + { 0xff40fe01, KEY_CHANNELUP }, 61 + { 0xff40fa05, KEY_CHANNELDOWN }, 62 + { 0xff40eb14, KEY_ZOOM }, 63 + { 0xff40e718, KEY_RECORD }, 64 + { 0xff40e916, KEY_STOP }, 65 65 /* Type 3 - 20 buttons */ 66 - { 0x1c, KEY_0 }, 67 - { 0x07, KEY_1 }, 68 - { 0x15, KEY_2 }, 69 - { 0x09, KEY_3 }, 70 - { 0x16, KEY_4 }, 71 - { 0x19, KEY_5 }, 72 - { 0x0d, KEY_6 }, 73 - { 0x0c, KEY_7 }, 74 - { 0x18, KEY_8 }, 75 - { 0x5e, KEY_9 }, 76 - { 0x45, KEY_POWER }, 77 - { 0x44, KEY_MEDIA_REPEAT}, /* Recall */ 78 - { 0x4a, KEY_PAUSE }, /* Timeshift */ 79 - { 0x47, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ 80 - { 0x43, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ 81 - { 0x46, KEY_CHANNELUP }, 82 - { 0x40, KEY_CHANNELDOWN }, 83 - { 0x08, KEY_ZOOM }, 84 - { 0x42, KEY_RECORD }, 85 - { 0x5a, KEY_STOP }, 66 + { 0xff00e31c, KEY_0 }, 67 + { 0xff00f807, KEY_1 }, 68 + { 0xff00ea15, KEY_2 }, 69 + { 0xff00f609, KEY_3 }, 70 + { 0xff00e916, KEY_4 }, 71 + { 0xff00e619, KEY_5 }, 72 + { 0xff00f20d, KEY_6 }, 73 + { 0xff00f30c, KEY_7 }, 74 + { 0xff00e718, KEY_8 }, 75 + { 0xff00a15e, KEY_9 }, 76 + { 0xff00ba45, KEY_POWER }, 77 + { 0xff00bb44, KEY_MEDIA_REPEAT}, /* Recall */ 78 + { 0xff00b54a, KEY_PAUSE }, /* Timeshift */ 79 + { 0xff00b847, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */ 80 + { 0xff00bc43, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/ 81 + { 0xff00b946, KEY_CHANNELUP }, 82 + { 0xff00bf40, KEY_CHANNELDOWN }, 83 + { 0xff00f708, KEY_ZOOM }, 84 + { 0xff00bd42, KEY_RECORD }, 85 + { 0xff00a55a, KEY_STOP }, 86 86 }; 87 87 88 88 static struct rc_map_list lme2510_map = {
+11 -10
drivers/media/usb/dvb-usb-v2/lmedm04.c
··· 348 348 switch (ibuf[0]) { 349 349 case 0xaa: 350 350 debug_data_snipet(1, "INT Remote data snipet", ibuf); 351 - if ((ibuf[4] + ibuf[5]) == 0xff) { 352 - key = RC_SCANCODE_NECX((ibuf[2] ^ 0xff) << 8 | 353 - (ibuf[3] > 0) ? (ibuf[3] ^ 0xff) : 0, 354 - ibuf[5]); 355 - deb_info(1, "INT Key =%08x", key); 356 - if (adap_to_d(adap)->rc_dev != NULL) 357 - rc_keydown(adap_to_d(adap)->rc_dev, 358 - RC_TYPE_NEC, key, 0); 359 - } 351 + if (!adap_to_d(adap)->rc_dev) 352 + break; 353 + 354 + key = RC_SCANCODE_NEC32(ibuf[2] << 24 | 355 + ibuf[3] << 16 | 356 + ibuf[4] << 8 | 357 + ibuf[5]); 358 + 359 + deb_info(1, "INT Key = 0x%08x", key); 360 + rc_keydown(adap_to_d(adap)->rc_dev, RC_TYPE_NEC, key, 0); 360 361 break; 361 362 case 0xbb: 362 363 switch (st->tuner_config) { ··· 1345 1344 1346 1345 MODULE_AUTHOR("Malcolm Priestley <tvboxspy@gmail.com>"); 1347 1346 MODULE_DESCRIPTION("LME2510(C) DVB-S USB2.0"); 1348 - MODULE_VERSION("2.06"); 1347 + MODULE_VERSION("2.07"); 1349 1348 MODULE_LICENSE("GPL"); 1350 1349 MODULE_FIRMWARE(LME2510_C_S7395); 1351 1350 MODULE_FIRMWARE(LME2510_C_LG);