All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: Sean Young <sean@mess.org>
Cc: Jarod Wilson <jarod@wilsonet.com>,
	linux-media@vger.kernel.org, lirc-list@lists.sourceforge.net
Subject: Re: [PATCH] [media] nec-decoder: fix NEC decoding for Pioneer Laserdisc CU-700 remote
Date: Sat, 11 Aug 2012 17:31:11 -0300	[thread overview]
Message-ID: <5026C10F.6010600@redhat.com> (raw)
In-Reply-To: <1343731049-9856-1-git-send-email-sean@mess.org>

Em 31-07-2012 07:37, Sean Young escreveu:
> This remote sends a header pulse of 8150us followed by a space of 4000us.

 
> Signed-off-by: Sean Young <sean@mess.org>
> ---
>  drivers/media/rc/ir-nec-decoder.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/rc/ir-nec-decoder.c b/drivers/media/rc/ir-nec-decoder.c
> index 3c9431a..2ca509e 100644
> --- a/drivers/media/rc/ir-nec-decoder.c
> +++ b/drivers/media/rc/ir-nec-decoder.c
> @@ -70,7 +70,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
>  		if (!ev.pulse)
>  			break;
>  
> -		if (eq_margin(ev.duration, NEC_HEADER_PULSE, NEC_UNIT / 2)) {
> +		if (eq_margin(ev.duration, NEC_HEADER_PULSE, NEC_UNIT * 2)) {
>  			data->is_nec_x = false;
>  			data->necx_repeat = false;
>  		} else if (eq_margin(ev.duration, NECX_HEADER_PULSE, NEC_UNIT / 2))
> @@ -86,7 +86,7 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev)
>  		if (ev.pulse)
>  			break;
>  
> -		if (eq_margin(ev.duration, NEC_HEADER_SPACE, NEC_UNIT / 2)) {
> +		if (eq_margin(ev.duration, NEC_HEADER_SPACE, NEC_UNIT)) {
>  			data->state = STATE_BIT_PULSE;
>  			return 0;
>  		} else if (eq_margin(ev.duration, NEC_REPEAT_SPACE, NEC_UNIT / 2)) {
> 

The timings above are adjusted for 9000us/4500us, with a tolerance of 281,250us.
You're changing the pulse tolerance to 1125us for pulse, and 562,5us for space.

I double-checked: this shouldn't interfere with the other decoders, so it could
be possible to apply it, without causing regressions.

I'll apply it.

Regards,
Mauro

      reply	other threads:[~2012-08-11 20:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31 10:37 [PATCH] [media] nec-decoder: fix NEC decoding for Pioneer Laserdisc CU-700 remote Sean Young
2012-08-11 20:31 ` Mauro Carvalho Chehab [this message]

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=5026C10F.6010600@redhat.com \
    --to=mchehab@redhat.com \
    --cc=jarod@wilsonet.com \
    --cc=linux-media@vger.kernel.org \
    --cc=lirc-list@lists.sourceforge.net \
    --cc=sean@mess.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.