rc-hauppauge-new.c 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /* hauppauge-new.h - Keytable for hauppauge_new Remote Controller
  2. *
  3. * keymap imported from ir-keymaps.c
  4. *
  5. * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. */
  12. #include <media/rc-map.h>
  13. /* Hauppauge: the newer, gray remotes (seems there are multiple
  14. * slightly different versions), shipped with cx88+ivtv cards.
  15. * almost rc5 coding, but some non-standard keys */
  16. static struct rc_map_table hauppauge_new[] = {
  17. /* Keys 0 to 9 */
  18. { 0x00, KEY_0 },
  19. { 0x01, KEY_1 },
  20. { 0x02, KEY_2 },
  21. { 0x03, KEY_3 },
  22. { 0x04, KEY_4 },
  23. { 0x05, KEY_5 },
  24. { 0x06, KEY_6 },
  25. { 0x07, KEY_7 },
  26. { 0x08, KEY_8 },
  27. { 0x09, KEY_9 },
  28. { 0x0a, KEY_TEXT }, /* keypad asterisk as well */
  29. { 0x0b, KEY_RED }, /* red button */
  30. { 0x0c, KEY_RADIO },
  31. { 0x0d, KEY_MENU },
  32. { 0x0e, KEY_SUBTITLE }, /* also the # key */
  33. { 0x0f, KEY_MUTE },
  34. { 0x10, KEY_VOLUMEUP },
  35. { 0x11, KEY_VOLUMEDOWN },
  36. { 0x12, KEY_PREVIOUS }, /* previous channel */
  37. { 0x14, KEY_UP },
  38. { 0x15, KEY_DOWN },
  39. { 0x16, KEY_LEFT },
  40. { 0x17, KEY_RIGHT },
  41. { 0x18, KEY_VIDEO }, /* Videos */
  42. { 0x19, KEY_AUDIO }, /* Music */
  43. /* 0x1a: Pictures - presume this means
  44. "Multimedia Home Platform" -
  45. no "PICTURES" key in input.h
  46. */
  47. { 0x1a, KEY_MHP },
  48. { 0x1b, KEY_EPG }, /* Guide */
  49. { 0x1c, KEY_TV },
  50. { 0x1e, KEY_NEXTSONG }, /* skip >| */
  51. { 0x1f, KEY_EXIT }, /* back/exit */
  52. { 0x20, KEY_CHANNELUP }, /* channel / program + */
  53. { 0x21, KEY_CHANNELDOWN }, /* channel / program - */
  54. { 0x22, KEY_CHANNEL }, /* source (old black remote) */
  55. { 0x24, KEY_PREVIOUSSONG }, /* replay |< */
  56. { 0x25, KEY_ENTER }, /* OK */
  57. { 0x26, KEY_SLEEP }, /* minimize (old black remote) */
  58. { 0x29, KEY_BLUE }, /* blue key */
  59. { 0x2e, KEY_GREEN }, /* green button */
  60. { 0x30, KEY_PAUSE }, /* pause */
  61. { 0x32, KEY_REWIND }, /* backward << */
  62. { 0x34, KEY_FASTFORWARD }, /* forward >> */
  63. { 0x35, KEY_PLAY },
  64. { 0x36, KEY_STOP },
  65. { 0x37, KEY_RECORD }, /* recording */
  66. { 0x38, KEY_YELLOW }, /* yellow key */
  67. { 0x3b, KEY_SELECT }, /* top right button */
  68. { 0x3c, KEY_ZOOM }, /* full */
  69. { 0x3d, KEY_POWER }, /* system power (green button) */
  70. };
  71. static struct rc_map_list hauppauge_new_map = {
  72. .map = {
  73. .scan = hauppauge_new,
  74. .size = ARRAY_SIZE(hauppauge_new),
  75. .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */
  76. .name = RC_MAP_HAUPPAUGE_NEW,
  77. }
  78. };
  79. static int __init init_rc_map_hauppauge_new(void)
  80. {
  81. return rc_map_register(&hauppauge_new_map);
  82. }
  83. static void __exit exit_rc_map_hauppauge_new(void)
  84. {
  85. rc_map_unregister(&hauppauge_new_map);
  86. }
  87. module_init(init_rc_map_hauppauge_new)
  88. module_exit(exit_rc_map_hauppauge_new)
  89. MODULE_LICENSE("GPL");
  90. MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");