rc-streamzap.c 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // SPDX-License-Identifier: GPL-2.0-or-later
  2. /* rc-streamzap.c - Keytable for Streamzap PC Remote, for use
  3. * with the Streamzap PC Remote IR Receiver.
  4. *
  5. * Copyright (c) 2010 by Jarod Wilson <[email protected]>
  6. */
  7. #include <media/rc-map.h>
  8. #include <linux/module.h>
  9. static struct rc_map_table streamzap[] = {
  10. /*
  11. * The Streamzap remote is almost, but not quite, RC-5, as it has an extra
  12. * bit in it.
  13. */
  14. { 0x28c0, KEY_NUMERIC_0 },
  15. { 0x28c1, KEY_NUMERIC_1 },
  16. { 0x28c2, KEY_NUMERIC_2 },
  17. { 0x28c3, KEY_NUMERIC_3 },
  18. { 0x28c4, KEY_NUMERIC_4 },
  19. { 0x28c5, KEY_NUMERIC_5 },
  20. { 0x28c6, KEY_NUMERIC_6 },
  21. { 0x28c7, KEY_NUMERIC_7 },
  22. { 0x28c8, KEY_NUMERIC_8 },
  23. { 0x28c9, KEY_NUMERIC_9 },
  24. { 0x28ca, KEY_POWER },
  25. { 0x28cb, KEY_MUTE },
  26. { 0x28cc, KEY_CHANNELUP },
  27. { 0x28cd, KEY_VOLUMEUP },
  28. { 0x28ce, KEY_CHANNELDOWN },
  29. { 0x28cf, KEY_VOLUMEDOWN },
  30. { 0x28d0, KEY_UP },
  31. { 0x28d1, KEY_LEFT },
  32. { 0x28d2, KEY_OK },
  33. { 0x28d3, KEY_RIGHT },
  34. { 0x28d4, KEY_DOWN },
  35. { 0x28d5, KEY_MENU },
  36. { 0x28d6, KEY_EXIT },
  37. { 0x28d7, KEY_PLAY },
  38. { 0x28d8, KEY_PAUSE },
  39. { 0x28d9, KEY_STOP },
  40. { 0x28da, KEY_BACK },
  41. { 0x28db, KEY_FORWARD },
  42. { 0x28dc, KEY_RECORD },
  43. { 0x28dd, KEY_REWIND },
  44. { 0x28de, KEY_FASTFORWARD },
  45. { 0x28e0, KEY_RED },
  46. { 0x28e1, KEY_GREEN },
  47. { 0x28e2, KEY_YELLOW },
  48. { 0x28e3, KEY_BLUE },
  49. };
  50. static struct rc_map_list streamzap_map = {
  51. .map = {
  52. .scan = streamzap,
  53. .size = ARRAY_SIZE(streamzap),
  54. .rc_proto = RC_PROTO_RC5_SZ,
  55. .name = RC_MAP_STREAMZAP,
  56. }
  57. };
  58. static int __init init_rc_map_streamzap(void)
  59. {
  60. return rc_map_register(&streamzap_map);
  61. }
  62. static void __exit exit_rc_map_streamzap(void)
  63. {
  64. rc_map_unregister(&streamzap_map);
  65. }
  66. module_init(init_rc_map_streamzap)
  67. module_exit(exit_rc_map_streamzap)
  68. MODULE_LICENSE("GPL");
  69. MODULE_AUTHOR("Jarod Wilson <[email protected]>");