STRUCT SND_COMPR_STREAM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct snd_compr_stream(9)

okay so bestie, welcome to the kernel API manual β€” specifically the page for struct snd_compr_stream, which lives in the Kernel API Manual. yes this is the compressed-stream glow-up you've been waiting for. buckle up πŸŽ€


✨ NAME ✨

struct snd_compr_stream β€” the compressed stream struct itself. that's it, that's the vibe. it's giving core data structure energy πŸ‘‘


🌸 SYNOPSIS 🌸

here she is, in all her glory β€” copy this exactly, no typos, i'm watching πŸ‘€

struct snd_compr_stream {
    const char *name;
    struct snd_compr_ops *ops;
    struct snd_compr_runtime *runtime;
    struct snd_compr *device;
    struct delayed_work error_work;
    enum snd_compr_direction direction;
    bool metadata_set;
    bool next_track;
    bool partial_drain;
    bool pause_in_draining;
    void *private_data;
    struct snd_dma_buffer dma_buffer;
 };

πŸ¦‹ Members πŸ¦‹

okay now the actual members, one by one, no skipping, we don't do that here πŸ’–

  • name β€” the device name. literally just the name. iconic of her.
  • ops β€” a pointer to the DSP callbacks. the whole personality lives here ngl.
  • runtime β€” a pointer to the runtime structure. yes, another struct, it's structs all the way down 🫢
  • device β€” device pointer. you know the drill.
  • error_work β€” delayed work used when closing the stream due to an error 😭 so when things go wrong, this is the cleanup crew.
  • direction β€” the stream direction, playback/recording. which way the audio is flowing, bestie.
  • metadata_set β€” metadata set flag, true when set. yes the name is the description, she's self-aware πŸ’…
  • next_track β€” has userspace signal next track transition, true when set. bop incoming πŸ”₯
  • partial_drain β€” undergoing partial_drain for the stream, true when set. mid-drain main character moment.
  • pause_in_draining β€” paused during draining state, true when set. pausing while draining, the multitasking queen that she is ✨
  • private_data β€” a pointer to DSP private data. secrets 🀫 keep it private, hence the name.
  • dma_buffer β€” the allocated buffer, if any. if any!! sometimes there just isn't one and that's fine πŸ“

πŸ‘‘ SEE ALSO πŸ‘‘

go read these next, for real fr fr β€” Kernel file ./include/sound/compress_driver.h, struct snd_compr_task_runtime(9), struct snd_compr_runtime(9), struct snd_compr_ops(9), struct snd_compr(9), snd_compr_use_pause_in_draining(9), snd_compr_set_runtime_buffer(9) 🌈


and that's the whole page, bestie 🧚 this one came from ./include/sound in the October 2026 edition of the kernel docs β€” struct snd_compr_stream(9), slaying in a header file near you πŸ’œβ­

πŸ“¦ where this page comes from