* IR button repeat not working in kernel 4.6 and 4.7
@ 2016-07-26 11:52 Matthias Reichl
2016-07-30 13:19 ` [PATCH] Partly revert "[media] rc-core: allow calling rc_open with device not initialized" Ole Ernst
0 siblings, 1 reply; 3+ messages in thread
From: Matthias Reichl @ 2016-07-26 11:52 UTC (permalink / raw)
To: Mauro Carvalho Chehab; +Cc: linux-media
In kernel 4.6 and 4.7 holding down a button on an IR remote no longer
results in repeated key down events.
I've reproduced that issue on a Raspberry Pi B using a GPIO IR
receiver. Other systems seem to be affected as well, for
example Intel NUC with an ITE CIR receiver.
Bisecting points to this commit as a possible cause for that issue:
commit 078600f514a12fd763ac84c86af68ef5b5267563
Author: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Date: Wed Mar 2 08:00:15 2016 -0300
[media] rc-core: allow calling rc_open with device not initialized
With upstream kernel 4.6.0 and 4.7.0 the ir-keytable output looks OK:
Found /sys/class/rc/rc0/ (/dev/input/event0) with:
Driver gpio-rc-recv, table rc-hauppauge
Supported protocols: NEC RC-5 RC-6 JVC SONY SANYO RC-5-SZ SHARP XMP other
Enabled protocols: RC-5
Name: gpio_ir_recv
bus: 25, vendor/product: 0001:0001, version: 0x0100
Repeat delay = 500 ms, repeat period = 125 ms
But running evtest (or ir-keytable -t) only shows EV_KEY events on
initial button down and on release:
Event: time 1469531035.490700, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531035.490700, type 1 (EV_KEY), code 2 (KEY_1), value 1
Event: time 1469531035.490700, -------------- EV_SYN ------------
Event: time 1469531035.603725, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531035.603725, -------------- EV_SYN ------------
Event: time 1469531035.716778, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531035.716778, -------------- EV_SYN ------------
Event: time 1469531035.829849, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531035.829849, -------------- EV_SYN ------------
Event: time 1469531035.942893, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531035.942893, -------------- EV_SYN ------------
Event: time 1469531036.055932, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531036.055932, -------------- EV_SYN ------------
Event: time 1469531036.169004, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531036.169004, -------------- EV_SYN ------------
Event: time 1469531036.282043, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531036.282043, -------------- EV_SYN ------------
Event: time 1469531036.395103, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531036.395103, -------------- EV_SYN ------------
Event: time 1469531036.508157, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531036.508157, -------------- EV_SYN ------------
Event: time 1469531036.621216, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531036.621216, -------------- EV_SYN ------------
Event: time 1469531036.734255, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531036.734255, -------------- EV_SYN ------------
Event: time 1469531036.875917, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531036.875917, -------------- EV_SYN ------------
Event: time 1469531037.125875, type 1 (EV_KEY), code 2 (KEY_1), value 0
Event: time 1469531037.125875, -------------- EV_SYN ------------
When reverting commit 078600f514a12fd763ac84c86af68ef5b5267563 in
kernel 4.6.0 evtest output is back to normal: EV_KEY events with
value 2 show up between button down and button up:
Event: time 1469531201.086823, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531201.086823, type 1 (EV_KEY), code 2 (KEY_1), value 1
Event: time 1469531201.086823, -------------- EV_SYN ------------
Event: time 1469531201.199789, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531201.199789, -------------- EV_SYN ------------
Event: time 1469531201.312818, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531201.312818, -------------- EV_SYN ------------
Event: time 1469531201.425846, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531201.425846, -------------- EV_SYN ------------
Event: time 1469531201.538852, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531201.538852, -------------- EV_SYN ------------
Event: time 1469531201.578497, type 1 (EV_KEY), code 2 (KEY_1), value 2
Event: time 1469531201.578497, -------------- EV_SYN ------------
Event: time 1469531201.651897, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531201.651897, -------------- EV_SYN ------------
Event: time 1469531201.708488, type 1 (EV_KEY), code 2 (KEY_1), value 2
Event: time 1469531201.708488, -------------- EV_SYN ------------
Event: time 1469531201.764901, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531201.764901, -------------- EV_SYN ------------
Event: time 1469531201.838497, type 1 (EV_KEY), code 2 (KEY_1), value 2
Event: time 1469531201.838497, -------------- EV_SYN ------------
Event: time 1469531201.877950, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531201.877950, -------------- EV_SYN ------------
Event: time 1469531201.968484, type 1 (EV_KEY), code 2 (KEY_1), value 2
Event: time 1469531201.968484, -------------- EV_SYN ------------
Event: time 1469531201.990939, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531201.990939, -------------- EV_SYN ------------
Event: time 1469531202.098497, type 1 (EV_KEY), code 2 (KEY_1), value 2
Event: time 1469531202.098497, -------------- EV_SYN ------------
Event: time 1469531202.128516, type 4 (EV_MSC), code 4 (MSC_SCAN), value 1e01
Event: time 1469531202.128516, -------------- EV_SYN ------------
Event: time 1469531202.228506, type 1 (EV_KEY), code 2 (KEY_1), value 2
Event: time 1469531202.228506, -------------- EV_SYN ------------
Event: time 1469531202.358563, type 1 (EV_KEY), code 2 (KEY_1), value 2
Event: time 1469531202.358563, -------------- EV_SYN ------------
Event: time 1469531202.378560, type 1 (EV_KEY), code 2 (KEY_1), value 0
Event: time 1469531202.378560, -------------- EV_SYN ------------
so long,
Hias
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Partly revert "[media] rc-core: allow calling rc_open with device not initialized"
2016-07-26 11:52 IR button repeat not working in kernel 4.6 and 4.7 Matthias Reichl
@ 2016-07-30 13:19 ` Ole Ernst
2016-08-01 12:09 ` Matthias Reichl
0 siblings, 1 reply; 3+ messages in thread
From: Ole Ernst @ 2016-07-30 13:19 UTC (permalink / raw)
To: m.chehab; +Cc: hias, linux-media, Ole Ernst
This partly reverts commit 078600f514a12fd763ac84c86af68ef5b5267563.
Due to the relocation of input_register_device() call, holding down a
button on an IR remote no longer resulted in repeated key down events.
Signed-off-by: Ole Ernst <olebowle@gmx.com>
---
drivers/media/rc/rc-main.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 8e7f292..26fd63b 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -1460,6 +1460,10 @@ int rc_register_device(struct rc_dev *dev)
dev->input_dev->phys = dev->input_phys;
dev->input_dev->name = dev->input_name;
+ rc = input_register_device(dev->input_dev);
+ if (rc)
+ goto out_table;
+
/*
* Default delay of 250ms is too short for some protocols, especially
* since the timeout is currently set to 250ms. Increase it to 500ms,
@@ -1475,11 +1479,6 @@ int rc_register_device(struct rc_dev *dev)
*/
dev->input_dev->rep[REP_PERIOD] = 125;
- /* rc_open will be called here */
- rc = input_register_device(dev->input_dev);
- if (rc)
- goto out_table;
-
path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL);
dev_info(&dev->dev, "%s as %s\n",
dev->input_name ?: "Unspecified device", path ?: "N/A");
--
2.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Partly revert "[media] rc-core: allow calling rc_open with device not initialized"
2016-07-30 13:19 ` [PATCH] Partly revert "[media] rc-core: allow calling rc_open with device not initialized" Ole Ernst
@ 2016-08-01 12:09 ` Matthias Reichl
0 siblings, 0 replies; 3+ messages in thread
From: Matthias Reichl @ 2016-08-01 12:09 UTC (permalink / raw)
To: Ole Ernst; +Cc: m.chehab, linux-media
On Sat, Jul 30, 2016 at 03:19:27PM +0200, Ole Ernst wrote:
> This partly reverts commit 078600f514a12fd763ac84c86af68ef5b5267563.
>
> Due to the relocation of input_register_device() call, holding down a
> button on an IR remote no longer resulted in repeated key down events.
>
> Signed-off-by: Ole Ernst <olebowle@gmx.com>
Tested-by: Matthias Reichl <hias@horus.com>
I tested on Raspberry Pi model B with kernel 4.7.0, gpio-rc-recv,
rc-hauppauge keymap and with this patch key repeat is working fine
again.
Thanks a lot for the quick fix!
Hias
> ---
> drivers/media/rc/rc-main.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
> index 8e7f292..26fd63b 100644
> --- a/drivers/media/rc/rc-main.c
> +++ b/drivers/media/rc/rc-main.c
> @@ -1460,6 +1460,10 @@ int rc_register_device(struct rc_dev *dev)
> dev->input_dev->phys = dev->input_phys;
> dev->input_dev->name = dev->input_name;
>
> + rc = input_register_device(dev->input_dev);
> + if (rc)
> + goto out_table;
> +
> /*
> * Default delay of 250ms is too short for some protocols, especially
> * since the timeout is currently set to 250ms. Increase it to 500ms,
> @@ -1475,11 +1479,6 @@ int rc_register_device(struct rc_dev *dev)
> */
> dev->input_dev->rep[REP_PERIOD] = 125;
>
> - /* rc_open will be called here */
> - rc = input_register_device(dev->input_dev);
> - if (rc)
> - goto out_table;
> -
> path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL);
> dev_info(&dev->dev, "%s as %s\n",
> dev->input_name ?: "Unspecified device", path ?: "N/A");
> --
> 2.9.0
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-01 12:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-26 11:52 IR button repeat not working in kernel 4.6 and 4.7 Matthias Reichl
2016-07-30 13:19 ` [PATCH] Partly revert "[media] rc-core: allow calling rc_open with device not initialized" Ole Ernst
2016-08-01 12:09 ` Matthias Reichl
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.