From patchwork Sat Aug 10 11:44:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 11088531 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D2D3314F7 for ; Sat, 10 Aug 2019 11:45:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C32B5209CE for ; Sat, 10 Aug 2019 11:45:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B718022A68; Sat, 10 Aug 2019 11:45:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1F83522A68 for ; Sat, 10 Aug 2019 11:45:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726132AbfHJLpA (ORCPT ); Sat, 10 Aug 2019 07:45:00 -0400 Received: from gofer.mess.org ([88.97.38.141]:36489 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbfHJLpA (ORCPT ); Sat, 10 Aug 2019 07:45:00 -0400 Received: by gofer.mess.org (Postfix, from userid 1000) id 9584F600AF; Sat, 10 Aug 2019 12:44:58 +0100 (BST) From: Sean Young To: linux-media@vger.kernel.org Subject: [PATCH 2/3] media: imon_raw: prevent "nonsensical timing event of duration 0" Date: Sat, 10 Aug 2019 12:44:57 +0100 Message-Id: <20190810114458.8883-2-sean@mess.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190810114458.8883-1-sean@mess.org> References: <20190810114458.8883-1-sean@mess.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Sometimes the device sends IR data which is all space, no pulses whatsoever. Add the end of this the driver will put the rc device into idle mode when it already is in idle mode. The following will be logged: rc rc0: nonsensical timing event of duration 0 rc rc0: two consecutive events of type space Signed-off-by: Sean Young --- drivers/media/rc/imon_raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/rc/imon_raw.c b/drivers/media/rc/imon_raw.c index e6723993b466..d4aedcf76418 100644 --- a/drivers/media/rc/imon_raw.c +++ b/drivers/media/rc/imon_raw.c @@ -85,7 +85,7 @@ static void imon_ir_data(struct imon *imon) offset = bit; } while (offset > 0); - if (packet_no == 0x0a) { + if (packet_no == 0x0a && !imon->rcdev->idle) { ir_raw_event_set_idle(imon->rcdev, true); ir_raw_event_handle(imon->rcdev); } From patchwork Sat Aug 10 11:44:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Young X-Patchwork-Id: 11088527 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A01EC1399 for ; Sat, 10 Aug 2019 11:45:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D9CC22A6F for ; Sat, 10 Aug 2019 11:45:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80CE022B39; Sat, 10 Aug 2019 11:45:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 001D6223B3 for ; Sat, 10 Aug 2019 11:45:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726121AbfHJLpA (ORCPT ); Sat, 10 Aug 2019 07:45:00 -0400 Received: from gofer.mess.org ([88.97.38.141]:55415 "EHLO gofer.mess.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726101AbfHJLpA (ORCPT ); Sat, 10 Aug 2019 07:45:00 -0400 Received: by gofer.mess.org (Postfix, from userid 1000) id BD61C61BFD; Sat, 10 Aug 2019 12:44:58 +0100 (BST) From: Sean Young To: linux-media@vger.kernel.org Cc: Shuah Khan Subject: [PATCH 3/3] selftests: ir: fix ir_loopback test failure Date: Sat, 10 Aug 2019 12:44:58 +0100 Message-Id: <20190810114458.8883-3-sean@mess.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190810114458.8883-1-sean@mess.org> References: <20190810114458.8883-1-sean@mess.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The decoder is called rc-mm, not rcmm. This was renamed late in the cycle so this bug crept in. Cc: Shuah Khan Signed-off-by: Sean Young Acked-by: Shuah Khan --- tools/testing/selftests/ir/ir_loopback.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/ir/ir_loopback.c b/tools/testing/selftests/ir/ir_loopback.c index e700e09e3682..af7f9c7d59bc 100644 --- a/tools/testing/selftests/ir/ir_loopback.c +++ b/tools/testing/selftests/ir/ir_loopback.c @@ -54,9 +54,9 @@ static const struct { { RC_PROTO_RC6_MCE, "rc-6-mce", 0x00007fff, "rc-6" }, { RC_PROTO_SHARP, "sharp", 0x1fff, "sharp" }, { RC_PROTO_IMON, "imon", 0x7fffffff, "imon" }, - { RC_PROTO_RCMM12, "rcmm-12", 0x00000fff, "rcmm" }, - { RC_PROTO_RCMM24, "rcmm-24", 0x00ffffff, "rcmm" }, - { RC_PROTO_RCMM32, "rcmm-32", 0xffffffff, "rcmm" }, + { RC_PROTO_RCMM12, "rcmm-12", 0x00000fff, "rc-mm" }, + { RC_PROTO_RCMM24, "rcmm-24", 0x00ffffff, "rc-mm" }, + { RC_PROTO_RCMM32, "rcmm-32", 0xffffffff, "rc-mm" }, }; int lirc_open(const char *rc)