ir_raw_gen_pl(9)
π ir_raw_gen_pl(9) β the Kernel API Manual, bestie edition β¨
okay so we're in the Kernel API Manual today and the star of the show is ir_raw_gen_pl β say hi π
π NAME π
ir_raw_gen_pl β Encode data to raw events with pulse-length modulation.
β¨ SYNOPSIS β¨
int ir_raw_gen_pl (struct ir_raw_event **ev , unsigned int max , const
struct ir_raw_timings_pl *timings , unsigned int n , u64 data );
π«Ά ARGUMENTS π«Ά
evβ Pointer to pointer to next free event.*evis incremented for each raw event filled. she moves the pointer forward as she fills, main character energy fr πmaxβ Maximum number of raw events to fill.timingsβ Pulse distance modulation timings.nβ Number of bits of data.dataβ Data bits to encode.
πΈ DESCRIPTION πΈ
okay so picture this: it encodes the n least significant bits of data using space-distance modulation, with the timing characteristics described by timings π¦ and it writes up to max raw IR events using the *ev pointer. that's the whole vibe. it's giving "just do the encoding, no drama" β¨
π RETURN π
0on success π slay-ENOBUFSif there isn't enough space in the array to fit the full encoded data. and bestie, listen: in this case allmaxevents will have been written π so yeah, they got written, there just wasn't room for the whole thing. be aware.
no cap, if you see-ENOBUFSyou were too small onmaxand it filled everything it could before bailing π
π¦ SEE ALSO π¦
Kernel file ./drivers/media/rc/rc-ir-raw.c and the whole friend group π
ir_raw_event_store(9)ir_raw_event_store_edge(9)ir_raw_event_store_with_filter(9)ir_raw_event_set_idle(9)ir_raw_event_handle(9)ir_raw_gen_manchester(9)ir_raw_gen_pd(9)ir_raw_encode_scancode(9)ir_raw_edge_handle(9)ir_raw_encode_carrier(9)
alright bestie, that's the page π this one lives in ./drivers/media/rc and it's dated October 2026 β go off, encode those bits, and remember: pulse-length modulation is iconic, periodt πβ
π¦ 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