STRUCT IMG_IR_DECODER(9)
π struct img_ir_decoder(9) β the kernel API manual, bestie edition
okay so listen up π«Ά this one's from the Kernel API Manual and it's literally the whole scoop on struct img_ir_decoder β the decoder settings for an IR protocol. yes, that IR. remotes. the lil guy on your couch. let's get into it β¨
β¨ NAME β¨
struct img_ir_decoder β the decoder settings for an IR protocol, periodt π
πΈ SYNOPSIS πΈ
struct img_ir_decoder {
u64 type;
unsigned int tolerance;
unsigned int unit;
struct img_ir_timings timings;
struct img_ir_timings rtimings;
unsigned int repeat;
struct img_ir_control control;
int (*scancode)(int len, u64 raw, u64 enabled_protocols, struct
img_ir_scancode_req *request);
int (*filter)(const struct rc_scancode_filter *in, struct
img_ir_filter *out, u64 protocols);
};
look at her. iconic. a whole struct just vibing there π
π Members π
time for the member-by-member vibe check, iykyk π
typeβ a bitmap of the protocol types. yes, plural, she's multifaceted πtoleranceβ timing tolerance, expressed as a percentage (the default is 10% β she's generous but not too generous).unitβ the unit that timings are measured in, in nanoseconds (default is 1 us, so don't come at her with anything else without reading the docs first).timingsβ the primary timings. the main character timings, if you will βrtimingsβ additional override timings, used while she's waiting for repeats. like a special little outfit change π₯repeatβ the maximum repeat interval (always in milliseconds β not nanoseconds, not vibes, milliseconds π).controlβ the control flags.scancodeβ a pointer to a function that converts the IR data into a scancode. and listen β it must be safe to execute in interrupt context π that's not optional, that's the rule. she returnsIMG_IR_SCANCODEto emit a new scancode, returnsIMG_IR_REPEATCODEto repeat the previous code, and returns-errno(e.g.-EINVAL) on error. so like, three whole moods πfilterβ a pointer to a function that converts a scancode filter into a raw hardware filter. heads up: theminlenandmaxlenfields will have already been initialised to the maximum range before your function even gets to peek at them π
π¦ SEE ALSO π¦
go read these next, bestie, they're all in the family π«Ά β the kernel file ./drivers/media/rc/img-ir/img-ir-hw.h, plus:
struct img_ir_control(9)struct img_ir_timing_range(9)struct img_ir_symbol_timing(9)struct img_ir_free_timing(9)struct img_ir_timings(9)struct img_ir_filter(9)struct img_ir_timing_regvals(9)struct img_ir_scancode_req(9)struct img_ir_reg_timings(9)struct img_ir_priv_hw(9)
and that's the whole page, no notes π this lil beauty ships out of ./drivers/media/rc/img-ir and the manual's dated October 2026 β go off, king πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms