diff options
author | Michael Krufky <devnull@localhost> | 2005-09-07 04:03:15 +0000 |
---|---|---|
committer | Michael Krufky <devnull@localhost> | 2005-09-07 04:03:15 +0000 |
commit | ebd6c0d8e49b5ecf396fd251e50ea4b3ac49a57f (patch) | |
tree | 7cb2b63a538e485533538bc38100c2d144ec9223 /linux/drivers/media/video/ir-kbd-gpio.c | |
parent | d4b7ebe4462856de6d7f987d9a7871c632581b3f (diff) | |
download | mediapointer-dvb-s2-ebd6c0d8e49b5ecf396fd251e50ea4b3ac49a57f.tar.gz mediapointer-dvb-s2-ebd6c0d8e49b5ecf396fd251e50ea4b3ac49a57f.tar.bz2 |
* bttv-cards.c, bttv.h, ir-kbd-gpio.c:
* doc/CARDLIST.bttv:
- add bttv card 137 - Conceptronic CTVFMi v2
- some ir buttons seem to be duplicated, explained
by comments within source.
Thanks to: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Diffstat (limited to 'linux/drivers/media/video/ir-kbd-gpio.c')
-rw-r--r-- | linux/drivers/media/video/ir-kbd-gpio.c | 73 |
1 files changed, 72 insertions, 1 deletions
diff --git a/linux/drivers/media/video/ir-kbd-gpio.c b/linux/drivers/media/video/ir-kbd-gpio.c index ee41576c1..caa074b69 100644 --- a/linux/drivers/media/video/ir-kbd-gpio.c +++ b/linux/drivers/media/video/ir-kbd-gpio.c @@ -1,5 +1,5 @@ /* - * $Id: ir-kbd-gpio.c,v 1.15 2005/09/04 13:36:10 mkrufky Exp $ + * $Id: ir-kbd-gpio.c,v 1.16 2005/09/07 04:03:15 mkrufky Exp $ * * Copyright (c) 2003 Gerd Knorr * Copyright (c) 2003 Pavel Machek @@ -157,6 +157,71 @@ static IR_KEYTAB_TYPE ir_codes_apac_viewcomp[IR_KEYTAB_SIZE] = { /* ---------------------------------------------------------------------- */ +/* Ricardo Cerqueira <v4l@cerqueira.org> */ +/* Weird matching, since the remote has "uncommon" keys */ + +static IR_KEYTAB_TYPE ir_codes_conceptronic[IR_KEYTAB_SIZE] = { + + [ 30 ] = KEY_POWER, // power + [ 7 ] = KEY_SWITCHVIDEOMODE, // source + [ 28 ] = KEY_SEARCH, // scan + +/* FIXME: duplicate keycodes? + * + * These four keys seem to share the same GPIO as CH+, CH-, <<< and >>> + * The GPIO values are + * 6397fb for both "Scan <" and "CH -", + * 639ffb for "Scan >" and "CH+", + * 6384fb for "Tune <" and "<<<", + * 638cfb for "Tune >" and ">>>", regardless of the mask. + * + * [ 23 ] = KEY_BACK, // fm scan << + * [ 31 ] = KEY_FORWARD, // fm scan >> + * + * [ 4 ] = KEY_LEFT, // fm tuning < + * [ 12 ] = KEY_RIGHT, // fm tuning > + * + * For now, these four keys are disabled. Pressing them will generate + * the CH+/CH-/<<</>>> events + */ + + [ 3 ] = KEY_TUNER, // TV/FM + + [ 0 ] = KEY_RECORD, + [ 8 ] = KEY_STOP, + [ 17 ] = KEY_PLAY, + + [ 26 ] = KEY_PLAYPAUSE, // freeze + [ 25 ] = KEY_ZOOM, // zoom + [ 15 ] = KEY_TEXT, // min + + [ 1 ] = KEY_KP1, + [ 11 ] = KEY_KP2, + [ 27 ] = KEY_KP3, + [ 5 ] = KEY_KP4, + [ 9 ] = KEY_KP5, + [ 21 ] = KEY_KP6, + [ 6 ] = KEY_KP7, + [ 10 ] = KEY_KP8, + [ 18 ] = KEY_KP9, + [ 2 ] = KEY_KP0, + [ 16 ] = KEY_LAST, // +100 + [ 19 ] = KEY_LIST, // recall + + [ 31 ] = KEY_CHANNELUP, // chn down + [ 23 ] = KEY_CHANNELDOWN, // chn up + [ 22 ] = KEY_VOLUMEUP, // vol down + [ 20 ] = KEY_VOLUMEDOWN, // vol up + + [ 4 ] = KEY_KPMINUS, // <<< + [ 14 ] = KEY_SETUP, // function + [ 12 ] = KEY_KPPLUS, // >>> + + [ 13 ] = KEY_GOTO, // mts + [ 29 ] = KEY_REFRESH, // reset + [ 24 ] = KEY_MUTE // mute/unmute +}; + struct IR { struct bttv_sub_device *sub; struct input_dev input; @@ -326,6 +391,12 @@ static int ir_probe(struct device *dev) ir->mask_keyup = 0x008000; ir->polling = 50; // ms break; + case BTTV_CONCEPTRONIC_CTVFMI2: + ir_codes = ir_codes_conceptronic; + ir->mask_keycode = 0x001F00; + ir->mask_keyup = 0x006000; + ir->polling = 50; // ms + break; } if (NULL == ir_codes) { kfree(ir); |