Skip to contentSkip to conversation

rc5x: 6th command bit is S2 bit

PATCH In review Sean Young 1 participant 1 message Dec 2, 2016

Subsystems (2)
lore
Share & tools
lore

Sean Young

author maintainer
#0 lore raw

PATCH 7/8 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.

Cc David Härdeman <[email protected]>
---
 drivers/media/rc/ir-rc5-decoder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/rc/ir-rc5-decoder.c +1 -1
index a0fd4e6..a95477c 100644
@@ -132,7 +132,7 @@ static int ir_rc5_decode(struct rc_dev *dev, struct ir_raw_event ev)
 			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;
 
Signature · 1 line
2.9.3