2010-09-03 04:29:30 +08:00
|
|
|
/* LME2510 remote control
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Malcolm Priestley (tvboxspy@gmail.com)
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <media/rc-map.h>
|
2011-07-04 02:03:12 +08:00
|
|
|
#include <linux/module.h>
|
2010-09-03 04:29:30 +08:00
|
|
|
|
|
|
|
|
[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-11-18 02:46:09 +08:00
|
|
|
static struct rc_map_table lme2510_rc[] = {
|
2011-01-24 05:26:03 +08:00
|
|
|
/* Type 1 - 26 buttons */
|
2011-05-26 05:28:29 +08:00
|
|
|
{ 0x10ed45, KEY_0 },
|
|
|
|
{ 0x10ed5f, KEY_1 },
|
|
|
|
{ 0x10ed50, KEY_2 },
|
|
|
|
{ 0x10ed5d, KEY_3 },
|
|
|
|
{ 0x10ed41, KEY_4 },
|
|
|
|
{ 0x10ed0a, KEY_5 },
|
|
|
|
{ 0x10ed42, KEY_6 },
|
|
|
|
{ 0x10ed47, KEY_7 },
|
|
|
|
{ 0x10ed49, KEY_8 },
|
|
|
|
{ 0x10ed05, KEY_9 },
|
|
|
|
{ 0x10ed43, KEY_POWER },
|
|
|
|
{ 0x10ed46, KEY_SUBTITLE },
|
|
|
|
{ 0x10ed06, KEY_PAUSE },
|
|
|
|
{ 0x10ed03, KEY_MEDIA_REPEAT},
|
|
|
|
{ 0x10ed02, KEY_PAUSE },
|
|
|
|
{ 0x10ed5e, KEY_VOLUMEUP },
|
|
|
|
{ 0x10ed5c, KEY_VOLUMEDOWN },
|
|
|
|
{ 0x10ed09, KEY_CHANNELUP },
|
|
|
|
{ 0x10ed1a, KEY_CHANNELDOWN },
|
|
|
|
{ 0x10ed1e, KEY_PLAY },
|
|
|
|
{ 0x10ed1b, KEY_ZOOM },
|
|
|
|
{ 0x10ed59, KEY_MUTE },
|
|
|
|
{ 0x10ed5a, KEY_TV },
|
|
|
|
{ 0x10ed18, KEY_RECORD },
|
|
|
|
{ 0x10ed07, KEY_EPG },
|
|
|
|
{ 0x10ed01, KEY_STOP },
|
2011-01-24 05:26:03 +08:00
|
|
|
/* Type 2 - 20 buttons */
|
2011-05-26 05:28:29 +08:00
|
|
|
{ 0xbf15, KEY_0 },
|
|
|
|
{ 0xbf08, KEY_1 },
|
|
|
|
{ 0xbf09, KEY_2 },
|
|
|
|
{ 0xbf0a, KEY_3 },
|
|
|
|
{ 0xbf0c, KEY_4 },
|
|
|
|
{ 0xbf0d, KEY_5 },
|
|
|
|
{ 0xbf0e, KEY_6 },
|
|
|
|
{ 0xbf10, KEY_7 },
|
|
|
|
{ 0xbf11, KEY_8 },
|
|
|
|
{ 0xbf12, KEY_9 },
|
|
|
|
{ 0xbf00, KEY_POWER },
|
|
|
|
{ 0xbf04, KEY_MEDIA_REPEAT}, /* Recall */
|
|
|
|
{ 0xbf1a, KEY_PAUSE }, /* Timeshift */
|
|
|
|
{ 0xbf02, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */
|
|
|
|
{ 0xbf06, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/
|
|
|
|
{ 0xbf01, KEY_CHANNELUP },
|
|
|
|
{ 0xbf05, KEY_CHANNELDOWN },
|
|
|
|
{ 0xbf14, KEY_ZOOM },
|
|
|
|
{ 0xbf18, KEY_RECORD },
|
|
|
|
{ 0xbf16, KEY_STOP },
|
2011-01-24 05:26:03 +08:00
|
|
|
/* Type 3 - 20 buttons */
|
2011-05-26 05:28:29 +08:00
|
|
|
{ 0x1c, KEY_0 },
|
|
|
|
{ 0x07, KEY_1 },
|
|
|
|
{ 0x15, KEY_2 },
|
|
|
|
{ 0x09, KEY_3 },
|
|
|
|
{ 0x16, KEY_4 },
|
|
|
|
{ 0x19, KEY_5 },
|
|
|
|
{ 0x0d, KEY_6 },
|
|
|
|
{ 0x0c, KEY_7 },
|
|
|
|
{ 0x18, KEY_8 },
|
|
|
|
{ 0x5e, KEY_9 },
|
|
|
|
{ 0x45, KEY_POWER },
|
|
|
|
{ 0x44, KEY_MEDIA_REPEAT}, /* Recall */
|
|
|
|
{ 0x4a, KEY_PAUSE }, /* Timeshift */
|
|
|
|
{ 0x47, KEY_VOLUMEUP }, /* 2 x -/+ Keys not marked */
|
|
|
|
{ 0x43, KEY_VOLUMEDOWN }, /* Volume defined as right hand*/
|
|
|
|
{ 0x46, KEY_CHANNELUP },
|
|
|
|
{ 0x40, KEY_CHANNELDOWN },
|
|
|
|
{ 0x08, KEY_ZOOM },
|
|
|
|
{ 0x42, KEY_RECORD },
|
|
|
|
{ 0x5a, KEY_STOP },
|
2010-09-03 04:29:30 +08:00
|
|
|
};
|
|
|
|
|
2010-11-18 02:56:53 +08:00
|
|
|
static struct rc_map_list lme2510_map = {
|
2010-09-03 04:29:30 +08:00
|
|
|
.map = {
|
|
|
|
.scan = lme2510_rc,
|
|
|
|
.size = ARRAY_SIZE(lme2510_rc),
|
2011-05-26 05:28:29 +08:00
|
|
|
.rc_type = RC_TYPE_NEC,
|
2010-09-03 04:29:30 +08:00
|
|
|
.name = RC_MAP_LME2510,
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static int __init init_rc_lme2510_map(void)
|
|
|
|
{
|
2010-11-18 02:56:53 +08:00
|
|
|
return rc_map_register(&lme2510_map);
|
2010-09-03 04:29:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static void __exit exit_rc_lme2510_map(void)
|
|
|
|
{
|
2010-11-18 02:56:53 +08:00
|
|
|
rc_map_unregister(&lme2510_map);
|
2010-09-03 04:29:30 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
module_init(init_rc_lme2510_map)
|
|
|
|
module_exit(exit_rc_lme2510_map)
|
|
|
|
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_AUTHOR("Malcolm Priestley tvboxspy@gmail.com");
|