Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rc-avermedia-dvbt.c
Go to the documentation of this file.
1 /* avermedia-dvbt.h - Keytable for avermedia_dvbt Remote Controller
2  *
3  * keymap imported from ir-keymaps.c
4  *
5  * Copyright (c) 2010 by Mauro Carvalho Chehab <[email protected]>
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 /* Matt Jesson <[email protected] */
17 
18 static struct rc_map_table avermedia_dvbt[] = {
19  { 0x28, KEY_0 }, /* '0' / 'enter' */
20  { 0x22, KEY_1 }, /* '1' */
21  { 0x12, KEY_2 }, /* '2' / 'up arrow' */
22  { 0x32, KEY_3 }, /* '3' */
23  { 0x24, KEY_4 }, /* '4' / 'left arrow' */
24  { 0x14, KEY_5 }, /* '5' */
25  { 0x34, KEY_6 }, /* '6' / 'right arrow' */
26  { 0x26, KEY_7 }, /* '7' */
27  { 0x16, KEY_8 }, /* '8' / 'down arrow' */
28  { 0x36, KEY_9 }, /* '9' */
29 
30  { 0x20, KEY_VIDEO }, /* 'source' */
31  { 0x10, KEY_TEXT }, /* 'teletext' */
32  { 0x00, KEY_POWER }, /* 'power' */
33  { 0x04, KEY_AUDIO }, /* 'audio' */
34  { 0x06, KEY_ZOOM }, /* 'full screen' */
35  { 0x18, KEY_SWITCHVIDEOMODE }, /* 'display' */
36  { 0x38, KEY_SEARCH }, /* 'loop' */
37  { 0x08, KEY_INFO }, /* 'preview' */
38  { 0x2a, KEY_REWIND }, /* 'backward <<' */
39  { 0x1a, KEY_FASTFORWARD }, /* 'forward >>' */
40  { 0x3a, KEY_RECORD }, /* 'capture' */
41  { 0x0a, KEY_MUTE }, /* 'mute' */
42  { 0x2c, KEY_RECORD }, /* 'record' */
43  { 0x1c, KEY_PAUSE }, /* 'pause' */
44  { 0x3c, KEY_STOP }, /* 'stop' */
45  { 0x0c, KEY_PLAY }, /* 'play' */
46  { 0x2e, KEY_RED }, /* 'red' */
47  { 0x01, KEY_BLUE }, /* 'blue' / 'cancel' */
48  { 0x0e, KEY_YELLOW }, /* 'yellow' / 'ok' */
49  { 0x21, KEY_GREEN }, /* 'green' */
50  { 0x11, KEY_CHANNELDOWN }, /* 'channel -' */
51  { 0x31, KEY_CHANNELUP }, /* 'channel +' */
52  { 0x1e, KEY_VOLUMEDOWN }, /* 'volume -' */
53  { 0x3e, KEY_VOLUMEUP }, /* 'volume +' */
54 };
55 
56 static struct rc_map_list avermedia_dvbt_map = {
57  .map = {
58  .scan = avermedia_dvbt,
59  .size = ARRAY_SIZE(avermedia_dvbt),
60  .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */
61  .name = RC_MAP_AVERMEDIA_DVBT,
62  }
63 };
64 
65 static int __init init_rc_map_avermedia_dvbt(void)
66 {
67  return rc_map_register(&avermedia_dvbt_map);
68 }
69 
70 static void __exit exit_rc_map_avermedia_dvbt(void)
71 {
72  rc_map_unregister(&avermedia_dvbt_map);
73 }
74 
75 module_init(init_rc_map_avermedia_dvbt)
76 module_exit(exit_rc_map_avermedia_dvbt)
77 
78 MODULE_LICENSE("GPL");
79 MODULE_AUTHOR("Mauro Carvalho Chehab <[email protected]>");