xref: /linux/drivers/media/rc/keymaps/rc-dib0700-rc5.c (revision d100e659b61a735c3343b3d82c1c009b04072cdd)
132cf86f6SMauro Carvalho Chehab /* rc-dvb0700-big.c - Keytable for devices in dvb0700
232cf86f6SMauro Carvalho Chehab  *
332cf86f6SMauro Carvalho Chehab  * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com>
432cf86f6SMauro Carvalho Chehab  *
532cf86f6SMauro Carvalho Chehab  * TODO: This table is a real mess, as it merges RC codes from several
632cf86f6SMauro Carvalho Chehab  * devices into a big table. It also has both RC-5 and NEC codes inside.
732cf86f6SMauro Carvalho Chehab  * It should be broken into small tables, and the protocols should properly
832cf86f6SMauro Carvalho Chehab  * be indentificated.
932cf86f6SMauro Carvalho Chehab  *
1032cf86f6SMauro Carvalho Chehab  * The table were imported from dib0700_devices.c.
1132cf86f6SMauro Carvalho Chehab  *
1232cf86f6SMauro Carvalho Chehab  * This program is free software; you can redistribute it and/or modify
1332cf86f6SMauro Carvalho Chehab  * it under the terms of the GNU General Public License as published by
1432cf86f6SMauro Carvalho Chehab  * the Free Software Foundation; either version 2 of the License, or
1532cf86f6SMauro Carvalho Chehab  * (at your option) any later version.
1632cf86f6SMauro Carvalho Chehab  */
1732cf86f6SMauro Carvalho Chehab 
1832cf86f6SMauro Carvalho Chehab #include <media/rc-map.h>
1932cf86f6SMauro Carvalho Chehab 
202f4f58d6SMauro Carvalho Chehab static struct rc_map_table dib0700_rc5_table[] = {
2132cf86f6SMauro Carvalho Chehab 	/* Key codes for the tiny Pinnacle remote*/
2232cf86f6SMauro Carvalho Chehab 	{ 0x0700, KEY_MUTE },
2332cf86f6SMauro Carvalho Chehab 	{ 0x0701, KEY_MENU }, /* Pinnacle logo */
2432cf86f6SMauro Carvalho Chehab 	{ 0x0739, KEY_POWER },
2532cf86f6SMauro Carvalho Chehab 	{ 0x0703, KEY_VOLUMEUP },
2632cf86f6SMauro Carvalho Chehab 	{ 0x0709, KEY_VOLUMEDOWN },
2732cf86f6SMauro Carvalho Chehab 	{ 0x0706, KEY_CHANNELUP },
2832cf86f6SMauro Carvalho Chehab 	{ 0x070c, KEY_CHANNELDOWN },
2932cf86f6SMauro Carvalho Chehab 	{ 0x070f, KEY_1 },
3032cf86f6SMauro Carvalho Chehab 	{ 0x0715, KEY_2 },
3132cf86f6SMauro Carvalho Chehab 	{ 0x0710, KEY_3 },
3232cf86f6SMauro Carvalho Chehab 	{ 0x0718, KEY_4 },
3332cf86f6SMauro Carvalho Chehab 	{ 0x071b, KEY_5 },
3432cf86f6SMauro Carvalho Chehab 	{ 0x071e, KEY_6 },
3532cf86f6SMauro Carvalho Chehab 	{ 0x0711, KEY_7 },
3632cf86f6SMauro Carvalho Chehab 	{ 0x0721, KEY_8 },
3732cf86f6SMauro Carvalho Chehab 	{ 0x0712, KEY_9 },
3832cf86f6SMauro Carvalho Chehab 	{ 0x0727, KEY_0 },
3932cf86f6SMauro Carvalho Chehab 	{ 0x0724, KEY_SCREEN }, /* 'Square' key */
4032cf86f6SMauro Carvalho Chehab 	{ 0x072a, KEY_TEXT },   /* 'T' key */
4132cf86f6SMauro Carvalho Chehab 	{ 0x072d, KEY_REWIND },
4232cf86f6SMauro Carvalho Chehab 	{ 0x0730, KEY_PLAY },
4332cf86f6SMauro Carvalho Chehab 	{ 0x0733, KEY_FASTFORWARD },
4432cf86f6SMauro Carvalho Chehab 	{ 0x0736, KEY_RECORD },
4532cf86f6SMauro Carvalho Chehab 	{ 0x073c, KEY_STOP },
4632cf86f6SMauro Carvalho Chehab 	{ 0x073f, KEY_CANCEL }, /* '?' key */
4732cf86f6SMauro Carvalho Chehab 
4832cf86f6SMauro Carvalho Chehab 	/* Key codes for the Terratec Cinergy DT XS Diversity, similar to cinergyT2.c */
4932cf86f6SMauro Carvalho Chehab 	{ 0xeb01, KEY_POWER },
5032cf86f6SMauro Carvalho Chehab 	{ 0xeb02, KEY_1 },
5132cf86f6SMauro Carvalho Chehab 	{ 0xeb03, KEY_2 },
5232cf86f6SMauro Carvalho Chehab 	{ 0xeb04, KEY_3 },
5332cf86f6SMauro Carvalho Chehab 	{ 0xeb05, KEY_4 },
5432cf86f6SMauro Carvalho Chehab 	{ 0xeb06, KEY_5 },
5532cf86f6SMauro Carvalho Chehab 	{ 0xeb07, KEY_6 },
5632cf86f6SMauro Carvalho Chehab 	{ 0xeb08, KEY_7 },
5732cf86f6SMauro Carvalho Chehab 	{ 0xeb09, KEY_8 },
5832cf86f6SMauro Carvalho Chehab 	{ 0xeb0a, KEY_9 },
5932cf86f6SMauro Carvalho Chehab 	{ 0xeb0b, KEY_VIDEO },
6032cf86f6SMauro Carvalho Chehab 	{ 0xeb0c, KEY_0 },
6132cf86f6SMauro Carvalho Chehab 	{ 0xeb0d, KEY_REFRESH },
6232cf86f6SMauro Carvalho Chehab 	{ 0xeb0f, KEY_EPG },
6332cf86f6SMauro Carvalho Chehab 	{ 0xeb10, KEY_UP },
6432cf86f6SMauro Carvalho Chehab 	{ 0xeb11, KEY_LEFT },
6532cf86f6SMauro Carvalho Chehab 	{ 0xeb12, KEY_OK },
6632cf86f6SMauro Carvalho Chehab 	{ 0xeb13, KEY_RIGHT },
6732cf86f6SMauro Carvalho Chehab 	{ 0xeb14, KEY_DOWN },
6832cf86f6SMauro Carvalho Chehab 	{ 0xeb16, KEY_INFO },
6932cf86f6SMauro Carvalho Chehab 	{ 0xeb17, KEY_RED },
7032cf86f6SMauro Carvalho Chehab 	{ 0xeb18, KEY_GREEN },
7132cf86f6SMauro Carvalho Chehab 	{ 0xeb19, KEY_YELLOW },
7232cf86f6SMauro Carvalho Chehab 	{ 0xeb1a, KEY_BLUE },
7332cf86f6SMauro Carvalho Chehab 	{ 0xeb1b, KEY_CHANNELUP },
7432cf86f6SMauro Carvalho Chehab 	{ 0xeb1c, KEY_VOLUMEUP },
7532cf86f6SMauro Carvalho Chehab 	{ 0xeb1d, KEY_MUTE },
7632cf86f6SMauro Carvalho Chehab 	{ 0xeb1e, KEY_VOLUMEDOWN },
7732cf86f6SMauro Carvalho Chehab 	{ 0xeb1f, KEY_CHANNELDOWN },
7832cf86f6SMauro Carvalho Chehab 	{ 0xeb40, KEY_PAUSE },
7932cf86f6SMauro Carvalho Chehab 	{ 0xeb41, KEY_HOME },
8032cf86f6SMauro Carvalho Chehab 	{ 0xeb42, KEY_MENU }, /* DVD Menu */
8132cf86f6SMauro Carvalho Chehab 	{ 0xeb43, KEY_SUBTITLE },
8232cf86f6SMauro Carvalho Chehab 	{ 0xeb44, KEY_TEXT }, /* Teletext */
8332cf86f6SMauro Carvalho Chehab 	{ 0xeb45, KEY_DELETE },
8432cf86f6SMauro Carvalho Chehab 	{ 0xeb46, KEY_TV },
8532cf86f6SMauro Carvalho Chehab 	{ 0xeb47, KEY_DVD },
8632cf86f6SMauro Carvalho Chehab 	{ 0xeb48, KEY_STOP },
8732cf86f6SMauro Carvalho Chehab 	{ 0xeb49, KEY_VIDEO },
8832cf86f6SMauro Carvalho Chehab 	{ 0xeb4a, KEY_AUDIO }, /* Music */
8932cf86f6SMauro Carvalho Chehab 	{ 0xeb4b, KEY_SCREEN }, /* Pic */
9032cf86f6SMauro Carvalho Chehab 	{ 0xeb4c, KEY_PLAY },
9132cf86f6SMauro Carvalho Chehab 	{ 0xeb4d, KEY_BACK },
9232cf86f6SMauro Carvalho Chehab 	{ 0xeb4e, KEY_REWIND },
9332cf86f6SMauro Carvalho Chehab 	{ 0xeb4f, KEY_FASTFORWARD },
9432cf86f6SMauro Carvalho Chehab 	{ 0xeb54, KEY_PREVIOUS },
9532cf86f6SMauro Carvalho Chehab 	{ 0xeb58, KEY_RECORD },
9632cf86f6SMauro Carvalho Chehab 	{ 0xeb5c, KEY_NEXT },
9732cf86f6SMauro Carvalho Chehab 
9832cf86f6SMauro Carvalho Chehab 	/* Key codes for the Haupauge WinTV Nova-TD, copied from nova-t-usb2.c (Nova-T USB2) */
9932cf86f6SMauro Carvalho Chehab 	{ 0x1e00, KEY_0 },
10032cf86f6SMauro Carvalho Chehab 	{ 0x1e01, KEY_1 },
10132cf86f6SMauro Carvalho Chehab 	{ 0x1e02, KEY_2 },
10232cf86f6SMauro Carvalho Chehab 	{ 0x1e03, KEY_3 },
10332cf86f6SMauro Carvalho Chehab 	{ 0x1e04, KEY_4 },
10432cf86f6SMauro Carvalho Chehab 	{ 0x1e05, KEY_5 },
10532cf86f6SMauro Carvalho Chehab 	{ 0x1e06, KEY_6 },
10632cf86f6SMauro Carvalho Chehab 	{ 0x1e07, KEY_7 },
10732cf86f6SMauro Carvalho Chehab 	{ 0x1e08, KEY_8 },
10832cf86f6SMauro Carvalho Chehab 	{ 0x1e09, KEY_9 },
10932cf86f6SMauro Carvalho Chehab 	{ 0x1e0a, KEY_KPASTERISK },
11032cf86f6SMauro Carvalho Chehab 	{ 0x1e0b, KEY_RED },
11132cf86f6SMauro Carvalho Chehab 	{ 0x1e0c, KEY_RADIO },
11232cf86f6SMauro Carvalho Chehab 	{ 0x1e0d, KEY_MENU },
11332cf86f6SMauro Carvalho Chehab 	{ 0x1e0e, KEY_GRAVE }, /* # */
11432cf86f6SMauro Carvalho Chehab 	{ 0x1e0f, KEY_MUTE },
11532cf86f6SMauro Carvalho Chehab 	{ 0x1e10, KEY_VOLUMEUP },
11632cf86f6SMauro Carvalho Chehab 	{ 0x1e11, KEY_VOLUMEDOWN },
11732cf86f6SMauro Carvalho Chehab 	{ 0x1e12, KEY_CHANNEL },
11832cf86f6SMauro Carvalho Chehab 	{ 0x1e14, KEY_UP },
11932cf86f6SMauro Carvalho Chehab 	{ 0x1e15, KEY_DOWN },
12032cf86f6SMauro Carvalho Chehab 	{ 0x1e16, KEY_LEFT },
12132cf86f6SMauro Carvalho Chehab 	{ 0x1e17, KEY_RIGHT },
12232cf86f6SMauro Carvalho Chehab 	{ 0x1e18, KEY_VIDEO },
12332cf86f6SMauro Carvalho Chehab 	{ 0x1e19, KEY_AUDIO },
12432cf86f6SMauro Carvalho Chehab 	{ 0x1e1a, KEY_MEDIA },
12532cf86f6SMauro Carvalho Chehab 	{ 0x1e1b, KEY_EPG },
12632cf86f6SMauro Carvalho Chehab 	{ 0x1e1c, KEY_TV },
12732cf86f6SMauro Carvalho Chehab 	{ 0x1e1e, KEY_NEXT },
12832cf86f6SMauro Carvalho Chehab 	{ 0x1e1f, KEY_BACK },
12932cf86f6SMauro Carvalho Chehab 	{ 0x1e20, KEY_CHANNELUP },
13032cf86f6SMauro Carvalho Chehab 	{ 0x1e21, KEY_CHANNELDOWN },
13132cf86f6SMauro Carvalho Chehab 	{ 0x1e24, KEY_LAST }, /* Skip backwards */
13232cf86f6SMauro Carvalho Chehab 	{ 0x1e25, KEY_OK },
13332cf86f6SMauro Carvalho Chehab 	{ 0x1e29, KEY_BLUE},
13432cf86f6SMauro Carvalho Chehab 	{ 0x1e2e, KEY_GREEN },
13532cf86f6SMauro Carvalho Chehab 	{ 0x1e30, KEY_PAUSE },
13632cf86f6SMauro Carvalho Chehab 	{ 0x1e32, KEY_REWIND },
13732cf86f6SMauro Carvalho Chehab 	{ 0x1e34, KEY_FASTFORWARD },
13832cf86f6SMauro Carvalho Chehab 	{ 0x1e35, KEY_PLAY },
13932cf86f6SMauro Carvalho Chehab 	{ 0x1e36, KEY_STOP },
14032cf86f6SMauro Carvalho Chehab 	{ 0x1e37, KEY_RECORD },
14132cf86f6SMauro Carvalho Chehab 	{ 0x1e38, KEY_YELLOW },
14232cf86f6SMauro Carvalho Chehab 	{ 0x1e3b, KEY_GOTO },
14332cf86f6SMauro Carvalho Chehab 	{ 0x1e3d, KEY_POWER },
14432cf86f6SMauro Carvalho Chehab 
14532cf86f6SMauro Carvalho Chehab 	/* Key codes for the Leadtek Winfast DTV Dongle */
14632cf86f6SMauro Carvalho Chehab 	{ 0x0042, KEY_POWER },
14732cf86f6SMauro Carvalho Chehab 	{ 0x077c, KEY_TUNER },
14832cf86f6SMauro Carvalho Chehab 	{ 0x0f4e, KEY_PRINT }, /* PREVIEW */
14932cf86f6SMauro Carvalho Chehab 	{ 0x0840, KEY_SCREEN }, /* full screen toggle*/
15032cf86f6SMauro Carvalho Chehab 	{ 0x0f71, KEY_DOT }, /* frequency */
15132cf86f6SMauro Carvalho Chehab 	{ 0x0743, KEY_0 },
15232cf86f6SMauro Carvalho Chehab 	{ 0x0c41, KEY_1 },
15332cf86f6SMauro Carvalho Chehab 	{ 0x0443, KEY_2 },
15432cf86f6SMauro Carvalho Chehab 	{ 0x0b7f, KEY_3 },
15532cf86f6SMauro Carvalho Chehab 	{ 0x0e41, KEY_4 },
15632cf86f6SMauro Carvalho Chehab 	{ 0x0643, KEY_5 },
15732cf86f6SMauro Carvalho Chehab 	{ 0x097f, KEY_6 },
15832cf86f6SMauro Carvalho Chehab 	{ 0x0d7e, KEY_7 },
15932cf86f6SMauro Carvalho Chehab 	{ 0x057c, KEY_8 },
16032cf86f6SMauro Carvalho Chehab 	{ 0x0a40, KEY_9 },
16132cf86f6SMauro Carvalho Chehab 	{ 0x0e4e, KEY_CLEAR },
16232cf86f6SMauro Carvalho Chehab 	{ 0x047c, KEY_CHANNEL }, /* show channel number */
16332cf86f6SMauro Carvalho Chehab 	{ 0x0f41, KEY_LAST }, /* recall */
16432cf86f6SMauro Carvalho Chehab 	{ 0x0342, KEY_MUTE },
16532cf86f6SMauro Carvalho Chehab 	{ 0x064c, KEY_RESERVED }, /* PIP button*/
16632cf86f6SMauro Carvalho Chehab 	{ 0x0172, KEY_SHUFFLE }, /* SNAPSHOT */
16732cf86f6SMauro Carvalho Chehab 	{ 0x0c4e, KEY_PLAYPAUSE }, /* TIMESHIFT */
16832cf86f6SMauro Carvalho Chehab 	{ 0x0b70, KEY_RECORD },
16932cf86f6SMauro Carvalho Chehab 	{ 0x037d, KEY_VOLUMEUP },
17032cf86f6SMauro Carvalho Chehab 	{ 0x017d, KEY_VOLUMEDOWN },
17132cf86f6SMauro Carvalho Chehab 	{ 0x0242, KEY_CHANNELUP },
17232cf86f6SMauro Carvalho Chehab 	{ 0x007d, KEY_CHANNELDOWN },
17332cf86f6SMauro Carvalho Chehab 
17432cf86f6SMauro Carvalho Chehab 	/* Key codes for Nova-TD "credit card" remote control. */
17532cf86f6SMauro Carvalho Chehab 	{ 0x1d00, KEY_0 },
17632cf86f6SMauro Carvalho Chehab 	{ 0x1d01, KEY_1 },
17732cf86f6SMauro Carvalho Chehab 	{ 0x1d02, KEY_2 },
17832cf86f6SMauro Carvalho Chehab 	{ 0x1d03, KEY_3 },
17932cf86f6SMauro Carvalho Chehab 	{ 0x1d04, KEY_4 },
18032cf86f6SMauro Carvalho Chehab 	{ 0x1d05, KEY_5 },
18132cf86f6SMauro Carvalho Chehab 	{ 0x1d06, KEY_6 },
18232cf86f6SMauro Carvalho Chehab 	{ 0x1d07, KEY_7 },
18332cf86f6SMauro Carvalho Chehab 	{ 0x1d08, KEY_8 },
18432cf86f6SMauro Carvalho Chehab 	{ 0x1d09, KEY_9 },
18532cf86f6SMauro Carvalho Chehab 	{ 0x1d0a, KEY_TEXT },
18632cf86f6SMauro Carvalho Chehab 	{ 0x1d0d, KEY_MENU },
18732cf86f6SMauro Carvalho Chehab 	{ 0x1d0f, KEY_MUTE },
18832cf86f6SMauro Carvalho Chehab 	{ 0x1d10, KEY_VOLUMEUP },
18932cf86f6SMauro Carvalho Chehab 	{ 0x1d11, KEY_VOLUMEDOWN },
19032cf86f6SMauro Carvalho Chehab 	{ 0x1d12, KEY_CHANNEL },
19132cf86f6SMauro Carvalho Chehab 	{ 0x1d14, KEY_UP },
19232cf86f6SMauro Carvalho Chehab 	{ 0x1d15, KEY_DOWN },
19332cf86f6SMauro Carvalho Chehab 	{ 0x1d16, KEY_LEFT },
19432cf86f6SMauro Carvalho Chehab 	{ 0x1d17, KEY_RIGHT },
19532cf86f6SMauro Carvalho Chehab 	{ 0x1d1c, KEY_TV },
19632cf86f6SMauro Carvalho Chehab 	{ 0x1d1e, KEY_NEXT },
19732cf86f6SMauro Carvalho Chehab 	{ 0x1d1f, KEY_BACK },
19832cf86f6SMauro Carvalho Chehab 	{ 0x1d20, KEY_CHANNELUP },
19932cf86f6SMauro Carvalho Chehab 	{ 0x1d21, KEY_CHANNELDOWN },
20032cf86f6SMauro Carvalho Chehab 	{ 0x1d24, KEY_LAST },
20132cf86f6SMauro Carvalho Chehab 	{ 0x1d25, KEY_OK },
20232cf86f6SMauro Carvalho Chehab 	{ 0x1d30, KEY_PAUSE },
20332cf86f6SMauro Carvalho Chehab 	{ 0x1d32, KEY_REWIND },
20432cf86f6SMauro Carvalho Chehab 	{ 0x1d34, KEY_FASTFORWARD },
20532cf86f6SMauro Carvalho Chehab 	{ 0x1d35, KEY_PLAY },
20632cf86f6SMauro Carvalho Chehab 	{ 0x1d36, KEY_STOP },
20732cf86f6SMauro Carvalho Chehab 	{ 0x1d37, KEY_RECORD },
20832cf86f6SMauro Carvalho Chehab 	{ 0x1d3b, KEY_GOTO },
20932cf86f6SMauro Carvalho Chehab 	{ 0x1d3d, KEY_POWER },
21032cf86f6SMauro Carvalho Chehab };
21132cf86f6SMauro Carvalho Chehab 
212*d100e659SMauro Carvalho Chehab static struct rc_map_list dib0700_rc5_map = {
21332cf86f6SMauro Carvalho Chehab 	.map = {
21432cf86f6SMauro Carvalho Chehab 		.scan    = dib0700_rc5_table,
21532cf86f6SMauro Carvalho Chehab 		.size    = ARRAY_SIZE(dib0700_rc5_table),
21652b66144SMauro Carvalho Chehab 		.rc_type = RC_TYPE_RC5,
21732cf86f6SMauro Carvalho Chehab 		.name    = RC_MAP_DIB0700_RC5_TABLE,
21832cf86f6SMauro Carvalho Chehab 	}
21932cf86f6SMauro Carvalho Chehab };
22032cf86f6SMauro Carvalho Chehab 
22132cf86f6SMauro Carvalho Chehab static int __init init_rc_map(void)
22232cf86f6SMauro Carvalho Chehab {
223*d100e659SMauro Carvalho Chehab 	return rc_map_register(&dib0700_rc5_map);
22432cf86f6SMauro Carvalho Chehab }
22532cf86f6SMauro Carvalho Chehab 
22632cf86f6SMauro Carvalho Chehab static void __exit exit_rc_map(void)
22732cf86f6SMauro Carvalho Chehab {
228*d100e659SMauro Carvalho Chehab 	rc_map_unregister(&dib0700_rc5_map);
22932cf86f6SMauro Carvalho Chehab }
23032cf86f6SMauro Carvalho Chehab 
23132cf86f6SMauro Carvalho Chehab module_init(init_rc_map)
23232cf86f6SMauro Carvalho Chehab module_exit(exit_rc_map)
23332cf86f6SMauro Carvalho Chehab 
23432cf86f6SMauro Carvalho Chehab MODULE_LICENSE("GPL");
23532cf86f6SMauro Carvalho Chehab MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>");
236