rc-rc5-streamzap.c 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /* rc-rc5-streamzap.c - Keytable for Streamzap PC Remote, for use
  2. * with the Streamzap PC Remote IR Receiver.
  3. *
  4. * Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
  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. #include <media/rc-map.h>
  12. static struct ir_scancode rc5_streamzap[] = {
  13. /*
  14. * FIXME: The Streamzap remote isn't actually true RC-5, it has an extra
  15. * bit in it, which presently throws the in-kernel RC-5 decoder for a loop.
  16. * We either have to enhance the decoder to support it, add a new decoder,
  17. * or just rely on lirc userspace decoding.
  18. */
  19. { 0x00, KEY_NUMERIC_0 },
  20. { 0x01, KEY_NUMERIC_1 },
  21. { 0x02, KEY_NUMERIC_2 },
  22. { 0x03, KEY_NUMERIC_3 },
  23. { 0x04, KEY_NUMERIC_4 },
  24. { 0x05, KEY_NUMERIC_5 },
  25. { 0x06, KEY_NUMERIC_6 },
  26. { 0x07, KEY_NUMERIC_7 },
  27. { 0x08, KEY_NUMERIC_8 },
  28. { 0x0a, KEY_POWER },
  29. { 0x0b, KEY_MUTE },
  30. { 0x0c, KEY_CHANNELUP },
  31. { 0x0d, KEY_VOLUMEUP },
  32. { 0x0e, KEY_CHANNELDOWN },
  33. { 0x0f, KEY_VOLUMEDOWN },
  34. { 0x10, KEY_UP },
  35. { 0x11, KEY_LEFT },
  36. { 0x12, KEY_OK },
  37. { 0x13, KEY_RIGHT },
  38. { 0x14, KEY_DOWN },
  39. { 0x15, KEY_MENU },
  40. { 0x16, KEY_EXIT },
  41. { 0x17, KEY_PLAY },
  42. { 0x18, KEY_PAUSE },
  43. { 0x19, KEY_STOP },
  44. { 0x1a, KEY_BACK },
  45. { 0x1b, KEY_FORWARD },
  46. { 0x1c, KEY_RECORD },
  47. { 0x1d, KEY_REWIND },
  48. { 0x1e, KEY_FASTFORWARD },
  49. { 0x20, KEY_RED },
  50. { 0x21, KEY_GREEN },
  51. { 0x22, KEY_YELLOW },
  52. { 0x23, KEY_BLUE },
  53. };
  54. static struct rc_keymap rc5_streamzap_map = {
  55. .map = {
  56. .scan = rc5_streamzap,
  57. .size = ARRAY_SIZE(rc5_streamzap),
  58. .ir_type = IR_TYPE_RC5,
  59. .name = RC_MAP_RC5_STREAMZAP,
  60. }
  61. };
  62. static int __init init_rc_map_rc5_streamzap(void)
  63. {
  64. return ir_register_map(&rc5_streamzap_map);
  65. }
  66. static void __exit exit_rc_map_rc5_streamzap(void)
  67. {
  68. ir_unregister_map(&rc5_streamzap_map);
  69. }
  70. module_init(init_rc_map_rc5_streamzap)
  71. module_exit(exit_rc_map_rc5_streamzap)
  72. MODULE_LICENSE("GPL");
  73. MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");