summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/ir-rc5-decoder.c
diff options
context:
space:
mode:
authorSean Young2016-12-02 18:16:13 +0100
committerMauro Carvalho Chehab2017-01-30 15:09:38 +0100
commitfd844d905d1ba13326f59835f77a4827076fdcac (patch)
tree433333fe5101c6162d9b46995e1e1344c12f5a04 /drivers/media/rc/ir-rc5-decoder.c
parent[media] rc: allow software timeout to be set (diff)
downloadkernel-qcow2-linux-fd844d905d1ba13326f59835f77a4827076fdcac.tar.gz
kernel-qcow2-linux-fd844d905d1ba13326f59835f77a4827076fdcac.tar.xz
kernel-qcow2-linux-fd844d905d1ba13326f59835f77a4827076fdcac.zip
[media] rc5x: 6th command bit is S2 bit
The 2nd stop bit in rc5 is reused as an inverted 6th command bit in 20 bits rc5x. Currently the rc5x decoder sets the 6th command bit as an inverted duplicate of the lowest system bit; as a result we do not have all the command bits. Note that there are no rc5x keymaps present. Signed-off-by: Sean Young <sean@mess.org> Cc: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/ir-rc5-decoder.c')
-rw-r--r--drivers/media/rc/ir-rc5-decoder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/rc/ir-rc5-decoder.c b/drivers/media/rc/ir-rc5-decoder.c
index a0fd4e6b2155..a95477cb486d 100644
--- a/drivers/media/rc/ir-rc5-decoder.c
+++ b/drivers/media/rc/ir-rc5-decoder.c
@@ -132,7 +132,7 @@ again:
command = (data->bits & 0x00FC0) >> 6;
system = (data->bits & 0x1F000) >> 12;
toggle = (data->bits & 0x20000) ? 1 : 0;
- command += (data->bits & 0x01000) ? 0 : 0x40;
+ command += (data->bits & 0x40000) ? 0 : 0x40;
scancode = system << 16 | command << 8 | xdata;
protocol = RC_TYPE_RC5X;