ir_sony_encode(9)
π ir_sony_encode(9) β the kernel API manual, but make it cute π
okay so bestie, welcome to ir_sony_encode(9) β¨ this is a page from the Kernel API Manual and it's literally all about turning a scancode into a little parade of raw IR events. no cap, it's giving "translator for the infrared girlies" π
πΈ NAME πΈ
ir_sony_encode β Encode a scancode as a stream of raw events π¦
like. that's the whole vibe. one scancode in, a whole stream of events out. iconic.
β¨ SYNOPSIS β¨
int ir_sony_encode (enum rc_proto protocol , u32 scancode , struct
ir_raw_event *events , unsigned int max );
that's the signature, bestie β copied character for character, I would never do you dirty like that π«Ά
π ARGUMENTS π
protocolβ the protocol to encode π« like, which dialect of IR we're speaking rnscancodeβ the scancode to encode π₯ this is the thing you're translatingeventsβ array of raw ir events to write into π this is where the output goes, it's the canvas, it's the main charactermaxβ maximum size ofeventsπ the absolute limit, the boundaries, the "know your limits" moment
π RETURN π
So here's what you get back, and honestly pay attention because this is the important part:
- The number of events written. π slay, it worked, here's your count
-ENOBUFSif there isn't enough space in the array to fit the encoding π okay so the array was too small, it's not you it's the buffer- and ngl, in that case all
maxevents will have been written β like it fills up everything it possibly can and then tells you it ran out of room. it's doing its best, fr fr π
- and ngl, in that case all
β οΈ bestie please check the return value. -ENOBUFS means your array got absolutely stuffed to the brim and the encoding did not fully fit. that's a real caveat, not a vibe check you can skip π
π₯ SEE ALSO π₯
- Kernel file
./drivers/media/rc/ir-sony-decoder.cπ ir_sony_decode(9)π β the other half of the duo, the decoder to this encoder, the remix to this original
and that's the page!! go forth and encode, you absolute legend ππ
this little meet-cute happened in ./drivers/media/rc, dated October 2026 β mwah, love u, bye πβ¨
π¦ 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