Commit d2a74581 authored by David Härdeman's avatar David Härdeman Committed by Mauro Carvalho Chehab

[media] rc-core: fix toggle handling in the rc6 decoder

The toggle bit shouldn't be cleared before the toggle value is calculated.

This should probably go into 3.17.x as well.

Fixes: 120703f9 ([media] rc-core: document the protocol type)

Cc: stable@vger.kernel.org # For v3.17
Tested-by: default avatarStephan Raue <mailinglists@openelec.tv>
Signed-off-by: default avatarDavid Härdeman <david@hardeman.nu>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent 009a5410
...@@ -259,8 +259,8 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev) ...@@ -259,8 +259,8 @@ static int ir_rc6_decode(struct rc_dev *dev, struct ir_raw_event ev)
case 32: case 32:
if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) { if ((scancode & RC6_6A_LCC_MASK) == RC6_6A_MCE_CC) {
protocol = RC_TYPE_RC6_MCE; protocol = RC_TYPE_RC6_MCE;
scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK); toggle = !!(scancode & RC6_6A_MCE_TOGGLE_MASK);
scancode &= ~RC6_6A_MCE_TOGGLE_MASK;
} else { } else {
protocol = RC_BIT_RC6_6A_32; protocol = RC_BIT_RC6_6A_32;
toggle = 0; toggle = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment