162306a36Sopenharmony_ci// SPDX-License-Identifier: GPL-2.0+
262306a36Sopenharmony_ci// rc-dvb0700-big.c - Keytable for devices in dvb0700
362306a36Sopenharmony_ci//
462306a36Sopenharmony_ci// Copyright (c) 2010 by Mauro Carvalho Chehab
562306a36Sopenharmony_ci//
662306a36Sopenharmony_ci// TODO: This table is a real mess, as it merges RC codes from several
762306a36Sopenharmony_ci// devices into a big table. It also has both RC-5 and NEC codes inside.
862306a36Sopenharmony_ci// It should be broken into small tables, and the protocols should properly
962306a36Sopenharmony_ci// be identificated.
1062306a36Sopenharmony_ci//
1162306a36Sopenharmony_ci// The table were imported from dib0700_devices.c.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#include <media/rc-map.h>
1462306a36Sopenharmony_ci#include <linux/module.h>
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_cistatic struct rc_map_table dib0700_rc5_table[] = {
1762306a36Sopenharmony_ci	/* Key codes for the tiny Pinnacle remote*/
1862306a36Sopenharmony_ci	{ 0x0700, KEY_MUTE },
1962306a36Sopenharmony_ci	{ 0x0701, KEY_MENU }, /* Pinnacle logo */
2062306a36Sopenharmony_ci	{ 0x0739, KEY_POWER },
2162306a36Sopenharmony_ci	{ 0x0703, KEY_VOLUMEUP },
2262306a36Sopenharmony_ci	{ 0x0709, KEY_VOLUMEDOWN },
2362306a36Sopenharmony_ci	{ 0x0706, KEY_CHANNELUP },
2462306a36Sopenharmony_ci	{ 0x070c, KEY_CHANNELDOWN },
2562306a36Sopenharmony_ci	{ 0x070f, KEY_NUMERIC_1 },
2662306a36Sopenharmony_ci	{ 0x0715, KEY_NUMERIC_2 },
2762306a36Sopenharmony_ci	{ 0x0710, KEY_NUMERIC_3 },
2862306a36Sopenharmony_ci	{ 0x0718, KEY_NUMERIC_4 },
2962306a36Sopenharmony_ci	{ 0x071b, KEY_NUMERIC_5 },
3062306a36Sopenharmony_ci	{ 0x071e, KEY_NUMERIC_6 },
3162306a36Sopenharmony_ci	{ 0x0711, KEY_NUMERIC_7 },
3262306a36Sopenharmony_ci	{ 0x0721, KEY_NUMERIC_8 },
3362306a36Sopenharmony_ci	{ 0x0712, KEY_NUMERIC_9 },
3462306a36Sopenharmony_ci	{ 0x0727, KEY_NUMERIC_0 },
3562306a36Sopenharmony_ci	{ 0x0724, KEY_SCREEN }, /* 'Square' key */
3662306a36Sopenharmony_ci	{ 0x072a, KEY_TEXT },   /* 'T' key */
3762306a36Sopenharmony_ci	{ 0x072d, KEY_REWIND },
3862306a36Sopenharmony_ci	{ 0x0730, KEY_PLAY },
3962306a36Sopenharmony_ci	{ 0x0733, KEY_FASTFORWARD },
4062306a36Sopenharmony_ci	{ 0x0736, KEY_RECORD },
4162306a36Sopenharmony_ci	{ 0x073c, KEY_STOP },
4262306a36Sopenharmony_ci	{ 0x073f, KEY_CANCEL }, /* '?' key */
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_ci	/* Key codes for the Terratec Cinergy DT XS Diversity, similar to cinergyT2.c */
4562306a36Sopenharmony_ci	{ 0xeb01, KEY_POWER },
4662306a36Sopenharmony_ci	{ 0xeb02, KEY_NUMERIC_1 },
4762306a36Sopenharmony_ci	{ 0xeb03, KEY_NUMERIC_2 },
4862306a36Sopenharmony_ci	{ 0xeb04, KEY_NUMERIC_3 },
4962306a36Sopenharmony_ci	{ 0xeb05, KEY_NUMERIC_4 },
5062306a36Sopenharmony_ci	{ 0xeb06, KEY_NUMERIC_5 },
5162306a36Sopenharmony_ci	{ 0xeb07, KEY_NUMERIC_6 },
5262306a36Sopenharmony_ci	{ 0xeb08, KEY_NUMERIC_7 },
5362306a36Sopenharmony_ci	{ 0xeb09, KEY_NUMERIC_8 },
5462306a36Sopenharmony_ci	{ 0xeb0a, KEY_NUMERIC_9 },
5562306a36Sopenharmony_ci	{ 0xeb0b, KEY_VIDEO },
5662306a36Sopenharmony_ci	{ 0xeb0c, KEY_NUMERIC_0 },
5762306a36Sopenharmony_ci	{ 0xeb0d, KEY_REFRESH },
5862306a36Sopenharmony_ci	{ 0xeb0f, KEY_EPG },
5962306a36Sopenharmony_ci	{ 0xeb10, KEY_UP },
6062306a36Sopenharmony_ci	{ 0xeb11, KEY_LEFT },
6162306a36Sopenharmony_ci	{ 0xeb12, KEY_OK },
6262306a36Sopenharmony_ci	{ 0xeb13, KEY_RIGHT },
6362306a36Sopenharmony_ci	{ 0xeb14, KEY_DOWN },
6462306a36Sopenharmony_ci	{ 0xeb16, KEY_INFO },
6562306a36Sopenharmony_ci	{ 0xeb17, KEY_RED },
6662306a36Sopenharmony_ci	{ 0xeb18, KEY_GREEN },
6762306a36Sopenharmony_ci	{ 0xeb19, KEY_YELLOW },
6862306a36Sopenharmony_ci	{ 0xeb1a, KEY_BLUE },
6962306a36Sopenharmony_ci	{ 0xeb1b, KEY_CHANNELUP },
7062306a36Sopenharmony_ci	{ 0xeb1c, KEY_VOLUMEUP },
7162306a36Sopenharmony_ci	{ 0xeb1d, KEY_MUTE },
7262306a36Sopenharmony_ci	{ 0xeb1e, KEY_VOLUMEDOWN },
7362306a36Sopenharmony_ci	{ 0xeb1f, KEY_CHANNELDOWN },
7462306a36Sopenharmony_ci	{ 0xeb40, KEY_PAUSE },
7562306a36Sopenharmony_ci	{ 0xeb41, KEY_HOME },
7662306a36Sopenharmony_ci	{ 0xeb42, KEY_MENU }, /* DVD Menu */
7762306a36Sopenharmony_ci	{ 0xeb43, KEY_SUBTITLE },
7862306a36Sopenharmony_ci	{ 0xeb44, KEY_TEXT }, /* Teletext */
7962306a36Sopenharmony_ci	{ 0xeb45, KEY_DELETE },
8062306a36Sopenharmony_ci	{ 0xeb46, KEY_TV },
8162306a36Sopenharmony_ci	{ 0xeb47, KEY_DVD },
8262306a36Sopenharmony_ci	{ 0xeb48, KEY_STOP },
8362306a36Sopenharmony_ci	{ 0xeb49, KEY_VIDEO },
8462306a36Sopenharmony_ci	{ 0xeb4a, KEY_AUDIO }, /* Music */
8562306a36Sopenharmony_ci	{ 0xeb4b, KEY_SCREEN }, /* Pic */
8662306a36Sopenharmony_ci	{ 0xeb4c, KEY_PLAY },
8762306a36Sopenharmony_ci	{ 0xeb4d, KEY_BACK },
8862306a36Sopenharmony_ci	{ 0xeb4e, KEY_REWIND },
8962306a36Sopenharmony_ci	{ 0xeb4f, KEY_FASTFORWARD },
9062306a36Sopenharmony_ci	{ 0xeb54, KEY_PREVIOUS },
9162306a36Sopenharmony_ci	{ 0xeb58, KEY_RECORD },
9262306a36Sopenharmony_ci	{ 0xeb5c, KEY_NEXT },
9362306a36Sopenharmony_ci
9462306a36Sopenharmony_ci	/* Key codes for the Haupauge WinTV Nova-TD, copied from nova-t-usb2.c (Nova-T USB2) */
9562306a36Sopenharmony_ci	{ 0x1e00, KEY_NUMERIC_0 },
9662306a36Sopenharmony_ci	{ 0x1e01, KEY_NUMERIC_1 },
9762306a36Sopenharmony_ci	{ 0x1e02, KEY_NUMERIC_2 },
9862306a36Sopenharmony_ci	{ 0x1e03, KEY_NUMERIC_3 },
9962306a36Sopenharmony_ci	{ 0x1e04, KEY_NUMERIC_4 },
10062306a36Sopenharmony_ci	{ 0x1e05, KEY_NUMERIC_5 },
10162306a36Sopenharmony_ci	{ 0x1e06, KEY_NUMERIC_6 },
10262306a36Sopenharmony_ci	{ 0x1e07, KEY_NUMERIC_7 },
10362306a36Sopenharmony_ci	{ 0x1e08, KEY_NUMERIC_8 },
10462306a36Sopenharmony_ci	{ 0x1e09, KEY_NUMERIC_9 },
10562306a36Sopenharmony_ci	{ 0x1e0a, KEY_KPASTERISK },
10662306a36Sopenharmony_ci	{ 0x1e0b, KEY_RED },
10762306a36Sopenharmony_ci	{ 0x1e0c, KEY_RADIO },
10862306a36Sopenharmony_ci	{ 0x1e0d, KEY_MENU },
10962306a36Sopenharmony_ci	{ 0x1e0e, KEY_GRAVE }, /* # */
11062306a36Sopenharmony_ci	{ 0x1e0f, KEY_MUTE },
11162306a36Sopenharmony_ci	{ 0x1e10, KEY_VOLUMEUP },
11262306a36Sopenharmony_ci	{ 0x1e11, KEY_VOLUMEDOWN },
11362306a36Sopenharmony_ci	{ 0x1e12, KEY_CHANNEL },
11462306a36Sopenharmony_ci	{ 0x1e14, KEY_UP },
11562306a36Sopenharmony_ci	{ 0x1e15, KEY_DOWN },
11662306a36Sopenharmony_ci	{ 0x1e16, KEY_LEFT },
11762306a36Sopenharmony_ci	{ 0x1e17, KEY_RIGHT },
11862306a36Sopenharmony_ci	{ 0x1e18, KEY_VIDEO },
11962306a36Sopenharmony_ci	{ 0x1e19, KEY_AUDIO },
12062306a36Sopenharmony_ci	{ 0x1e1a, KEY_MEDIA },
12162306a36Sopenharmony_ci	{ 0x1e1b, KEY_EPG },
12262306a36Sopenharmony_ci	{ 0x1e1c, KEY_TV },
12362306a36Sopenharmony_ci	{ 0x1e1e, KEY_NEXT },
12462306a36Sopenharmony_ci	{ 0x1e1f, KEY_BACK },
12562306a36Sopenharmony_ci	{ 0x1e20, KEY_CHANNELUP },
12662306a36Sopenharmony_ci	{ 0x1e21, KEY_CHANNELDOWN },
12762306a36Sopenharmony_ci	{ 0x1e24, KEY_LAST }, /* Skip backwards */
12862306a36Sopenharmony_ci	{ 0x1e25, KEY_OK },
12962306a36Sopenharmony_ci	{ 0x1e29, KEY_BLUE},
13062306a36Sopenharmony_ci	{ 0x1e2e, KEY_GREEN },
13162306a36Sopenharmony_ci	{ 0x1e30, KEY_PAUSE },
13262306a36Sopenharmony_ci	{ 0x1e32, KEY_REWIND },
13362306a36Sopenharmony_ci	{ 0x1e34, KEY_FASTFORWARD },
13462306a36Sopenharmony_ci	{ 0x1e35, KEY_PLAY },
13562306a36Sopenharmony_ci	{ 0x1e36, KEY_STOP },
13662306a36Sopenharmony_ci	{ 0x1e37, KEY_RECORD },
13762306a36Sopenharmony_ci	{ 0x1e38, KEY_YELLOW },
13862306a36Sopenharmony_ci	{ 0x1e3b, KEY_GOTO },
13962306a36Sopenharmony_ci	{ 0x1e3d, KEY_POWER },
14062306a36Sopenharmony_ci
14162306a36Sopenharmony_ci	/* Key codes for the Leadtek Winfast DTV Dongle */
14262306a36Sopenharmony_ci	{ 0x0042, KEY_POWER },
14362306a36Sopenharmony_ci	{ 0x077c, KEY_TUNER },
14462306a36Sopenharmony_ci	{ 0x0f4e, KEY_PRINT }, /* PREVIEW */
14562306a36Sopenharmony_ci	{ 0x0840, KEY_SCREEN }, /* full screen toggle*/
14662306a36Sopenharmony_ci	{ 0x0f71, KEY_DOT }, /* frequency */
14762306a36Sopenharmony_ci	{ 0x0743, KEY_NUMERIC_0 },
14862306a36Sopenharmony_ci	{ 0x0c41, KEY_NUMERIC_1 },
14962306a36Sopenharmony_ci	{ 0x0443, KEY_NUMERIC_2 },
15062306a36Sopenharmony_ci	{ 0x0b7f, KEY_NUMERIC_3 },
15162306a36Sopenharmony_ci	{ 0x0e41, KEY_NUMERIC_4 },
15262306a36Sopenharmony_ci	{ 0x0643, KEY_NUMERIC_5 },
15362306a36Sopenharmony_ci	{ 0x097f, KEY_NUMERIC_6 },
15462306a36Sopenharmony_ci	{ 0x0d7e, KEY_NUMERIC_7 },
15562306a36Sopenharmony_ci	{ 0x057c, KEY_NUMERIC_8 },
15662306a36Sopenharmony_ci	{ 0x0a40, KEY_NUMERIC_9 },
15762306a36Sopenharmony_ci	{ 0x0e4e, KEY_CLEAR },
15862306a36Sopenharmony_ci	{ 0x047c, KEY_CHANNEL }, /* show channel number */
15962306a36Sopenharmony_ci	{ 0x0f41, KEY_LAST }, /* recall */
16062306a36Sopenharmony_ci	{ 0x0342, KEY_MUTE },
16162306a36Sopenharmony_ci	{ 0x064c, KEY_RESERVED }, /* PIP button*/
16262306a36Sopenharmony_ci	{ 0x0172, KEY_SHUFFLE }, /* SNAPSHOT */
16362306a36Sopenharmony_ci	{ 0x0c4e, KEY_PLAYPAUSE }, /* TIMESHIFT */
16462306a36Sopenharmony_ci	{ 0x0b70, KEY_RECORD },
16562306a36Sopenharmony_ci	{ 0x037d, KEY_VOLUMEUP },
16662306a36Sopenharmony_ci	{ 0x017d, KEY_VOLUMEDOWN },
16762306a36Sopenharmony_ci	{ 0x0242, KEY_CHANNELUP },
16862306a36Sopenharmony_ci	{ 0x007d, KEY_CHANNELDOWN },
16962306a36Sopenharmony_ci
17062306a36Sopenharmony_ci	/* Key codes for Nova-TD "credit card" remote control. */
17162306a36Sopenharmony_ci	{ 0x1d00, KEY_NUMERIC_0 },
17262306a36Sopenharmony_ci	{ 0x1d01, KEY_NUMERIC_1 },
17362306a36Sopenharmony_ci	{ 0x1d02, KEY_NUMERIC_2 },
17462306a36Sopenharmony_ci	{ 0x1d03, KEY_NUMERIC_3 },
17562306a36Sopenharmony_ci	{ 0x1d04, KEY_NUMERIC_4 },
17662306a36Sopenharmony_ci	{ 0x1d05, KEY_NUMERIC_5 },
17762306a36Sopenharmony_ci	{ 0x1d06, KEY_NUMERIC_6 },
17862306a36Sopenharmony_ci	{ 0x1d07, KEY_NUMERIC_7 },
17962306a36Sopenharmony_ci	{ 0x1d08, KEY_NUMERIC_8 },
18062306a36Sopenharmony_ci	{ 0x1d09, KEY_NUMERIC_9 },
18162306a36Sopenharmony_ci	{ 0x1d0a, KEY_TEXT },
18262306a36Sopenharmony_ci	{ 0x1d0d, KEY_MENU },
18362306a36Sopenharmony_ci	{ 0x1d0f, KEY_MUTE },
18462306a36Sopenharmony_ci	{ 0x1d10, KEY_VOLUMEUP },
18562306a36Sopenharmony_ci	{ 0x1d11, KEY_VOLUMEDOWN },
18662306a36Sopenharmony_ci	{ 0x1d12, KEY_CHANNEL },
18762306a36Sopenharmony_ci	{ 0x1d14, KEY_UP },
18862306a36Sopenharmony_ci	{ 0x1d15, KEY_DOWN },
18962306a36Sopenharmony_ci	{ 0x1d16, KEY_LEFT },
19062306a36Sopenharmony_ci	{ 0x1d17, KEY_RIGHT },
19162306a36Sopenharmony_ci	{ 0x1d1c, KEY_TV },
19262306a36Sopenharmony_ci	{ 0x1d1e, KEY_NEXT },
19362306a36Sopenharmony_ci	{ 0x1d1f, KEY_BACK },
19462306a36Sopenharmony_ci	{ 0x1d20, KEY_CHANNELUP },
19562306a36Sopenharmony_ci	{ 0x1d21, KEY_CHANNELDOWN },
19662306a36Sopenharmony_ci	{ 0x1d24, KEY_LAST },
19762306a36Sopenharmony_ci	{ 0x1d25, KEY_OK },
19862306a36Sopenharmony_ci	{ 0x1d30, KEY_PAUSE },
19962306a36Sopenharmony_ci	{ 0x1d32, KEY_REWIND },
20062306a36Sopenharmony_ci	{ 0x1d34, KEY_FASTFORWARD },
20162306a36Sopenharmony_ci	{ 0x1d35, KEY_PLAY },
20262306a36Sopenharmony_ci	{ 0x1d36, KEY_STOP },
20362306a36Sopenharmony_ci	{ 0x1d37, KEY_RECORD },
20462306a36Sopenharmony_ci	{ 0x1d3b, KEY_GOTO },
20562306a36Sopenharmony_ci	{ 0x1d3d, KEY_POWER },
20662306a36Sopenharmony_ci};
20762306a36Sopenharmony_ci
20862306a36Sopenharmony_cistatic struct rc_map_list dib0700_rc5_map = {
20962306a36Sopenharmony_ci	.map = {
21062306a36Sopenharmony_ci		.scan     = dib0700_rc5_table,
21162306a36Sopenharmony_ci		.size     = ARRAY_SIZE(dib0700_rc5_table),
21262306a36Sopenharmony_ci		.rc_proto = RC_PROTO_RC5,
21362306a36Sopenharmony_ci		.name     = RC_MAP_DIB0700_RC5_TABLE,
21462306a36Sopenharmony_ci	}
21562306a36Sopenharmony_ci};
21662306a36Sopenharmony_ci
21762306a36Sopenharmony_cistatic int __init init_rc_map(void)
21862306a36Sopenharmony_ci{
21962306a36Sopenharmony_ci	return rc_map_register(&dib0700_rc5_map);
22062306a36Sopenharmony_ci}
22162306a36Sopenharmony_ci
22262306a36Sopenharmony_cistatic void __exit exit_rc_map(void)
22362306a36Sopenharmony_ci{
22462306a36Sopenharmony_ci	rc_map_unregister(&dib0700_rc5_map);
22562306a36Sopenharmony_ci}
22662306a36Sopenharmony_ci
22762306a36Sopenharmony_cimodule_init(init_rc_map)
22862306a36Sopenharmony_cimodule_exit(exit_rc_map)
22962306a36Sopenharmony_ci
23062306a36Sopenharmony_ciMODULE_LICENSE("GPL");
23162306a36Sopenharmony_ciMODULE_AUTHOR("Mauro Carvalho Chehab");
232