Mauro Carvalho Chehab | 6686fa6 | 2010-04-02 03:05:46 -0300 | [diff] [blame] | 1 | /* behold-columbus.h - Keytable for behold_columbus Remote Controller |
| 2 | * |
| 3 | * keymap imported from ir-keymaps.c |
| 4 | * |
| 5 | * Copyright (c) 2010 by Mauro Carvalho Chehab <mchehab@redhat.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; either version 2 of the License, or |
| 10 | * (at your option) any later version. |
| 11 | */ |
| 12 | |
| 13 | #include <media/rc-map.h> |
| 14 | |
| 15 | /* Beholder Intl. Ltd. 2008 |
| 16 | * Dmitry Belimov d.belimov@google.com |
| 17 | * Keytable is used by BeholdTV Columbus |
| 18 | * The "ascii-art picture" below (in comments, first row |
| 19 | * is the keycode in hex, and subsequent row(s) shows |
| 20 | * the button labels (several variants when appropriate) |
| 21 | * helps to descide which keycodes to assign to the buttons. |
| 22 | */ |
| 23 | |
| 24 | static struct ir_scancode behold_columbus[] = { |
| 25 | |
| 26 | /* 0x13 0x11 0x1C 0x12 * |
| 27 | * Mute Source TV/FM Power * |
| 28 | * */ |
| 29 | |
| 30 | { 0x13, KEY_MUTE }, |
| 31 | { 0x11, KEY_PROPS }, |
| 32 | { 0x1C, KEY_TUNER }, /* KEY_TV/KEY_RADIO */ |
| 33 | { 0x12, KEY_POWER }, |
| 34 | |
| 35 | /* 0x01 0x02 0x03 0x0D * |
| 36 | * 1 2 3 Stereo * |
| 37 | * * |
| 38 | * 0x04 0x05 0x06 0x19 * |
| 39 | * 4 5 6 Snapshot * |
| 40 | * * |
| 41 | * 0x07 0x08 0x09 0x10 * |
| 42 | * 7 8 9 Zoom * |
| 43 | * */ |
| 44 | { 0x01, KEY_1 }, |
| 45 | { 0x02, KEY_2 }, |
| 46 | { 0x03, KEY_3 }, |
| 47 | { 0x0D, KEY_SETUP }, /* Setup key */ |
| 48 | { 0x04, KEY_4 }, |
| 49 | { 0x05, KEY_5 }, |
| 50 | { 0x06, KEY_6 }, |
| 51 | { 0x19, KEY_CAMERA }, /* Snapshot key */ |
| 52 | { 0x07, KEY_7 }, |
| 53 | { 0x08, KEY_8 }, |
| 54 | { 0x09, KEY_9 }, |
| 55 | { 0x10, KEY_ZOOM }, |
| 56 | |
| 57 | /* 0x0A 0x00 0x0B 0x0C * |
| 58 | * RECALL 0 ChannelUp VolumeUp * |
| 59 | * */ |
| 60 | { 0x0A, KEY_AGAIN }, |
| 61 | { 0x00, KEY_0 }, |
| 62 | { 0x0B, KEY_CHANNELUP }, |
| 63 | { 0x0C, KEY_VOLUMEUP }, |
| 64 | |
| 65 | /* 0x1B 0x1D 0x15 0x18 * |
| 66 | * Timeshift Record ChannelDown VolumeDown * |
| 67 | * */ |
| 68 | |
| 69 | { 0x1B, KEY_TIME }, |
| 70 | { 0x1D, KEY_RECORD }, |
| 71 | { 0x15, KEY_CHANNELDOWN }, |
| 72 | { 0x18, KEY_VOLUMEDOWN }, |
| 73 | |
| 74 | /* 0x0E 0x1E 0x0F 0x1A * |
| 75 | * Stop Pause Previouse Next * |
| 76 | * */ |
| 77 | |
| 78 | { 0x0E, KEY_STOP }, |
| 79 | { 0x1E, KEY_PAUSE }, |
| 80 | { 0x0F, KEY_PREVIOUS }, |
| 81 | { 0x1A, KEY_NEXT }, |
| 82 | |
| 83 | }; |
| 84 | |
| 85 | static struct rc_keymap behold_columbus_map = { |
| 86 | .map = { |
| 87 | .scan = behold_columbus, |
| 88 | .size = ARRAY_SIZE(behold_columbus), |
| 89 | .ir_type = IR_TYPE_UNKNOWN, /* Legacy IR type */ |
| 90 | .name = RC_MAP_BEHOLD_COLUMBUS, |
| 91 | } |
| 92 | }; |
| 93 | |
| 94 | static int __init init_rc_map_behold_columbus(void) |
| 95 | { |
| 96 | return ir_register_map(&behold_columbus_map); |
| 97 | } |
| 98 | |
| 99 | static void __exit exit_rc_map_behold_columbus(void) |
| 100 | { |
| 101 | ir_unregister_map(&behold_columbus_map); |
| 102 | } |
| 103 | |
| 104 | module_init(init_rc_map_behold_columbus) |
| 105 | module_exit(exit_rc_map_behold_columbus) |
| 106 | |
| 107 | MODULE_LICENSE("GPL"); |
| 108 | MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); |