* [PATCH] Make ati_remote button repeat sensitivity soft-configurable
@ 2007-04-04 0:34 Karl Pickett
2007-04-04 2:51 ` Dmitry Torokhov
2007-04-04 7:46 ` Éric Piel
0 siblings, 2 replies; 4+ messages in thread
From: Karl Pickett @ 2007-04-04 0:34 UTC (permalink / raw)
To: linux-kernel, linux-input, dmitry.torokhov
The ati_remote driver is a little too sensitive for my wife... if you
do anything but barely tap the button you can get multiple events
reported. We prefer a more conservative no-repeat setting. This is a
pretty trivial patch which just makes one hard coded value soft
configurable and does not change the default.
--- linux-source-2.6.20/drivers/usb/input/ati_remote.c.kjp
2006-12-07 22:50:56.000000000 -0500
+++ linux-source-2.6.20/drivers/usb/input/ati_remote.c 2007-04-03
20:19:24.000000000 -0400
@@ -119,7 +119,9 @@
* and we have to take this into account for an accurate repeat
* behaviour.
*/
-#define FILTER_TIME 60 /* msec */
+#define FILTER_TIME 60 /* millisec between each repeat */
+
+#define FILTER_MAX 5 /* number of repeats to ignore */
static unsigned long channel_mask;
module_param(channel_mask, ulong, 0644);
@@ -133,6 +135,11 @@
module_param(repeat_filter, int, 0644);
MODULE_PARM_DESC(repeat_filter, "Repeat filter time, default = 60 msec");
+static int repeat_filter_max = FILTER_MAX;
+module_param(repeat_filter_max, int, 0644);
+MODULE_PARM_DESC(repeat_filter_max,
+ "Number of repeats to ignore, default = 5");
+
#define dbginfo(dev, format, arg...) do { if (debug) dev_info(dev ,
format , ## arg); } while (0)
#undef err
#define err(format, arg...) printk(KERN_ERR format , ## arg)
@@ -515,7 +522,7 @@
ati_remote->old_jiffies = jiffies;
if (ati_remote->repeat_count > 0 &&
- ati_remote->repeat_count < 5)
+ ati_remote->repeat_count < repeat_filter_max)
return;
--
Karl Pickett
The most wasted of all days is one without laughter.—E.E. Cummings
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Make ati_remote button repeat sensitivity soft-configurable
2007-04-04 0:34 [PATCH] Make ati_remote button repeat sensitivity soft-configurable Karl Pickett
@ 2007-04-04 2:51 ` Dmitry Torokhov
2007-04-04 7:46 ` Éric Piel
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2007-04-04 2:51 UTC (permalink / raw)
To: Karl Pickett; +Cc: linux-kernel, linux-input
Hi Karl,
On Tuesday 03 April 2007 20:34, Karl Pickett wrote:
> The ati_remote driver is a little too sensitive for my wife... if you
> do anything but barely tap the button you can get multiple events
> reported. We prefer a more conservative no-repeat setting. This is a
> pretty trivial patch which just makes one hard coded value soft
> configurable and does not change the default.
>
Makes sense. Can I please have a Signed-off-by: ... line from you so
I can apply the patch to my tree?
Thanks!
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Make ati_remote button repeat sensitivity soft-configurable
2007-04-04 0:34 [PATCH] Make ati_remote button repeat sensitivity soft-configurable Karl Pickett
2007-04-04 2:51 ` Dmitry Torokhov
@ 2007-04-04 7:46 ` Éric Piel
2007-04-04 8:45 ` Vincent Vanackere
1 sibling, 1 reply; 4+ messages in thread
From: Éric Piel @ 2007-04-04 7:46 UTC (permalink / raw)
To: Karl Pickett; +Cc: linux-kernel, linux-input, dmitry.torokhov
04/04/2007 02:34 AM, Karl Pickett wrote/a écrit:
> The ati_remote driver is a little too sensitive for my wife... if you
> do anything but barely tap the button you can get multiple events
> reported. We prefer a more conservative no-repeat setting. This is a
> pretty trivial patch which just makes one hard coded value soft
> configurable and does not change the default.
This default value is set to 300 ms. On my Xserver, the default value is
660 ms and by default in my distrib it's set to 500 ms. So, indeed, the
default value of the ati_remote is quite small. Maybe you could increase
FILTER_MAX to 10 (= 600 ms) in order to have something saner?
That was my two cents :-)
See you,
Eric
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Make ati_remote button repeat sensitivity soft-configurable
2007-04-04 7:46 ` Éric Piel
@ 2007-04-04 8:45 ` Vincent Vanackere
0 siblings, 0 replies; 4+ messages in thread
From: Vincent Vanackere @ 2007-04-04 8:45 UTC (permalink / raw)
To: Éric Piel; +Cc: Karl Pickett, linux-kernel, linux-input, dmitry.torokhov
On 4/4/07, Éric Piel <Eric.Piel@tremplin-utc.net> wrote:
> This default value is set to 300 ms. On my Xserver, the default value is
> 660 ms and by default in my distrib it's set to 500 ms. So, indeed, the
> default value of the ati_remote is quite small. Maybe you could increase
> FILTER_MAX to 10 (= 600 ms) in order to have something saner?
Well, this value was chosen because it matches what the hardware does
: as explained in the comments, the hardware generates exactly 5
events for the first keypress (spaced by ~50ms if I recall correctly).
At least on my hardware (=> Vendor=0bc7 ProdID=0004 Rev= 1.00), the
current default value match exactly what I'm expecting (never had the
problem : "if you do anything but barely tap the button you can get
multiple events reported").
Just a thought : perhaps some models are more sensitive than others
(and so the default should be made dependent on the exact remote
model)... what is your hardware id ?
Best regards,
Vincent
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-04-04 8:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-04 0:34 [PATCH] Make ati_remote button repeat sensitivity soft-configurable Karl Pickett
2007-04-04 2:51 ` Dmitry Torokhov
2007-04-04 7:46 ` Éric Piel
2007-04-04 8:45 ` Vincent Vanackere
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).