rc-behold.c 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. // SPDX-License-Identifier: GPL-2.0+
  2. // behold.h - Keytable for behold Remote Controller
  3. //
  4. // keymap imported from ir-keymaps.c
  5. //
  6. // Copyright (c) 2010 by Mauro Carvalho Chehab
  7. #include <media/rc-map.h>
  8. #include <linux/module.h>
  9. /*
  10. * Igor Kuznetsov <igk72@ya.ru>
  11. * Andrey J. Melnikov <temnota@kmv.ru>
  12. *
  13. * Keytable is used by BeholdTV 60x series, M6 series at
  14. * least, and probably other cards too.
  15. * The "ascii-art picture" below (in comments, first row
  16. * is the keycode in hex, and subsequent row(s) shows
  17. * the button labels (several variants when appropriate)
  18. * helps to descide which keycodes to assign to the buttons.
  19. */
  20. static struct rc_map_table behold[] = {
  21. /* 0x1c 0x12 *
  22. * TV/FM POWER *
  23. * */
  24. { 0x866b1c, KEY_TUNER }, /* XXX KEY_TV / KEY_RADIO */
  25. { 0x866b12, KEY_POWER },
  26. /* 0x01 0x02 0x03 *
  27. * 1 2 3 *
  28. * *
  29. * 0x04 0x05 0x06 *
  30. * 4 5 6 *
  31. * *
  32. * 0x07 0x08 0x09 *
  33. * 7 8 9 *
  34. * */
  35. { 0x866b01, KEY_1 },
  36. { 0x866b02, KEY_2 },
  37. { 0x866b03, KEY_3 },
  38. { 0x866b04, KEY_4 },
  39. { 0x866b05, KEY_5 },
  40. { 0x866b06, KEY_6 },
  41. { 0x866b07, KEY_7 },
  42. { 0x866b08, KEY_8 },
  43. { 0x866b09, KEY_9 },
  44. /* 0x0a 0x00 0x17 *
  45. * RECALL 0 MODE *
  46. * */
  47. { 0x866b0a, KEY_AGAIN },
  48. { 0x866b00, KEY_0 },
  49. { 0x866b17, KEY_MODE },
  50. /* 0x14 0x10 *
  51. * ASPECT FULLSCREEN *
  52. * */
  53. { 0x866b14, KEY_SCREEN },
  54. { 0x866b10, KEY_ZOOM },
  55. /* 0x0b *
  56. * Up *
  57. * *
  58. * 0x18 0x16 0x0c *
  59. * Left Ok Right *
  60. * *
  61. * 0x015 *
  62. * Down *
  63. * */
  64. { 0x866b0b, KEY_CHANNELUP },
  65. { 0x866b18, KEY_VOLUMEDOWN },
  66. { 0x866b16, KEY_OK }, /* XXX KEY_ENTER */
  67. { 0x866b0c, KEY_VOLUMEUP },
  68. { 0x866b15, KEY_CHANNELDOWN },
  69. /* 0x11 0x0d *
  70. * MUTE INFO *
  71. * */
  72. { 0x866b11, KEY_MUTE },
  73. { 0x866b0d, KEY_INFO },
  74. /* 0x0f 0x1b 0x1a *
  75. * RECORD PLAY/PAUSE STOP *
  76. * *
  77. * 0x0e 0x1f 0x1e *
  78. *TELETEXT AUDIO SOURCE *
  79. * RED YELLOW *
  80. * */
  81. { 0x866b0f, KEY_RECORD },
  82. { 0x866b1b, KEY_PLAYPAUSE },
  83. { 0x866b1a, KEY_STOP },
  84. { 0x866b0e, KEY_TEXT },
  85. { 0x866b1f, KEY_RED }, /*XXX KEY_AUDIO */
  86. { 0x866b1e, KEY_VIDEO },
  87. /* 0x1d 0x13 0x19 *
  88. * SLEEP PREVIEW DVB *
  89. * GREEN BLUE *
  90. * */
  91. { 0x866b1d, KEY_SLEEP },
  92. { 0x866b13, KEY_GREEN },
  93. { 0x866b19, KEY_BLUE }, /* XXX KEY_SAT */
  94. /* 0x58 0x5c *
  95. * FREEZE SNAPSHOT *
  96. * */
  97. { 0x866b58, KEY_SLOW },
  98. { 0x866b5c, KEY_CAMERA },
  99. };
  100. static struct rc_map_list behold_map = {
  101. .map = {
  102. .scan = behold,
  103. .size = ARRAY_SIZE(behold),
  104. .rc_proto = RC_PROTO_NEC,
  105. .name = RC_MAP_BEHOLD,
  106. }
  107. };
  108. static int __init init_rc_map_behold(void)
  109. {
  110. return rc_map_register(&behold_map);
  111. }
  112. static void __exit exit_rc_map_behold(void)
  113. {
  114. rc_map_unregister(&behold_map);
  115. }
  116. module_init(init_rc_map_behold)
  117. module_exit(exit_rc_map_behold)
  118. MODULE_LICENSE("GPL");
  119. MODULE_AUTHOR("Mauro Carvalho Chehab");