snd_pcm_capture_avail(9)
β¨ snd_pcm_capture_avail(9) β¨
okay so this is a page from the Kernel API Manual, bestie, and it's about snd_pcm_capture_avail β literally the function that tells you how much readable space your capture stream has. let's get into it π
πΈ NAME πΈ
snd_pcm_capture_avail β get the available (readable) space for capture π
π¦ SYNOPSIS π¦
snd_pcm_uframes_t snd_pcm_capture_avail (struct snd_pcm_runtime *runtime
);
like yes that's the whole signature, it's giving "short and iconic" β¨
π ARGUMENTS π
runtimeβ the PCM runtime instance. that's your girl, she holds all the state π«Ά
π DESCRIPTION π
so the result lands somewhere between 0 ... (boundary - 1). no cap, that's the range, and it's inclusive-ish in the way the manpage says it so i'm saying it π
lowkey important: it's 0 ... (boundary - 1), not just "0 to boundary". don't come for me, i'm just the messenger π
π₯ RETURN π₯
the available frame size β
π SEE ALSO π
kernel file ./include/sound/pcm.h β and honestly the whole friend group is here, so:
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_playback_hw_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 roster, go read them, iykyk π
and that's the page!! mwah π this gem lives under ./include/sound, dated October 2026, and it's literally the snd_pcm_capture_avail(9) manual page β main character energy only πβ¨
π¦ 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