aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/ir-mce_kbd-decoder.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2018-01-05 13:38:43 +0000
committerSean Young <sean@mess.org>2018-01-05 15:13:15 +0000
commit6dc84d93e557c787ae74a808d93a8493f85a7800 (patch)
treea52f366fdb969d6a8d442cb3781b3cd6fe88bb34 /drivers/media/rc/ir-mce_kbd-decoder.c
parent3da4f8704df6a4959687b916ecfcbfcf3ab306d1 (diff)
media: rc: do not remove first bit if leader pulse is presentfor-v4.16c
The rc5 protocol does not have a leading pulse or space, but we encode the first bit using a single leading pulse. For other protocols, the leading pulse or space does not represent any bit. So, don't remove the first bit if a leading pulse is present. Cc: Antti Seppälä <a.seppala@gmail.com> Signed-off-by: Sean Young <sean@mess.org>
Diffstat (limited to 'drivers/media/rc/ir-mce_kbd-decoder.c')
-rw-r--r--drivers/media/rc/ir-mce_kbd-decoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c
index 2a279b3b9c0a..2c3df02e05ff 100644
--- a/drivers/media/rc/ir-mce_kbd-decoder.c
+++ b/drivers/media/rc/ir-mce_kbd-decoder.c
@@ -452,11 +452,11 @@ static int ir_mce_kbd_encode(enum rc_proto protocol, u32 scancode,
if (protocol == RC_PROTO_MCIR2_KBD) {
raw = scancode |
((u64)MCIR2_KEYBOARD_HEADER << MCIR2_KEYBOARD_NBITS);
- len = MCIR2_KEYBOARD_NBITS + MCIR2_HEADER_NBITS + 1;
+ len = MCIR2_KEYBOARD_NBITS + MCIR2_HEADER_NBITS;
} else {
raw = scancode |
((u64)MCIR2_MOUSE_HEADER << MCIR2_MOUSE_NBITS);
- len = MCIR2_MOUSE_NBITS + MCIR2_HEADER_NBITS + 1;
+ len = MCIR2_MOUSE_NBITS + MCIR2_HEADER_NBITS;
}
ret = ir_raw_gen_manchester(&e, max, &ir_mce_kbd_timings, len, raw);

Privacy Policy