From patchwork Thu Oct 29 19:28:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiner Kallweit X-Patchwork-Id: 7520411 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2AE2BBEEA4 for ; Thu, 29 Oct 2015 19:37:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E5B620905 for ; Thu, 29 Oct 2015 19:37:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7FA6820900 for ; Thu, 29 Oct 2015 19:37:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757648AbbJ2ThP (ORCPT ); Thu, 29 Oct 2015 15:37:15 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:33191 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752799AbbJ2ThO (ORCPT ); Thu, 29 Oct 2015 15:37:14 -0400 X-Greylist: delayed 482 seconds by postgrey-1.27 at vger.kernel.org; Thu, 29 Oct 2015 15:37:13 EDT Received: by wmeg8 with SMTP id g8so30616170wme.0 for ; Thu, 29 Oct 2015 12:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:subject:to:cc:message-id:date:user-agent:mime-version :content-type:content-transfer-encoding; bh=HuFBWlndHYxQi/56/3hPLdZcE8oy5cqy8pOqKmwup94=; b=yW0ODZ7qxTsuubap8O0Ip8wS/BKSt/mxTewrjet4C6QI36qpjtrzwI8e2RU20EcwTh n09UfOXE4cvplGSz9aAFpcWpKW9s2VFcONA4pctd0U23z7eYkXx1eC8taQi19suML5Zg jgzygA2CnLJWf3BxYgVBRlviU5b2lUY5Bwq9c8WaoGipPuKm3FpdCs8XGh4oqUURbAa+ U0L7BKxPS7AOrYwy31PhutWT0DRrDDD5SJh1hDUojwO26bEaHsO1QSBpNo7/vmhZCBjj Kz+PeTahI6zuFqiMXhnbyLpdIkEhV+TjBpQ2LkOftIkGCDPwx0pb02e88W7kcut6b/X9 qmAg== X-Received: by 10.28.93.70 with SMTP id r67mr5566519wmb.16.1446146950738; Thu, 29 Oct 2015 12:29:10 -0700 (PDT) Received: from ?IPv6:2003:62:5f55:ba00:14ec:a654:7de1:4720? (p200300625F55BA0014ECA6547DE14720.dip0.t-ipconnect.de. [2003:62:5f55:ba00:14ec:a654:7de1:4720]) by smtp.googlemail.com with ESMTPSA id ld5sm3288743wjc.18.2015.10.29.12.29.09 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 29 Oct 2015 12:29:10 -0700 (PDT) From: Heiner Kallweit Subject: [PATCH] media: rc: ir-sharp-decoder: add support for Denon variant of the protocol To: mchehab@osg.samsung.com Cc: linux-media@vger.kernel.org Message-ID: <56327348.80807@gmail.com> Date: Thu, 29 Oct 2015 20:28:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Denon also uses the Sharp protocol, however with different check bits. It would have been also possible to add this as a separate protocol but this may not be worth the effort. Successfully tested with a Denon RC-1002 remote control. Signed-off-by: Heiner Kallweit --- drivers/media/rc/Kconfig | 3 ++- drivers/media/rc/ir-sharp-decoder.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/media/rc/Kconfig b/drivers/media/rc/Kconfig index b6e1311..bd4d685 100644 --- a/drivers/media/rc/Kconfig +++ b/drivers/media/rc/Kconfig @@ -101,7 +101,8 @@ config IR_SHARP_DECODER ---help--- Enable this option if you have an infrared remote control which - uses the Sharp protocol, and you need software decoding support. + uses the Sharp protocol (Sharp, Denon), and you need software + decoding support. config IR_MCE_KBD_DECODER tristate "Enable IR raw decoder for the MCE keyboard/mouse protocol" diff --git a/drivers/media/rc/ir-sharp-decoder.c b/drivers/media/rc/ir-sharp-decoder.c index b7acdba..1f33164 100644 --- a/drivers/media/rc/ir-sharp-decoder.c +++ b/drivers/media/rc/ir-sharp-decoder.c @@ -118,7 +118,9 @@ static int ir_sharp_decode(struct rc_dev *dev, struct ir_raw_event ev) if (data->count == SHARP_NBITS) { /* exp,chk bits should be 1,0 */ - if ((data->bits & 0x3) != 0x2) + if ((data->bits & 0x3) != 0x2 && + /* DENON variant, both chk bits 0 */ + (data->bits & 0x3) != 0x0) break; data->state = STATE_ECHO_SPACE; } else {