rc-winfast.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. /* winfast.h - Keytable for winfast 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. /* Table for Leadtek Winfast Remote Controls - used by both bttv and cx88 */
  15. static struct rc_map_table winfast[] = {
  16. /* Keys 0 to 9 */
  17. { 0x12, KEY_0 },
  18. { 0x05, KEY_1 },
  19. { 0x06, KEY_2 },
  20. { 0x07, KEY_3 },
  21. { 0x09, KEY_4 },
  22. { 0x0a, KEY_5 },
  23. { 0x0b, KEY_6 },
  24. { 0x0d, KEY_7 },
  25. { 0x0e, KEY_8 },
  26. { 0x0f, KEY_9 },
  27. { 0x00, KEY_POWER2 },
  28. { 0x1b, KEY_AUDIO }, /* Audio Source */
  29. { 0x02, KEY_TUNER }, /* TV/FM, not on Y0400052 */
  30. { 0x1e, KEY_VIDEO }, /* Video Source */
  31. { 0x16, KEY_INFO }, /* Display information */
  32. { 0x04, KEY_RIGHT },
  33. { 0x08, KEY_LEFT },
  34. { 0x0c, KEY_UP },
  35. { 0x10, KEY_DOWN },
  36. { 0x03, KEY_ZOOM }, /* fullscreen */
  37. { 0x1f, KEY_TEXT }, /* closed caption/teletext */
  38. { 0x20, KEY_SLEEP },
  39. { 0x29, KEY_CLEAR }, /* boss key */
  40. { 0x14, KEY_MUTE },
  41. { 0x2b, KEY_RED },
  42. { 0x2c, KEY_GREEN },
  43. { 0x2d, KEY_YELLOW },
  44. { 0x2e, KEY_BLUE },
  45. { 0x18, KEY_KPPLUS }, /* fine tune + , not on Y040052 */
  46. { 0x19, KEY_KPMINUS }, /* fine tune - , not on Y040052 */
  47. { 0x2a, KEY_TV2 }, /* PIP (Picture in picture */
  48. { 0x21, KEY_DOT },
  49. { 0x13, KEY_ENTER },
  50. { 0x11, KEY_LAST }, /* Recall (last channel */
  51. { 0x22, KEY_PREVIOUS },
  52. { 0x23, KEY_PLAYPAUSE },
  53. { 0x24, KEY_NEXT },
  54. { 0x25, KEY_TIME }, /* Time Shifting */
  55. { 0x26, KEY_STOP },
  56. { 0x27, KEY_RECORD },
  57. { 0x28, KEY_CAMERA }, /* Screenshot */
  58. { 0x2f, KEY_MENU },
  59. { 0x30, KEY_CANCEL },
  60. { 0x31, KEY_CHANNEL }, /* Channel Surf */
  61. { 0x32, KEY_SUBTITLE },
  62. { 0x33, KEY_LANGUAGE },
  63. { 0x34, KEY_REWIND },
  64. { 0x35, KEY_FASTFORWARD },
  65. { 0x36, KEY_TV },
  66. { 0x37, KEY_RADIO }, /* FM */
  67. { 0x38, KEY_DVD },
  68. { 0x1a, KEY_MODE}, /* change to MCE mode on Y04G0051 */
  69. { 0x3e, KEY_VOLUMEUP }, /* MCE +VOL, on Y04G0033 */
  70. { 0x3a, KEY_VOLUMEDOWN }, /* MCE -VOL, on Y04G0033 */
  71. { 0x3b, KEY_CHANNELUP }, /* MCE +CH, on Y04G0033 */
  72. { 0x3f, KEY_CHANNELDOWN } /* MCE -CH, on Y04G0033 */
  73. };
  74. static struct rc_map_list winfast_map = {
  75. .map = {
  76. .scan = winfast,
  77. .size = ARRAY_SIZE(winfast),
  78. .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */
  79. .name = RC_MAP_WINFAST,
  80. }
  81. };
  82. static int __init init_rc_map_winfast(void)
  83. {
  84. return rc_map_register(&winfast_map);
  85. }
  86. static void __exit exit_rc_map_winfast(void)
  87. {
  88. rc_map_unregister(&winfast_map);
  89. }
  90. module_init(init_rc_map_winfast)
  91. module_exit(exit_rc_map_winfast)
  92. MODULE_LICENSE("GPL");
  93. MODULE_AUTHOR("Mauro Carvalho Chehab");