diff options
author | Sean Young <sean@mess.org> | 2017-11-23 17:37:10 -0500 |
---|---|---|
committer | Tao Huang <huangtao@rock-chips.com> | 2018-12-10 20:36:29 +0800 |
commit | 35e683c5471b1b6fcbdef376d9a2f89338d917f0 (patch) | |
tree | d03d70e6484676dcd9fb5398e8b51bee6d65b70d /include | |
parent | db2b14aac469f4f18070421ca5eaebcf9e53e5e4 (diff) |
UPSTREAM: 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>
(cherry picked from commit 57c642cb45d6f7d0d950c3bc67439989062ac743)
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Conflicts:
drivers/media/cec/cec-adap.c
Diffstat (limited to 'include')
-rw-r--r-- | include/media/rc-core.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/media/rc-core.h b/include/media/rc-core.h index cb8c71ae682c..dc84fc8b3332 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; |