snd_pcm_playback_hw_avail(9)
π snd_pcm_playback_hw_avail β like, the queued space for playback, bestie
okay so this one is a page from the Kernel API Manual (yes we're in kernel land, stay with me π«Ά) and it's honestly so chill. The function is snd_pcm_playback_hw_avail β a little baddie that tells you the queued space for playback. That's it. That's her whole job. π
β¨ SYNOPSIS β¨
snd_pcm_sframes_t snd_pcm_playback_hw_avail (struct snd_pcm_runtime
*runtime );
Look at the return type bestie β snd_pcm_sframes_t, a signed frame count, we love an int that can go negative, the drama of it all π
π ARGUMENTS π
runtimeβ the PCM runtime instance π literally just the runtime you're working with, that's the whole vibe check
πΈ RETURN πΈ
The available frame size. That's it, that's the whole answer β available frame size, returned to you, no cap β¨
π¦ SEE ALSO π¦
The kernel file you want to peek at is ./include/sound/pcm.h π β and then there's the entire friend group of related calls, because apparently everyone in the ALSA PCM directory knows each other:
snd_pcm_stream_linked(9)snd_pcm_stream_lock_irqsave(9)snd_pcm_stream_lock_irqsave_nested(9)snd_pcm_group_for_each_entry(9)snd_pcm_running(9)__snd_pcm_set_state(9)bytes_to_samples(9)bytes_to_frames(9)samples_to_bytes(9)frames_to_bytes(9)frame_aligned(9)snd_pcm_lib_buffer_bytes(9)snd_pcm_lib_period_bytes(9)snd_pcm_playback_avail(9)snd_pcm_capture_avail(9)snd_pcm_capture_hw_avail(9)snd_pcm_playback_ready(9)snd_pcm_capture_ready(9)snd_pcm_playback_data(9)snd_pcm_playback_empty(9)snd_pcm_capture_empty(9)snd_pcm_trigger_done(9)params_channels(9)params_rate(9)params_period_size(9)params_periods(9)params_buffer_size(9)params_buffer_bytes(9)snd_pcm_hw_constraint_single(9)snd_pcm_format_cpu_endian(9)snd_pcm_set_sync(9)snd_pcm_set_runtime_buffer(9)snd_pcm_gettime(9)snd_pcm_set_fixed_buffer(9)snd_pcm_set_fixed_buffer_all(9)snd_pcm_sgbuf_get_addr(9)snd_pcm_sgbuf_get_chunk_size(9)snd_pcm_limit_isa_dma_size(9)snd_pcm_direction_name(9)snd_pcm_stream_str(9)snd_pcm_chmap_substream(9)pcm_format_to_bits(9)pcm_for_each_format(9)
Like, that's a whole group chat of manpages and they're all going to the same place (the PCM header, obvs) π
Honestly the shortest manpage I've ever read and I'm obsessed β get in, get the queued space, get out, no side quests, main character energy only π
kisses bestie, this page lives in ./include/sound and it's dated October 2026 β yes, the future, we're time travelers now π§β made with love in snd_pcm_playback_hw_avail(9), byeee πππ
π¦ 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