From: Greg Kroah-Hartman Date: Wed, 25 Feb 2015 00:46:58 +0000 (-0800) Subject: 3.14-stable patches X-Git-Tag: v3.14.34~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=08d34f0594fbc60ac7717e26745da53c7ee01862;p=thirdparty%2Fkernel%2Fstable-queue.git 3.14-stable patches added patches: media-rc-send-sync-space-information-on-the-lirc.patch --- diff --git a/queue-3.14/media-rc-send-sync-space-information-on-the-lirc.patch b/queue-3.14/media-rc-send-sync-space-information-on-the-lirc.patch new file mode 100644 index 00000000000..fee7494818b --- /dev/null +++ b/queue-3.14/media-rc-send-sync-space-information-on-the-lirc.patch @@ -0,0 +1,49 @@ +From a8f29e89f2b54fbf2c52be341f149bc195b63a8b Mon Sep 17 00:00:00 2001 +From: Austin Lund +Date: Thu, 24 Jul 2014 07:40:20 -0300 +Subject: [media] media/rc: Send sync space information on the lirc + device + +From: Austin Lund + +commit a8f29e89f2b54fbf2c52be341f149bc195b63a8b upstream. + +Userspace expects to see a long space before the first pulse is sent on +the lirc device. Currently, if a long time has passed and a new packet +is started, the lirc codec just returns and doesn't send anything. This +makes lircd ignore many perfectly valid signals unless they are sent in +quick sucession. When a reset event is delivered, we cannot know +anything about the duration of the space. But it should be safe to +assume it has been a long time and we just set the duration to maximum. + +Signed-off-by: Austin Lund +Signed-off-by: Mauro Carvalho Chehab +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/media/rc/ir-lirc-codec.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/drivers/media/rc/ir-lirc-codec.c ++++ b/drivers/media/rc/ir-lirc-codec.c +@@ -42,11 +42,17 @@ static int ir_lirc_decode(struct rc_dev + 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); + diff --git a/queue-3.14/series b/queue-3.14/series index 80e5c0d1c44..6251b364454 100644 --- a/queue-3.14/series +++ b/queue-3.14/series @@ -14,3 +14,4 @@ tcp-ipv4-initialize-unicast_sock-sk_pacing_rate.patch ipv4-tcp-get-rid-of-ugly-unicast_sock.patch ppp-deflate-never-return-len-larger-than-output-buffer.patch net-sctp-fix-passing-wrong-parameter-header-to-param_type2af-in-sctp_process_param.patch +media-rc-send-sync-space-information-on-the-lirc.patch