aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2011-04-28 11:13:32 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 08:29:53 -0400
commit08ffff9fa410916f1847aff831206465cefa924f (patch)
tree04668c458baf54d42e8d20ed0947d1960f18ba72 /drivers/media/rc
parentc829f2672f312f2c19dc021b233a45d3dd850a4f (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>
Diffstat (limited to 'drivers/media/rc')
-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 49cee61d79c6..cc846b2619cf 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)
146 if (rawir.duration) 146 if (rawir.duration)
147 ir_raw_event_store_with_filter(dev, &rawir); 147 ir_raw_event_store_with_filter(dev, &rawir);
148 } 148 }
149
150 /* Fake a silence long enough to cause us to go idle */
151 rawir.pulse = false;
152 rawir.duration = dev->timeout;
153 ir_raw_event_store_with_filter(dev, &rawir);
154
149 ir_raw_event_handle(dev); 155 ir_raw_event_handle(dev);
150 156
151out: 157out: