Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] Fix RC5 decoding with Fintek CIR chipset

Fix RC5 decoding with Fintek CIR chipset

Commit e87b540be2dd02552fb9244d50ae8b4e4619a34b tightened up the RC5
decoding by adding a check for trailing silence to ensure a valid RC5
command had been received. Unfortunately the trailer length checked was
10 units and the Fintek CIR device does not want to provide details of a
space longer than 6350us. This meant that RC5 remotes working on a
Fintek setup on 3.16 failed on 3.17 and later. Fix this by shortening
the trailer check to 6 units (allowing for a previous space in the
received remote command).

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=117221

Signed-off-by: Jonathan McDowell <noodles@earth.li>
Cc: stable@vger.kernel.org
Signed-off-by: David Härdeman <david@hardeman.nu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Jonathan McDowell and committed by
Mauro Carvalho Chehab
bbdb34c9 ca6e6126

+1 -1
+1 -1
drivers/media/rc/ir-rc5-decoder.c
··· 29 29 #define RC5_BIT_START (1 * RC5_UNIT) 30 30 #define RC5_BIT_END (1 * RC5_UNIT) 31 31 #define RC5X_SPACE (4 * RC5_UNIT) 32 - #define RC5_TRAILER (10 * RC5_UNIT) /* In reality, approx 100 */ 32 + #define RC5_TRAILER (6 * RC5_UNIT) /* In reality, approx 100 */ 33 33 34 34 enum rc5_state { 35 35 STATE_INACTIVE,