Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-or-later
0002 /* rc-streamzap.c - Keytable for Streamzap PC Remote, for use
0003  * with the Streamzap PC Remote IR Receiver.
0004  *
0005  * Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com>
0006  */
0007 
0008 #include <media/rc-map.h>
0009 #include <linux/module.h>
0010 
0011 static struct rc_map_table streamzap[] = {
0012 /*
0013  * The Streamzap remote is almost, but not quite, RC-5, as it has an extra
0014  * bit in it.
0015  */
0016     { 0x28c0, KEY_NUMERIC_0 },
0017     { 0x28c1, KEY_NUMERIC_1 },
0018     { 0x28c2, KEY_NUMERIC_2 },
0019     { 0x28c3, KEY_NUMERIC_3 },
0020     { 0x28c4, KEY_NUMERIC_4 },
0021     { 0x28c5, KEY_NUMERIC_5 },
0022     { 0x28c6, KEY_NUMERIC_6 },
0023     { 0x28c7, KEY_NUMERIC_7 },
0024     { 0x28c8, KEY_NUMERIC_8 },
0025     { 0x28c9, KEY_NUMERIC_9 },
0026     { 0x28ca, KEY_POWER },
0027     { 0x28cb, KEY_MUTE },
0028     { 0x28cc, KEY_CHANNELUP },
0029     { 0x28cd, KEY_VOLUMEUP },
0030     { 0x28ce, KEY_CHANNELDOWN },
0031     { 0x28cf, KEY_VOLUMEDOWN },
0032     { 0x28d0, KEY_UP },
0033     { 0x28d1, KEY_LEFT },
0034     { 0x28d2, KEY_OK },
0035     { 0x28d3, KEY_RIGHT },
0036     { 0x28d4, KEY_DOWN },
0037     { 0x28d5, KEY_MENU },
0038     { 0x28d6, KEY_EXIT },
0039     { 0x28d7, KEY_PLAY },
0040     { 0x28d8, KEY_PAUSE },
0041     { 0x28d9, KEY_STOP },
0042     { 0x28da, KEY_BACK },
0043     { 0x28db, KEY_FORWARD },
0044     { 0x28dc, KEY_RECORD },
0045     { 0x28dd, KEY_REWIND },
0046     { 0x28de, KEY_FASTFORWARD },
0047     { 0x28e0, KEY_RED },
0048     { 0x28e1, KEY_GREEN },
0049     { 0x28e2, KEY_YELLOW },
0050     { 0x28e3, KEY_BLUE },
0051 
0052 };
0053 
0054 static struct rc_map_list streamzap_map = {
0055     .map = {
0056         .scan     = streamzap,
0057         .size     = ARRAY_SIZE(streamzap),
0058         .rc_proto = RC_PROTO_RC5_SZ,
0059         .name     = RC_MAP_STREAMZAP,
0060     }
0061 };
0062 
0063 static int __init init_rc_map_streamzap(void)
0064 {
0065     return rc_map_register(&streamzap_map);
0066 }
0067 
0068 static void __exit exit_rc_map_streamzap(void)
0069 {
0070     rc_map_unregister(&streamzap_map);
0071 }
0072 
0073 module_init(init_rc_map_streamzap)
0074 module_exit(exit_rc_map_streamzap)
0075 
0076 MODULE_LICENSE("GPL");
0077 MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>");