rc-snapstream-firefly.c 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. * SnapStream Firefly X10 RF remote keytable
  3. *
  4. * Copyright (C) 2011 Anssi Hannula <anssi.hannula@?ki.fi>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. */
  20. #include <linux/module.h>
  21. #include <media/rc-map.h>
  22. static struct rc_map_table snapstream_firefly[] = {
  23. { 0x2c, KEY_ZOOM }, /* Maximize */
  24. { 0x02, KEY_CLOSE },
  25. { 0x0d, KEY_1 },
  26. { 0x0e, KEY_2 },
  27. { 0x0f, KEY_3 },
  28. { 0x10, KEY_4 },
  29. { 0x11, KEY_5 },
  30. { 0x12, KEY_6 },
  31. { 0x13, KEY_7 },
  32. { 0x14, KEY_8 },
  33. { 0x15, KEY_9 },
  34. { 0x17, KEY_0 },
  35. { 0x16, KEY_BACK },
  36. { 0x18, KEY_KPENTER }, /* ent */
  37. { 0x09, KEY_VOLUMEUP },
  38. { 0x08, KEY_VOLUMEDOWN },
  39. { 0x0a, KEY_MUTE },
  40. { 0x0b, KEY_CHANNELUP },
  41. { 0x0c, KEY_CHANNELDOWN },
  42. { 0x00, KEY_VENDOR }, /* firefly */
  43. { 0x2e, KEY_INFO },
  44. { 0x2f, KEY_OPTION },
  45. { 0x1d, KEY_LEFT },
  46. { 0x1f, KEY_RIGHT },
  47. { 0x22, KEY_DOWN },
  48. { 0x1a, KEY_UP },
  49. { 0x1e, KEY_OK },
  50. { 0x1c, KEY_MENU },
  51. { 0x20, KEY_EXIT },
  52. { 0x27, KEY_RECORD },
  53. { 0x25, KEY_PLAY },
  54. { 0x28, KEY_STOP },
  55. { 0x24, KEY_REWIND },
  56. { 0x26, KEY_FORWARD },
  57. { 0x29, KEY_PAUSE },
  58. { 0x2b, KEY_PREVIOUS },
  59. { 0x2a, KEY_NEXT },
  60. { 0x06, KEY_AUDIO }, /* Music */
  61. { 0x05, KEY_IMAGES }, /* Photos */
  62. { 0x04, KEY_DVD },
  63. { 0x03, KEY_TV },
  64. { 0x07, KEY_VIDEO },
  65. { 0x01, KEY_HELP },
  66. { 0x2d, KEY_MODE }, /* Mouse */
  67. { 0x19, KEY_A },
  68. { 0x1b, KEY_B },
  69. { 0x21, KEY_C },
  70. { 0x23, KEY_D },
  71. };
  72. static struct rc_map_list snapstream_firefly_map = {
  73. .map = {
  74. .scan = snapstream_firefly,
  75. .size = ARRAY_SIZE(snapstream_firefly),
  76. .rc_type = RC_TYPE_OTHER,
  77. .name = RC_MAP_SNAPSTREAM_FIREFLY,
  78. }
  79. };
  80. static int __init init_rc_map_snapstream_firefly(void)
  81. {
  82. return rc_map_register(&snapstream_firefly_map);
  83. }
  84. static void __exit exit_rc_map_snapstream_firefly(void)
  85. {
  86. rc_map_unregister(&snapstream_firefly_map);
  87. }
  88. module_init(init_rc_map_snapstream_firefly)
  89. module_exit(exit_rc_map_snapstream_firefly)
  90. MODULE_LICENSE("GPL");
  91. MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>");