132cf86f6SMauro Carvalho Chehab /* avermedia-m135a.c - Keytable for Avermedia M135A Remote Controllers 232cf86f6SMauro Carvalho Chehab * 337e59f87SMauro Carvalho Chehab * Copyright (c) 2010 by Mauro Carvalho Chehab 432cf86f6SMauro Carvalho Chehab * Copyright (c) 2010 by Herton Ronaldo Krzesinski <herton@mandriva.com.br> 532cf86f6SMauro Carvalho Chehab * 632cf86f6SMauro Carvalho Chehab * This program is free software; you can redistribute it and/or modify 732cf86f6SMauro Carvalho Chehab * it under the terms of the GNU General Public License as published by 832cf86f6SMauro Carvalho Chehab * the Free Software Foundation; either version 2 of the License, or 932cf86f6SMauro Carvalho Chehab * (at your option) any later version. 1032cf86f6SMauro Carvalho Chehab */ 1132cf86f6SMauro Carvalho Chehab 1232cf86f6SMauro Carvalho Chehab #include <media/rc-map.h> 137a707b89SPaul Gortmaker #include <linux/module.h> 1432cf86f6SMauro Carvalho Chehab 1532cf86f6SMauro Carvalho Chehab /* 1632cf86f6SMauro Carvalho Chehab * Avermedia M135A with RM-JX and RM-K6 remote controls 1732cf86f6SMauro Carvalho Chehab * 1832cf86f6SMauro Carvalho Chehab * On Avermedia M135A with IR model RM-JX, the same codes exist on both 1932cf86f6SMauro Carvalho Chehab * Positivo (BR) and original IR, initial version and remote control codes 2032cf86f6SMauro Carvalho Chehab * added by Mauro Carvalho Chehab <mchehab@infradead.org> 2132cf86f6SMauro Carvalho Chehab * 2232cf86f6SMauro Carvalho Chehab * Positivo also ships Avermedia M135A with model RM-K6, extra control 2332cf86f6SMauro Carvalho Chehab * codes added by Herton Ronaldo Krzesinski <herton@mandriva.com.br> 2432cf86f6SMauro Carvalho Chehab */ 2532cf86f6SMauro Carvalho Chehab 262f4f58d6SMauro Carvalho Chehab static struct rc_map_table avermedia_m135a[] = { 2732cf86f6SMauro Carvalho Chehab /* RM-JX */ 2832cf86f6SMauro Carvalho Chehab { 0x0200, KEY_POWER2 }, 2932cf86f6SMauro Carvalho Chehab { 0x022e, KEY_DOT }, /* '.' */ 3032cf86f6SMauro Carvalho Chehab { 0x0201, KEY_MODE }, /* TV/FM or SOURCE */ 3132cf86f6SMauro Carvalho Chehab 3232cf86f6SMauro Carvalho Chehab { 0x0205, KEY_1 }, 3332cf86f6SMauro Carvalho Chehab { 0x0206, KEY_2 }, 3432cf86f6SMauro Carvalho Chehab { 0x0207, KEY_3 }, 3532cf86f6SMauro Carvalho Chehab { 0x0209, KEY_4 }, 3632cf86f6SMauro Carvalho Chehab { 0x020a, KEY_5 }, 3732cf86f6SMauro Carvalho Chehab { 0x020b, KEY_6 }, 3832cf86f6SMauro Carvalho Chehab { 0x020d, KEY_7 }, 3932cf86f6SMauro Carvalho Chehab { 0x020e, KEY_8 }, 4032cf86f6SMauro Carvalho Chehab { 0x020f, KEY_9 }, 4132cf86f6SMauro Carvalho Chehab { 0x0211, KEY_0 }, 4232cf86f6SMauro Carvalho Chehab 4332cf86f6SMauro Carvalho Chehab { 0x0213, KEY_RIGHT }, /* -> or L */ 4432cf86f6SMauro Carvalho Chehab { 0x0212, KEY_LEFT }, /* <- or R */ 4532cf86f6SMauro Carvalho Chehab 4632cf86f6SMauro Carvalho Chehab { 0x0217, KEY_SLEEP }, /* Capturar Imagem or Snapshot */ 4732cf86f6SMauro Carvalho Chehab { 0x0210, KEY_SHUFFLE }, /* Amostra or 16 chan prev */ 4832cf86f6SMauro Carvalho Chehab 4932cf86f6SMauro Carvalho Chehab { 0x0303, KEY_CHANNELUP }, 5032cf86f6SMauro Carvalho Chehab { 0x0302, KEY_CHANNELDOWN }, 5132cf86f6SMauro Carvalho Chehab { 0x021f, KEY_VOLUMEUP }, 5232cf86f6SMauro Carvalho Chehab { 0x021e, KEY_VOLUMEDOWN }, 5332cf86f6SMauro Carvalho Chehab { 0x020c, KEY_ENTER }, /* Full Screen */ 5432cf86f6SMauro Carvalho Chehab 5532cf86f6SMauro Carvalho Chehab { 0x0214, KEY_MUTE }, 5632cf86f6SMauro Carvalho Chehab { 0x0208, KEY_AUDIO }, 5732cf86f6SMauro Carvalho Chehab 5832cf86f6SMauro Carvalho Chehab { 0x0203, KEY_TEXT }, /* Teletext */ 5932cf86f6SMauro Carvalho Chehab { 0x0204, KEY_EPG }, 6032cf86f6SMauro Carvalho Chehab { 0x022b, KEY_TV2 }, /* TV2 or PIP */ 6132cf86f6SMauro Carvalho Chehab 6232cf86f6SMauro Carvalho Chehab { 0x021d, KEY_RED }, 6332cf86f6SMauro Carvalho Chehab { 0x021c, KEY_YELLOW }, 6432cf86f6SMauro Carvalho Chehab { 0x0301, KEY_GREEN }, 6532cf86f6SMauro Carvalho Chehab { 0x0300, KEY_BLUE }, 6632cf86f6SMauro Carvalho Chehab 6732cf86f6SMauro Carvalho Chehab { 0x021a, KEY_PLAYPAUSE }, 6832cf86f6SMauro Carvalho Chehab { 0x0219, KEY_RECORD }, 6932cf86f6SMauro Carvalho Chehab { 0x0218, KEY_PLAY }, 7032cf86f6SMauro Carvalho Chehab { 0x021b, KEY_STOP }, 7132cf86f6SMauro Carvalho Chehab 7232cf86f6SMauro Carvalho Chehab /* RM-K6 */ 7332cf86f6SMauro Carvalho Chehab { 0x0401, KEY_POWER2 }, 7432cf86f6SMauro Carvalho Chehab { 0x0406, KEY_MUTE }, 7532cf86f6SMauro Carvalho Chehab { 0x0408, KEY_MODE }, /* TV/FM */ 7632cf86f6SMauro Carvalho Chehab 7732cf86f6SMauro Carvalho Chehab { 0x0409, KEY_1 }, 7832cf86f6SMauro Carvalho Chehab { 0x040a, KEY_2 }, 7932cf86f6SMauro Carvalho Chehab { 0x040b, KEY_3 }, 8032cf86f6SMauro Carvalho Chehab { 0x040c, KEY_4 }, 8132cf86f6SMauro Carvalho Chehab { 0x040d, KEY_5 }, 8232cf86f6SMauro Carvalho Chehab { 0x040e, KEY_6 }, 8332cf86f6SMauro Carvalho Chehab { 0x040f, KEY_7 }, 8432cf86f6SMauro Carvalho Chehab { 0x0410, KEY_8 }, 8532cf86f6SMauro Carvalho Chehab { 0x0411, KEY_9 }, 8632cf86f6SMauro Carvalho Chehab { 0x044c, KEY_DOT }, /* '.' */ 8732cf86f6SMauro Carvalho Chehab { 0x0412, KEY_0 }, 8832cf86f6SMauro Carvalho Chehab { 0x0407, KEY_REFRESH }, /* Refresh/Reload */ 8932cf86f6SMauro Carvalho Chehab 9032cf86f6SMauro Carvalho Chehab { 0x0413, KEY_AUDIO }, 9132cf86f6SMauro Carvalho Chehab { 0x0440, KEY_SCREEN }, /* Full Screen toggle */ 9232cf86f6SMauro Carvalho Chehab { 0x0441, KEY_HOME }, 9332cf86f6SMauro Carvalho Chehab { 0x0442, KEY_BACK }, 9432cf86f6SMauro Carvalho Chehab { 0x0447, KEY_UP }, 9532cf86f6SMauro Carvalho Chehab { 0x0448, KEY_DOWN }, 9632cf86f6SMauro Carvalho Chehab { 0x0449, KEY_LEFT }, 9732cf86f6SMauro Carvalho Chehab { 0x044a, KEY_RIGHT }, 9832cf86f6SMauro Carvalho Chehab { 0x044b, KEY_OK }, 9932cf86f6SMauro Carvalho Chehab { 0x0404, KEY_VOLUMEUP }, 10032cf86f6SMauro Carvalho Chehab { 0x0405, KEY_VOLUMEDOWN }, 10132cf86f6SMauro Carvalho Chehab { 0x0402, KEY_CHANNELUP }, 10232cf86f6SMauro Carvalho Chehab { 0x0403, KEY_CHANNELDOWN }, 10332cf86f6SMauro Carvalho Chehab 10432cf86f6SMauro Carvalho Chehab { 0x0443, KEY_RED }, 10532cf86f6SMauro Carvalho Chehab { 0x0444, KEY_GREEN }, 10632cf86f6SMauro Carvalho Chehab { 0x0445, KEY_YELLOW }, 10732cf86f6SMauro Carvalho Chehab { 0x0446, KEY_BLUE }, 10832cf86f6SMauro Carvalho Chehab 10932cf86f6SMauro Carvalho Chehab { 0x0414, KEY_TEXT }, 11032cf86f6SMauro Carvalho Chehab { 0x0415, KEY_EPG }, 11132cf86f6SMauro Carvalho Chehab { 0x041a, KEY_TV2 }, /* PIP */ 112444cc20bSMauro Carvalho Chehab { 0x041b, KEY_CAMERA }, /* Snapshot */ 11332cf86f6SMauro Carvalho Chehab 11432cf86f6SMauro Carvalho Chehab { 0x0417, KEY_RECORD }, 11532cf86f6SMauro Carvalho Chehab { 0x0416, KEY_PLAYPAUSE }, 11632cf86f6SMauro Carvalho Chehab { 0x0418, KEY_STOP }, 11732cf86f6SMauro Carvalho Chehab { 0x0419, KEY_PAUSE }, 11832cf86f6SMauro Carvalho Chehab 11932cf86f6SMauro Carvalho Chehab { 0x041f, KEY_PREVIOUS }, 12032cf86f6SMauro Carvalho Chehab { 0x041c, KEY_REWIND }, 12132cf86f6SMauro Carvalho Chehab { 0x041d, KEY_FORWARD }, 12232cf86f6SMauro Carvalho Chehab { 0x041e, KEY_NEXT }, 12332cf86f6SMauro Carvalho Chehab }; 12432cf86f6SMauro Carvalho Chehab 125d100e659SMauro Carvalho Chehab static struct rc_map_list avermedia_m135a_map = { 12632cf86f6SMauro Carvalho Chehab .map = { 12732cf86f6SMauro Carvalho Chehab .scan = avermedia_m135a, 12832cf86f6SMauro Carvalho Chehab .size = ARRAY_SIZE(avermedia_m135a), 129*6d741bfeSSean Young .rc_proto = RC_PROTO_NEC, 13032cf86f6SMauro Carvalho Chehab .name = RC_MAP_AVERMEDIA_M135A, 13132cf86f6SMauro Carvalho Chehab } 13232cf86f6SMauro Carvalho Chehab }; 13332cf86f6SMauro Carvalho Chehab 13432cf86f6SMauro Carvalho Chehab static int __init init_rc_map_avermedia_m135a(void) 13532cf86f6SMauro Carvalho Chehab { 136d100e659SMauro Carvalho Chehab return rc_map_register(&avermedia_m135a_map); 13732cf86f6SMauro Carvalho Chehab } 13832cf86f6SMauro Carvalho Chehab 13932cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map_avermedia_m135a(void) 14032cf86f6SMauro Carvalho Chehab { 141d100e659SMauro Carvalho Chehab rc_map_unregister(&avermedia_m135a_map); 14232cf86f6SMauro Carvalho Chehab } 14332cf86f6SMauro Carvalho Chehab 14432cf86f6SMauro Carvalho Chehab module_init(init_rc_map_avermedia_m135a) 14532cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map_avermedia_m135a) 14632cf86f6SMauro Carvalho Chehab 14732cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL"); 14837e59f87SMauro Carvalho Chehab MODULE_AUTHOR("Mauro Carvalho Chehab"); 149