rc-rc5-hauppauge-new.c 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. /* rc5-hauppauge-new.h - Keytable for rc5_hauppauge_new Remote Controller
  2. *
  3. * keymap imported from ir-keymaps.c
  4. *
  5. * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
  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. /*
  14. * Hauppauge:the newer, gray remotes (seems there are multiple
  15. * slightly different versions), shipped with cx88+ivtv cards.
  16. *
  17. * This table contains the complete RC5 code, instead of just the data part
  18. */
  19. static struct rc_map_table rc5_hauppauge_new[] = {
  20. /* Keys 0 to 9 */
  21. { 0x1e00, KEY_0 },
  22. { 0x1e01, KEY_1 },
  23. { 0x1e02, KEY_2 },
  24. { 0x1e03, KEY_3 },
  25. { 0x1e04, KEY_4 },
  26. { 0x1e05, KEY_5 },
  27. { 0x1e06, KEY_6 },
  28. { 0x1e07, KEY_7 },
  29. { 0x1e08, KEY_8 },
  30. { 0x1e09, KEY_9 },
  31. { 0x1e0a, KEY_TEXT }, /* keypad asterisk as well */
  32. { 0x1e0b, KEY_RED }, /* red button */
  33. { 0x1e0c, KEY_RADIO },
  34. { 0x1e0d, KEY_MENU },
  35. { 0x1e0e, KEY_SUBTITLE }, /* also the # key */
  36. { 0x1e0f, KEY_MUTE },
  37. { 0x1e10, KEY_VOLUMEUP },
  38. { 0x1e11, KEY_VOLUMEDOWN },
  39. { 0x1e12, KEY_PREVIOUS }, /* previous channel */
  40. { 0x1e14, KEY_UP },
  41. { 0x1e15, KEY_DOWN },
  42. { 0x1e16, KEY_LEFT },
  43. { 0x1e17, KEY_RIGHT },
  44. { 0x1e18, KEY_VIDEO }, /* Videos */
  45. { 0x1e19, KEY_AUDIO }, /* Music */
  46. /* 0x1e1a: Pictures - presume this means
  47. "Multimedia Home Platform" -
  48. no "PICTURES" key in input.h
  49. */
  50. { 0x1e1a, KEY_MHP },
  51. { 0x1e1b, KEY_EPG }, /* Guide */
  52. { 0x1e1c, KEY_TV },
  53. { 0x1e1e, KEY_NEXTSONG }, /* skip >| */
  54. { 0x1e1f, KEY_EXIT }, /* back/exit */
  55. { 0x1e20, KEY_CHANNELUP }, /* channel / program + */
  56. { 0x1e21, KEY_CHANNELDOWN }, /* channel / program - */
  57. { 0x1e22, KEY_CHANNEL }, /* source (old black remote) */
  58. { 0x1e24, KEY_PREVIOUSSONG }, /* replay |< */
  59. { 0x1e25, KEY_ENTER }, /* OK */
  60. { 0x1e26, KEY_SLEEP }, /* minimize (old black remote) */
  61. { 0x1e29, KEY_BLUE }, /* blue key */
  62. { 0x1e2e, KEY_GREEN }, /* green button */
  63. { 0x1e30, KEY_PAUSE }, /* pause */
  64. { 0x1e32, KEY_REWIND }, /* backward << */
  65. { 0x1e34, KEY_FASTFORWARD }, /* forward >> */
  66. { 0x1e35, KEY_PLAY },
  67. { 0x1e36, KEY_STOP },
  68. { 0x1e37, KEY_RECORD }, /* recording */
  69. { 0x1e38, KEY_YELLOW }, /* yellow key */
  70. { 0x1e3b, KEY_SELECT }, /* top right button */
  71. { 0x1e3c, KEY_ZOOM }, /* full */
  72. { 0x1e3d, KEY_POWER }, /* system power (green button) */
  73. /* Keycodes for DSR-0112 remote bundled with Haupauge MiniStick */
  74. { 0x1d00, KEY_0 },
  75. { 0x1d01, KEY_1 },
  76. { 0x1d02, KEY_2 },
  77. { 0x1d03, KEY_3 },
  78. { 0x1d04, KEY_4 },
  79. { 0x1d05, KEY_5 },
  80. { 0x1d06, KEY_6 },
  81. { 0x1d07, KEY_7 },
  82. { 0x1d08, KEY_8 },
  83. { 0x1d09, KEY_9 },
  84. { 0x1d0a, KEY_TEXT },
  85. { 0x1d0d, KEY_MENU },
  86. { 0x1d0f, KEY_MUTE },
  87. { 0x1d10, KEY_VOLUMEUP },
  88. { 0x1d11, KEY_VOLUMEDOWN },
  89. { 0x1d12, KEY_PREVIOUS }, /* Prev.Ch .. ??? */
  90. { 0x1d14, KEY_UP },
  91. { 0x1d15, KEY_DOWN },
  92. { 0x1d16, KEY_LEFT },
  93. { 0x1d17, KEY_RIGHT },
  94. { 0x1d1c, KEY_TV },
  95. { 0x1d1e, KEY_NEXT }, /* >| */
  96. { 0x1d1f, KEY_EXIT },
  97. { 0x1d20, KEY_CHANNELUP },
  98. { 0x1d21, KEY_CHANNELDOWN },
  99. { 0x1d24, KEY_LAST }, /* <| */
  100. { 0x1d25, KEY_OK },
  101. { 0x1d30, KEY_PAUSE },
  102. { 0x1d32, KEY_REWIND },
  103. { 0x1d34, KEY_FASTFORWARD },
  104. { 0x1d35, KEY_PLAY },
  105. { 0x1d36, KEY_STOP },
  106. { 0x1d37, KEY_RECORD },
  107. { 0x1d3b, KEY_GOTO },
  108. { 0x1d3d, KEY_POWER },
  109. { 0x1d3f, KEY_HOME },
  110. };
  111. static struct rc_map_list rc5_hauppauge_new_map = {
  112. .map = {
  113. .scan = rc5_hauppauge_new,
  114. .size = ARRAY_SIZE(rc5_hauppauge_new),
  115. .rc_type = RC_TYPE_RC5,
  116. .name = RC_MAP_RC5_HAUPPAUGE_NEW,
  117. }
  118. };
  119. static int __init init_rc_map_rc5_hauppauge_new(void)
  120. {
  121. return rc_map_register(&rc5_hauppauge_new_map);
  122. }
  123. static void __exit exit_rc_map_rc5_hauppauge_new(void)
  124. {
  125. rc_map_unregister(&rc5_hauppauge_new_map);
  126. }
  127. module_init(init_rc_map_rc5_hauppauge_new)
  128. module_exit(exit_rc_map_rc5_hauppauge_new)
  129. MODULE_LICENSE("GPL");
  130. MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");