root/drivers/media/rc/keymaps/rc-avermedia-m135a.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. init_rc_map_avermedia_m135a
  2. exit_rc_map_avermedia_m135a

   1 // SPDX-License-Identifier: GPL-2.0+
   2 // avermedia-m135a.c - Keytable for Avermedia M135A Remote Controllers
   3 //
   4 // Copyright (c) 2010 by Mauro Carvalho Chehab
   5 // Copyright (c) 2010 by Herton Ronaldo Krzesinski <herton@mandriva.com.br>
   6 
   7 #include <media/rc-map.h>
   8 #include <linux/module.h>
   9 
  10 /*
  11  * Avermedia M135A with RM-JX and RM-K6 remote controls
  12  *
  13  * On Avermedia M135A with IR model RM-JX, the same codes exist on both
  14  * Positivo (BR) and original IR, initial version and remote control codes
  15  * added by Mauro Carvalho Chehab <mchehab@kernel.org>
  16  *
  17  * Positivo also ships Avermedia M135A with model RM-K6, extra control
  18  * codes added by Herton Ronaldo Krzesinski <herton@mandriva.com.br>
  19  */
  20 
  21 static struct rc_map_table avermedia_m135a[] = {
  22         /* RM-JX */
  23         { 0x0200, KEY_POWER2 },
  24         { 0x022e, KEY_DOT },            /* '.' */
  25         { 0x0201, KEY_MODE },           /* TV/FM or SOURCE */
  26 
  27         { 0x0205, KEY_NUMERIC_1 },
  28         { 0x0206, KEY_NUMERIC_2 },
  29         { 0x0207, KEY_NUMERIC_3 },
  30         { 0x0209, KEY_NUMERIC_4 },
  31         { 0x020a, KEY_NUMERIC_5 },
  32         { 0x020b, KEY_NUMERIC_6 },
  33         { 0x020d, KEY_NUMERIC_7 },
  34         { 0x020e, KEY_NUMERIC_8 },
  35         { 0x020f, KEY_NUMERIC_9 },
  36         { 0x0211, KEY_NUMERIC_0 },
  37 
  38         { 0x0213, KEY_RIGHT },          /* -> or L */
  39         { 0x0212, KEY_LEFT },           /* <- or R */
  40 
  41         { 0x0215, KEY_MENU },
  42         { 0x0217, KEY_CAMERA },         /* Capturar Imagem or Snapshot */
  43         { 0x0210, KEY_SHUFFLE },        /* Amostra or 16 chan prev */
  44 
  45         { 0x0303, KEY_CHANNELUP },
  46         { 0x0302, KEY_CHANNELDOWN },
  47         { 0x021f, KEY_VOLUMEUP },
  48         { 0x021e, KEY_VOLUMEDOWN },
  49         { 0x020c, KEY_ENTER },          /* Full Screen */
  50 
  51         { 0x0214, KEY_MUTE },
  52         { 0x0208, KEY_AUDIO },
  53 
  54         { 0x0203, KEY_TEXT },           /* Teletext */
  55         { 0x0204, KEY_EPG },
  56         { 0x022b, KEY_TV2 },            /* TV2 or PIP */
  57 
  58         { 0x021d, KEY_RED },
  59         { 0x021c, KEY_YELLOW },
  60         { 0x0301, KEY_GREEN },
  61         { 0x0300, KEY_BLUE },
  62 
  63         { 0x021a, KEY_PLAYPAUSE },
  64         { 0x0219, KEY_RECORD },
  65         { 0x0218, KEY_PLAY },
  66         { 0x021b, KEY_STOP },
  67 
  68         /* RM-K6 */
  69         { 0x0401, KEY_POWER2 },
  70         { 0x0406, KEY_MUTE },
  71         { 0x0408, KEY_MODE },     /* TV/FM */
  72 
  73         { 0x0409, KEY_NUMERIC_1 },
  74         { 0x040a, KEY_NUMERIC_2 },
  75         { 0x040b, KEY_NUMERIC_3 },
  76         { 0x040c, KEY_NUMERIC_4 },
  77         { 0x040d, KEY_NUMERIC_5 },
  78         { 0x040e, KEY_NUMERIC_6 },
  79         { 0x040f, KEY_NUMERIC_7 },
  80         { 0x0410, KEY_NUMERIC_8 },
  81         { 0x0411, KEY_NUMERIC_9 },
  82         { 0x044c, KEY_DOT },      /* '.' */
  83         { 0x0412, KEY_NUMERIC_0 },
  84         { 0x0407, KEY_REFRESH },  /* Refresh/Reload */
  85 
  86         { 0x0413, KEY_AUDIO },
  87         { 0x0440, KEY_SCREEN },   /* Full Screen toggle */
  88         { 0x0441, KEY_HOME },
  89         { 0x0442, KEY_BACK },
  90         { 0x0447, KEY_UP },
  91         { 0x0448, KEY_DOWN },
  92         { 0x0449, KEY_LEFT },
  93         { 0x044a, KEY_RIGHT },
  94         { 0x044b, KEY_OK },
  95         { 0x0404, KEY_VOLUMEUP },
  96         { 0x0405, KEY_VOLUMEDOWN },
  97         { 0x0402, KEY_CHANNELUP },
  98         { 0x0403, KEY_CHANNELDOWN },
  99 
 100         { 0x0443, KEY_RED },
 101         { 0x0444, KEY_GREEN },
 102         { 0x0445, KEY_YELLOW },
 103         { 0x0446, KEY_BLUE },
 104 
 105         { 0x0414, KEY_TEXT },
 106         { 0x0415, KEY_EPG },
 107         { 0x041a, KEY_TV2 },      /* PIP */
 108         { 0x041b, KEY_CAMERA },      /* Snapshot */
 109 
 110         { 0x0417, KEY_RECORD },
 111         { 0x0416, KEY_PLAYPAUSE },
 112         { 0x0418, KEY_STOP },
 113         { 0x0419, KEY_PAUSE },
 114 
 115         { 0x041f, KEY_PREVIOUS },
 116         { 0x041c, KEY_REWIND },
 117         { 0x041d, KEY_FORWARD },
 118         { 0x041e, KEY_NEXT },
 119 };
 120 
 121 static struct rc_map_list avermedia_m135a_map = {
 122         .map = {
 123                 .scan     = avermedia_m135a,
 124                 .size     = ARRAY_SIZE(avermedia_m135a),
 125                 .rc_proto = RC_PROTO_NEC,
 126                 .name     = RC_MAP_AVERMEDIA_M135A,
 127         }
 128 };
 129 
 130 static int __init init_rc_map_avermedia_m135a(void)
 131 {
 132         return rc_map_register(&avermedia_m135a_map);
 133 }
 134 
 135 static void __exit exit_rc_map_avermedia_m135a(void)
 136 {
 137         rc_map_unregister(&avermedia_m135a_map);
 138 }
 139 
 140 module_init(init_rc_map_avermedia_m135a)
 141 module_exit(exit_rc_map_avermedia_m135a)
 142 
 143 MODULE_LICENSE("GPL");
 144 MODULE_AUTHOR("Mauro Carvalho Chehab");

/* [<][>][^][v][top][bottom][index][help] */