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