From patchwork Sun Nov 4 20:57:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Valentin X-Patchwork-Id: 10667163 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 69F531591 for ; Sun, 4 Nov 2018 20:57:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4932C2963C for ; Sun, 4 Nov 2018 20:57:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3629F29642; Sun, 4 Nov 2018 20:57:55 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,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 C75E82963C for ; Sun, 4 Nov 2018 20:57:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726186AbeKEGOM (ORCPT ); Mon, 5 Nov 2018 01:14:12 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:38346 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726012AbeKEGOL (ORCPT ); Mon, 5 Nov 2018 01:14:11 -0500 Received: by mail-ed1-f67.google.com with SMTP id a2-v6so1261066edi.5 for ; Sun, 04 Nov 2018 12:57:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=tbzK17XG58kQQgHL0TyZOwuT8fA6+FEwmkqxXWqwLRo=; b=FwbTAL0mvV5YX6SldJ2O6KsVRX1ZLyo1TYItREVxiHCXYd6z5ersi2uXbLsLoR/qB6 6jklxbuCWrWWdHJIMQ2PfDWkJE+QplPWAet2FBkMd7VNRnawAQyj1TUA+0KgXKerXmHq bLb3cfwoznQM6qA6Ydt3YaqxjlTyW+kU88L+9g2TE8W+8YHVRndlULuNelz8zPCHPBqK HTt9/YIHVB+Kuf767RwgQuj3hU2bstj3ZMuM0s73nf4az2gagvBGkmTexT4g/2WaUHSd D88yDP5J9woLuG2UHfXMJR/58c4E+VshS3/wyXfiQbDB3Ism5mMeQMdoZg3HG4OtE98H bk0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=tbzK17XG58kQQgHL0TyZOwuT8fA6+FEwmkqxXWqwLRo=; b=eG5uIkl2y39lskLwotKrSY4BTFlhTHaZqv0kFnlLyIAO1uwi1Gkvbk+fjnZrhigqmM kLzds2c8XPIGl9OfqM63Ewkbd4ZGaqF6HyEF2+du8Eri6uR1GVdcsYM+abQkCuWy7XaL uWmjIzggw5X/Jy/k9pYofAnuoStRZGOL4BPJl++mutbpDyt8ul88CAodmCfO4jNOb38s JHPW5vKqR65SQFo2qLCM8fRKASkZO/2aZNMPos05kIJ6Kw2HJePenAFP9iSCm4TWhlzZ P3YHenILuDByXTmeAFsx9zIMUX6/BAhfgbSfMtf9GpgY+Ec1b4JV5Rs5Ps/QAk53aRPb oIaw== X-Gm-Message-State: AGRZ1gJWWMUfWp8TB0NKs7spd2vFyT4Ml3dy/8RwtvDcOns+U7hq5fnJ 1eJ8PEXi3IobkO8YlhtyP0k= X-Google-Smtp-Source: AJdET5eQmpnsnL9dz/uloDr/2dJxbCSOiaHOAZPqiIOzOyIXSLurxYb68CJJb7dQKW1t5GCYIqHCVg== X-Received: by 2002:aa7:d0d2:: with SMTP id u18-v6mr6367778edo.158.1541365071295; Sun, 04 Nov 2018 12:57:51 -0800 (PST) Received: from rechenknecht2k11 (200116b840328e00b1531d7d30416796.dip.versatel-1u1.de. [2001:16b8:4032:8e00:b153:1d7d:3041:6796]) by smtp.googlemail.com with ESMTPSA id w8-v6sm7230397edh.12.2018.11.04.12.57.50 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 04 Nov 2018 12:57:51 -0800 (PST) Date: Sun, 4 Nov 2018 21:57:46 +0100 From: Benjamin Valentin To: Sean Young , Mauro Carvalho Chehab , linux-media@vger.kernel.org Subject: [RFC] [PATCH] media: rc: Improve responsiveness of Xbox DVD Remote Message-ID: <20181104215746.113942a9@rechenknecht2k11> X-Mailer: Claws Mail 3.17.1 (GTK+ 2.24.32; x86_64-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 X-Virus-Scanned: ClamAV using ClamSMTP The Xbox DVD Remote feels somewhat sluggish, pressing a button repeatedly is sometimes interpreted as it being kept pressed down. It seems like the RC subsystem is doing some incorrect heuristics when in fact the data that comes from the device is already pretty clean. When looking at rc_keydown(), the timeout parameter for a keypress seems to be relevant here. And indeed changing it from the default value of 125000000 to something lower improves situation greatly. I'm not sure what the 'correct' value is here - even just setting it to 0 works fine and might even be the proper thing to do as the receiver dongle seems to do some filtering on it's own? --- drivers/media/rc/xbox_remote.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/rc/xbox_remote.c b/drivers/media/rc/xbox_remote.c index 07ed9be24a60..496f1394216d 100644 --- a/drivers/media/rc/xbox_remote.c +++ b/drivers/media/rc/xbox_remote.c @@ -157,6 +157,8 @@ static void xbox_remote_rc_init(struct xbox_remote *xbox_remote) rdev->device_name = xbox_remote->rc_name; rdev->input_phys = xbox_remote->rc_phys; + rdev->timeout = 1000; + usb_to_input_id(xbox_remote->udev, &rdev->input_id); rdev->dev.parent = &xbox_remote->interface->dev; }