Skip to contentSkip to conversation

FAILED: patch "[PATCH] media: lirc: LIRC_GET_REC_RESOLUTION should return" failed to apply to 4.4-stable tree

PATCH [email protected] 2 participants 3 messages Aug 7, 2017 – Aug 8, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 9f5039ba440e499d85c29b1ddbc3cbc9dc90e44b Mon Sep 17 00:00:00 2001

From: Sean Young <[email protected]>
Date: Fri, 7 Jul 2017 18:49:18 -0300
Subject: [PATCH] media: lirc: LIRC_GET_REC_RESOLUTION should return
microseconds

Since commit e8f4818895b3 ("[media] lirc: advertise LIRC_CAN_GET_REC_RESOLUTION and improve") lircd uses the ioctl LIRC_GET_REC_RESOLUTION to determine the shortest pulse or space that the hardware can detect. This breaks decoding in lirc because lircd expects the answer in microseconds, but nanoseconds is returned.

drivers/media/rc/ir-lirc-codec.c +1 -1
index a30af91710fe..d2223c04e9ad 100644
@@ -266,7 +266,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
 		if (!dev->rx_resolution)
 			return -ENOTTY;
 
-		val = dev->rx_resolution;
+		val = dev->rx_resolution / 1000;
 		break;
 
 	case LIRC_SET_WIDEBAND_RECEIVER:
maintainer Tested-by Derek
#1 lore raw
Quoted 1 line

From dfd1bd8275a6287068fda370ac49a8549e660674 Mon Sep 17 00:00:00 2001

From: Sean Young <[email protected]>
Date: Fri, 7 Jul 2017 18:49:18 -0300
Subject: [PATCH] media: lirc: LIRC_GET_REC_RESOLUTION should return
microseconds

Since commit e8f4818895b3 ("[media] lirc: advertise LIRC_CAN_GET_REC_RESOLUTION and improve") lircd uses the ioctl LIRC_GET_REC_RESOLUTION to determine the shortest pulse or space that the hardware can detect. This breaks decoding in lirc because lircd expects the answer in microseconds, but nanoseconds is returned.

---
 drivers/media/rc/ir-lirc-codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/ir-lirc-codec.c +1 -1
index a32659fcd266..efc21b1da211 100644
@@ -254,7 +254,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
 		return 0;
 
 	case LIRC_GET_REC_RESOLUTION:
-		val = dev->rx_resolution;
+		val = dev->rx_resolution / 1000;
 		break;
 
 	case LIRC_SET_WIDEBAND_RECEIVER:
Signature · 1 line
2.11.0
Quoted 43 lines · On Mon, Aug 07, 2017 at 03:14:20PM -0700, [email protected] wrote:

The patch below does not apply to the 4.4-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

Quoted 1 line

From 9f5039ba440e499d85c29b1ddbc3cbc9dc90e44b Mon Sep 17 00:00:00 2001

From: Sean Young <[email protected]>
Date: Fri, 7 Jul 2017 18:49:18 -0300
Subject: [PATCH] media: lirc: LIRC_GET_REC_RESOLUTION should return
microseconds

Since commit e8f4818895b3 ("[media] lirc: advertise LIRC_CAN_GET_REC_RESOLUTION and improve") lircd uses the ioctl LIRC_GET_REC_RESOLUTION to determine the shortest pulse or space that the hardware can detect. This breaks decoding in lirc because lircd expects the answer in microseconds, but nanoseconds is returned.

drivers/media/rc/ir-lirc-codec.c +1 -1
index a30af91710fe..d2223c04e9ad 100644
@@ -266,7 +266,7 @@ static long ir_lirc_ioctl(struct file *filep, unsigned int cmd,
 		if (!dev->rx_resolution)
 			return -ENOTTY;
 
-		val = dev->rx_resolution;
+		val = dev->rx_resolution / 1000;
 		break;
 
 	case LIRC_SET_WIDEBAND_RECEIVER:
author maintainer
#2 lore raw
Quoted 12 lines · Sean Young
Quoted 1 line

From dfd1bd8275a6287068fda370ac49a8549e660674 Mon Sep 17 00:00:00 2001

From: Sean Young <[email protected]>
Date: Fri, 7 Jul 2017 18:49:18 -0300
Subject: [PATCH] media: lirc: LIRC_GET_REC_RESOLUTION should return
microseconds

Since commit e8f4818895b3 ("[media] lirc: advertise LIRC_CAN_GET_REC_RESOLUTION and improve") lircd uses the ioctl LIRC_GET_REC_RESOLUTION to determine the shortest pulse or space that the hardware can detect. This breaks decoding in lirc because lircd expects the answer in microseconds, but nanoseconds is returned.

Quoted 8 lines
---
 drivers/media/rc/ir-lirc-codec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Thanks for the 2 backports, now applied.

greg k-h