STRUCT SND_COMPR_TASK(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

struct snd_compr_task β€” the task primitive for non-realtime operation πŸ’…

okay so real talk, this struct is the little task ticket you hand over when you're doing audio compression stuff not in realtime. it's giving "i'll get to it when i get to it" energy, and honestly? iconic.


✨ SYNOPSIS ✨

struct snd_compr_task {
    __u64 seqno;
    __u64 origin_seqno;
    int input_fd;
    int output_fd;
    __u64 input_size;
    __u32 flags;
    __u8 reserved[16];
 };

like, that's the whole shape of it bestie, no cap 🫢


πŸŽ€ Members πŸŽ€

time for the vibe check on every single field, let's go πŸ”₯

  • seqno β€” the sequence number, aka the task identifier. this is how you know which task is which. main character energy, fr fr.
  • origin_seqno β€” the previous sequence number (task identifier) β€” it's there for reuse. so like, a little callback to the task that came before πŸ‘‘
  • input_fd β€” the data input file descriptor, and specifically it's a dma-buf. note that, bestie, it matters πŸ’–
  • output_fd β€” the data output file descriptor, also a dma-buf. matching set, we love to see it ✨
  • input_size β€” the filled data, in bytes, coming from the caller. ⚠️ and it must not exceed the fragment size β€” that's not a suggestion, that's a rule 😭
  • flags β€” go check the SND_COMPRESS_TFLG_* defines for what goes in here. iykyk πŸ¦‹
  • reserved β€” reserved for future extension. it's literally just sitting there being mysterious and future-proof πŸ’…

🌈 SEE ALSO 🌈

everything else in this little family, because they all hang out together, periodt:

  • Kernel file ./include/uapi/sound/compress_offload.h
  • 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_caps(9)
  • struct snd_compr_codec_caps(9)
  • enum sndrv_compress_encoder(9)
  • struct snd_compr_metadata(9)
  • enum snd_compr_state(9)
  • struct snd_compr_task_status(9)

and that's the whole page bestie, you ate that πŸ“ this one came from the Kernel file ./include/uapi/sound, dated October 2026 β€” mwah, go read the source, ily πŸ’œπŸ§š

πŸ“¦ where this page comes from