Malcolm Priestley | d2f918b | 2010-09-02 17:29:30 -0300 | [diff] [blame] | 1 | /* LME2510 remote control |
| 2 | * |
| 3 | * |
| 4 | * Copyright (C) 2010 Malcolm Priestley (tvboxspy@gmail.com) |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | */ |
| 11 | |
| 12 | #include <media/rc-map.h> |
Paul Gortmaker | 7a707b8 | 2011-07-03 14:03:12 -0400 | [diff] [blame] | 13 | #include <linux/module.h> |
Malcolm Priestley | d2f918b | 2010-09-02 17:29:30 -0300 | [diff] [blame] | 14 | |
| 15 | |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 16 | static struct rc_map_table lme2510_rc[] = { |
Malcolm Priestley | 4a1cba5 | 2011-01-23 18:26:03 -0300 | [diff] [blame] | 17 | /* Type 1 - 26 buttons */ |
Malcolm Priestley | 616a4b8 | 2011-05-25 18:28:29 -0300 | [diff] [blame] | 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 }, |
Malcolm Priestley | 4a1cba5 | 2011-01-23 18:26:03 -0300 | [diff] [blame] | 44 | /* Type 2 - 20 buttons */ |
Malcolm Priestley | 616a4b8 | 2011-05-25 18:28:29 -0300 | [diff] [blame] | 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 }, |
Malcolm Priestley | 4a1cba5 | 2011-01-23 18:26:03 -0300 | [diff] [blame] | 65 | /* Type 3 - 20 buttons */ |
Malcolm Priestley | 616a4b8 | 2011-05-25 18:28:29 -0300 | [diff] [blame] | 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 }, |
Malcolm Priestley | d2f918b | 2010-09-02 17:29:30 -0300 | [diff] [blame] | 86 | }; |
| 87 | |
Mauro Carvalho Chehab | d100e65 | 2010-11-17 15:56:53 -0300 | [diff] [blame] | 88 | static struct rc_map_list lme2510_map = { |
Malcolm Priestley | d2f918b | 2010-09-02 17:29:30 -0300 | [diff] [blame] | 89 | .map = { |
| 90 | .scan = lme2510_rc, |
| 91 | .size = ARRAY_SIZE(lme2510_rc), |
Malcolm Priestley | 616a4b8 | 2011-05-25 18:28:29 -0300 | [diff] [blame] | 92 | .rc_type = RC_TYPE_NEC, |
Malcolm Priestley | d2f918b | 2010-09-02 17:29:30 -0300 | [diff] [blame] | 93 | .name = RC_MAP_LME2510, |
| 94 | } |
| 95 | }; |
| 96 | |
| 97 | static int __init init_rc_lme2510_map(void) |
| 98 | { |
Mauro Carvalho Chehab | d100e65 | 2010-11-17 15:56:53 -0300 | [diff] [blame] | 99 | return rc_map_register(&lme2510_map); |
Malcolm Priestley | d2f918b | 2010-09-02 17:29:30 -0300 | [diff] [blame] | 100 | } |
| 101 | |
| 102 | static void __exit exit_rc_lme2510_map(void) |
| 103 | { |
Mauro Carvalho Chehab | d100e65 | 2010-11-17 15:56:53 -0300 | [diff] [blame] | 104 | rc_map_unregister(&lme2510_map); |
Malcolm Priestley | d2f918b | 2010-09-02 17:29:30 -0300 | [diff] [blame] | 105 | } |
| 106 | |
| 107 | module_init(init_rc_lme2510_map) |
| 108 | module_exit(exit_rc_lme2510_map) |
| 109 | |
| 110 | MODULE_LICENSE("GPL"); |
| 111 | MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com"); |