rc-avermedia-dvbt.c 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. // SPDX-License-Identifier: GPL-2.0+
  2. // avermedia-dvbt.h - Keytable for avermedia_dvbt 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. /* Matt Jesson <dvb@jesson.eclipse.co.uk */
  10. static struct rc_map_table avermedia_dvbt[] = {
  11. { 0x28, KEY_0 }, /* '0' / 'enter' */
  12. { 0x22, KEY_1 }, /* '1' */
  13. { 0x12, KEY_2 }, /* '2' / 'up arrow' */
  14. { 0x32, KEY_3 }, /* '3' */
  15. { 0x24, KEY_4 }, /* '4' / 'left arrow' */
  16. { 0x14, KEY_5 }, /* '5' */
  17. { 0x34, KEY_6 }, /* '6' / 'right arrow' */
  18. { 0x26, KEY_7 }, /* '7' */
  19. { 0x16, KEY_8 }, /* '8' / 'down arrow' */
  20. { 0x36, KEY_9 }, /* '9' */
  21. { 0x20, KEY_VIDEO }, /* 'source' */
  22. { 0x10, KEY_TEXT }, /* 'teletext' */
  23. { 0x00, KEY_POWER }, /* 'power' */
  24. { 0x04, KEY_AUDIO }, /* 'audio' */
  25. { 0x06, KEY_ZOOM }, /* 'full screen' */
  26. { 0x18, KEY_SWITCHVIDEOMODE }, /* 'display' */
  27. { 0x38, KEY_SEARCH }, /* 'loop' */
  28. { 0x08, KEY_INFO }, /* 'preview' */
  29. { 0x2a, KEY_REWIND }, /* 'backward <<' */
  30. { 0x1a, KEY_FASTFORWARD }, /* 'forward >>' */
  31. { 0x3a, KEY_RECORD }, /* 'capture' */
  32. { 0x0a, KEY_MUTE }, /* 'mute' */
  33. { 0x2c, KEY_RECORD }, /* 'record' */
  34. { 0x1c, KEY_PAUSE }, /* 'pause' */
  35. { 0x3c, KEY_STOP }, /* 'stop' */
  36. { 0x0c, KEY_PLAY }, /* 'play' */
  37. { 0x2e, KEY_RED }, /* 'red' */
  38. { 0x01, KEY_BLUE }, /* 'blue' / 'cancel' */
  39. { 0x0e, KEY_YELLOW }, /* 'yellow' / 'ok' */
  40. { 0x21, KEY_GREEN }, /* 'green' */
  41. { 0x11, KEY_CHANNELDOWN }, /* 'channel -' */
  42. { 0x31, KEY_CHANNELUP }, /* 'channel +' */
  43. { 0x1e, KEY_VOLUMEDOWN }, /* 'volume -' */
  44. { 0x3e, KEY_VOLUMEUP }, /* 'volume +' */
  45. };
  46. static struct rc_map_list avermedia_dvbt_map = {
  47. .map = {
  48. .scan = avermedia_dvbt,
  49. .size = ARRAY_SIZE(avermedia_dvbt),
  50. .rc_proto = RC_PROTO_UNKNOWN, /* Legacy IR type */
  51. .name = RC_MAP_AVERMEDIA_DVBT,
  52. }
  53. };
  54. static int __init init_rc_map_avermedia_dvbt(void)
  55. {
  56. return rc_map_register(&avermedia_dvbt_map);
  57. }
  58. static void __exit exit_rc_map_avermedia_dvbt(void)
  59. {
  60. rc_map_unregister(&avermedia_dvbt_map);
  61. }
  62. module_init(init_rc_map_avermedia_dvbt)
  63. module_exit(exit_rc_map_avermedia_dvbt)
  64. MODULE_LICENSE("GPL");
  65. MODULE_AUTHOR("Mauro Carvalho Chehab");