diff options
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] = { | |||
56 | [ 12 ] = KEY_KP8, | 56 | [ 12 ] = KEY_KP8, |
57 | [ 13 ] = KEY_KP9, | 57 | [ 13 ] = KEY_KP9, |
58 | 58 | ||
59 | [ 14 ] = KEY_TUNER, // Air/Cable | 59 | [ 14 ] = KEY_MODE, // Air/Cable |
60 | [ 17 ] = KEY_VIDEO, // Video | 60 | [ 17 ] = KEY_VIDEO, // Video |
61 | [ 21 ] = KEY_AUDIO, // Audio | 61 | [ 21 ] = KEY_AUDIO, // Audio |
62 | [ 0 ] = KEY_POWER, // Pover | 62 | [ 0 ] = KEY_POWER, // Power |
63 | [ 24 ] = KEY_TUNER, // AV Source | ||
63 | [ 2 ] = KEY_ZOOM, // Fullscreen | 64 | [ 2 ] = KEY_ZOOM, // Fullscreen |
65 | [ 26 ] = KEY_LANGUAGE, // Stereo | ||
64 | [ 27 ] = KEY_MUTE, // Mute | 66 | [ 27 ] = KEY_MUTE, // Mute |
65 | [ 20 ] = KEY_VOLUMEUP, | 67 | [ 20 ] = KEY_VOLUMEUP, // Volume + |
66 | [ 23 ] = KEY_VOLUMEDOWN, | 68 | [ 23 ] = KEY_VOLUMEDOWN, // Volume - |
67 | [ 18 ] = KEY_CHANNELUP, // Channel + | 69 | [ 18 ] = KEY_CHANNELUP, // Channel + |
68 | [ 19 ] = KEY_CHANNELDOWN, // Channel - | 70 | [ 19 ] = KEY_CHANNELDOWN, // Channel - |
69 | [ 6 ] = KEY_AGAIN, // Recal | 71 | [ 6 ] = KEY_AGAIN, // Recall |
70 | [ 16 ] = KEY_KPENTER, // Enter | 72 | [ 16 ] = KEY_ENTER, // Enter |
71 | |||
72 | [ 26 ] = KEY_F22, // Stereo | ||
73 | [ 24 ] = KEY_EDIT, // AV Source | ||
74 | }; | 73 | }; |
75 | 74 | ||
75 | |||
76 | static IR_KEYTAB_TYPE cinergy_codes[IR_KEYTAB_SIZE] = { | 76 | static IR_KEYTAB_TYPE cinergy_codes[IR_KEYTAB_SIZE] = { |
77 | [ 0 ] = KEY_KP0, | 77 | [ 0 ] = KEY_KP0, |
78 | [ 1 ] = KEY_KP1, | 78 | [ 1 ] = KEY_KP1, |
@@ -543,12 +543,22 @@ static int build_key(struct saa7134_dev *dev) | |||
543 | dprintk("build_key gpio=0x%x mask=0x%x data=%d\n", | 543 | dprintk("build_key gpio=0x%x mask=0x%x data=%d\n", |
544 | gpio, ir->mask_keycode, data); | 544 | gpio, ir->mask_keycode, data); |
545 | 545 | ||
546 | if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || | 546 | if (ir->polling) { |
547 | (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { | 547 | if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || |
548 | ir_input_keydown(ir->dev, &ir->ir, data, data); | 548 | (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { |
549 | } else { | 549 | ir_input_keydown(ir->dev, &ir->ir, data, data); |
550 | ir_input_nokey(ir->dev, &ir->ir); | 550 | } else { |
551 | ir_input_nokey(ir->dev, &ir->ir); | ||
552 | } | ||
553 | } | ||
554 | else { /* IRQ driven mode - handle key press and release in one go */ | ||
555 | if ((ir->mask_keydown && (0 != (gpio & ir->mask_keydown))) || | ||
556 | (ir->mask_keyup && (0 == (gpio & ir->mask_keyup)))) { | ||
557 | ir_input_keydown(ir->dev, &ir->ir, data, data); | ||
558 | ir_input_nokey(ir->dev, &ir->ir); | ||
559 | } | ||
551 | } | 560 | } |
561 | |||
552 | return 0; | 562 | return 0; |
553 | } | 563 | } |
554 | 564 | ||