rc-astrometa-t2hybrid.c 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Keytable for the Astrometa T2hybrid remote controller
  3. *
  4. * Copyright (C) 2017 Oleh Kravchenko <oleg@kaa.org.ua>
  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 version 2 as
  8. * published by the Free Software Foundation.
  9. *
  10. * You should have received a copy of the GNU General Public License
  11. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  12. */
  13. #include <media/rc-map.h>
  14. #include <linux/module.h>
  15. static struct rc_map_table t2hybrid[] = {
  16. { 0x4d, KEY_POWER2 },
  17. { 0x54, KEY_VIDEO }, /* Source */
  18. { 0x16, KEY_MUTE },
  19. { 0x4c, KEY_RECORD },
  20. { 0x05, KEY_CHANNELUP },
  21. { 0x0c, KEY_TIME}, /* Timeshift */
  22. { 0x0a, KEY_VOLUMEDOWN },
  23. { 0x40, KEY_ZOOM }, /* Fullscreen */
  24. { 0x1e, KEY_VOLUMEUP },
  25. { 0x12, KEY_0 },
  26. { 0x02, KEY_CHANNELDOWN },
  27. { 0x1c, KEY_AGAIN }, /* Recall */
  28. { 0x09, KEY_1 },
  29. { 0x1d, KEY_2 },
  30. { 0x1f, KEY_3 },
  31. { 0x0d, KEY_4 },
  32. { 0x19, KEY_5 },
  33. { 0x1b, KEY_6 },
  34. { 0x11, KEY_7 },
  35. { 0x15, KEY_8 },
  36. { 0x17, KEY_9 },
  37. };
  38. static struct rc_map_list t2hybrid_map = {
  39. .map = {
  40. .scan = t2hybrid,
  41. .size = ARRAY_SIZE(t2hybrid),
  42. .rc_proto = RC_PROTO_NEC,
  43. .name = RC_MAP_ASTROMETA_T2HYBRID,
  44. }
  45. };
  46. static int __init init_rc_map_t2hybrid(void)
  47. {
  48. return rc_map_register(&t2hybrid_map);
  49. }
  50. static void __exit exit_rc_map_t2hybrid(void)
  51. {
  52. rc_map_unregister(&t2hybrid_map);
  53. }
  54. module_init(init_rc_map_t2hybrid)
  55. module_exit(exit_rc_map_t2hybrid)
  56. MODULE_LICENSE("GPL");
  57. MODULE_AUTHOR("Oleh Kravchenko <oleg@kaa.org.ua>");