rc-purpletv.c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // SPDX-License-Identifier: GPL-2.0+
  2. // purpletv.h - Keytable for purpletv Remote Controller
  3. //
  4. // keymap imported from ir-keymaps.c
  5. //
  6. // Copyright (c) 2010 by Mauro Carvalho Chehab
  7. #include <media/rc-map.h>
  8. #include <linux/module.h>
  9. static struct rc_map_table purpletv[] = {
  10. { 0x03, KEY_POWER },
  11. { 0x6f, KEY_MUTE },
  12. { 0x10, KEY_BACKSPACE }, /* Recall */
  13. { 0x11, KEY_0 },
  14. { 0x04, KEY_1 },
  15. { 0x05, KEY_2 },
  16. { 0x06, KEY_3 },
  17. { 0x08, KEY_4 },
  18. { 0x09, KEY_5 },
  19. { 0x0a, KEY_6 },
  20. { 0x0c, KEY_7 },
  21. { 0x0d, KEY_8 },
  22. { 0x0e, KEY_9 },
  23. { 0x12, KEY_DOT }, /* 100+ */
  24. { 0x07, KEY_VOLUMEUP },
  25. { 0x0b, KEY_VOLUMEDOWN },
  26. { 0x1a, KEY_KPPLUS },
  27. { 0x18, KEY_KPMINUS },
  28. { 0x15, KEY_UP },
  29. { 0x1d, KEY_DOWN },
  30. { 0x0f, KEY_CHANNELUP },
  31. { 0x13, KEY_CHANNELDOWN },
  32. { 0x48, KEY_ZOOM },
  33. { 0x1b, KEY_VIDEO }, /* Video source */
  34. { 0x1f, KEY_CAMERA }, /* Snapshot */
  35. { 0x49, KEY_LANGUAGE }, /* MTS Select */
  36. { 0x19, KEY_SEARCH }, /* Auto Scan */
  37. { 0x4b, KEY_RECORD },
  38. { 0x46, KEY_PLAY },
  39. { 0x45, KEY_PAUSE }, /* Pause */
  40. { 0x44, KEY_STOP },
  41. { 0x43, KEY_TIME }, /* Time Shift */
  42. { 0x17, KEY_CHANNEL }, /* SURF CH */
  43. { 0x40, KEY_FORWARD }, /* Forward ? */
  44. { 0x42, KEY_REWIND }, /* Backward ? */
  45. };
  46. static struct rc_map_list purpletv_map = {
  47. .map = {
  48. .scan = purpletv,
  49. .size = ARRAY_SIZE(purpletv),
  50. .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
  51. .name = RC_MAP_PURPLETV,
  52. }
  53. };
  54. static int __init init_rc_map_purpletv(void)
  55. {
  56. return rc_map_register(&purpletv_map);
  57. }
  58. static void __exit exit_rc_map_purpletv(void)
  59. {
  60. rc_map_unregister(&purpletv_map);
  61. }
  62. module_init(init_rc_map_purpletv)
  63. module_exit(exit_rc_map_purpletv)
  64. MODULE_LICENSE("GPL");
  65. MODULE_AUTHOR("Mauro Carvalho Chehab");