|
@@ -42,11 +42,17 @@ static int ir_lirc_decode(struct rc_dev *dev, struct ir_raw_event ev)
|
|
|
return -EINVAL;
|
|
|
|
|
|
/* Packet start */
|
|
|
- if (ev.reset)
|
|
|
- return 0;
|
|
|
+ if (ev.reset) {
|
|
|
+ /* Userspace expects a long space event before the start of
|
|
|
+ * the signal to use as a sync. This may be done with repeat
|
|
|
+ * packets and normal samples. But if a reset has been sent
|
|
|
+ * then we assume that a long time has passed, so we send a
|
|
|
+ * space with the maximum time value. */
|
|
|
+ sample = LIRC_SPACE(LIRC_VALUE_MASK);
|
|
|
+ IR_dprintk(2, "delivering reset sync space to lirc_dev\n");
|
|
|
|
|
|
/* Carrier reports */
|
|
|
- if (ev.carrier_report) {
|
|
|
+ } else if (ev.carrier_report) {
|
|
|
sample = LIRC_FREQUENCY(ev.carrier);
|
|
|
IR_dprintk(2, "carrier report (freq: %d)\n", sample);
|
|
|
|