media: rc: per-protocol repeat period and minimum keyup timer

Each IR protocol has its own repeat period. We can minimise the keyup
timer to be the protocol period + IR timeout. This makes keys less
"sticky" and makes IR more reactive and nicer to use.

This feature was previously attempted in commit d57ea877af ("media: rc:
per-protocol repeat period"), but that did not take the IR timeout into
account, and had to be reverted.

Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This commit is contained in:
Sean Young
2018-03-24 08:02:48 -04:00
committed by Mauro Carvalho Chehab
parent 95d1544eb6
commit 284922562b
3 changed files with 31 additions and 29 deletions

View File

@@ -583,7 +583,7 @@ static long ir_lirc_ioctl(struct file *file, unsigned int cmd,
break;
case LIRC_SET_REC_TIMEOUT_REPORTS:
if (!dev->timeout)
if (dev->driver_type != RC_DRIVER_IR_RAW)
ret = -ENOTTY;
else
fh->send_timeout_reports = !!val;