STRUCT SND_COMPR_STREAM(9)
π 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,truewhen set. yes the name is the description, she's self-aware πnext_trackβ has userspace signal next track transition,truewhen set. bop incoming π₯partial_drainβ undergoingpartial_drainfor the stream,truewhen set. mid-drain main character moment.pause_in_drainingβ paused during draining state,truewhen 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
- 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