提交 08ffff9f 编写于 作者: D David Härdeman 提交者: Mauro Carvalho Chehab

[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: NDavid Härdeman <david@hardeman.nu>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 c829f267
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册