1 /* behold.h - Keytable for behold Remote Controller 2 * 3 * keymap imported from ir-keymaps.c 4 * 5 * Copyright (c) 2010 by Mauro Carvalho Chehab 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 13 #include <media/rc-map.h> 14 #include <linux/module.h> 15 16 /* 17 * Igor Kuznetsov <igk72@ya.ru> 18 * Andrey J. Melnikov <temnota@kmv.ru> 19 * 20 * Keytable is used by BeholdTV 60x series, M6 series at 21 * least, and probably other cards too. 22 * The "ascii-art picture" below (in comments, first row 23 * is the keycode in hex, and subsequent row(s) shows 24 * the button labels (several variants when appropriate) 25 * helps to descide which keycodes to assign to the buttons. 26 */ 27 28 static struct rc_map_table behold[] = { 29 30 /* 0x1c 0x12 * 31 * TV/FM POWER * 32 * */ 33 { 0x866b1c, KEY_TUNER }, /* XXX KEY_TV / KEY_RADIO */ 34 { 0x866b12, KEY_POWER }, 35 36 /* 0x01 0x02 0x03 * 37 * 1 2 3 * 38 * * 39 * 0x04 0x05 0x06 * 40 * 4 5 6 * 41 * * 42 * 0x07 0x08 0x09 * 43 * 7 8 9 * 44 * */ 45 { 0x866b01, KEY_1 }, 46 { 0x866b02, KEY_2 }, 47 { 0x866b03, KEY_3 }, 48 { 0x866b04, KEY_4 }, 49 { 0x866b05, KEY_5 }, 50 { 0x866b06, KEY_6 }, 51 { 0x866b07, KEY_7 }, 52 { 0x866b08, KEY_8 }, 53 { 0x866b09, KEY_9 }, 54 55 /* 0x0a 0x00 0x17 * 56 * RECALL 0 MODE * 57 * */ 58 { 0x866b0a, KEY_AGAIN }, 59 { 0x866b00, KEY_0 }, 60 { 0x866b17, KEY_MODE }, 61 62 /* 0x14 0x10 * 63 * ASPECT FULLSCREEN * 64 * */ 65 { 0x866b14, KEY_SCREEN }, 66 { 0x866b10, KEY_ZOOM }, 67 68 /* 0x0b * 69 * Up * 70 * * 71 * 0x18 0x16 0x0c * 72 * Left Ok Right * 73 * * 74 * 0x015 * 75 * Down * 76 * */ 77 { 0x866b0b, KEY_CHANNELUP }, 78 { 0x866b18, KEY_VOLUMEDOWN }, 79 { 0x866b16, KEY_OK }, /* XXX KEY_ENTER */ 80 { 0x866b0c, KEY_VOLUMEUP }, 81 { 0x866b15, KEY_CHANNELDOWN }, 82 83 /* 0x11 0x0d * 84 * MUTE INFO * 85 * */ 86 { 0x866b11, KEY_MUTE }, 87 { 0x866b0d, KEY_INFO }, 88 89 /* 0x0f 0x1b 0x1a * 90 * RECORD PLAY/PAUSE STOP * 91 * * 92 * 0x0e 0x1f 0x1e * 93 *TELETEXT AUDIO SOURCE * 94 * RED YELLOW * 95 * */ 96 { 0x866b0f, KEY_RECORD }, 97 { 0x866b1b, KEY_PLAYPAUSE }, 98 { 0x866b1a, KEY_STOP }, 99 { 0x866b0e, KEY_TEXT }, 100 { 0x866b1f, KEY_RED }, /*XXX KEY_AUDIO */ 101 { 0x866b1e, KEY_VIDEO }, 102 103 /* 0x1d 0x13 0x19 * 104 * SLEEP PREVIEW DVB * 105 * GREEN BLUE * 106 * */ 107 { 0x866b1d, KEY_SLEEP }, 108 { 0x866b13, KEY_GREEN }, 109 { 0x866b19, KEY_BLUE }, /* XXX KEY_SAT */ 110 111 /* 0x58 0x5c * 112 * FREEZE SNAPSHOT * 113 * */ 114 { 0x866b58, KEY_SLOW }, 115 { 0x866b5c, KEY_CAMERA }, 116 117 }; 118 119 static struct rc_map_list behold_map = { 120 .map = { 121 .scan = behold, 122 .size = ARRAY_SIZE(behold), 123 .rc_type = RC_TYPE_NEC, 124 .name = RC_MAP_BEHOLD, 125 } 126 }; 127 128 static int __init init_rc_map_behold(void) 129 { 130 return rc_map_register(&behold_map); 131 } 132 133 static void __exit exit_rc_map_behold(void) 134 { 135 rc_map_unregister(&behold_map); 136 } 137 138 module_init(init_rc_map_behold) 139 module_exit(exit_rc_map_behold) 140 141 MODULE_LICENSE("GPL"); 142 MODULE_AUTHOR("Mauro Carvalho Chehab"); 143