STRUCT RS_CODEC(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct rs_codec β€” rs codec data

okay so bestie, welcome to the kernel API manual for struct rs_codec β€” this is literally the struct that holds all the rs codec data, and she is that girl. every field, every type, all of it, coming right up ✨


✨ SYNOPSIS ✨

here's the whole glow-up, character for character, don't touch a thing:

struct rs_codec {
    int mm;
    int nn;
    uint16_t *alpha_to;
    uint16_t *index_of;
    uint16_t *genpoly;
    int nroots;
    int fcr;
    int prim;
    int iprim;
    int gfpoly;
    int (*gffunc)(int);
    int users;
    struct list_head list;
 };

πŸŽ€ MEMBERS πŸŽ€

time for the vibe check on every single member β€” no skipping, we don't do that here 🫢

  • mm β€” bits per symbol. that's it, that's the whole thing πŸ’…
  • nn β€” symbols per block, and it equals (1<<mm)-1. yeah, the math is mathing πŸ”₯
  • alpha_to β€” the log lookup table. iconic little lookup table behavior.
  • index_of β€” the antilog lookup table. she's the sister of alpha_to, they come as a pair πŸ’–
  • genpoly β€” the generator polynomial. main character energy fr fr ✨
  • nroots β€” number of generator roots, which also equals the number of parity symbols. two things at once, she's multitasking πŸ‘‘
  • fcr β€” first consecutive root, in index form.
  • prim β€” primitive element, in index form.
  • iprim β€” the prim-th root of 1, in index form. ok that's lowkey gorgeous 🌸
  • gfpoly β€” the primitive generator polynominal (spelled exactly like that, no cap πŸ’€).
  • gffunc β€” function to generate the field, if it's a non-canonical representation. it's literally int (*gffunc)(int);, so yes, she takes an int and hands you back an int πŸ¦‹
  • users β€” the users of this structure. love that for her, she has a fanbase πŸ₯°
  • list β€” list entry for the rs codec list. keeping everything linked up and organized, we stan πŸŽ€

πŸ’œ SEE ALSO πŸ’œ

go read these next, iykyk:

  • Kernel file ./include/linux/rslib.h
  • struct rs_control(9)
  • init_rs(9)

okay that's the whole page, you ate that πŸ“ this little number lives over in ./include/linux, and it's dated October 2026 β€” October 2026 bestie, she's from the future and she's still serving πŸ’…βœ¨ bye mwah πŸ˜­πŸ’–

πŸ“¦ where this page comes from