rc-behold.c 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /* behold.h - Keytable for behold 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. #include <linux/module.h>
  14. /*
  15. * Igor Kuznetsov <igk72@ya.ru>
  16. * Andrey J. Melnikov <temnota@kmv.ru>
  17. *
  18. * Keytable is used by BeholdTV 60x series, M6 series at
  19. * least, and probably other cards too.
  20. * The "ascii-art picture" below (in comments, first row
  21. * is the keycode in hex, and subsequent row(s) shows
  22. * the button labels (several variants when appropriate)
  23. * helps to descide which keycodes to assign to the buttons.
  24. */
  25. static struct rc_map_table behold[] = {
  26. /* 0x1c 0x12 *
  27. * TV/FM POWER *
  28. * */
  29. { 0x6b861c, KEY_TUNER }, /* XXX KEY_TV / KEY_RADIO */
  30. { 0x6b8612, KEY_POWER },
  31. /* 0x01 0x02 0x03 *
  32. * 1 2 3 *
  33. * *
  34. * 0x04 0x05 0x06 *
  35. * 4 5 6 *
  36. * *
  37. * 0x07 0x08 0x09 *
  38. * 7 8 9 *
  39. * */
  40. { 0x6b8601, KEY_1 },
  41. { 0x6b8602, KEY_2 },
  42. { 0x6b8603, KEY_3 },
  43. { 0x6b8604, KEY_4 },
  44. { 0x6b8605, KEY_5 },
  45. { 0x6b8606, KEY_6 },
  46. { 0x6b8607, KEY_7 },
  47. { 0x6b8608, KEY_8 },
  48. { 0x6b8609, KEY_9 },
  49. /* 0x0a 0x00 0x17 *
  50. * RECALL 0 MODE *
  51. * */
  52. { 0x6b860a, KEY_AGAIN },
  53. { 0x6b8600, KEY_0 },
  54. { 0x6b8617, KEY_MODE },
  55. /* 0x14 0x10 *
  56. * ASPECT FULLSCREEN *
  57. * */
  58. { 0x6b8614, KEY_SCREEN },
  59. { 0x6b8610, KEY_ZOOM },
  60. /* 0x0b *
  61. * Up *
  62. * *
  63. * 0x18 0x16 0x0c *
  64. * Left Ok Right *
  65. * *
  66. * 0x015 *
  67. * Down *
  68. * */
  69. { 0x6b860b, KEY_CHANNELUP },
  70. { 0x6b8618, KEY_VOLUMEDOWN },
  71. { 0x6b8616, KEY_OK }, /* XXX KEY_ENTER */
  72. { 0x6b860c, KEY_VOLUMEUP },
  73. { 0x6b8615, KEY_CHANNELDOWN },
  74. /* 0x11 0x0d *
  75. * MUTE INFO *
  76. * */
  77. { 0x6b8611, KEY_MUTE },
  78. { 0x6b860d, KEY_INFO },
  79. /* 0x0f 0x1b 0x1a *
  80. * RECORD PLAY/PAUSE STOP *
  81. * *
  82. * 0x0e 0x1f 0x1e *
  83. *TELETEXT AUDIO SOURCE *
  84. * RED YELLOW *
  85. * */
  86. { 0x6b860f, KEY_RECORD },
  87. { 0x6b861b, KEY_PLAYPAUSE },
  88. { 0x6b861a, KEY_STOP },
  89. { 0x6b860e, KEY_TEXT },
  90. { 0x6b861f, KEY_RED }, /*XXX KEY_AUDIO */
  91. { 0x6b861e, KEY_VIDEO },
  92. /* 0x1d 0x13 0x19 *
  93. * SLEEP PREVIEW DVB *
  94. * GREEN BLUE *
  95. * */
  96. { 0x6b861d, KEY_SLEEP },
  97. { 0x6b8613, KEY_GREEN },
  98. { 0x6b8619, KEY_BLUE }, /* XXX KEY_SAT */
  99. /* 0x58 0x5c *
  100. * FREEZE SNAPSHOT *
  101. * */
  102. { 0x6b8658, KEY_SLOW },
  103. { 0x6b865c, KEY_CAMERA },
  104. };
  105. static struct rc_map_list behold_map = {
  106. .map = {
  107. .scan = behold,
  108. .size = ARRAY_SIZE(behold),
  109. .rc_type = RC_TYPE_NEC,
  110. .name = RC_MAP_BEHOLD,
  111. }
  112. };
  113. static int __init init_rc_map_behold(void)
  114. {
  115. return rc_map_register(&behold_map);
  116. }
  117. static void __exit exit_rc_map_behold(void)
  118. {
  119. rc_map_unregister(&behold_map);
  120. }
  121. module_init(init_rc_map_behold)
  122. module_exit(exit_rc_map_behold)
  123. MODULE_LICENSE("GPL");
  124. MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");