Skip to content

Commit

Permalink
[media] Use a more consistent value for RC repeat period
Browse files Browse the repository at this point in the history
The default REP_PERIOD is 33 ms. This doesn't make sense for IR's,
as, in general, an IR repeat scancode is provided at every 110/115ms,
depending on the RC protocol. So, increase its default, to do a
better job avoiding ghost repeat events.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Jarod Wilson <jarod@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed May 20, 2011
1 parent 612031c commit ca540c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/media/rc/rc-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,13 @@ int rc_register_device(struct rc_dev *dev)
*/
dev->input_dev->rep[REP_DELAY] = 500;

/*
* As a repeat event on protocols like RC-5 and NEC take as long as
* 110/114ms, using 33ms as a repeat period is not the right thing
* to do.
*/
dev->input_dev->rep[REP_PERIOD] = 125;

path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL);
printk(KERN_INFO "%s: %s as %s\n",
dev_name(&dev->dev),
Expand Down

0 comments on commit ca540c8

Please sign in to comment.