Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1579666pxb; Mon, 13 Sep 2021 00:27:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgxBDcLO8dCz2LdLiqKa0HZZs5JbNqxFqlbsfNDPpCh3gIZPPgte8mNkZCB2FTvqVsvIrN X-Received: by 2002:a5e:9819:: with SMTP id s25mr8150269ioj.63.1631518074206; Mon, 13 Sep 2021 00:27:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631518074; cv=none; d=google.com; s=arc-20160816; b=EUdYX5i6GdMCMXsf7ZzSxa1H1E1pMW6zfXJ3ww/0QpmUEMVJ+SEnjsnvfHdeuRyEMc HYiNECHiHxuwYz3seCa9MZLS8DgyZ1Py1f/LzvBi5XBySylDsMsLlr1olKSB9HCuRe8L 5TOSws8i3bXPEGKvqc7B5NlvQAQ1DNzinuSQldiOqG8P8EGU+fsreyHerxf0db1yPHAl arMtYDmSk2fBigzMAIvEI9Rqv6K9vrQJsGsFaQxgltp1hsFLRoqra37FYl7EiInvUOCO AflrUQuLYTgA2KV2b4GdhJ8LTpzrz9lWL7iTVMj+YrfL4o0eDSesczaDI3Mf4d4xRzYe LMmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=FGLtlzqpYZJgxnPJcY3r/UfDQdaRw5ynKMrYtYfuL1o=; b=t/duXLPYLsN4rjcx3TGlSi0wpzpXKsc5i8DJyUP2G8PJr2Zux43HeEibuyhB93TJhR tlQiBaSdO/FMe5Z1XUGKfnyXORMFRCvAloQzjFSePMIbRDKUIHaAPvJbI3CnqRV4l0LF V3ECssrhmLCLt2tK6TOR0piZLrLXRMXjw8wkbFXf73CKg77+9ZBtMOzkkgtQLrwMAxB6 hcvL9lW/MZ7DNSkl58CCd2/jsr2anAORANKc4HiGB4FxgRKSVY76rh9BmcaYH5O0aOkb bFDazq2ks9nSeUE06kjzgjREb6/XJEplBDpDBnhWYuX4QM0Bg2xmUIrecjiIH/Sahb6/ zeiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mess.org header.s=2020 header.b=VpAx3H7N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h13si6328622ila.73.2021.09.13.00.27.42; Mon, 13 Sep 2021 00:27:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@mess.org header.s=2020 header.b=VpAx3H7N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237622AbhIMH2H (ORCPT + 99 others); Mon, 13 Sep 2021 03:28:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60946 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237561AbhIMH2G (ORCPT ); Mon, 13 Sep 2021 03:28:06 -0400 Received: from gofer.mess.org (gofer.mess.org [IPv6:2a02:8011:d000:212::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB449C061574; Mon, 13 Sep 2021 00:26:50 -0700 (PDT) Received: by gofer.mess.org (Postfix, from userid 1000) id 31A49C6050; Mon, 13 Sep 2021 08:26:49 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mess.org; s=2020; t=1631518009; bh=qS2vbOcvUK+v/bTcb/OiamyjIe5gw+PCQXTQRWWRAo0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=VpAx3H7NmEOsBiTVBzp91UvXgVzpEHGMrlCGx4wG9KZR2juVXyZHxaWoXiLNPfcgL xkt2qHm+7qQmMVyKGD1mA5gKN6xZehIWik4IGk5cCiW9Kj7ZvZaUriLxPu698cEHTy BGekNkFVue1KS7V0/hfiW6PG05+YiKcCt9/SYR7+XIXXv2YP67csQ6pwc0d95Fnink LtXUugTPV4c0Edy3QN9MNtMToOJXIp9IWHnX7tTVMzOTxf3pyQsq6GLWYjpzdAuCn4 QkCYSH5YqiE1ZHdtjvZZLr4dvQSIWEbJemBOHTZQmtRWawGXbG33BDHTYg23UJkhga esAfHTmhct9yw== Date: Mon, 13 Sep 2021 08:26:49 +0100 From: Sean Young To: =?iso-8859-1?Q?Joaqu=EDn_Alberto_Calder=F3n?= Pozo Cc: "mchehab@kernel.org" , "christophe.jaillet@wanadoo.fr" , "linux-media@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: linux-image-5.10.0-8-amd64: Hauppauge WinTV-HVR1110 DVB-T/Hybrid bug 125 ms polling on ir-kbd-i2c.ko bad DEFAULT_POLLING_INTERVAL Message-ID: <20210913072649.GB2393@gofer.mess.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 12, 2021 at 10:15:31PM +0000, Joaqu?n Alberto Calder?n Pozo wrote: > Mantainers of the ir-kbd-i2c, althought I sent it to the debian bug report team, I consider to sent you also this patch (if it's the right way) to solve this bug. > > Thanks > > Package: src:linux > X-Debbugs-Cc: kini_calderon@hotmail.com > Version: 5.10.46-4 > Severity: important > Tags: patch > > Although I have a very old pci (not express) Hauppauge WinTV-HVR1110 DVB-T/Hybrid TV card with a remote control, I am still using it because has fully support and functionallity and it's hardware capable of play DVB-T HD streams. > > It has a very strange behaviour: > > -One is it has a slow response when I push a key, has a delay, and sometimes even no key response, nothing happens, as if never push a key. > -Other is when you hold a key, it start to begin the repeat key (characters like numerical) appears in the test app (kwrite) then, has a pause, stops to write characters, and begin the sequence again, writes some sequence, then stops... and so on. Even I noticed the repeat speed is a bit slow, compared to a keyboard key hold on. > > So... I began to investigates the causes and after two weeks of research, searchs on the web, I found the module affected and a solution. > > The module affected is ir-kbd-i2c.ko, this remote (rc5 protocol) uses this module as uinput (devinput) device, in resume as like an attatched keyboard. Resulting investigation in get noticed that this remote with rc5 protocol has 8hz of time frame when receiving the air gap code (rc5 procotol timing). > > Investigating the sources files in the kernel sources for try and fall, re-compiling the modules, get me to get noticed that the polling ir remote interval is 100ms which is 5hz, forcing this value to 125ms, re-compiling the module causes the remote to work normally as expecte, the response is like a real keyboard and the repeat sequence not only as speedy as a normal keyboard, but also hasn't got a pause in repetition. In resume, the problem is solved. > > Here is the patch: > > --- ir-kbd-i2c.original.c 2021-09-08 23:45:23.723210301 +0200 > +++ ir-kbd-i2c.hauppauge.patched.c 2021-09-10 03:55:28.003529072 +0200 > @@ -742,7 +742,7 @@ > return -ENOMEM; > > ir->c = client; > - ir->polling_interval = DEFAULT_POLLING_INTERVAL; > + ir->polling_interval = 125; > i2c_set_clientdata(client, ir); > > switch(addr) { > > I am a experienced user, but not an experienced developer, also in editing/submitting bugs, I don't know if this is the right way to solve this, If the rest of brand remotes are affected for my solution, but for me, solved my problem in this particular case. > > I don't know where the value DEFAULT_POLLING_INTERVAL is get stablished or a way when detect a Hauppauge WinTV-HVR1110 DVB-T/Hybrid TV card to stablish 125ms instead of 100ms. As I said, I'm not an expert but experienced user. This change looks right to me, but it needs some changes: - The change needs to be made Hauppauge/Zilog specific by adding a line under the "case 0x71:" line below which sets the polling interval to 125. - The patch should be against current media kernel, not 5.10 - Follow https://www.kernel.org/doc/html/latest/process/submitting-patches.html - Add "Cc: stable@vger.kernel.org" and the patch will trickle down into 5.10. Thanks Sean > > I don't know if this is the right package to post this bug. Thanks. > > --- ir-kbd-i2c.original.c 2021-09-08 23:45:23.723210301 +0200 > +++ ir-kbd-i2c.hauppauge.patched.c 2021-09-10 03:55:28.003529072 +0200 > @@ -742,7 +742,7 @@ > return -ENOMEM; > > ir->c = client; > - ir->polling_interval = DEFAULT_POLLING_INTERVAL; > + ir->polling_interval = 125; > i2c_set_clientdata(client, ir); > > switch(addr) {