linux-amlogic.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: hias@horus.com (Matthias Reichl)
To: linus-amlogic@lists.infradead.org
Subject: [PATCH] media: rc: meson-ir: lower timeout and make configurable
Date: Tue, 13 Mar 2018 23:27:20 +0100	[thread overview]
Message-ID: <20180313222719.tox73pp25adqvktu@camel2.lan> (raw)
In-Reply-To: <20180312214840.rnuflajm6n6kozxt@gofer.mess.org>

On Mon, Mar 12, 2018 at 09:48:40PM +0000, Sean Young wrote:
> 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.
> 
> Signed-off-by: Sean Young <sean@mess.org>

Tested-by: Matthias Reichl <hias@horus.com>

Thanks a lot, this is working fine!

so long,

Hias

> ---
>  drivers/media/rc/meson-ir.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> 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);
> -- 
> 2.14.3
> 

  reply	other threads:[~2018-03-13 22:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-06 17:41 [PATCH] media: rc: meson-ir: add timeout on idle Matthias Reichl
2018-03-08 16:43 ` Sean Young
2018-03-09 15:54   ` Matthias Reichl
2018-03-10 11:27     ` Sean Young
2018-03-10 17:38       ` Matthias Reichl
2018-03-11 12:55         ` Sean Young
2018-03-12 13:20           ` Matthias Reichl
2018-03-12 13:58             ` Sean Young
2018-03-12 21:48               ` [PATCH] media: rc: meson-ir: lower timeout and make configurable Sean Young
2018-03-13 22:27                 ` Matthias Reichl [this message]
2018-03-13 23:31               ` [PATCH] media: rc: meson-ir: add timeout on idle Matthias Reichl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180313222719.tox73pp25adqvktu@camel2.lan \
    --to=hias@horus.com \
    --cc=linus-amlogic@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).