STRUCT SND_COMPR_CAPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– STRUCT SND_COMPR_CAPS(9) πŸ’–

okay bestie so you're looking at the Kernel API Manual and today's main character is struct snd_compr_caps β€” literally the caps descriptor, no cap 🧒✨


🌸 NAME 🌸

struct snd_compr_caps β€” the caps descriptor. that's it, that's the vibe πŸ’…


✨ SYNOPSIS ✨

struct snd_compr_caps {
    __u32 num_codecs;
    __u32 direction;
    __u32 min_fragment_size;
    __u32 max_fragment_size;
    __u32 min_fragments;
    __u32 max_fragments;
    __u32 codecs[MAX_NUM_CODECS];
    __u32 reserved[11];
 };

copy it exactly pls, we do NOT freestyle struct definitions in this house πŸ™ˆ


πŸŽ€ MEMBERS πŸŽ€

  • num_codecs β€” how many codecs are supported, like the actual headcount πŸ‘‘
  • direction β€” which direction is supported. it's of type snd_compr_direction, iykyk πŸ¦‹
  • min_fragment_size β€” the minimum fragment supported by the DSP, the little guy πŸ“
  • max_fragment_size β€” the maximum fragment supported by the DSP, the big guy πŸ”₯
  • min_fragments β€” min fragments supported by the DSP, lowkey the floor ⭐
  • max_fragments β€” max fragments supported by the DSP, highkey the ceiling 🌈
  • codecs β€” pointer to an array of codecs. she's pointing at the lineup πŸ’œ
  • reserved β€” reserved field. leave her alone, she's reserved for a reason πŸ’€

🫢 SEE ALSO 🫢

kernel file ./include/uapi/sound/compress_offload.h, plus the whole friend group β€” go say hi to all of them:

  • struct snd_compressed_buffer(9)
  • struct snd_compr_params(9)
  • struct snd_compr_tstamp(9)
  • struct snd_compr_tstamp64(9)
  • struct snd_compr_avail(9)
  • struct snd_compr_avail64(9)
  • struct snd_compr_codec_caps(9)
  • enum sndrv_compress_encoder(9)
  • struct snd_compr_metadata(9)
  • struct snd_compr_task(9)
  • enum snd_compr_state(9)
  • struct snd_compr_task_status(9)

ngl this page lives at ./include/uapi/sound and it's dated October 2026 β€” future icon behaviour fr fr πŸ‘‘βœ¨

and that's the whole page bestie, mwah πŸ’‹ go read the source, periodt πŸ’…πŸŽ€

πŸ“¦ where this page comes from