Mauro Carvalho Chehab | 6686fa6 | 2010-04-02 03:05:46 -0300 | [diff] [blame] | 1 | /* manli.h - Keytable for manli 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 | /* Michael Tokarev <mjt@tls.msk.ru> |
Mauro Carvalho Chehab | 6686fa6 | 2010-04-02 03:05:46 -0300 | [diff] [blame] | 16 | keytable is used by MANLI MTV00[0x0c] and BeholdTV 40[13] at |
| 17 | least, and probably other cards too. |
| 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 | |
Mauro Carvalho Chehab | 2f4f58d | 2010-11-17 15:46:09 -0300 | [diff] [blame] | 24 | static struct rc_map_table manli[] = { |
Mauro Carvalho Chehab | 6686fa6 | 2010-04-02 03:05:46 -0300 | [diff] [blame] | 25 | |
| 26 | /* 0x1c 0x12 * |
| 27 | * FUNCTION POWER * |
| 28 | * FM (|) * |
| 29 | * */ |
| 30 | { 0x1c, KEY_RADIO }, /*XXX*/ |
| 31 | { 0x12, KEY_POWER }, |
| 32 | |
| 33 | /* 0x01 0x02 0x03 * |
| 34 | * 1 2 3 * |
| 35 | * * |
| 36 | * 0x04 0x05 0x06 * |
| 37 | * 4 5 6 * |
| 38 | * * |
| 39 | * 0x07 0x08 0x09 * |
| 40 | * 7 8 9 * |
| 41 | * */ |
| 42 | { 0x01, KEY_1 }, |
| 43 | { 0x02, KEY_2 }, |
| 44 | { 0x03, KEY_3 }, |
| 45 | { 0x04, KEY_4 }, |
| 46 | { 0x05, KEY_5 }, |
| 47 | { 0x06, KEY_6 }, |
| 48 | { 0x07, KEY_7 }, |
| 49 | { 0x08, KEY_8 }, |
| 50 | { 0x09, KEY_9 }, |
| 51 | |
| 52 | /* 0x0a 0x00 0x17 * |
| 53 | * RECALL 0 +100 * |
| 54 | * PLUS * |
| 55 | * */ |
| 56 | { 0x0a, KEY_AGAIN }, /*XXX KEY_REWIND? */ |
| 57 | { 0x00, KEY_0 }, |
| 58 | { 0x17, KEY_DIGITS }, /*XXX*/ |
| 59 | |
| 60 | /* 0x14 0x10 * |
| 61 | * MENU INFO * |
| 62 | * OSD */ |
| 63 | { 0x14, KEY_MENU }, |
| 64 | { 0x10, KEY_INFO }, |
| 65 | |
| 66 | /* 0x0b * |
| 67 | * Up * |
| 68 | * * |
| 69 | * 0x18 0x16 0x0c * |
| 70 | * Left Ok Right * |
| 71 | * * |
| 72 | * 0x015 * |
| 73 | * Down * |
| 74 | * */ |
| 75 | { 0x0b, KEY_UP }, |
| 76 | { 0x18, KEY_LEFT }, |
| 77 | { 0x16, KEY_OK }, /*XXX KEY_SELECT? KEY_ENTER? */ |
| 78 | { 0x0c, KEY_RIGHT }, |
| 79 | { 0x15, KEY_DOWN }, |
| 80 | |
| 81 | /* 0x11 0x0d * |
| 82 | * TV/AV MODE * |
| 83 | * SOURCE STEREO * |
| 84 | * */ |
| 85 | { 0x11, KEY_TV }, /*XXX*/ |
| 86 | { 0x0d, KEY_MODE }, /*XXX there's no KEY_STEREO */ |
| 87 | |
| 88 | /* 0x0f 0x1b 0x1a * |
| 89 | * AUDIO Vol+ Chan+ * |
| 90 | * TIMESHIFT??? * |
| 91 | * * |
| 92 | * 0x0e 0x1f 0x1e * |
| 93 | * SLEEP Vol- Chan- * |
| 94 | * */ |
| 95 | { 0x0f, KEY_AUDIO }, |
| 96 | { 0x1b, KEY_VOLUMEUP }, |
| 97 | { 0x1a, KEY_CHANNELUP }, |
| 98 | { 0x0e, KEY_TIME }, |
| 99 | { 0x1f, KEY_VOLUMEDOWN }, |
| 100 | { 0x1e, KEY_CHANNELDOWN }, |
| 101 | |
| 102 | /* 0x13 0x19 * |
| 103 | * MUTE SNAPSHOT* |
| 104 | * */ |
| 105 | { 0x13, KEY_MUTE }, |
| 106 | { 0x19, KEY_CAMERA }, |
| 107 | |
| 108 | /* 0x1d unused ? */ |
| 109 | }; |
| 110 | |
Mauro Carvalho Chehab | d100e65 | 2010-11-17 15:56:53 -0300 | [diff] [blame] | 111 | static struct rc_map_list manli_map = { |
Mauro Carvalho Chehab | 6686fa6 | 2010-04-02 03:05:46 -0300 | [diff] [blame] | 112 | .map = { |
| 113 | .scan = manli, |
| 114 | .size = ARRAY_SIZE(manli), |
Mauro Carvalho Chehab | 52b6614 | 2010-11-17 14:20:52 -0300 | [diff] [blame] | 115 | .rc_type = RC_TYPE_UNKNOWN, /* Legacy IR type */ |
Mauro Carvalho Chehab | 6686fa6 | 2010-04-02 03:05:46 -0300 | [diff] [blame] | 116 | .name = RC_MAP_MANLI, |
| 117 | } |
| 118 | }; |
| 119 | |
| 120 | static int __init init_rc_map_manli(void) |
| 121 | { |
Mauro Carvalho Chehab | d100e65 | 2010-11-17 15:56:53 -0300 | [diff] [blame] | 122 | return rc_map_register(&manli_map); |
Mauro Carvalho Chehab | 6686fa6 | 2010-04-02 03:05:46 -0300 | [diff] [blame] | 123 | } |
| 124 | |
| 125 | static void __exit exit_rc_map_manli(void) |
| 126 | { |
Mauro Carvalho Chehab | d100e65 | 2010-11-17 15:56:53 -0300 | [diff] [blame] | 127 | rc_map_unregister(&manli_map); |
Mauro Carvalho Chehab | 6686fa6 | 2010-04-02 03:05:46 -0300 | [diff] [blame] | 128 | } |
| 129 | |
| 130 | module_init(init_rc_map_manli) |
| 131 | module_exit(exit_rc_map_manli) |
| 132 | |
| 133 | MODULE_LICENSE("GPL"); |
| 134 | MODULE_AUTHOR("Mauro Carvalho Chehab <mchehab@redhat.com>"); |