Jarod Wilson | 7a569f5 | 2010-08-07 13:31:40 -0300 | [diff] [blame] | 1 | /* rc-streamzap.c - Keytable for Streamzap PC Remote, for use |
| 2 | * with the Streamzap PC Remote IR Receiver. |
| 3 | * |
| 4 | * Copyright (c) 2010 by Jarod Wilson <jarod@redhat.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or modify |
| 7 | * it under the terms of the GNU General Public License as published by |
| 8 | * the Free Software Foundation; either version 2 of the License, or |
| 9 | * (at your option) any later version. |
| 10 | */ |
| 11 | |
| 12 | #include <media/rc-map.h> |
Paul Gortmaker | 7a707b8 | 2011-07-03 14:03:12 -0400 | [diff] [blame] | 13 | #include <linux/module.h> |
Jarod Wilson | 7a569f5 | 2010-08-07 13:31:40 -0300 | [diff] [blame] | 14 | |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 15 | static struct rc_map_table streamzap[] = { |
Jarod Wilson | 7a569f5 | 2010-08-07 13:31:40 -0300 | [diff] [blame] | 16 | /* |
| 17 | * The Streamzap remote is almost, but not quite, RC-5, as it has an extra |
David Härdeman | e87b540 | 2014-04-03 20:32:31 -0300 | [diff] [blame] | 18 | * bit in it. |
Jarod Wilson | 7a569f5 | 2010-08-07 13:31:40 -0300 | [diff] [blame] | 19 | */ |
| 20 | { 0x28c0, KEY_NUMERIC_0 }, |
| 21 | { 0x28c1, KEY_NUMERIC_1 }, |
| 22 | { 0x28c2, KEY_NUMERIC_2 }, |
| 23 | { 0x28c3, KEY_NUMERIC_3 }, |
| 24 | { 0x28c4, KEY_NUMERIC_4 }, |
| 25 | { 0x28c5, KEY_NUMERIC_5 }, |
| 26 | { 0x28c6, KEY_NUMERIC_6 }, |
| 27 | { 0x28c7, KEY_NUMERIC_7 }, |
| 28 | { 0x28c8, KEY_NUMERIC_8 }, |
| 29 | { 0x28c9, KEY_NUMERIC_9 }, |
| 30 | { 0x28ca, KEY_POWER }, |
| 31 | { 0x28cb, KEY_MUTE }, |
| 32 | { 0x28cc, KEY_CHANNELUP }, |
| 33 | { 0x28cd, KEY_VOLUMEUP }, |
| 34 | { 0x28ce, KEY_CHANNELDOWN }, |
| 35 | { 0x28cf, KEY_VOLUMEDOWN }, |
| 36 | { 0x28d0, KEY_UP }, |
| 37 | { 0x28d1, KEY_LEFT }, |
| 38 | { 0x28d2, KEY_OK }, |
| 39 | { 0x28d3, KEY_RIGHT }, |
| 40 | { 0x28d4, KEY_DOWN }, |
| 41 | { 0x28d5, KEY_MENU }, |
| 42 | { 0x28d6, KEY_EXIT }, |
| 43 | { 0x28d7, KEY_PLAY }, |
| 44 | { 0x28d8, KEY_PAUSE }, |
| 45 | { 0x28d9, KEY_STOP }, |
| 46 | { 0x28da, KEY_BACK }, |
| 47 | { 0x28db, KEY_FORWARD }, |
| 48 | { 0x28dc, KEY_RECORD }, |
| 49 | { 0x28dd, KEY_REWIND }, |
| 50 | { 0x28de, KEY_FASTFORWARD }, |
| 51 | { 0x28e0, KEY_RED }, |
| 52 | { 0x28e1, KEY_GREEN }, |
| 53 | { 0x28e2, KEY_YELLOW }, |
| 54 | { 0x28e3, KEY_BLUE }, |
| 55 | |
| 56 | }; |
| 57 | |
Mauro Carvalho Chehab | d100e65 | 2010-11-17 15:56:53 -0300 | [diff] [blame] | 58 | static struct rc_map_list streamzap_map = { |
Jarod Wilson | 7a569f5 | 2010-08-07 13:31:40 -0300 | [diff] [blame] | 59 | .map = { |
| 60 | .scan = streamzap, |
| 61 | .size = ARRAY_SIZE(streamzap), |
Mauro Carvalho Chehab | 52b6614 | 2010-11-17 14:20:52 -0300 | [diff] [blame] | 62 | .rc_type = RC_TYPE_RC5_SZ, |
Jarod Wilson | 7a569f5 | 2010-08-07 13:31:40 -0300 | [diff] [blame] | 63 | .name = RC_MAP_STREAMZAP, |
| 64 | } |
| 65 | }; |
| 66 | |
| 67 | static int __init init_rc_map_streamzap(void) |
| 68 | { |
Mauro Carvalho Chehab | d100e65 | 2010-11-17 15:56:53 -0300 | [diff] [blame] | 69 | return rc_map_register(&streamzap_map); |
Jarod Wilson | 7a569f5 | 2010-08-07 13:31:40 -0300 | [diff] [blame] | 70 | } |
| 71 | |
| 72 | static void __exit exit_rc_map_streamzap(void) |
| 73 | { |
Mauro Carvalho Chehab | d100e65 | 2010-11-17 15:56:53 -0300 | [diff] [blame] | 74 | rc_map_unregister(&streamzap_map); |
Jarod Wilson | 7a569f5 | 2010-08-07 13:31:40 -0300 | [diff] [blame] | 75 | } |
| 76 | |
| 77 | module_init(init_rc_map_streamzap) |
| 78 | module_exit(exit_rc_map_streamzap) |
| 79 | |
| 80 | MODULE_LICENSE("GPL"); |
| 81 | MODULE_AUTHOR("Jarod Wilson <jarod@redhat.com>"); |