diff options
author | Sean Young <sean@mess.org> | 2017-11-19 16:57:27 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-11-30 04:40:23 -0500 |
commit | 67f0f15ad5c47490e19f2526f8f9cea97c5ce1a6 (patch) | |
tree | fb0fe160f14d29c9dba5a11a2e593279592dc50d | |
parent | 6d33377f2abbf9f0e561b116dd468d1c3ff36a6a (diff) |
media: rc: partial revert of "media: rc: per-protocol repeat period"
Since commit d57ea877af38 ("media: rc: per-protocol repeat period"), most
IR protocols have a lower keyup timeout. This causes problems on the
ite-cir, which has default IR timeout of 200ms.
Since the IR decoders read the trailing space, with a IR timeout of 200ms,
the last keydown will have at least a delay of 200ms. This is more than
the protocol timeout of e.g. rc-6 (which is 164ms). As a result the last
IR will be interpreted as a new keydown event, and we get two keypresses.
Revert the protocol timeout to 250ms, except for cec which needs a timeout
of 550ms.
Fixes: d57ea877af38 ("media: rc: per-protocol repeat period")
Cc: <stable@vger.kernel.org> # 4.14
Reported-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Sean Young <sean@mess.org>
Tested-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
-rw-r--r-- | drivers/media/rc/rc-main.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index c4b0217bd169..c144b77eac98 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c | |||
@@ -39,41 +39,41 @@ static const struct { | |||
39 | [RC_PROTO_UNKNOWN] = { .name = "unknown", .repeat_period = 250 }, | 39 | [RC_PROTO_UNKNOWN] = { .name = "unknown", .repeat_period = 250 }, |
40 | [RC_PROTO_OTHER] = { .name = "other", .repeat_period = 250 }, | 40 | [RC_PROTO_OTHER] = { .name = "other", .repeat_period = 250 }, |
41 | [RC_PROTO_RC5] = { .name = "rc-5", | 41 | [RC_PROTO_RC5] = { .name = "rc-5", |
42 | .scancode_bits = 0x1f7f, .repeat_period = 164 }, | 42 | .scancode_bits = 0x1f7f, .repeat_period = 250 }, |
43 | [RC_PROTO_RC5X_20] = { .name = "rc-5x-20", | 43 | [RC_PROTO_RC5X_20] = { .name = "rc-5x-20", |
44 | .scancode_bits = 0x1f7f3f, .repeat_period = 164 }, | 44 | .scancode_bits = 0x1f7f3f, .repeat_period = 250 }, |
45 | [RC_PROTO_RC5_SZ] = { .name = "rc-5-sz", | 45 | [RC_PROTO_RC5_SZ] = { .name = "rc-5-sz", |
46 | .scancode_bits = 0x2fff, .repeat_period = 164 }, | 46 | .scancode_bits = 0x2fff, .repeat_period = 250 }, |
47 | [RC_PROTO_JVC] = { .name = "jvc", | 47 | [RC_PROTO_JVC] = { .name = "jvc", |
48 | .scancode_bits = 0xffff, .repeat_period = 250 }, | 48 | .scancode_bits = 0xffff, .repeat_period = 250 }, |
49 | [RC_PROTO_SONY12] = { .name = "sony-12", | 49 | [RC_PROTO_SONY12] = { .name = "sony-12", |
50 | .scancode_bits = 0x1f007f, .repeat_period = 100 }, | 50 | .scancode_bits = 0x1f007f, .repeat_period = 250 }, |
51 | [RC_PROTO_SONY15] = { .name = "sony-15", | 51 | [RC_PROTO_SONY15] = { .name = "sony-15", |
52 | .scancode_bits = 0xff007f, .repeat_period = 100 }, | 52 | .scancode_bits = 0xff007f, .repeat_period = 250 }, |
53 | [RC_PROTO_SONY20] = { .name = "sony-20", | 53 | [RC_PROTO_SONY20] = { .name = "sony-20", |
54 | .scancode_bits = 0x1fff7f, .repeat_period = 100 }, | 54 | .scancode_bits = 0x1fff7f, .repeat_period = 250 }, |
55 | [RC_PROTO_NEC] = { .name = "nec", | 55 | [RC_PROTO_NEC] = { .name = "nec", |
56 | .scancode_bits = 0xffff, .repeat_period = 160 }, | 56 | .scancode_bits = 0xffff, .repeat_period = 250 }, |
57 | [RC_PROTO_NECX] = { .name = "nec-x", | 57 | [RC_PROTO_NECX] = { .name = "nec-x", |
58 | .scancode_bits = 0xffffff, .repeat_period = 160 }, | 58 | .scancode_bits = 0xffffff, .repeat_period = 250 }, |
59 | [RC_PROTO_NEC32] = { .name = "nec-32", | 59 | [RC_PROTO_NEC32] = { .name = "nec-32", |
60 | .scancode_bits = 0xffffffff, .repeat_period = 160 }, | 60 | .scancode_bits = 0xffffffff, .repeat_period = 250 }, |
61 | [RC_PROTO_SANYO] = { .name = "sanyo", | 61 | [RC_PROTO_SANYO] = { .name = "sanyo", |
62 | .scancode_bits = 0x1fffff, .repeat_period = 250 }, | 62 | .scancode_bits = 0x1fffff, .repeat_period = 250 }, |
63 | [RC_PROTO_MCIR2_KBD] = { .name = "mcir2-kbd", | 63 | [RC_PROTO_MCIR2_KBD] = { .name = "mcir2-kbd", |
64 | .scancode_bits = 0xffff, .repeat_period = 150 }, | 64 | .scancode_bits = 0xffff, .repeat_period = 250 }, |
65 | [RC_PROTO_MCIR2_MSE] = { .name = "mcir2-mse", | 65 | [RC_PROTO_MCIR2_MSE] = { .name = "mcir2-mse", |
66 | .scancode_bits = 0x1fffff, .repeat_period = 150 }, | 66 | .scancode_bits = 0x1fffff, .repeat_period = 250 }, |
67 | [RC_PROTO_RC6_0] = { .name = "rc-6-0", | 67 | [RC_PROTO_RC6_0] = { .name = "rc-6-0", |
68 | .scancode_bits = 0xffff, .repeat_period = 164 }, | 68 | .scancode_bits = 0xffff, .repeat_period = 250 }, |
69 | [RC_PROTO_RC6_6A_20] = { .name = "rc-6-6a-20", | 69 | [RC_PROTO_RC6_6A_20] = { .name = "rc-6-6a-20", |
70 | .scancode_bits = 0xfffff, .repeat_period = 164 }, | 70 | .scancode_bits = 0xfffff, .repeat_period = 250 }, |
71 | [RC_PROTO_RC6_6A_24] = { .name = "rc-6-6a-24", | 71 | [RC_PROTO_RC6_6A_24] = { .name = "rc-6-6a-24", |
72 | .scancode_bits = 0xffffff, .repeat_period = 164 }, | 72 | .scancode_bits = 0xffffff, .repeat_period = 250 }, |
73 | [RC_PROTO_RC6_6A_32] = { .name = "rc-6-6a-32", | 73 | [RC_PROTO_RC6_6A_32] = { .name = "rc-6-6a-32", |
74 | .scancode_bits = 0xffffffff, .repeat_period = 164 }, | 74 | .scancode_bits = 0xffffffff, .repeat_period = 250 }, |
75 | [RC_PROTO_RC6_MCE] = { .name = "rc-6-mce", | 75 | [RC_PROTO_RC6_MCE] = { .name = "rc-6-mce", |
76 | .scancode_bits = 0xffff7fff, .repeat_period = 164 }, | 76 | .scancode_bits = 0xffff7fff, .repeat_period = 250 }, |
77 | [RC_PROTO_SHARP] = { .name = "sharp", | 77 | [RC_PROTO_SHARP] = { .name = "sharp", |
78 | .scancode_bits = 0x1fff, .repeat_period = 250 }, | 78 | .scancode_bits = 0x1fff, .repeat_period = 250 }, |
79 | [RC_PROTO_XMP] = { .name = "xmp", .repeat_period = 250 }, | 79 | [RC_PROTO_XMP] = { .name = "xmp", .repeat_period = 250 }, |