rc-medion-x10.c 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * Medion X10 RF remote keytable
  3. *
  4. * Copyright (C) 2011 Anssi Hannula <anssi.hannula@?ki.fi>
  5. *
  6. * This file is based on a keytable provided by
  7. * Jan Losinski <losinski@wh2.tu-dresden.de>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This program is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU General Public License along
  20. * with this program; if not, write to the Free Software Foundation, Inc.,
  21. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  22. */
  23. #include <linux/module.h>
  24. #include <media/rc-map.h>
  25. static struct rc_map_table medion_x10[] = {
  26. { 0x2c, KEY_TV }, /* TV */
  27. { 0x2d, KEY_VCR }, /* VCR */
  28. { 0x04, KEY_DVD }, /* DVD */
  29. { 0x06, KEY_AUDIO }, /* MUSIC */
  30. { 0x2e, KEY_RADIO }, /* RADIO */
  31. { 0x05, KEY_DIRECTORY }, /* PHOTO */
  32. { 0x2f, KEY_INFO }, /* TV-PREVIEW */
  33. { 0x30, KEY_LIST }, /* CHANNEL-LST */
  34. { 0x1b, KEY_SETUP }, /* SETUP */
  35. { 0x31, KEY_VIDEO }, /* VIDEO DESKTOP */
  36. { 0x08, KEY_VOLUMEDOWN }, /* VOL - */
  37. { 0x09, KEY_VOLUMEUP }, /* VOL + */
  38. { 0x0b, KEY_CHANNELUP }, /* CHAN + */
  39. { 0x0c, KEY_CHANNELDOWN }, /* CHAN - */
  40. { 0x00, KEY_MUTE }, /* MUTE */
  41. { 0x32, KEY_RED }, /* red */
  42. { 0x33, KEY_GREEN }, /* green */
  43. { 0x34, KEY_YELLOW }, /* yellow */
  44. { 0x35, KEY_BLUE }, /* blue */
  45. { 0x16, KEY_TEXT }, /* TXT */
  46. { 0x0d, KEY_1 },
  47. { 0x0e, KEY_2 },
  48. { 0x0f, KEY_3 },
  49. { 0x10, KEY_4 },
  50. { 0x11, KEY_5 },
  51. { 0x12, KEY_6 },
  52. { 0x13, KEY_7 },
  53. { 0x14, KEY_8 },
  54. { 0x15, KEY_9 },
  55. { 0x17, KEY_0 },
  56. { 0x1c, KEY_SEARCH }, /* TV/RAD, CH SRC */
  57. { 0x20, KEY_DELETE }, /* DELETE */
  58. { 0x36, KEY_KEYBOARD }, /* RENAME */
  59. { 0x18, KEY_SCREEN }, /* SNAPSHOT */
  60. { 0x1a, KEY_UP }, /* up */
  61. { 0x22, KEY_DOWN }, /* down */
  62. { 0x1d, KEY_LEFT }, /* left */
  63. { 0x1f, KEY_RIGHT }, /* right */
  64. { 0x1e, KEY_OK }, /* OK */
  65. { 0x37, KEY_SELECT }, /* ACQUIRE IMAGE */
  66. { 0x38, KEY_EDIT }, /* EDIT IMAGE */
  67. { 0x24, KEY_REWIND }, /* rewind (<<) */
  68. { 0x25, KEY_PLAY }, /* play ( >) */
  69. { 0x26, KEY_FORWARD }, /* forward (>>) */
  70. { 0x27, KEY_RECORD }, /* record ( o) */
  71. { 0x28, KEY_STOP }, /* stop ([]) */
  72. { 0x29, KEY_PAUSE }, /* pause ('') */
  73. { 0x21, KEY_PREVIOUS }, /* prev */
  74. { 0x39, KEY_SWITCHVIDEOMODE }, /* F SCR */
  75. { 0x23, KEY_NEXT }, /* next */
  76. { 0x19, KEY_MENU }, /* MENU */
  77. { 0x3a, KEY_LANGUAGE }, /* AUDIO */
  78. { 0x02, KEY_POWER }, /* POWER */
  79. };
  80. static struct rc_map_list medion_x10_map = {
  81. .map = {
  82. .scan = medion_x10,
  83. .size = ARRAY_SIZE(medion_x10),
  84. .rc_type = RC_TYPE_OTHER,
  85. .name = RC_MAP_MEDION_X10,
  86. }
  87. };
  88. static int __init init_rc_map_medion_x10(void)
  89. {
  90. return rc_map_register(&medion_x10_map);
  91. }
  92. static void __exit exit_rc_map_medion_x10(void)
  93. {
  94. rc_map_unregister(&medion_x10_map);
  95. }
  96. module_init(init_rc_map_medion_x10)
  97. module_exit(exit_rc_map_medion_x10)
  98. MODULE_LICENSE("GPL");
  99. MODULE_AUTHOR("Anssi Hannula <anssi.hannula@iki.fi>");