All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: "Mariusz Białończyk" <manio@skyboo.net>
Cc: linux-media@vger.kernel.org
Subject: Re: ir-core: nec protocol problem
Date: Mon, 27 Dec 2010 09:50:46 -0200	[thread overview]
Message-ID: <4D187D96.5060303@redhat.com> (raw)
In-Reply-To: <4D17816B.2050500@skyboo.net>

Em 26-12-2010 15:54, Mariusz Białończyk escreveu:
> Hello,
> Maybe you could give me some tip for issue i found with ir-core.
> I am using cx88 chipset for ir-decoding.
> The problem is that sometimes the key is wrong handled (especially
> when the remote is long from the receiver), for instance:
> I am pressing "1" on remote, then after some time i am pressing
> "2" but instead i've got repeat key of "1" again.
> When looking at debug logs i can see that "key startup sequence"
> is omitted and only a back of ir code (the repeat) is handled
> as a repeat. Maybe I'm not clear, so i'll try to explain like this:
> As far as I know pressing the buttons on remote with NEC protocol
> generates two things:
> 1. key code (I'll call it "code header")
> 2. repeat code
> 
> And the problem is when ir-core is receiving it like this:
> 1. key code of "1"
> 2. repeat code
> 3. key code of "2" - this is wrong decoded
> 4. repeat code - and here it repeats "1", not "2"
> 
> I think it's a problem with NEC protocol. My point is that
> it should NOT do "repeat code" in case when "code header" was not
> decoded, and especially if the repeat code is after some period of
> time after the "key header" (and even after ir_keyup event).
> In the other words - I think it is better to have no event instead
> of wrong repeat key event (which i does *NOT* press), at least I
> know than, that I need to press the key again.
> I am attaching you debug logs with comments inside.
> What do you think about it? Maybe it is fixed now? (i am using
> 2.6.36 kernel with one patch which ported my cx88 driver to
> ir-core).

We can't simply discard the repeat code due to some non-decoded stuff,
as it can be some noise, caused, for example, by a fluorescent bulb or
by the sunlight.

That's said, it actually makes sense to have some timeout event that
will disable key repeats if they are not close enough to an IR keydown.

At a first glance, it makes sense to use the ir_keyup timeout also to 
disable the IR repeat for the NEC protocol.

Feel free to propose a patch for it.

Cheers,
Mauro

  reply	other threads:[~2010-12-27 11:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-26 17:54 ir-core: nec protocol problem Mariusz Białończyk
2010-12-27 11:50 ` Mauro Carvalho Chehab [this message]
2010-12-29 22:48   ` [PATCH] ir-nec-decoder: fix repeat key issue Mariusz Białończyk

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=4D187D96.5060303@redhat.com \
    --to=mchehab@redhat.com \
    --cc=linux-media@vger.kernel.org \
    --cc=manio@skyboo.net \
    /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.