diff options
author | Peter Missel <peter.missel@onlinehome.de> | 2006-01-09 18:21:23 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-09 18:21:23 -0200 |
commit | 0602fbb2c84ffea1b06ae8e677662074620f01d7 (patch) | |
tree | 936ab6e290a69519aa391be81b037c41210987c6 /drivers/media/video/saa7134/saa7134-input.c | |
parent | cab462f716cdd522edc71436482d8734e8258489 (diff) | |
download | blackbird-op-linux-0602fbb2c84ffea1b06ae8e677662074620f01d7.tar.gz blackbird-op-linux-0602fbb2c84ffea1b06ae8e677662074620f01d7.zip |
V4L/DVB (3309): SAA7134: GPIO IRQ improvements
- Saa7134-core.c saa7134_irq(): Separate GPIO16 and GPIO18 handling. Call
IR-remote-GPIO handler only if the GPIO IRQ is "owned" by it. Added
infrastructure to branch out to a future I2C-IR IRQ handler.
saa7134-core.c saa7134_hwinit2(): Enable only the one GPIO pin and edge to
trigger an IRQ that is wired as keyup/keydown mask. IRQ will only be
generated for an actual key-down event.
saa7134-input.c flyvideo_codes[]: Replace numpad keys with normal ones. Put
meaning to mystery keys. Change some key definitions to have their functions
match their labels better. Fix typos.
saa7134-input.c flydvb_codes[]: Added new table for the larger remote that
comes with the LifeView FlyDVB series.
saa7134-input.c build_key(): In IRQ mode, signal key-down and then key-up
straight in one go.
Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-input.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-input.c | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/drivers/media/video/saa7134/saa7134-input.c b/drivers/media/video/saa7134/saa7134-input.c index 7175abbd2f8c..82d28cbf289f 100644 --- a/drivers/media/video/saa7134/saa7134-input.c +++ b/drivers/media/video/saa7134/saa7134-input.c @@ -56,23 +56,23 @@ static IR_KEYTAB_TYPE flyvideo_codes[IR_KEYTAB_SIZE] = { [ 12 ] = KEY_KP8, [ 13 ] = KEY_KP9, - [ 14 ] = KEY_TUNER, // Air/Cable + [ 14 ] = KEY_MODE, // Air/Cable [ 17 ] = KEY_VIDEO, // Video [ 21 ] = KEY_AUDIO, // Audio - [ 0 ] = KEY_POWER, // Pover + [ 0 ] = KEY_POWER, // Power + [ 24 ] = KEY_TUNER, // AV Source [ 2 ] = KEY_ZOOM, // Fullscreen + [ 26 ] = KEY_LANGUAGE, // Stereo [ 27 ] = KEY_MUTE, // Mute - [ 20 ] = KEY_VOLUMEUP, - [ 23 ] = KEY_VOLUMEDOWN, + [ 20 ] = KEY_VOLUMEUP, // Volume + + [ 23 ] = KEY_VOLUMEDOWN, // Volume - [ 18 ] = KEY_CHANNELUP, // Channel + [ 19 ] = KEY_CHANNELDOWN, // Channel - - [ 6 ] = KEY_AGAIN, // Recal - [ 16 ] = KEY_KPENTER, // Enter - - [ 26 ] = KEY_F22, // Stereo - [ 24 ] = KEY_EDIT, // AV Source + [ 6 ] = KEY_AGAIN, // Recall + [ 16 ] = KEY_ENTER, // Enter }; + static IR_KEYTAB_TYPE cinergy_codes[IR_KEYTAB_SIZE] = { [ 0 ] = KEY_KP0, [ 1 ] = KEY_KP1, @@ -543,12 +543,22 @@ static int build_key(struct saa7134_dev *dev) dprintk("build_key gpio=0x%x mask=0x%x data=%d\n", gpio, ir->mask_keycode, data); - if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || - (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { - ir_input_keydown(ir->dev, &ir->ir, data, data); - } else { - ir_input_nokey(ir->dev, &ir->ir); + if (ir->polling) { + if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || + (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { + ir_input_keydown(ir->dev, &ir->ir, data, data); + } else { + ir_input_nokey(ir->dev, &ir->ir); + } + } + else { /* IRQ driven mode - handle key press and release in one go */ + if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || + (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { + ir_input_keydown(ir->dev, &ir->ir, data, data); + ir_input_nokey(ir->dev, &ir->ir); + } } + return 0; } |