rc-avermedia-m135a.c 3.6 KB

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