summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2021-07-03 15:51:10 +0200
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-07-22 08:20:33 +0200
commit7300d0c2391a08d03b69100c454146b578322fa3 (patch)
tree99e0d00d1d5c7ac0bdc1407642559c9a74882b6d /drivers/media/rc
parentmedia: rc-loopback: use dev_dbg() rather than handrolled debug (diff)
downloadlinux-7300d0c2391a08d03b69100c454146b578322fa3.tar.xz
linux-7300d0c2391a08d03b69100c454146b578322fa3.zip
media: rc-loopback: send carrier reports
When carrier reports are enabled, send them over loopback. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/rc-loopback.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/media/rc/rc-loopback.c b/drivers/media/rc/rc-loopback.c
index 5adfbb6989ee..67782dd7ee4d 100644
--- a/drivers/media/rc/rc-loopback.c
+++ b/drivers/media/rc/rc-loopback.c
@@ -111,8 +111,16 @@ static int loop_tx_ir(struct rc_dev *dev, unsigned *txbuf, unsigned count)
for (i = 0; i < count; i++) {
rawir.pulse = i % 2 ? false : true;
rawir.duration = txbuf[i];
- if (rawir.duration)
- ir_raw_event_store_with_filter(dev, &rawir);
+
+ ir_raw_event_store_with_filter(dev, &rawir);
+ }
+
+ if (lodev->carrierreport) {
+ rawir.pulse = false;
+ rawir.carrier_report = true;
+ rawir.carrier = lodev->txcarrier;
+
+ ir_raw_event_store(dev, &rawir);
}
/* Fake a silence long enough to cause us to go idle */