diff options
author | George Gazurkoff <gazurkoff@gmail.com> | 2006-01-09 12:25:19 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-09 12:25:19 -0500 |
commit | 899ad11b55206c30db7e3667d14c8bdb167f51f8 (patch) | |
tree | 7190d3bff8a598c2ce42e2f8a56b5ce5e769a088 /drivers/media/video/cx88/cx88-input.c | |
parent | a1789d3aea9e1eca676de011e1e3ebe9171cf9cb (diff) |
V4L/DVB (3118): Enable remote control on AVERTV STUDIO 303
- Enable remote control on AVERTV STUDIO 303
- This patch adapted from a patch found on a website posted by
an anonymous user. Thanks to original anonymous author for
creating this patch. Tested successfully by George Gazurkoff.
Signed-off-by: George Gazurkoff <gazurkoff@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/cx88/cx88-input.c')
-rw-r--r-- | drivers/media/video/cx88/cx88-input.c | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c index a89bb2b195f3..e123367773b3 100644 --- a/drivers/media/video/cx88/cx88-input.c +++ b/drivers/media/video/cx88/cx88-input.c | |||
@@ -258,6 +258,54 @@ static IR_KEYTAB_TYPE ir_codes_cinergy_1400[IR_KEYTAB_SIZE] = { | |||
258 | 258 | ||
259 | /* ---------------------------------------------------------------------- */ | 259 | /* ---------------------------------------------------------------------- */ |
260 | 260 | ||
261 | /* AVERTV STUDIO 303 Remote */ | ||
262 | static IR_KEYTAB_TYPE ir_codes_avertv_303[IR_KEYTAB_SIZE] = { | ||
263 | [ 0x2a ] = KEY_KP1, | ||
264 | [ 0x32 ] = KEY_KP2, | ||
265 | [ 0x3a ] = KEY_KP3, | ||
266 | [ 0x4a ] = KEY_KP4, | ||
267 | [ 0x52 ] = KEY_KP5, | ||
268 | [ 0x5a ] = KEY_KP6, | ||
269 | [ 0x6a ] = KEY_KP7, | ||
270 | [ 0x72 ] = KEY_KP8, | ||
271 | [ 0x7a ] = KEY_KP9, | ||
272 | [ 0x0e ] = KEY_KP0, | ||
273 | |||
274 | [ 0x02 ] = KEY_POWER, | ||
275 | [ 0x22 ] = KEY_VIDEO, | ||
276 | [ 0x42 ] = KEY_AUDIO, | ||
277 | [ 0x62 ] = KEY_ZOOM, | ||
278 | [ 0x0a ] = KEY_TV, | ||
279 | [ 0x12 ] = KEY_CD, | ||
280 | [ 0x1a ] = KEY_TEXT, | ||
281 | |||
282 | [ 0x16 ] = KEY_SUBTITLE, | ||
283 | [ 0x1e ] = KEY_REWIND, | ||
284 | [ 0x06 ] = KEY_PRINT, | ||
285 | |||
286 | [ 0x2e ] = KEY_SEARCH, | ||
287 | [ 0x36 ] = KEY_SLEEP, | ||
288 | [ 0x3e ] = KEY_SHUFFLE, | ||
289 | [ 0x26 ] = KEY_MUTE, | ||
290 | |||
291 | [ 0x4e ] = KEY_RECORD, | ||
292 | [ 0x56 ] = KEY_PAUSE, | ||
293 | [ 0x5e ] = KEY_STOP, | ||
294 | [ 0x46 ] = KEY_PLAY, | ||
295 | |||
296 | [ 0x6e ] = KEY_RED, | ||
297 | [ 0x0b ] = KEY_GREEN, | ||
298 | [ 0x66 ] = KEY_YELLOW, | ||
299 | [ 0x03 ] = KEY_BLUE, | ||
300 | |||
301 | [ 0x76 ] = KEY_LEFT, | ||
302 | [ 0x7e ] = KEY_RIGHT, | ||
303 | [ 0x13 ] = KEY_DOWN, | ||
304 | [ 0x1b ] = KEY_UP, | ||
305 | }; | ||
306 | |||
307 | /* ---------------------------------------------------------------------- */ | ||
308 | |||
261 | struct cx88_IR { | 309 | struct cx88_IR { |
262 | struct cx88_core *core; | 310 | struct cx88_core *core; |
263 | struct input_dev *input; | 311 | struct input_dev *input; |
@@ -430,6 +478,13 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) | |||
430 | ir->mask_keyup = 0x40; | 478 | ir->mask_keyup = 0x40; |
431 | ir->polling = 1; /* ms */ | 479 | ir->polling = 1; /* ms */ |
432 | break; | 480 | break; |
481 | case CX88_BOARD_AVERTV_303: | ||
482 | ir_codes = ir_codes_avertv_303; | ||
483 | ir->gpio_addr = MO_GP2_IO; | ||
484 | ir->mask_keycode = 0xfb; | ||
485 | ir->mask_keydown = 0x02; | ||
486 | ir->polling = 50; /* ms */ | ||
487 | break; | ||
433 | } | 488 | } |
434 | 489 | ||
435 | if (NULL == ir_codes) { | 490 | if (NULL == ir_codes) { |