rc-msi-tvanywhere-plus.c 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. /* msi-tvanywhere-plus.h - Keytable for msi_tvanywhere_plus Remote Controller
  2. *
  3. * keymap imported from ir-keymaps.c
  4. *
  5. * Copyright (c) 2010 by Mauro Carvalho Chehab
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. */
  12. #include <media/rc-map.h>
  13. #include <linux/module.h>
  14. /*
  15. Keycodes for remote on the MSI TV@nywhere Plus. The controller IC on the card
  16. is marked "KS003". The controller is I2C at address 0x30, but does not seem
  17. to respond to probes until a read is performed from a valid device.
  18. I don't know why...
  19. Note: This remote may be of similar or identical design to the
  20. Pixelview remote (?). The raw codes and duplicate button codes
  21. appear to be the same.
  22. Henry Wong <henry@stuffedcow.net>
  23. Some changes to formatting and keycodes by Mark Schultz <n9xmj@yahoo.com>
  24. */
  25. static struct rc_map_table msi_tvanywhere_plus[] = {
  26. /* ---- Remote Button Layout ----
  27. POWER SOURCE SCAN MUTE
  28. TV/FM 1 2 3
  29. |> 4 5 6
  30. <| 7 8 9
  31. ^^UP 0 + RECALL
  32. vvDN RECORD STOP PLAY
  33. MINIMIZE ZOOM
  34. CH+
  35. VOL- VOL+
  36. CH-
  37. SNAPSHOT MTS
  38. << FUNC >> RESET
  39. */
  40. { 0x01, KEY_1 }, /* 1 */
  41. { 0x0b, KEY_2 }, /* 2 */
  42. { 0x1b, KEY_3 }, /* 3 */
  43. { 0x05, KEY_4 }, /* 4 */
  44. { 0x09, KEY_5 }, /* 5 */
  45. { 0x15, KEY_6 }, /* 6 */
  46. { 0x06, KEY_7 }, /* 7 */
  47. { 0x0a, KEY_8 }, /* 8 */
  48. { 0x12, KEY_9 }, /* 9 */
  49. { 0x02, KEY_0 }, /* 0 */
  50. { 0x10, KEY_KPPLUS }, /* + */
  51. { 0x13, KEY_AGAIN }, /* Recall */
  52. { 0x1e, KEY_POWER }, /* Power */
  53. { 0x07, KEY_VIDEO }, /* Source */
  54. { 0x1c, KEY_SEARCH }, /* Scan */
  55. { 0x18, KEY_MUTE }, /* Mute */
  56. { 0x03, KEY_RADIO }, /* TV/FM */
  57. /* The next four keys are duplicates that appear to send the
  58. same IR code as Ch+, Ch-, >>, and << . The raw code assigned
  59. to them is the actual code + 0x20 - they will never be
  60. detected as such unless some way is discovered to distinguish
  61. these buttons from those that have the same code. */
  62. { 0x3f, KEY_RIGHT }, /* |> and Ch+ */
  63. { 0x37, KEY_LEFT }, /* <| and Ch- */
  64. { 0x2c, KEY_UP }, /* ^^Up and >> */
  65. { 0x24, KEY_DOWN }, /* vvDn and << */
  66. { 0x00, KEY_RECORD }, /* Record */
  67. { 0x08, KEY_STOP }, /* Stop */
  68. { 0x11, KEY_PLAY }, /* Play */
  69. { 0x0f, KEY_CLOSE }, /* Minimize */
  70. { 0x19, KEY_ZOOM }, /* Zoom */
  71. { 0x1a, KEY_CAMERA }, /* Snapshot */
  72. { 0x0d, KEY_LANGUAGE }, /* MTS */
  73. { 0x14, KEY_VOLUMEDOWN }, /* Vol- */
  74. { 0x16, KEY_VOLUMEUP }, /* Vol+ */
  75. { 0x17, KEY_CHANNELDOWN }, /* Ch- */
  76. { 0x1f, KEY_CHANNELUP }, /* Ch+ */
  77. { 0x04, KEY_REWIND }, /* << */
  78. { 0x0e, KEY_MENU }, /* Function */
  79. { 0x0c, KEY_FASTFORWARD }, /* >> */
  80. { 0x1d, KEY_RESTART }, /* Reset */
  81. };
  82. static struct rc_map_list msi_tvanywhere_plus_map = {
  83. .map = {
  84. .scan = msi_tvanywhere_plus,
  85. .size = ARRAY_SIZE(msi_tvanywhere_plus),
  86. .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */
  87. .name = RC_MAP_MSI_TVANYWHERE_PLUS,
  88. }
  89. };
  90. static int __init init_rc_map_msi_tvanywhere_plus(void)
  91. {
  92. return rc_map_register(&msi_tvanywhere_plus_map);
  93. }
  94. static void __exit exit_rc_map_msi_tvanywhere_plus(void)
  95. {
  96. rc_map_unregister(&msi_tvanywhere_plus_map);
  97. }
  98. module_init(init_rc_map_msi_tvanywhere_plus)
  99. module_exit(exit_rc_map_msi_tvanywhere_plus)
  100. MODULE_LICENSE("GPL");
  101. MODULE_AUTHOR("Mauro Carvalho Chehab");