summaryrefslogtreecommitdiffstats
path: root/drivers/media/rc/ir-rc6-decoder.c
diff options
context:
space:
mode:
authorSean Young <sean@mess.org>2018-01-05 08:38:43 -0500
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2018-01-23 07:32:38 -0500
commit80008ddbed83b40d5b745a9bae721b736dd7314c (patch)
treefd6bb283662c629bf0af4a373ef6681660824c4b /drivers/media/rc/ir-rc6-decoder.c
parentddf9c1bb3d2ae24a216237d8195bb31ff632d8e5 (diff)
downloadop-kernel-dev-80008ddbed83b40d5b745a9bae721b736dd7314c.zip
op-kernel-dev-80008ddbed83b40d5b745a9bae721b736dd7314c.tar.gz
media: rc: do not remove first bit if leader pulse is present
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/rc/ir-rc6-decoder.c')
-rw-r--r--drivers/media/rc/ir-rc6-decoder.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/rc/ir-rc6-decoder.c b/drivers/media/rc/ir-rc6-decoder.c
index 422dec0..55bb19b 100644
--- a/drivers/media/rc/ir-rc6-decoder.c
+++ b/drivers/media/rc/ir-rc6-decoder.c
@@ -327,7 +327,7 @@ static int ir_rc6_encode(enum rc_proto protocol, u32 scancode,
/* Modulate the header (Start Bit & Mode-0) */
ret = ir_raw_gen_manchester(&e, max - (e - events),
&ir_rc6_timings[0],
- RC6_HEADER_NBITS + 1, (1 << 3));
+ RC6_HEADER_NBITS, (1 << 3));
if (ret < 0)
return ret;
@@ -365,7 +365,7 @@ static int ir_rc6_encode(enum rc_proto protocol, u32 scancode,
/* Modulate the header (Start Bit & Header-version 6 */
ret = ir_raw_gen_manchester(&e, max - (e - events),
&ir_rc6_timings[0],
- RC6_HEADER_NBITS + 1, (1 << 3 | 6));
+ RC6_HEADER_NBITS, (1 << 3 | 6));
if (ret < 0)
return ret;
OpenPOWER on IntegriCloud