| 
									
										
										
										
											2010-04-16 18:28:35 -03:00
										 |  |  | /* rc5-imon-mce.c - Keytable for Windows Media Center RC-6 remotes for use
 | 
					
						
							|  |  |  |  * with the SoundGraph iMON/Antec Veris hardware IR decoder | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com> | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  * This program is free software; you can redistribute it and/or modify | 
					
						
							|  |  |  |  * it under the terms of the GNU General Public License as published by | 
					
						
							|  |  |  |  * the Free Software Foundation; either version 2 of the License, or | 
					
						
							|  |  |  |  * (at your option) any later version. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include <media/rc-map.h>
 | 
					
						
							| 
									
										
										
										
											2011-07-03 14:03:12 -04:00
										 |  |  | #include <linux/module.h>
 | 
					
						
							| 
									
										
										
										
											2010-04-16 18:28:35 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | /* mce-mode imon mce remote key table */ | 
					
						
							| 
									
										
											  
											
												[media] rc: Name RC keymap tables as rc_map_table
Remote keytables had different names all over the place. Part of the fault
is due to a bad naming when rc subsystem was created, but there were lots
of old names that were still here.
Use a common standard for everything.
Patch generated by this script:
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_scancode,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,ir_codes_,rc_map_,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_key_map,rc_map_table,g <$i >a && mv a $i; done
for i in `find drivers/staging -type f -name *.[ch]` `find include/media -type f -name *.[ch]` `find drivers/media -type f -name *.[ch]`; do sed s,rc_map_table_size,rc_map_size,g <$i >a && mv a $i; done
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
											
										 
											2010-11-17 15:46:09 -03:00
										 |  |  | static struct rc_map_table imon_mce[] = { | 
					
						
							| 
									
										
										
										
											2010-04-16 18:28:35 -03:00
										 |  |  | 	/* keys sorted mostly by frequency of use to optimize lookups */ | 
					
						
							|  |  |  | 	{ 0x800ff415, KEY_REWIND }, | 
					
						
							|  |  |  | 	{ 0x800ff414, KEY_FASTFORWARD }, | 
					
						
							|  |  |  | 	{ 0x800ff41b, KEY_PREVIOUS }, | 
					
						
							|  |  |  | 	{ 0x800ff41a, KEY_NEXT }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x800ff416, KEY_PLAY }, | 
					
						
							|  |  |  | 	{ 0x800ff418, KEY_PAUSE }, | 
					
						
							|  |  |  | 	{ 0x800ff419, KEY_STOP }, | 
					
						
							|  |  |  | 	{ 0x800ff417, KEY_RECORD }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x02000052, KEY_UP }, | 
					
						
							|  |  |  | 	{ 0x02000051, KEY_DOWN }, | 
					
						
							|  |  |  | 	{ 0x02000050, KEY_LEFT }, | 
					
						
							|  |  |  | 	{ 0x0200004f, KEY_RIGHT }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x800ff41e, KEY_UP }, | 
					
						
							|  |  |  | 	{ 0x800ff41f, KEY_DOWN }, | 
					
						
							|  |  |  | 	{ 0x800ff420, KEY_LEFT }, | 
					
						
							|  |  |  | 	{ 0x800ff421, KEY_RIGHT }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	/* 0x800ff40b also KEY_NUMERIC_POUND on some receivers */ | 
					
						
							|  |  |  | 	{ 0x800ff40b, KEY_ENTER }, | 
					
						
							|  |  |  | 	{ 0x02000028, KEY_ENTER }, | 
					
						
							|  |  |  | /* the OK and Enter buttons decode to the same value on some remotes
 | 
					
						
							|  |  |  | 	{ 0x02000028, KEY_OK }, */ | 
					
						
							|  |  |  | 	{ 0x800ff422, KEY_OK }, | 
					
						
							|  |  |  | 	{ 0x0200002a, KEY_EXIT }, | 
					
						
							|  |  |  | 	{ 0x800ff423, KEY_EXIT }, | 
					
						
							|  |  |  | 	{ 0x02000029, KEY_DELETE }, | 
					
						
							|  |  |  | 	/* 0x800ff40a also KEY_NUMERIC_STAR on some receivers */ | 
					
						
							|  |  |  | 	{ 0x800ff40a, KEY_DELETE }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x800ff40e, KEY_MUTE }, | 
					
						
							|  |  |  | 	{ 0x800ff410, KEY_VOLUMEUP }, | 
					
						
							|  |  |  | 	{ 0x800ff411, KEY_VOLUMEDOWN }, | 
					
						
							|  |  |  | 	{ 0x800ff412, KEY_CHANNELUP }, | 
					
						
							|  |  |  | 	{ 0x800ff413, KEY_CHANNELDOWN }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x0200001e, KEY_NUMERIC_1 }, | 
					
						
							|  |  |  | 	{ 0x0200001f, KEY_NUMERIC_2 }, | 
					
						
							|  |  |  | 	{ 0x02000020, KEY_NUMERIC_3 }, | 
					
						
							|  |  |  | 	{ 0x02000021, KEY_NUMERIC_4 }, | 
					
						
							|  |  |  | 	{ 0x02000022, KEY_NUMERIC_5 }, | 
					
						
							|  |  |  | 	{ 0x02000023, KEY_NUMERIC_6 }, | 
					
						
							|  |  |  | 	{ 0x02000024, KEY_NUMERIC_7 }, | 
					
						
							|  |  |  | 	{ 0x02000025, KEY_NUMERIC_8 }, | 
					
						
							|  |  |  | 	{ 0x02000026, KEY_NUMERIC_9 }, | 
					
						
							|  |  |  | 	{ 0x02000027, KEY_NUMERIC_0 }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x800ff401, KEY_NUMERIC_1 }, | 
					
						
							|  |  |  | 	{ 0x800ff402, KEY_NUMERIC_2 }, | 
					
						
							|  |  |  | 	{ 0x800ff403, KEY_NUMERIC_3 }, | 
					
						
							|  |  |  | 	{ 0x800ff404, KEY_NUMERIC_4 }, | 
					
						
							|  |  |  | 	{ 0x800ff405, KEY_NUMERIC_5 }, | 
					
						
							|  |  |  | 	{ 0x800ff406, KEY_NUMERIC_6 }, | 
					
						
							|  |  |  | 	{ 0x800ff407, KEY_NUMERIC_7 }, | 
					
						
							|  |  |  | 	{ 0x800ff408, KEY_NUMERIC_8 }, | 
					
						
							|  |  |  | 	{ 0x800ff409, KEY_NUMERIC_9 }, | 
					
						
							|  |  |  | 	{ 0x800ff400, KEY_NUMERIC_0 }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x02200025, KEY_NUMERIC_STAR }, | 
					
						
							|  |  |  | 	{ 0x02200020, KEY_NUMERIC_POUND }, | 
					
						
							|  |  |  | 	/* 0x800ff41d also KEY_BLUE on some receivers */ | 
					
						
							|  |  |  | 	{ 0x800ff41d, KEY_NUMERIC_STAR }, | 
					
						
							|  |  |  | 	/* 0x800ff41c also KEY_PREVIOUS on some receivers */ | 
					
						
							|  |  |  | 	{ 0x800ff41c, KEY_NUMERIC_POUND }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x800ff446, KEY_TV }, | 
					
						
							|  |  |  | 	{ 0x800ff447, KEY_AUDIO }, /* My Music */ | 
					
						
							|  |  |  | 	{ 0x800ff448, KEY_PVR }, /* RecordedTV */ | 
					
						
							|  |  |  | 	{ 0x800ff449, KEY_CAMERA }, | 
					
						
							|  |  |  | 	{ 0x800ff44a, KEY_VIDEO }, | 
					
						
							|  |  |  | 	/* 0x800ff424 also KEY_MENU on some receivers */ | 
					
						
							|  |  |  | 	{ 0x800ff424, KEY_DVD }, | 
					
						
							|  |  |  | 	/* 0x800ff425 also KEY_GREEN on some receivers */ | 
					
						
							|  |  |  | 	{ 0x800ff425, KEY_TUNER }, /* LiveTV */ | 
					
						
							|  |  |  | 	{ 0x800ff450, KEY_RADIO }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x800ff44c, KEY_LANGUAGE }, | 
					
						
							|  |  |  | 	{ 0x800ff427, KEY_ZOOM }, /* Aspect */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x800ff45b, KEY_RED }, | 
					
						
							|  |  |  | 	{ 0x800ff45c, KEY_GREEN }, | 
					
						
							|  |  |  | 	{ 0x800ff45d, KEY_YELLOW }, | 
					
						
							|  |  |  | 	{ 0x800ff45e, KEY_BLUE }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x800ff466, KEY_RED }, | 
					
						
							|  |  |  | 	/* { 0x800ff425, KEY_GREEN }, */ | 
					
						
							|  |  |  | 	{ 0x800ff468, KEY_YELLOW }, | 
					
						
							|  |  |  | 	/* { 0x800ff41d, KEY_BLUE }, */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x800ff40f, KEY_INFO }, | 
					
						
							|  |  |  | 	{ 0x800ff426, KEY_EPG }, /* Guide */ | 
					
						
							|  |  |  | 	{ 0x800ff45a, KEY_SUBTITLE }, /* Caption/Teletext */ | 
					
						
							|  |  |  | 	{ 0x800ff44d, KEY_TITLE }, | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	{ 0x800ff40c, KEY_POWER }, | 
					
						
							| 
									
										
										
										
											2011-04-05 18:42:30 -03:00
										 |  |  | 	{ 0x800ff40d, KEY_MEDIA }, /* Windows MCE button */ | 
					
						
							| 
									
										
										
										
											2010-04-16 18:28:35 -03:00
										 |  |  | 
 | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-11-17 15:56:53 -03:00
										 |  |  | static struct rc_map_list imon_mce_map = { | 
					
						
							| 
									
										
										
										
											2010-04-16 18:28:35 -03:00
										 |  |  | 	.map = { | 
					
						
							|  |  |  | 		.scan    = imon_mce, | 
					
						
							|  |  |  | 		.size    = ARRAY_SIZE(imon_mce), | 
					
						
							| 
									
										
										
										
											2010-04-23 02:27:11 -03:00
										 |  |  | 		/* its RC6, but w/a hardware decoder */ | 
					
						
							| 
									
										
										
										
											2012-10-11 19:11:54 -03:00
										 |  |  | 		.rc_type = RC_TYPE_RC6_MCE, | 
					
						
							| 
									
										
										
										
											2010-04-16 18:28:35 -03:00
										 |  |  | 		.name    = RC_MAP_IMON_MCE, | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static int __init init_rc_map_imon_mce(void) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2010-11-17 15:56:53 -03:00
										 |  |  | 	return rc_map_register(&imon_mce_map); | 
					
						
							| 
									
										
										
										
											2010-04-16 18:28:35 -03:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | static void __exit exit_rc_map_imon_mce(void) | 
					
						
							|  |  |  | { | 
					
						
							| 
									
										
										
										
											2010-11-17 15:56:53 -03:00
										 |  |  | 	rc_map_unregister(&imon_mce_map); | 
					
						
							| 
									
										
										
										
											2010-04-16 18:28:35 -03:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | module_init(init_rc_map_imon_mce) | 
					
						
							|  |  |  | module_exit(exit_rc_map_imon_mce) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | MODULE_LICENSE("GPL"); | 
					
						
							|  |  |  | MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>"); |