STRUCT SND_COMPR_RUNTIME(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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: the active_tasks, total_tasks, task_seqno, and tasks fields 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 πŸ«ΆπŸ’œ


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