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>
This commit is contained in:

committed by
Mauro Carvalho Chehab

parent
ddf9c1bb3d
commit
80008ddbed
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user