2017-12-01 13:47:11 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
|
|
|
// avermedia-m135a.c - Keytable for Avermedia M135A Remote Controllers
|
|
|
|
//
|
|
|
|
// Copyright (c) 2010 by Mauro Carvalho Chehab
|
|
|
|
// Copyright (c) 2010 by Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
2010-05-10 18:43:31 +00:00
|
|
|
|
|
|
|
#include <media/rc-map.h>
|
2011-07-03 18:03:12 +00:00
|
|
|
#include <linux/module.h>
|
2010-05-10 18:43:31 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Avermedia M135A with RM-JX and RM-K6 remote controls
|
|
|
|
*
|
|
|
|
* On Avermedia M135A with IR model RM-JX, the same codes exist on both
|
|
|
|
* Positivo (BR) and original IR, initial version and remote control codes
|
MAINTAINERS & files: Canonize the e-mails I use at files
From now on, I'll start using my @kernel.org as my development e-mail.
As such, let's remove the entries that point to the old
mchehab@s-opensource.com at MAINTAINERS file.
For the files written with a copyright with mchehab@s-opensource,
let's keep Samsung on their names, using mchehab+samsung@kernel.org,
in order to keep pointing to my employer, with sponsors the work.
For the files written before I join Samsung (on July, 4 2013),
let's just use mchehab@kernel.org.
For bug reports, we can simply point to just kernel.org, as
this will reach my mchehab+samsung inbox anyway.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Brian Warner <brian.warner@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-04-25 09:34:48 +00:00
|
|
|
* added by Mauro Carvalho Chehab <mchehab@kernel.org>
|
2010-05-10 18:43:31 +00:00
|
|
|
*
|
|
|
|
* Positivo also ships Avermedia M135A with model RM-K6, extra control
|
|
|
|
* codes added by Herton Ronaldo Krzesinski <herton@mandriva.com.br>
|
|
|
|
*/
|
|
|
|
|
[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-17 18:46:09 +00:00
|
|
|
static struct rc_map_table avermedia_m135a[] = {
|
2010-05-10 18:43:31 +00:00
|
|
|
/* RM-JX */
|
|
|
|
{ 0x0200, KEY_POWER2 },
|
|
|
|
{ 0x022e, KEY_DOT }, /* '.' */
|
|
|
|
{ 0x0201, KEY_MODE }, /* TV/FM or SOURCE */
|
|
|
|
|
2019-06-24 15:42:14 +00:00
|
|
|
{ 0x0205, KEY_NUMERIC_1 },
|
|
|
|
{ 0x0206, KEY_NUMERIC_2 },
|
|
|
|
{ 0x0207, KEY_NUMERIC_3 },
|
|
|
|
{ 0x0209, KEY_NUMERIC_4 },
|
|
|
|
{ 0x020a, KEY_NUMERIC_5 },
|
|
|
|
{ 0x020b, KEY_NUMERIC_6 },
|
|
|
|
{ 0x020d, KEY_NUMERIC_7 },
|
|
|
|
{ 0x020e, KEY_NUMERIC_8 },
|
|
|
|
{ 0x020f, KEY_NUMERIC_9 },
|
|
|
|
{ 0x0211, KEY_NUMERIC_0 },
|
2010-05-10 18:43:31 +00:00
|
|
|
|
|
|
|
{ 0x0213, KEY_RIGHT }, /* -> or L */
|
|
|
|
{ 0x0212, KEY_LEFT }, /* <- or R */
|
|
|
|
|
2017-09-01 11:34:50 +00:00
|
|
|
{ 0x0215, KEY_MENU },
|
|
|
|
{ 0x0217, KEY_CAMERA }, /* Capturar Imagem or Snapshot */
|
2010-05-10 18:43:31 +00:00
|
|
|
{ 0x0210, KEY_SHUFFLE }, /* Amostra or 16 chan prev */
|
|
|
|
|
|
|
|
{ 0x0303, KEY_CHANNELUP },
|
|
|
|
{ 0x0302, KEY_CHANNELDOWN },
|
|
|
|
{ 0x021f, KEY_VOLUMEUP },
|
|
|
|
{ 0x021e, KEY_VOLUMEDOWN },
|
|
|
|
{ 0x020c, KEY_ENTER }, /* Full Screen */
|
|
|
|
|
|
|
|
{ 0x0214, KEY_MUTE },
|
|
|
|
{ 0x0208, KEY_AUDIO },
|
|
|
|
|
|
|
|
{ 0x0203, KEY_TEXT }, /* Teletext */
|
|
|
|
{ 0x0204, KEY_EPG },
|
|
|
|
{ 0x022b, KEY_TV2 }, /* TV2 or PIP */
|
|
|
|
|
|
|
|
{ 0x021d, KEY_RED },
|
|
|
|
{ 0x021c, KEY_YELLOW },
|
|
|
|
{ 0x0301, KEY_GREEN },
|
|
|
|
{ 0x0300, KEY_BLUE },
|
|
|
|
|
|
|
|
{ 0x021a, KEY_PLAYPAUSE },
|
|
|
|
{ 0x0219, KEY_RECORD },
|
|
|
|
{ 0x0218, KEY_PLAY },
|
|
|
|
{ 0x021b, KEY_STOP },
|
|
|
|
|
|
|
|
/* RM-K6 */
|
|
|
|
{ 0x0401, KEY_POWER2 },
|
|
|
|
{ 0x0406, KEY_MUTE },
|
|
|
|
{ 0x0408, KEY_MODE }, /* TV/FM */
|
|
|
|
|
2019-06-24 15:42:14 +00:00
|
|
|
{ 0x0409, KEY_NUMERIC_1 },
|
|
|
|
{ 0x040a, KEY_NUMERIC_2 },
|
|
|
|
{ 0x040b, KEY_NUMERIC_3 },
|
|
|
|
{ 0x040c, KEY_NUMERIC_4 },
|
|
|
|
{ 0x040d, KEY_NUMERIC_5 },
|
|
|
|
{ 0x040e, KEY_NUMERIC_6 },
|
|
|
|
{ 0x040f, KEY_NUMERIC_7 },
|
|
|
|
{ 0x0410, KEY_NUMERIC_8 },
|
|
|
|
{ 0x0411, KEY_NUMERIC_9 },
|
2010-05-10 18:43:31 +00:00
|
|
|
{ 0x044c, KEY_DOT }, /* '.' */
|
2019-06-24 15:42:14 +00:00
|
|
|
{ 0x0412, KEY_NUMERIC_0 },
|
2010-05-10 18:43:31 +00:00
|
|
|
{ 0x0407, KEY_REFRESH }, /* Refresh/Reload */
|
|
|
|
|
|
|
|
{ 0x0413, KEY_AUDIO },
|
|
|
|
{ 0x0440, KEY_SCREEN }, /* Full Screen toggle */
|
|
|
|
{ 0x0441, KEY_HOME },
|
|
|
|
{ 0x0442, KEY_BACK },
|
|
|
|
{ 0x0447, KEY_UP },
|
|
|
|
{ 0x0448, KEY_DOWN },
|
|
|
|
{ 0x0449, KEY_LEFT },
|
|
|
|
{ 0x044a, KEY_RIGHT },
|
|
|
|
{ 0x044b, KEY_OK },
|
|
|
|
{ 0x0404, KEY_VOLUMEUP },
|
|
|
|
{ 0x0405, KEY_VOLUMEDOWN },
|
|
|
|
{ 0x0402, KEY_CHANNELUP },
|
|
|
|
{ 0x0403, KEY_CHANNELDOWN },
|
|
|
|
|
|
|
|
{ 0x0443, KEY_RED },
|
|
|
|
{ 0x0444, KEY_GREEN },
|
|
|
|
{ 0x0445, KEY_YELLOW },
|
|
|
|
{ 0x0446, KEY_BLUE },
|
|
|
|
|
|
|
|
{ 0x0414, KEY_TEXT },
|
|
|
|
{ 0x0415, KEY_EPG },
|
|
|
|
{ 0x041a, KEY_TV2 }, /* PIP */
|
2011-01-24 15:18:36 +00:00
|
|
|
{ 0x041b, KEY_CAMERA }, /* Snapshot */
|
2010-05-10 18:43:31 +00:00
|
|
|
|
|
|
|
{ 0x0417, KEY_RECORD },
|
|
|
|
{ 0x0416, KEY_PLAYPAUSE },
|
|
|
|
{ 0x0418, KEY_STOP },
|
|
|
|
{ 0x0419, KEY_PAUSE },
|
|
|
|
|
|
|
|
{ 0x041f, KEY_PREVIOUS },
|
|
|
|
{ 0x041c, KEY_REWIND },
|
|
|
|
{ 0x041d, KEY_FORWARD },
|
|
|
|
{ 0x041e, KEY_NEXT },
|
|
|
|
};
|
|
|
|
|
2010-11-17 18:56:53 +00:00
|
|
|
static struct rc_map_list avermedia_m135a_map = {
|
2010-05-10 18:43:31 +00:00
|
|
|
.map = {
|
2017-08-07 20:20:58 +00:00
|
|
|
.scan = avermedia_m135a,
|
|
|
|
.size = ARRAY_SIZE(avermedia_m135a),
|
|
|
|
.rc_proto = RC_PROTO_NEC,
|
|
|
|
.name = RC_MAP_AVERMEDIA_M135A,
|
2010-05-10 18:43:31 +00:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
static int __init init_rc_map_avermedia_m135a(void)
|
|
|
|
{
|
2010-11-17 18:56:53 +00:00
|
|
|
return rc_map_register(&avermedia_m135a_map);
|
2010-05-10 18:43:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void __exit exit_rc_map_avermedia_m135a(void)
|
|
|
|
{
|
2010-11-17 18:56:53 +00:00
|
|
|
rc_map_unregister(&avermedia_m135a_map);
|
2010-05-10 18:43:31 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module_init(init_rc_map_avermedia_m135a)
|
|
|
|
module_exit(exit_rc_map_avermedia_m135a)
|
|
|
|
|
|
|
|
MODULE_LICENSE("GPL");
|
2014-02-07 10:03:07 +00:00
|
|
|
MODULE_AUTHOR("Mauro Carvalho Chehab");
|