linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: "David Härdeman" <david@hardeman.nu>
Cc: linux-media@vger.kernel.org, mchehab@s-opensource.com
Subject: Re: [PATCH 3/7] rc-core: img-nec-decoder - leave the internals of rc_dev alone
Date: Mon, 22 May 2017 21:40:30 +0100	[thread overview]
Message-ID: <20170522204030.GA22650@gofer.mess.org> (raw)
In-Reply-To: <149365500692.13489.9572857464621441673.stgit@zeus.hardeman.nu>

On Mon, May 01, 2017 at 06:10:06PM +0200, David Härdeman wrote:
> Obvious fix, leave repeat handling to rc-core
> 
> Signed-off-by: David Härdeman <david@hardeman.nu>
> ---
>  drivers/media/rc/ir-nec-decoder.c |   10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/media/rc/ir-nec-decoder.c b/drivers/media/rc/ir-nec-decoder.c
> index 3ce850314dca..75b9137f6faf 100644
> --- a/drivers/media/rc/ir-nec-decoder.c
> +++ b/drivers/media/rc/ir-nec-decoder.c
> @@ -88,13 +88,9 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
>  			data->state = STATE_BIT_PULSE;
>  			return 0;
>  		} else if (eq_margin(ev.duration, NEC_REPEAT_SPACE, NEC_UNIT / 2)) {
> -			if (!dev->keypressed) {
> -				IR_dprintk(1, "Discarding last key repeat: event after key up\n");
> -			} else {
> -				rc_repeat(dev);
> -				IR_dprintk(1, "Repeat last key\n");
> -				data->state = STATE_TRAILER_PULSE;
> -			}
> +			rc_repeat(dev);
> +			IR_dprintk(1, "Repeat last key\n");
> +			data->state = STATE_TRAILER_PULSE;

This is not correct. This means that whenever a nec repeat is received,
the last scancode is sent to the input device, irrespective of whether
there has been no IR for hours. The original code is stricter.

>  			return 0;
>  		}
>  

  reply	other threads:[~2017-05-22 20:40 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-01 16:09 [PATCH 0/7] rc: don't poke around in rc_dev internals David Härdeman
2017-05-01 16:09 ` [PATCH 1/7] rc-core: ati_remote - leave the internals of rc_dev alone David Härdeman
2017-05-01 16:10 ` [PATCH 2/7] rc-core: img-ir " David Härdeman
2017-05-01 16:10 ` [PATCH 3/7] rc-core: img-nec-decoder " David Härdeman
2017-05-22 20:40   ` Sean Young [this message]
2017-05-28  8:28     ` David Härdeman
2017-06-11 16:02       ` Sean Young
2017-06-17 11:14         ` David Härdeman
2017-05-01 16:10 ` [PATCH 4/7] rc-core: sanyo " David Härdeman
2017-05-22 20:46   ` Sean Young
2017-05-01 16:10 ` [PATCH 5/7] rc-core: ir-raw " David Härdeman
2017-05-23  9:20   ` Sean Young
2017-05-28  8:31     ` David Härdeman
2017-05-28 16:49       ` [PATCH] [media] rc-core: simplify ir_raw_event_store_edge() Sean Young
2017-06-06 21:27         ` Sean Young
2017-05-01 16:10 ` [PATCH 6/7] rc-core: cx231xx - leave the internals of rc_dev alone David Härdeman
2017-05-01 16:10 ` [PATCH 7/7] rc-core: tm6000 " David Härdeman

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=20170522204030.GA22650@gofer.mess.org \
    --to=sean@mess.org \
    --cc=david@hardeman.nu \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@s-opensource.com \
    /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).