Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

media: lirc: increase IR_MAX_DURATION to send extended code sequences

sensor:increase IR_MAX_DURATION to 1000ms
to fix long IR remote timeouts Certain infrared remotes
(e.g., brand-specific smart home remotes, custom consumer electronics)
send extended code sequences that exceed the default 500ms
IR_MAX_DURATION threshold. This causes the kernel's raw
IR driver to discard incomplete code, resulting in unrecognized commands.

Increase IR_MAX_DURATION to 1000ms:
- Aligns with common extended IR protocol specs
(most long sequences use 700-900ms)
- No impact on standard remotes
(all mainstream IR codes are <500ms)
- Validated on vivo X200 and vivo X300,
resolves timeout issues without regressions

Signed-off-by: LiPeng Huang <huanglipeng@vivo.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>

authored by

LiPeng Huang and committed by
Hans Verkuil
a93a51f4 1f03894b

+3 -3
+2 -2
drivers/media/rc/gpio-ir-tx.c
··· 51 51 static void delay_until(ktime_t until) 52 52 { 53 53 /* 54 - * delta should never exceed 0.5 seconds (IR_MAX_DURATION) and on 54 + * delta should never exceed 1 second (IR_MAX_DURATION) and on 55 55 * m68k ndelay(s64) does not compile; so use s32 rather than s64. 56 56 */ 57 57 s32 delta; ··· 95 95 { 96 96 ktime_t edge; 97 97 /* 98 - * delta should never exceed 0.5 seconds (IR_MAX_DURATION) and on 98 + * delta should never exceed 1 second (IR_MAX_DURATION) and on 99 99 * m68k ndelay(s64) does not compile; so use s32 rather than s64. 100 100 */ 101 101 s32 delta;
+1 -1
include/media/rc-core.h
··· 301 301 302 302 #define US_TO_NS(usec) ((usec) * 1000) 303 303 #define MS_TO_US(msec) ((msec) * 1000) 304 - #define IR_MAX_DURATION MS_TO_US(500) 304 + #define IR_MAX_DURATION MS_TO_US(1000) 305 305 #define IR_DEFAULT_TIMEOUT MS_TO_US(125) 306 306 #define IR_MAX_TIMEOUT LIRC_VALUE_MASK 307 307