aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/lirc_dev.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2022-01-15 11:19:11 +0100
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-01-28 19:32:50 +0100
commit68a99f6a0ebfe9101ea79ba5af1c407a5ad4f629 (patch)
treeb69aadd1e508be6ab565b8da568edc3e812e8484 /drivers/media/rc/lirc_dev.c
parentmedia: rc-core: rename ir_raw_event_reset to ir_raw_event_overflow (diff)
downloadlinux-dev-68a99f6a0ebfe9101ea79ba5af1c407a5ad4f629.tar.xz
linux-dev-68a99f6a0ebfe9101ea79ba5af1c407a5ad4f629.zip
media: lirc: report ir receiver overflow
If the driver reports that the hardware had an overflow, report this to userspace. It would be nice to know when this happens, and not just get a long space. This change has been tested with lircd, ir-ctl, and ir-keytable. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/rc/lirc_dev.c')
-rw-r--r--drivers/media/rc/lirc_dev.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/rc/lirc_dev.c b/drivers/media/rc/lirc_dev.c
index fa4671fc92be..765375bda0c6 100644
--- a/drivers/media/rc/lirc_dev.c
+++ b/drivers/media/rc/lirc_dev.c
@@ -44,14 +44,13 @@ void lirc_raw_event(struct rc_dev *dev, struct ir_raw_event ev)
/* Receiver overflow, data missing */
if (ev.overflow) {
/*
- * Userspace expects a long space event before the start of
- * the signal to use as a sync. This may be done with repeat
- * packets and normal samples. But if an overflow has been sent
- * then we assume that a long time has passed, so we send a
- * space with the maximum time value.
+ * Send lirc overflow message. This message is unknown to
+ * lircd, but it will interpret this as a long space as
+ * long as the value is set to high value. This resets its
+ * decoder state.
*/
- sample = LIRC_SPACE(LIRC_VALUE_MASK);
- dev_dbg(&dev->dev, "delivering overflow space to lirc_dev\n");
+ sample = LIRC_OVERFLOW(LIRC_VALUE_MASK);
+ dev_dbg(&dev->dev, "delivering overflow to lirc_dev\n");
/* Carrier reports */
} else if (ev.carrier_report) {