summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/meson-ir.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2018-03-12 17:23:00 -0400
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-03-21 13:59:38 -0400
commitb358e747aebc4a52f20732d569ec04c6bc15d008 (patch)
tree8be7e097b5b5e8d1a54e982e243415171e34fa5c /drivers/media/rc/meson-ir.c
parent8d7a77ce56cdb5f50b83ca0c59a31362e1a5eeb4 (diff)
downloadlinux-stable-b358e747aebc4a52f20732d569ec04c6bc15d008.tar.gz
linux-stable-b358e747aebc4a52f20732d569ec04c6bc15d008.tar.bz2
linux-stable-b358e747aebc4a52f20732d569ec04c6bc15d008.zip
media: rc: meson-ir: lower timeout and make configurable
A timeout of 200ms is much longer than necessary, and delays the decoding decoding of a single scancode and the last scancode when a button is being held. This makes the remote seem sluggish. If the min_timeout and max_timeout values are set, the timeout is configurable via the LIRC_SET_REC_TIMEOUT ioctl. Tested-by: Matthias Reichl <hias@horus.com> Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/meson-ir.c')
-rw-r--r--drivers/media/rc/meson-ir.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
index 64b0aa4f4db7..f449b35d25e7 100644
--- a/drivers/media/rc/meson-ir.c
+++ b/drivers/media/rc/meson-ir.c
@@ -144,7 +144,9 @@ static int meson_ir_probe(struct platform_device *pdev)
ir->rc->map_name = map_name ? map_name : RC_MAP_EMPTY;
ir->rc->allowed_protocols = RC_PROTO_BIT_ALL_IR_DECODER;
ir->rc->rx_resolution = US_TO_NS(MESON_TRATE);
- ir->rc->timeout = MS_TO_NS(200);
+ ir->rc->min_timeout = 1;
+ ir->rc->timeout = IR_DEFAULT_TIMEOUT;
+ ir->rc->max_timeout = 10 * IR_DEFAULT_TIMEOUT;
ir->rc->driver_name = DRIVER_NAME;
spin_lock_init(&ir->lock);