rc-avermedia-m135a.c 3.4 KB

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