All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitri Belimov <d.belimov@gmail.com>
To: linux-media@vger.kernel.org, video4linux-list@redhat.com
Subject: [PATCH] Key filter for BeholdTV cards.
Date: Tue, 8 Sep 2009 09:36:05 +1000	[thread overview]
Message-ID: <20090908093605.25f8c68d@glory.loctelecom.ru> (raw)

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

Hi All.

When fast push-pull button of remote control we can received incorrect
key code 0x00. Key information from IR decoder has ID of remote control 2 bytes,
byte of key code and byte of mirror key code.
Correct data
0x86 0x6B 0x00 0xFF

Wrong data
0x86 0x6B 0x00 0x00

This patch added additional test of mirror byte for filtering.

diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c	Thu Sep 03 09:06:34 2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c	Mon Sep 07 18:05:54 2009 +1000
@@ -286,6 +286,10 @@
 	 * So, skip not our, if disable full codes mode.
 	 */
 	if (data[10] != 0x6b && data[11] != 0x86 && disable_other_ir)
+		return 0;
+
+	/* Wrong data decode fix */
+	if (data[9] != (unsigned char)(~data[8]))
 		return 0;
 
 	*ir_key = data[9];
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

With my best regards, Dmitry.

[-- Attachment #2: behold_remote.patch --]
[-- Type: text/x-patch, Size: 584 bytes --]

diff -r 2b49813f8482 linux/drivers/media/video/saa7134/saa7134-input.c
--- a/linux/drivers/media/video/saa7134/saa7134-input.c	Thu Sep 03 09:06:34 2009 -0300
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c	Mon Sep 07 18:05:54 2009 +1000
@@ -286,6 +286,10 @@
 	 * So, skip not our, if disable full codes mode.
 	 */
 	if (data[10] != 0x6b && data[11] != 0x86 && disable_other_ir)
+		return 0;
+
+	/* Wrong data decode fix */
+	if (data[9] != (unsigned char)(~data[8]))
 		return 0;
 
 	*ir_key = data[9];
Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov <d.belimov@gmail.com>

                 reply	other threads:[~2009-09-07 23:35 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090908093605.25f8c68d@glory.loctelecom.ru \
    --to=d.belimov@gmail.com \
    --cc=linux-media@vger.kernel.org \
    --cc=video4linux-list@redhat.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 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.