summaryrefslogtreecommitdiffstats
path: root/include/media/rc-core.h
diff options
context:
space:
mode:
authorSean Young2017-11-23 23:37:10 +0100
committerMauro Carvalho Chehab2017-12-14 16:35:30 +0100
commit57c642cb45d6f7d0d950c3bc67439989062ac743 (patch)
treea8bb6ccd399309d7c359917291cc58f01cbffb7f /include/media/rc-core.h
parentmedia: imon: auto-config ffdc 30 device (diff)
downloadkernel-qcow2-linux-57c642cb45d6f7d0d950c3bc67439989062ac743.tar.gz
kernel-qcow2-linux-57c642cb45d6f7d0d950c3bc67439989062ac743.tar.xz
kernel-qcow2-linux-57c642cb45d6f7d0d950c3bc67439989062ac743.zip
media: cec: move cec autorepeat handling to rc-core
CEC autorepeat is different than other protocols. Autorepeat is triggered by the first repeated user control pressed CEC message, rather than a fixed REP_DELAY. This change also does away with the KEY_UP event directly after the first KEY_DOWN event, which was used to stop autorepeat from starting. See commit a9a249a2c997 ("media: cec: fix remote control passthrough") for the original change. Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'include/media/rc-core.h')
-rw-r--r--include/media/rc-core.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/media/rc-core.h b/include/media/rc-core.h
index 3a47a25a6593..0a4026cf64f3 100644
--- a/include/media/rc-core.h
+++ b/include/media/rc-core.h
@@ -134,6 +134,8 @@ struct lirc_fh {
* @keypressed: whether a key is currently pressed
* @keyup_jiffies: time (in jiffies) when the current keypress should be released
* @timer_keyup: timer for releasing a keypress
+ * @timer_repeat: timer for autorepeat events. This is needed for CEC, which
+ * has non-standard repeats.
* @last_keycode: keycode of last keypress
* @last_protocol: protocol of last keypress
* @last_scancode: scancode of last keypress
@@ -202,6 +204,7 @@ struct rc_dev {
bool keypressed;
unsigned long keyup_jiffies;
struct timer_list timer_keyup;
+ struct timer_list timer_repeat;
u32 last_keycode;
enum rc_proto last_protocol;
u32 last_scancode;