aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2011-04-28 15:13:32 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-04 14:29:50 (GMT)
commita854f337dcf22cc009ab053552f7393553bc1295 (patch)
tree746645dabb05d546495612e8dbdf1f45514ec0c3
parent2e655e84cddc8c2fa3ddc672841d6c06fad2ebf5 (diff)
[media] rc-core: add trailing silence in rc-loopback tx
If an IR command is sent (using the LIRC userspace) to rc-loopback which doesn't include a trailing space, the result is that the message won't be completely decoded. In addition, "leftovers" from a previous transmission can be left until the next one. Fix this by faking a long silence after the end of TX data. Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/rc/rc-loopback.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/rc/rc-loopback.c b/drivers/media/rc/rc-loopback.c
index 49cee61..cc846b2 100644
--- a/drivers/media/rc/rc-loopback.c
+++ b/drivers/media/rc/rc-loopback.c
@@ -146,6 +146,12 @@ static int loop_tx_ir(struct rc_dev *dev, int *txbuf, u32 n)
if (rawir.duration)
ir_raw_event_store_with_filter(dev, &rawir);
}
+
+ /* Fake a silence long enough to cause us to go idle */
+ rawir.pulse = false;
+ rawir.duration = dev->timeout;
+ ir_raw_event_store_with_filter(dev, &rawir);
+
ir_raw_event_handle(dev);
out:

Privacy Policy