Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 1 | /* |
| 2 | * DVB USB Linux driver for Afatech AF9015 DVB-T USB2.0 receiver |
| 3 | * |
| 4 | * Copyright (C) 2007 Antti Palosaari <crope@iki.fi> |
| 5 | * |
| 6 | * Thanks to Afatech who kindly provided information. |
| 7 | * |
| 8 | * This program is free software; you can redistribute it and/or modify |
| 9 | * it under the terms of the GNU General Public License as published by |
| 10 | * the Free Software Foundation; either version 2 of the License, or |
| 11 | * (at your option) any later version. |
| 12 | * |
| 13 | * This program is distributed in the hope that it will be useful, |
| 14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | * GNU General Public License for more details. |
| 17 | * |
| 18 | * You should have received a copy of the GNU General Public License |
| 19 | * along with this program; if not, write to the Free Software |
| 20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #ifndef _DVB_USB_AF9015_H_ |
| 25 | #define _DVB_USB_AF9015_H_ |
| 26 | |
| 27 | #define DVB_USB_LOG_PREFIX "af9015" |
| 28 | #include "dvb-usb.h" |
| 29 | |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 30 | #define deb_info(args...) dprintk(dvb_usb_af9015_debug, 0x01, args) |
| 31 | #define deb_rc(args...) dprintk(dvb_usb_af9015_debug, 0x02, args) |
| 32 | #define deb_xfer(args...) dprintk(dvb_usb_af9015_debug, 0x04, args) |
| 33 | #define deb_reg(args...) dprintk(dvb_usb_af9015_debug, 0x08, args) |
| 34 | #define deb_i2c(args...) dprintk(dvb_usb_af9015_debug, 0x10, args) |
| 35 | #define deb_fw(args...) dprintk(dvb_usb_af9015_debug, 0x20, args) |
| 36 | |
| 37 | #define AF9015_I2C_EEPROM 0xa0 |
| 38 | #define AF9015_I2C_DEMOD 0x38 |
| 39 | #define AF9015_USB_TIMEOUT 2000 |
| 40 | |
| 41 | /* EEPROM locations */ |
| 42 | #define AF9015_EEPROM_IR_MODE 0x18 |
| 43 | #define AF9015_EEPROM_IR_REMOTE_TYPE 0x34 |
| 44 | #define AF9015_EEPROM_TS_MODE 0x31 |
| 45 | #define AF9015_EEPROM_DEMOD2_I2C 0x32 |
| 46 | |
| 47 | #define AF9015_EEPROM_SAW_BW1 0x35 |
| 48 | #define AF9015_EEPROM_XTAL_TYPE1 0x36 |
| 49 | #define AF9015_EEPROM_SPEC_INV1 0x37 |
| 50 | #define AF9015_EEPROM_IF1L 0x38 |
| 51 | #define AF9015_EEPROM_IF1H 0x39 |
| 52 | #define AF9015_EEPROM_MT2060_IF1L 0x3a |
| 53 | #define AF9015_EEPROM_MT2060_IF1H 0x3b |
| 54 | #define AF9015_EEPROM_TUNER_ID1 0x3c |
| 55 | |
| 56 | #define AF9015_EEPROM_SAW_BW2 0x45 |
| 57 | #define AF9015_EEPROM_XTAL_TYPE2 0x46 |
| 58 | #define AF9015_EEPROM_SPEC_INV2 0x47 |
| 59 | #define AF9015_EEPROM_IF2L 0x48 |
| 60 | #define AF9015_EEPROM_IF2H 0x49 |
| 61 | #define AF9015_EEPROM_MT2060_IF2L 0x4a |
| 62 | #define AF9015_EEPROM_MT2060_IF2H 0x4b |
| 63 | #define AF9015_EEPROM_TUNER_ID2 0x4c |
| 64 | |
| 65 | #define AF9015_EEPROM_OFFSET (AF9015_EEPROM_SAW_BW2 - AF9015_EEPROM_SAW_BW1) |
| 66 | |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 67 | struct req_t { |
| 68 | u8 cmd; /* [0] */ |
| 69 | /* seq */ /* [1] */ |
| 70 | u8 i2c_addr; /* [2] */ |
| 71 | u16 addr; /* [3|4] */ |
| 72 | u8 mbox; /* [5] */ |
| 73 | u8 addr_len; /* [6] */ |
| 74 | u8 data_len; /* [7] */ |
| 75 | u8 *data; |
| 76 | }; |
| 77 | |
| 78 | enum af9015_cmd { |
| 79 | GET_CONFIG = 0x10, |
| 80 | DOWNLOAD_FIRMWARE = 0x11, |
| 81 | BOOT = 0x13, |
| 82 | READ_MEMORY = 0x20, |
| 83 | WRITE_MEMORY = 0x21, |
| 84 | READ_WRITE_I2C = 0x22, |
| 85 | COPY_FIRMWARE = 0x23, |
| 86 | RECONNECT_USB = 0x5a, |
| 87 | WRITE_VIRTUAL_MEMORY = 0x26, |
| 88 | GET_IR_CODE = 0x27, |
| 89 | READ_I2C, |
| 90 | WRITE_I2C, |
| 91 | }; |
| 92 | |
| 93 | enum af9015_ir_mode { |
| 94 | AF9015_IR_MODE_DISABLED = 0, |
| 95 | AF9015_IR_MODE_HID, |
| 96 | AF9015_IR_MODE_RLC, |
| 97 | AF9015_IR_MODE_RC6, |
Antti Palosaari | 0f01721 | 2009-09-21 21:26:37 -0300 | [diff] [blame] | 98 | AF9015_IR_MODE_POLLING, /* just guess */ |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 99 | }; |
| 100 | |
| 101 | struct af9015_state { |
| 102 | struct i2c_adapter i2c_adap; /* I2C adapter for 2nd FE */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 103 | u8 rc_repeat; |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 104 | }; |
| 105 | |
| 106 | struct af9015_config { |
| 107 | u8 dual_mode:1; |
| 108 | u16 mt2060_if1[2]; |
| 109 | u16 firmware_size; |
| 110 | u16 firmware_checksum; |
Jiri Slaby | 6c61404 | 2010-01-22 12:10:52 -0300 | [diff] [blame] | 111 | u32 eeprom_sum; |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 112 | }; |
| 113 | |
| 114 | enum af9015_remote { |
| 115 | AF9015_REMOTE_NONE = 0, |
Marc Schneider | 2614484 | 2009-03-26 21:07:18 -0300 | [diff] [blame] | 116 | /* 1 */ AF9015_REMOTE_A_LINK_DTU_M, |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 117 | AF9015_REMOTE_MSI_DIGIVOX_MINI_II_V3, |
| 118 | AF9015_REMOTE_MYGICTV_U718, |
Alain Kalker | 0537156 | 2008-11-17 17:20:38 -0300 | [diff] [blame] | 119 | AF9015_REMOTE_DIGITTRADE_DVB_T, |
Marc Schneider | 2614484 | 2009-03-26 21:07:18 -0300 | [diff] [blame] | 120 | /* 5 */ AF9015_REMOTE_AVERMEDIA_KS, |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 121 | }; |
| 122 | |
Antti Palosaari | 641342d | 2009-09-21 18:56:12 -0300 | [diff] [blame] | 123 | /* LeadTek - Y04G0051 */ |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 124 | /* Leadtek WinFast DTV Dongle Gold */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 125 | static struct ir_scancode af9015_rc_leadtek[] = { |
| 126 | { 0x0300, KEY_POWER2 }, |
| 127 | { 0x0303, KEY_SCREEN }, |
| 128 | { 0x0304, KEY_RIGHT }, |
| 129 | { 0x0305, KEY_1 }, |
| 130 | { 0x0306, KEY_2 }, |
| 131 | { 0x0307, KEY_3 }, |
| 132 | { 0x0308, KEY_LEFT }, |
| 133 | { 0x0309, KEY_4 }, |
| 134 | { 0x030a, KEY_5 }, |
| 135 | { 0x030b, KEY_6 }, |
| 136 | { 0x030c, KEY_UP }, |
| 137 | { 0x030d, KEY_7 }, |
| 138 | { 0x030e, KEY_8 }, |
| 139 | { 0x030f, KEY_9 }, |
| 140 | { 0x0310, KEY_DOWN }, |
| 141 | { 0x0311, KEY_AGAIN }, |
| 142 | { 0x0312, KEY_0 }, |
| 143 | { 0x0313, KEY_OK }, /* 1st ok */ |
| 144 | { 0x0314, KEY_MUTE }, |
| 145 | { 0x0316, KEY_OK }, /* 2nd ok */ |
| 146 | { 0x031e, KEY_VIDEO }, /* 2nd video */ |
| 147 | { 0x031b, KEY_AUDIO }, |
| 148 | { 0x031f, KEY_TEXT }, |
| 149 | { 0x0340, KEY_SLEEP }, |
| 150 | { 0x0341, KEY_DOT }, |
| 151 | { 0x0342, KEY_REWIND }, |
| 152 | { 0x0343, KEY_PLAY }, |
| 153 | { 0x0344, KEY_FASTFORWARD }, |
| 154 | { 0x0345, KEY_TIME }, |
| 155 | { 0x0346, KEY_STOP }, /* 2nd stop */ |
| 156 | { 0x0347, KEY_RECORD }, |
| 157 | { 0x0348, KEY_CAMERA }, |
| 158 | { 0x0349, KEY_ESC }, |
| 159 | { 0x034a, KEY_NEW }, |
| 160 | { 0x034b, KEY_RED }, |
| 161 | { 0x034c, KEY_GREEN }, |
| 162 | { 0x034d, KEY_YELLOW }, |
| 163 | { 0x034e, KEY_BLUE }, |
| 164 | { 0x034f, KEY_MENU }, |
| 165 | { 0x0350, KEY_STOP }, /* 1st stop */ |
| 166 | { 0x0351, KEY_CHANNEL }, |
| 167 | { 0x0352, KEY_VIDEO }, /* 1st video */ |
| 168 | { 0x0353, KEY_EPG }, |
| 169 | { 0x0354, KEY_PREVIOUS }, |
| 170 | { 0x0355, KEY_NEXT }, |
| 171 | { 0x0356, KEY_TV }, |
| 172 | { 0x035a, KEY_VOLUMEDOWN }, |
| 173 | { 0x035b, KEY_CHANNELUP }, |
| 174 | { 0x035e, KEY_VOLUMEUP }, |
| 175 | { 0x035f, KEY_CHANNELDOWN }, |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 176 | }; |
| 177 | |
| 178 | /* TwinHan AzureWave AD-TU700(704J) */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 179 | static struct ir_scancode af9015_rc_twinhan[] = { |
| 180 | { 0x0000, KEY_TAB }, /* Tab */ |
| 181 | { 0x0001, KEY_2 }, |
| 182 | { 0x0002, KEY_CHANNELDOWN }, |
| 183 | { 0x0003, KEY_1 }, |
| 184 | { 0x0004, KEY_LIST }, /* Record List */ |
| 185 | { 0x0005, KEY_CHANNELUP }, |
| 186 | { 0x0006, KEY_3 }, |
| 187 | { 0x0007, KEY_SLEEP }, /* Hibernate */ |
| 188 | { 0x0008, KEY_SWITCHVIDEOMODE }, /* A/V */ |
| 189 | { 0x0009, KEY_4 }, |
| 190 | { 0x000a, KEY_VOLUMEDOWN }, |
| 191 | { 0x000c, KEY_CANCEL }, /* Cancel */ |
| 192 | { 0x000d, KEY_7 }, |
| 193 | { 0x000e, KEY_AGAIN }, /* Recall */ |
| 194 | { 0x000f, KEY_TEXT }, /* Teletext */ |
Mauro Carvalho Chehab | 2e36588 | 2009-08-29 15:19:31 -0300 | [diff] [blame] | 195 | { 0x0010, KEY_MUTE }, |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 196 | { 0x0011, KEY_RECORD }, |
| 197 | { 0x0012, KEY_FASTFORWARD }, /* FF >> */ |
| 198 | { 0x0013, KEY_BACK }, /* Back */ |
| 199 | { 0x0014, KEY_PLAY }, |
| 200 | { 0x0015, KEY_0 }, |
| 201 | { 0x0016, KEY_POWER }, |
| 202 | { 0x0017, KEY_FAVORITES }, /* Favorite List */ |
| 203 | { 0x0018, KEY_RED }, |
| 204 | { 0x0019, KEY_8 }, |
| 205 | { 0x001a, KEY_STOP }, |
| 206 | { 0x001b, KEY_9 }, |
| 207 | { 0x001c, KEY_EPG }, /* Info/EPG */ |
| 208 | { 0x001d, KEY_5 }, |
| 209 | { 0x001e, KEY_VOLUMEUP }, |
| 210 | { 0x001f, KEY_6 }, |
| 211 | { 0x0040, KEY_REWIND }, /* FR << */ |
| 212 | { 0x0041, KEY_PREVIOUS }, /* Replay */ |
| 213 | { 0x0042, KEY_NEXT }, /* Skip */ |
| 214 | { 0x0043, KEY_SUBTITLE }, /* Subtitle / CC */ |
| 215 | { 0x0045, KEY_KPPLUS }, /* Zoom+ */ |
| 216 | { 0x0046, KEY_KPMINUS }, /* Zoom- */ |
| 217 | { 0x0047, KEY_TV2 }, /* PIP */ |
| 218 | { 0x0048, KEY_INFO }, /* Preview */ |
| 219 | { 0x0049, KEY_AUDIO }, /* L/R */ /* TODO better event */ |
| 220 | { 0x004a, KEY_CLEAR }, /* Clear */ |
| 221 | { 0x004b, KEY_UP }, /* up arrow */ |
| 222 | { 0x004c, KEY_PAUSE }, |
| 223 | { 0x004d, KEY_ZOOM }, /* Full Screen */ |
| 224 | { 0x004e, KEY_LEFT }, /* left arrow */ |
| 225 | { 0x004f, KEY_ENTER }, /* Enter / ok */ |
| 226 | { 0x0050, KEY_LANGUAGE }, /* SAP */ |
| 227 | { 0x0051, KEY_DOWN }, /* down arrow */ |
| 228 | { 0x0052, KEY_RIGHT }, /* right arrow */ |
| 229 | { 0x0053, KEY_GREEN }, |
| 230 | { 0x0054, KEY_CAMERA }, /* Capture */ |
| 231 | { 0x005e, KEY_YELLOW }, |
| 232 | { 0x005f, KEY_BLUE }, |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 233 | }; |
| 234 | |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 235 | /* A-Link DTU(m) - 3x6 slim remote */ |
| 236 | static struct ir_scancode af9015_rc_a_link[] = { |
| 237 | { 0x0800, KEY_VOLUMEUP }, |
| 238 | { 0x0801, KEY_1 }, |
| 239 | { 0x0802, KEY_3 }, |
| 240 | { 0x0803, KEY_7 }, |
| 241 | { 0x0804, KEY_9 }, |
| 242 | { 0x0805, KEY_ZOOM }, |
| 243 | { 0x0806, KEY_0 }, |
| 244 | { 0x0807, KEY_GOTO }, /* jump */ |
| 245 | { 0x080d, KEY_5 }, |
| 246 | { 0x080f, KEY_2 }, |
| 247 | { 0x0812, KEY_POWER }, |
| 248 | { 0x0814, KEY_CHANNELUP }, |
| 249 | { 0x0816, KEY_VOLUMEDOWN }, |
| 250 | { 0x0818, KEY_6 }, |
| 251 | { 0x081a, KEY_MUTE }, |
| 252 | { 0x081b, KEY_8 }, |
| 253 | { 0x081c, KEY_4 }, |
| 254 | { 0x081d, KEY_CHANNELDOWN }, |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 255 | }; |
| 256 | |
| 257 | /* MSI DIGIVOX mini II V3.0 */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 258 | static struct ir_scancode af9015_rc_msi[] = { |
| 259 | { 0x0002, KEY_2 }, |
| 260 | { 0x0003, KEY_UP }, /* up */ |
| 261 | { 0x0004, KEY_3 }, |
| 262 | { 0x0005, KEY_CHANNELDOWN }, |
| 263 | { 0x0008, KEY_5 }, |
| 264 | { 0x0009, KEY_0 }, |
| 265 | { 0x000b, KEY_8 }, |
| 266 | { 0x000d, KEY_DOWN }, /* down */ |
| 267 | { 0x0010, KEY_9 }, |
| 268 | { 0x0011, KEY_7 }, |
| 269 | { 0x0014, KEY_VOLUMEUP }, |
| 270 | { 0x0015, KEY_CHANNELUP }, |
| 271 | { 0x0016, KEY_ENTER }, |
| 272 | { 0x0017, KEY_POWER }, |
| 273 | { 0x001a, KEY_1 }, |
| 274 | { 0x001c, KEY_4 }, |
| 275 | { 0x001d, KEY_6 }, |
| 276 | { 0x001f, KEY_VOLUMEDOWN }, |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 277 | }; |
| 278 | |
| 279 | /* MYGICTV U718 */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 280 | /* Uses NEC extended 0x02bd. Extended byte removed for compatibility... */ |
| 281 | static struct ir_scancode af9015_rc_mygictv[] = { |
| 282 | { 0x0200, KEY_1 }, |
| 283 | { 0x0201, KEY_2 }, |
| 284 | { 0x0202, KEY_3 }, |
| 285 | { 0x0203, KEY_4 }, |
| 286 | { 0x0204, KEY_5 }, |
| 287 | { 0x0205, KEY_6 }, |
| 288 | { 0x0206, KEY_7 }, |
| 289 | { 0x0207, KEY_8 }, |
| 290 | { 0x0208, KEY_9 }, |
| 291 | { 0x0209, KEY_0 }, |
| 292 | { 0x020a, KEY_MUTE }, |
| 293 | { 0x020b, KEY_CYCLEWINDOWS }, /* yellow, min / max */ |
| 294 | { 0x020c, KEY_SWITCHVIDEOMODE }, /* TV / AV */ |
| 295 | { 0x020e, KEY_VOLUMEDOWN }, |
| 296 | { 0x020f, KEY_TIME }, /* TimeShift */ |
| 297 | { 0x0210, KEY_RIGHT }, /* right arrow */ |
| 298 | { 0x0211, KEY_LEFT }, /* left arrow */ |
| 299 | { 0x0212, KEY_UP }, /* up arrow */ |
| 300 | { 0x0213, KEY_DOWN }, /* down arrow */ |
| 301 | { 0x0214, KEY_POWER }, |
| 302 | { 0x0215, KEY_ENTER }, /* ok */ |
| 303 | { 0x0216, KEY_STOP }, |
| 304 | { 0x0217, KEY_CAMERA }, /* Snapshot */ |
| 305 | { 0x0218, KEY_CHANNELUP }, |
| 306 | { 0x0219, KEY_RECORD }, |
| 307 | { 0x021a, KEY_CHANNELDOWN }, |
| 308 | { 0x021c, KEY_ESC }, /* Esc */ |
| 309 | { 0x021e, KEY_PLAY }, |
| 310 | { 0x021f, KEY_VOLUMEUP }, |
| 311 | { 0x0240, KEY_PAUSE }, |
| 312 | { 0x0241, KEY_FASTFORWARD }, /* FF >> */ |
| 313 | { 0x0242, KEY_REWIND }, /* FR << */ |
| 314 | { 0x0243, KEY_ZOOM }, /* 'select' (?) */ |
| 315 | { 0x0244, KEY_SHUFFLE }, /* Shuffle */ |
| 316 | { 0x0245, KEY_POWER }, |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 317 | }; |
| 318 | |
| 319 | /* KWorld PlusTV Dual DVB-T Stick (DVB-T 399U) */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 320 | /* FIXME: This mapping is totally incomplete and probably even wrong... */ |
| 321 | /* Uses NEC extended 0x866b. Extended byte removed for compatibility... */ |
| 322 | static struct ir_scancode af9015_rc_kworld[] = { |
| 323 | { 0x8600, KEY_1 }, |
| 324 | { 0x8601, KEY_2 }, |
| 325 | { 0x8602, KEY_3 }, |
| 326 | { 0x8603, KEY_4 }, |
| 327 | { 0x8604, KEY_5 }, |
| 328 | { 0x8605, KEY_6 }, |
| 329 | { 0x8606, KEY_7 }, |
| 330 | { 0x8607, KEY_8 }, |
| 331 | { 0x8608, KEY_9 }, |
| 332 | { 0x860a, KEY_0 }, |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 333 | }; |
| 334 | |
Jose Alberto Reguero | c78de71 | 2008-11-04 11:38:01 -0300 | [diff] [blame] | 335 | /* AverMedia Volar X */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 336 | static struct ir_scancode af9015_rc_avermedia[] = { |
| 337 | { 0x0200, KEY_POWER }, /* POWER */ |
| 338 | { 0x0201, KEY_PROG1 }, /* SOURCE */ |
| 339 | { 0x0203, KEY_TEXT }, /* TELETEXT */ |
| 340 | { 0x0204, KEY_EPG }, /* EPG */ |
| 341 | { 0x0205, KEY_1 }, /* 1 */ |
| 342 | { 0x0206, KEY_2 }, /* 2 */ |
| 343 | { 0x0207, KEY_3 }, /* 3 */ |
| 344 | { 0x0208, KEY_AUDIO }, /* AUDIO */ |
| 345 | { 0x0209, KEY_4 }, /* 4 */ |
| 346 | { 0x020a, KEY_5 }, /* 5 */ |
| 347 | { 0x020b, KEY_6 }, /* 6 */ |
| 348 | { 0x020c, KEY_ZOOM }, /* FULL SCREEN */ |
| 349 | { 0x020d, KEY_7 }, /* 7 */ |
| 350 | { 0x020e, KEY_8 }, /* 8 */ |
| 351 | { 0x020f, KEY_9 }, /* 9 */ |
| 352 | { 0x0210, KEY_PROG3 }, /* 16-CH PREV */ |
| 353 | { 0x0211, KEY_0 }, /* 0 */ |
| 354 | { 0x0212, KEY_LEFT }, /* L / DISPLAY */ |
| 355 | { 0x0213, KEY_RIGHT }, /* R / CH RTN */ |
| 356 | { 0x0214, KEY_MUTE }, /* MUTE */ |
| 357 | { 0x0215, KEY_MENU }, /* MENU */ |
| 358 | { 0x0217, KEY_PROG2 }, /* SNAP SHOT */ |
| 359 | { 0x0218, KEY_PLAY }, /* PLAY */ |
| 360 | { 0x0219, KEY_RECORD }, /* RECORD */ |
| 361 | { 0x021a, KEY_PLAYPAUSE }, /* TIMESHIFT / PAUSE */ |
| 362 | { 0x021b, KEY_STOP }, /* STOP */ |
| 363 | { 0x021c, KEY_FORWARD }, /* >> / YELLOW */ |
| 364 | { 0x021d, KEY_BACK }, /* << / RED */ |
| 365 | { 0x021e, KEY_VOLUMEDOWN }, /* VOL DOWN */ |
| 366 | { 0x021f, KEY_VOLUMEUP }, /* VOL UP */ |
Jose Alberto Reguero | c78de71 | 2008-11-04 11:38:01 -0300 | [diff] [blame] | 367 | |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 368 | { 0x0300, KEY_LAST }, /* >>| / BLUE */ |
| 369 | { 0x0301, KEY_FIRST }, /* |<< / GREEN */ |
| 370 | { 0x0302, KEY_CHANNELDOWN }, /* CH DOWN */ |
| 371 | { 0x0303, KEY_CHANNELUP }, /* CH UP */ |
Jose Alberto Reguero | c78de71 | 2008-11-04 11:38:01 -0300 | [diff] [blame] | 372 | }; |
| 373 | |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 374 | /* AverMedia KS */ |
| 375 | /* FIXME: mappings are not 100% correct? */ |
| 376 | static struct ir_scancode af9015_rc_avermedia_ks[] = { |
| 377 | { 0x0501, KEY_POWER }, |
| 378 | { 0x0502, KEY_CHANNELUP }, |
| 379 | { 0x0503, KEY_CHANNELDOWN }, |
| 380 | { 0x0504, KEY_VOLUMEUP }, |
| 381 | { 0x0505, KEY_VOLUMEDOWN }, |
| 382 | { 0x0506, KEY_MUTE }, |
| 383 | { 0x0507, KEY_RIGHT }, |
| 384 | { 0x0508, KEY_PROG1 }, |
| 385 | { 0x0509, KEY_1 }, |
| 386 | { 0x050a, KEY_2 }, |
| 387 | { 0x050b, KEY_3 }, |
| 388 | { 0x050c, KEY_4 }, |
| 389 | { 0x050d, KEY_5 }, |
| 390 | { 0x050e, KEY_6 }, |
| 391 | { 0x050f, KEY_7 }, |
| 392 | { 0x0510, KEY_8 }, |
| 393 | { 0x0511, KEY_9 }, |
| 394 | { 0x0512, KEY_0 }, |
| 395 | { 0x0513, KEY_AUDIO }, |
| 396 | { 0x0515, KEY_EPG }, |
| 397 | { 0x0516, KEY_PLAY }, |
| 398 | { 0x0517, KEY_RECORD }, |
| 399 | { 0x0518, KEY_STOP }, |
| 400 | { 0x051c, KEY_BACK }, |
| 401 | { 0x051d, KEY_FORWARD }, |
| 402 | { 0x054d, KEY_LEFT }, |
| 403 | { 0x0556, KEY_ZOOM }, |
Jose Alberto Reguero | 90b0f69 | 2009-01-23 19:23:23 -0300 | [diff] [blame] | 404 | }; |
| 405 | |
Alain Kalker | 0537156 | 2008-11-17 17:20:38 -0300 | [diff] [blame] | 406 | /* Digittrade DVB-T USB Stick */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 407 | static struct ir_scancode af9015_rc_digittrade[] = { |
| 408 | { 0x0000, KEY_9 }, |
| 409 | { 0x0001, KEY_EPG }, /* EPG */ |
| 410 | { 0x0002, KEY_VOLUMEDOWN }, /* Vol Dn */ |
| 411 | { 0x0003, KEY_TEXT }, /* TELETEXT */ |
| 412 | { 0x0004, KEY_8 }, |
| 413 | { 0x0005, KEY_MUTE }, /* MUTE */ |
| 414 | { 0x0006, KEY_POWER }, /* POWER */ |
| 415 | { 0x0009, KEY_ZOOM }, /* FULLSCREEN */ |
| 416 | { 0x000a, KEY_RECORD }, /* RECORD */ |
| 417 | { 0x000d, KEY_SUBTITLE }, /* SUBTITLE */ |
| 418 | { 0x000e, KEY_STOP }, /* STOP */ |
| 419 | { 0x0010, KEY_LAST }, /* RETURN */ |
| 420 | { 0x0011, KEY_2 }, |
| 421 | { 0x0012, KEY_4 }, |
| 422 | { 0x0015, KEY_3 }, |
| 423 | { 0x0016, KEY_5 }, |
| 424 | { 0x0017, KEY_CHANNELDOWN }, /* Ch Dn */ |
| 425 | { 0x0019, KEY_CHANNELUP }, /* CH Up */ |
| 426 | { 0x001a, KEY_PAUSE }, /* PAUSE */ |
| 427 | { 0x001b, KEY_1 }, |
| 428 | { 0x001d, KEY_AUDIO }, /* DUAL SOUND */ |
| 429 | { 0x001e, KEY_PLAY }, /* PLAY */ |
| 430 | { 0x001f, KEY_PRINT }, /* SNAPSHOT */ |
| 431 | { 0x0040, KEY_VOLUMEUP }, /* Vol Up */ |
| 432 | { 0x0048, KEY_7 }, |
| 433 | { 0x004c, KEY_6 }, |
| 434 | { 0x004d, KEY_PLAYPAUSE }, /* TIMESHIFT */ |
| 435 | { 0x0054, KEY_0 }, |
Alain Kalker | 0537156 | 2008-11-17 17:20:38 -0300 | [diff] [blame] | 436 | }; |
| 437 | |
Marc Schneider | 2614484 | 2009-03-26 21:07:18 -0300 | [diff] [blame] | 438 | /* TREKSTOR DVB-T USB Stick */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 439 | static struct ir_scancode af9015_rc_trekstor[] = { |
| 440 | { 0x0084, KEY_0 }, |
| 441 | { 0x0085, KEY_MUTE }, /* Mute */ |
| 442 | { 0x0086, KEY_AGAIN }, /* Home */ |
| 443 | { 0x0087, KEY_UP }, /* Up */ |
| 444 | { 0x0088, KEY_ENTER }, /* OK */ |
| 445 | { 0x0089, KEY_RIGHT }, /* Right */ |
| 446 | { 0x008a, KEY_FASTFORWARD }, /* Fast forward */ |
| 447 | { 0x008b, KEY_VOLUMEUP }, /* Volume + */ |
| 448 | { 0x008c, KEY_DOWN }, /* Down */ |
| 449 | { 0x008d, KEY_PLAY }, /* Play/Pause */ |
| 450 | { 0x008e, KEY_STOP }, /* Stop */ |
| 451 | { 0x008f, KEY_EPG }, /* Info/EPG */ |
| 452 | { 0x0090, KEY_7 }, |
| 453 | { 0x0091, KEY_4 }, |
| 454 | { 0x0092, KEY_1 }, |
| 455 | { 0x0093, KEY_CHANNELDOWN }, /* Channel - */ |
| 456 | { 0x0094, KEY_8 }, |
| 457 | { 0x0095, KEY_5 }, |
| 458 | { 0x0096, KEY_2 }, |
| 459 | { 0x0097, KEY_CHANNELUP }, /* Channel + */ |
| 460 | { 0x0098, KEY_9 }, |
| 461 | { 0x0099, KEY_6 }, |
| 462 | { 0x009a, KEY_3 }, |
| 463 | { 0x009b, KEY_VOLUMEDOWN }, /* Volume - */ |
| 464 | { 0x009c, KEY_ZOOM }, /* TV */ |
| 465 | { 0x009d, KEY_RECORD }, /* Record */ |
| 466 | { 0x009e, KEY_REWIND }, /* Rewind */ |
| 467 | { 0x009f, KEY_LEFT }, /* Left */ |
Marc Schneider | 2614484 | 2009-03-26 21:07:18 -0300 | [diff] [blame] | 468 | }; |
| 469 | |
Antti Palosaari | e1a7ff8 | 2009-09-21 20:52:44 -0300 | [diff] [blame] | 470 | /* MSI DIGIVOX mini III */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 471 | /* Uses NEC extended 0x61d6. Extended byte removed for compatibility... */ |
| 472 | static struct ir_scancode af9015_rc_msi_digivox_iii[] = { |
| 473 | { 0x6101, KEY_VIDEO }, /* Source */ |
| 474 | { 0x6102, KEY_3 }, |
| 475 | { 0x6103, KEY_POWER2 }, /* ShutDown */ |
| 476 | { 0x6104, KEY_1 }, |
| 477 | { 0x6105, KEY_5 }, |
| 478 | { 0x6106, KEY_6 }, |
| 479 | { 0x6107, KEY_CHANNELDOWN }, /* CH- */ |
| 480 | { 0x6108, KEY_2 }, |
| 481 | { 0x6109, KEY_CHANNELUP }, /* CH+ */ |
| 482 | { 0x610a, KEY_9 }, |
| 483 | { 0x610b, KEY_ZOOM }, /* Zoom */ |
| 484 | { 0x610c, KEY_7 }, |
| 485 | { 0x610d, KEY_8 }, |
| 486 | { 0x610e, KEY_VOLUMEUP }, /* Vol+ */ |
| 487 | { 0x610f, KEY_4 }, |
| 488 | { 0x6110, KEY_ESC }, /* [back up arrow] */ |
| 489 | { 0x6111, KEY_0 }, |
| 490 | { 0x6112, KEY_OK }, /* [enter arrow] */ |
| 491 | { 0x6113, KEY_VOLUMEDOWN }, /* Vol- */ |
| 492 | { 0x6114, KEY_RECORD }, /* Rec */ |
| 493 | { 0x6115, KEY_STOP }, /* Stop */ |
| 494 | { 0x6116, KEY_PLAY }, /* Play */ |
| 495 | { 0x6117, KEY_MUTE }, /* Mute */ |
| 496 | { 0x6118, KEY_UP }, |
| 497 | { 0x6119, KEY_DOWN }, |
| 498 | { 0x611a, KEY_LEFT }, |
| 499 | { 0x611b, KEY_RIGHT }, |
| 500 | { 0x611c, KEY_RED }, |
| 501 | { 0x611d, KEY_GREEN }, |
| 502 | { 0x611e, KEY_YELLOW }, |
| 503 | { 0x611f, KEY_BLUE }, |
| 504 | { 0x6143, KEY_POWER }, /* [red power button] */ |
Antti Palosaari | e1a7ff8 | 2009-09-21 20:52:44 -0300 | [diff] [blame] | 505 | }; |
| 506 | |
Antti Palosaari | 86dcab6 | 2010-09-09 17:05:10 -0300 | [diff] [blame] | 507 | /* TerraTec - 4x7 slim remote */ |
Antti Palosaari | d3bb73d | 2010-09-12 13:31:56 -0300 | [diff] [blame^] | 508 | /* Uses NEC extended 0x02bd. Extended byte removed for compatibility... */ |
| 509 | static struct ir_scancode af9015_rc_terratec[] = { |
| 510 | { 0x0200, KEY_1 }, |
| 511 | { 0x0201, KEY_2 }, |
| 512 | { 0x0202, KEY_3 }, |
| 513 | { 0x0203, KEY_4 }, |
| 514 | { 0x0204, KEY_5 }, |
| 515 | { 0x0205, KEY_6 }, |
| 516 | { 0x0206, KEY_7 }, |
| 517 | { 0x0207, KEY_8 }, |
| 518 | { 0x0208, KEY_9 }, |
| 519 | { 0x0209, KEY_0 }, |
| 520 | { 0x020a, KEY_MUTE }, |
| 521 | { 0x020b, KEY_ZOOM }, /* symbol: PIP or zoom ? */ |
| 522 | { 0x020e, KEY_VOLUMEDOWN }, |
| 523 | { 0x020f, KEY_PLAYPAUSE }, |
| 524 | { 0x0210, KEY_RIGHT }, |
| 525 | { 0x0211, KEY_LEFT }, |
| 526 | { 0x0212, KEY_UP }, |
| 527 | { 0x0213, KEY_DOWN }, |
| 528 | { 0x0215, KEY_OK }, |
| 529 | { 0x0216, KEY_STOP }, |
| 530 | { 0x0217, KEY_CAMERA }, /* snapshot */ |
| 531 | { 0x0218, KEY_CHANNELUP }, |
| 532 | { 0x0219, KEY_RECORD }, |
| 533 | { 0x021a, KEY_CHANNELDOWN }, |
| 534 | { 0x021c, KEY_ESC }, |
| 535 | { 0x021f, KEY_VOLUMEUP }, |
| 536 | { 0x0244, KEY_EPG }, |
| 537 | { 0x0245, KEY_POWER2 }, /* [red power button] */ |
Antti Palosaari | 86dcab6 | 2010-09-09 17:05:10 -0300 | [diff] [blame] | 538 | }; |
| 539 | |
Antti Palosaari | 80619de | 2008-09-15 17:18:09 -0300 | [diff] [blame] | 540 | #endif |