STRUCT MESON_IR_PROTOCOL(9)
π struct meson_ir_protocol(9) π
okay bestie so we're in the Kernel API Manual rn β yes, that Kernel API Manual β and today's main character is struct meson_ir_protocol, which is literally the glow-up blueprint for describing your IR Protocol parameters. no cap, it's giving "config struct that knows exactly what it wants." π
β¨ NAME β¨
struct meson_ir_protocol β the struct that describes your IR Protocol parameter π
πΈ SYNOPSIS πΈ
struct meson_ir_protocol {
u8 hw_protocol;
bool repeat_counter_enable;
bool repeat_check_enable;
bool repeat_compare_enable;
bool bit_order;
bool bit1_match_enable;
bool hold_code_enable;
bool count_tick_mode;
u8 code_length;
u16 frame_time_max;
u16 leader_active_max;
u16 leader_active_min;
u16 leader_idle_max;
u16 leader_idle_min;
u16 repeat_leader_max;
u16 repeat_leader_min;
u16 bit0_max;
u16 bit0_min;
u16 bit1_max;
u16 bit1_min;
u16 duration2_max;
u16 duration2_min;
u16 duration3_max;
u16 duration3_min;
};
like, look at her. all those u16 fields lined up like a little army of timing values. iconic. π«Ά
π¦ Members π¦
okay so, member by member, let's get into it:
hw_protocolβ this one literally selects the IR Protocol from the IR Controller. the vibe-setter, periodt. β¨repeat_counter_enableβ turns on the frame-to-frame time counter. heads up tho: it's supposed to work withrepeat_compare_enableto detect the repeat frame. team effort, iykyk πrepeat_check_enableβ enables the repeat time check for repeat detection. that's it, that's the whole job, and she does it well. πrepeat_compare_enableβ enables comparing the frame for repeat frame detection. some IR Protocol send the same data as a repeat frame β and in that case, this one should work together withrepeat_counter_enableto detect the repeat frame. dynamic duo energy fr fr πbit_orderβ the bit order, bestie.LSBorMSB. pick your fighter πbit1_match_enableβ enables checking bit 1. tiny flag, big responsibility. βhold_code_enableβ holds the frame code in registerIR_DEC_FRAME1, and the new one frame code will not be stored inIR_DEC_FRAME1untilIR_DEC_FRAME1has been read. so basically it's like "don't talk to me till I've finished reading my messages" πcount_tick_modeβ sets the increasing time unit of the frame-to-frame time counter.0=100us,1=10us. choose wisely, one of these is ten times speedier π§code_lengthβ the length (N-1) of the data frame. note theN-1, okay? it's not N. it's N minus one. do not come for me π₯frame_time_maxβ max time for the whole frame. unit:MESON_HW_TRATEβ±οΈleader_active_maxβ max time for the NEC/RC6 leader active part. unit:MESON_HW_TRATEπleader_active_minβ min time for the NEC/RC6 leader active part. unit:MESON_HW_TRATEπleader_idle_maxβ max time for the NEC/RC6 leader idle part. unit:MESON_HW_TRATEπ€leader_idle_minβ min time for the NEC/RC6 leader idle part. unit:MESON_HW_TRATEπ€repeat_leader_maxβ max time for the NEC repeat leader idle part. unit:MESON_HW_TRATEπrepeat_leader_minβ min time for the NEC repeat leader idle part. unit:MESON_HW_TRATEπbit0_maxβ max time for NEC Logic'0', half of RC6 trailer bit, XMP Logic'00'πΈbit0_minβ min time for NEC Logic'0', half of RC6 trailer bit, XMP Logic'00'πΈbit1_maxβ max time for NEC Logic'1', whole of RC6 trailer bit, XMP Logic'01'πbit1_minβ min time for NEC Logic'1', whole of RC6 trailer bit, XMP Logic'01'πduration2_maxβ max time for half of RC6 normal bit, XMP Logic'10'πduration2_minβ min time for half of RC6 normal bit, XMP Logic'10'πduration3_maxβ max time for whole of RC6 normal bit, XMP Logic'11'π₯duration3_minβ min time for whole of RC6 normal bit, XMP Logic'11'π₯
ok real talk: all those_max/_minpairs are literal time windows and every one of them that saysUnit: MESON_HW_TRATEmeans exactly that unit. don't go mixing in microseconds and then act surprised, bestie π
π« SEE ALSO π«
- Kernel file
./drivers/media/rc/meson-ir.cβ go read the source, she's right there π¦
and that's the whole page, bestie! π this lil masterpiece lives in ./drivers/media/rc and it's dated October 2026 β yes, from the future, and still slaying. ngl, the Kernel API Manual could never be boring with entries like this one. mwah πβ¨π·
π¦ 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