STRUCT SND_COMPR_RUNTIME(9)
π NAME π
okay bestie, this is struct snd_compr_runtime(9) from the Kernel API Manual β¨ and it's literally the runtime stream description β core-struct main character energy, no cap ππ
πΈ SYNOPSIS πΈ
here's the whole struct exactly as it appears β do not paraphrase this one, bestie, copy it character for character ππ«Ά
struct snd_compr_runtime {
snd_pcm_state_t state;
struct snd_compr_ops *ops;
void *buffer;
u64 buffer_size;
u32 fragment_size;
u32 fragments;
u64 total_bytes_available;
u64 total_bytes_transferred;
wait_queue_head_t sleep;
void *private_data;
unsigned char *dma_area;
dma_addr_t dma_addr;
size_t dma_bytes;
struct snd_dma_buffer *dma_buffer_p;
#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL);
u32 active_tasks;
u32 total_tasks;
u64 task_seqno;
struct list_head tasks;
#endif;
};
π Members π
vibe check on every field, one by one π¦
stateβ stream state πopsβ pointer to DSP callbacks πbufferβ pointer to kernel buffer, valid only when not in mmap mode or DSP doesn't implement copy πbuffer_sizeβ size of the above buffer β¨fragment_sizeβ size of buffer fragment in bytes πfragmentsβ number of such fragments π§total_bytes_availableβ cumulative number of bytes made available in the ring buffer π₯total_bytes_transferredβ cumulative bytes transferred by offload DSP βsleepβ poll sleep π€private_dataβ driver private data pointer πdma_areaβ virtual buffer address π¦dma_addrβ physical buffer address (not accessible from main CPU) πdma_bytesβ size of DMA area πdma_buffer_pβ runtime dma buffer pointer π―active_tasksβ count of active tasks β‘total_tasksβ count of all tasks ποΈtask_seqnoβ last task sequence number (!= 0) π’tasksβ list of all tasks π
tiny heads-up bestie: theactive_tasks,total_tasks,task_seqno, andtasksfields are sitting inside the#if IS_ENABLED(CONFIG_SND_COMPRESS_ACCEL);block, and the#endif;is exactly as shown π
π¦ SEE ALSO π¦
go read these next, bestie π«Άπ
- Kernel file
./include/sound/compress_driver.hstructsnd_compr_task_runtime(9) struct snd_compr_stream(9)struct snd_compr_ops(9)struct snd_compr(9)snd_compr_use_pause_in_draining(9)snd_compr_set_runtime_buffer(9)
okay that's the whole page, bestie β source ./include/sound, date October 2026, title struct snd_compr_runtime(9) β slay and bye πβ¨π
π¦ 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