summaryrefslogtreecommitdiff
path: root/drivers/media/rc/rc-core-priv.h
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2016-12-06 18:33:57 -0200
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2017-01-30 13:54:54 -0200
commit103293be9d23de8347fc2e5aecd06f8962d18154 (patch)
treeaef55f3c9d26081cc01cbf33f518c9d52cd97600 /drivers/media/rc/rc-core-priv.h
parentd35afc5fe0971bd1d40c824bd3c7587aeda823b2 (diff)
[media] rc: ir-sony-decoder: Add encode capability
Add the capability to encode Sony scancodes as raw events. Sony uses pulse length rather than pulse distance. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/rc-core-priv.h')
-rw-r--r--drivers/media/rc/rc-core-priv.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/media/rc/rc-core-priv.h b/drivers/media/rc/rc-core-priv.h
index 2471a3ccf931..a70a5c557434 100644
--- a/drivers/media/rc/rc-core-priv.h
+++ b/drivers/media/rc/rc-core-priv.h
@@ -239,6 +239,26 @@ int ir_raw_gen_pd(struct ir_raw_event **ev, unsigned int max,
const struct ir_raw_timings_pd *timings,
unsigned int n, u64 data);
+/**
+ * struct ir_raw_timings_pl - pulse-length modulation timings
+ * @header_pulse: duration of header pulse in ns (0 for none)
+ * @bit_space: duration of bit space in ns
+ * @bit_pulse: duration of bit pulse (for logic 0 and 1) in ns
+ * @trailer_space: duration of trailer space in ns
+ * @msb_first: 1 if most significant bit is sent first
+ */
+struct ir_raw_timings_pl {
+ unsigned int header_pulse;
+ unsigned int bit_space;
+ unsigned int bit_pulse[2];
+ unsigned int trailer_space;
+ unsigned int msb_first:1;
+};
+
+int ir_raw_gen_pl(struct ir_raw_event **ev, unsigned int max,
+ const struct ir_raw_timings_pl *timings,
+ unsigned int n, u64 data);
+
/*
* Routines from rc-raw.c to be used internally and by decoders
*/