STRUCT MESON_IR_PROTOCOL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 with repeat_compare_enable to 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 with repeat_counter_enable to detect the repeat frame. dynamic duo energy fr fr 🌈
  • bit_order β€” the bit order, bestie. LSB or MSB. pick your fighter πŸ’€
  • bit1_match_enable β€” enables checking bit 1. tiny flag, big responsibility. ⭐
  • hold_code_enable β€” holds the frame code in register IR_DEC_FRAME1, and the new one frame code will not be stored in IR_DEC_FRAME1 until IR_DEC_FRAME1 has 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 the N-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 / _min pairs are literal time windows and every one of them that says Unit: MESON_HW_TRATE means 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