xref: /openbmc/linux/drivers/media/rc/keymaps/rc-eztv.c (revision bc5aa3a0)
1 /* eztv.h - Keytable for eztv 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 /* Alfons Geser <a.geser@cox.net>
17  * updates from Job D. R. Borges <jobdrb@ig.com.br> */
18 
19 static struct rc_map_table eztv[] = {
20 	{ 0x12, KEY_POWER },
21 	{ 0x01, KEY_TV },	/* DVR */
22 	{ 0x15, KEY_DVD },	/* DVD */
23 	{ 0x17, KEY_AUDIO },	/* music */
24 				/* DVR mode / DVD mode / music mode */
25 
26 	{ 0x1b, KEY_MUTE },	/* mute */
27 	{ 0x02, KEY_LANGUAGE },	/* MTS/SAP / audio / autoseek */
28 	{ 0x1e, KEY_SUBTITLE },	/* closed captioning / subtitle / seek */
29 	{ 0x16, KEY_ZOOM },	/* full screen */
30 	{ 0x1c, KEY_VIDEO },	/* video source / eject / delall */
31 	{ 0x1d, KEY_RESTART },	/* playback / angle / del */
32 	{ 0x2f, KEY_SEARCH },	/* scan / menu / playlist */
33 	{ 0x30, KEY_CHANNEL },	/* CH surfing / bookmark / memo */
34 
35 	{ 0x31, KEY_HELP },	/* help */
36 	{ 0x32, KEY_MODE },	/* num/memo */
37 	{ 0x33, KEY_ESC },	/* cancel */
38 
39 	{ 0x0c, KEY_UP },	/* up */
40 	{ 0x10, KEY_DOWN },	/* down */
41 	{ 0x08, KEY_LEFT },	/* left */
42 	{ 0x04, KEY_RIGHT },	/* right */
43 	{ 0x03, KEY_SELECT },	/* select */
44 
45 	{ 0x1f, KEY_REWIND },	/* rewind */
46 	{ 0x20, KEY_PLAYPAUSE },/* play/pause */
47 	{ 0x29, KEY_FORWARD },	/* forward */
48 	{ 0x14, KEY_AGAIN },	/* repeat */
49 	{ 0x2b, KEY_RECORD },	/* recording */
50 	{ 0x2c, KEY_STOP },	/* stop */
51 	{ 0x2d, KEY_PLAY },	/* play */
52 	{ 0x2e, KEY_CAMERA },	/* snapshot / shuffle */
53 
54 	{ 0x00, KEY_0 },
55 	{ 0x05, KEY_1 },
56 	{ 0x06, KEY_2 },
57 	{ 0x07, KEY_3 },
58 	{ 0x09, KEY_4 },
59 	{ 0x0a, KEY_5 },
60 	{ 0x0b, KEY_6 },
61 	{ 0x0d, KEY_7 },
62 	{ 0x0e, KEY_8 },
63 	{ 0x0f, KEY_9 },
64 
65 	{ 0x2a, KEY_VOLUMEUP },
66 	{ 0x11, KEY_VOLUMEDOWN },
67 	{ 0x18, KEY_CHANNELUP },/* CH.tracking up */
68 	{ 0x19, KEY_CHANNELDOWN },/* CH.tracking down */
69 
70 	{ 0x13, KEY_ENTER },	/* enter */
71 	{ 0x21, KEY_DOT },	/* . (decimal dot) */
72 };
73 
74 static struct rc_map_list eztv_map = {
75 	.map = {
76 		.scan    = eztv,
77 		.size    = ARRAY_SIZE(eztv),
78 		.rc_type = RC_TYPE_UNKNOWN,	/* Legacy IR type */
79 		.name    = RC_MAP_EZTV,
80 	}
81 };
82 
83 static int __init init_rc_map_eztv(void)
84 {
85 	return rc_map_register(&eztv_map);
86 }
87 
88 static void __exit exit_rc_map_eztv(void)
89 {
90 	rc_map_unregister(&eztv_map);
91 }
92 
93 module_init(init_rc_map_eztv)
94 module_exit(exit_rc_map_eztv)
95 
96 MODULE_LICENSE("GPL");
97 MODULE_AUTHOR("Mauro Carvalho Chehab");
98