From patchwork Mon Sep 7 23:36:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitri Belimov X-Patchwork-Id: 46169 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n87NZnsS010842 for ; Mon, 7 Sep 2009 23:35:49 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752793AbZIGXfo (ORCPT ); Mon, 7 Sep 2009 19:35:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752748AbZIGXfo (ORCPT ); Mon, 7 Sep 2009 19:35:44 -0400 Received: from mail-yw0-f175.google.com ([209.85.211.175]:46695 "EHLO mail-yw0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752737AbZIGXfn (ORCPT ); Mon, 7 Sep 2009 19:35:43 -0400 Received: by ywh5 with SMTP id 5so3993362ywh.4 for ; Mon, 07 Sep 2009 16:35:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:x-mailer:mime-version:content-type; bh=DTrzV3kcxvwlCFf1uK4ZI09tcpcftfoVLCqJ4eJQhhA=; b=MjyipJo/Z1zmKH8B4cRiYkdKEQITDWFH0LLh8zFAV5MCV9lQTX8qGtlcGeBljerqH1 O3iMrqvr7a8c+2efMnMwPNS5wL4q6XshYa3GdDJn9y6F73jHRDxkfVISZ63j7OkXIYQ7 Mzl7xWd3PueVSpIq15WpFWunYOFI0ffP8kugk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:x-mailer:mime-version:content-type; b=a58M0OL/fQ6grVt7+TK9vcW5INuinevwhE/MphV+DZQvRo5QeZ9DlaBsQwNjxv53oP D7f3Pr1JJnBUT2PDHDS40yPufuoXHiJpSqN6ecJ8A89o76lvZSHyiKKKr5bdEyJK52fd rgUR1jZiV4EulvKkNUlSJjGc0dS1S/75jk95o= Received: by 10.91.191.17 with SMTP id t17mr11582196agp.51.1252366545926; Mon, 07 Sep 2009 16:35:45 -0700 (PDT) Received: from glory.loctelecom.ru (ns2.openhardware.ru [84.19.183.172]) by mx.google.com with ESMTPS id 20sm572542agd.63.2009.09.07.16.35.42 (version=SSLv3 cipher=RC4-MD5); Mon, 07 Sep 2009 16:35:44 -0700 (PDT) Date: Tue, 8 Sep 2009 09:36:05 +1000 From: Dmitri Belimov To: linux-media@vger.kernel.org, video4linux-list@redhat.com Subject: [PATCH] Key filter for BeholdTV cards. Message-ID: <20090908093605.25f8c68d@glory.loctelecom.ru> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.16.1; i486-pc-linux-gnu) Mime-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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. Signed-off-by: Beholder Intl. Ltd. Dmitry Belimov With my best regards, Dmitry. 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