snd_pcm_capture_empty(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– snd_pcm_capture_empty(9) β€” the Kernel API Manual, but make it make sense ✨

okay bestie, welcome to the snd_pcm_capture_empty(9) page of the Kernel API Manual 🌸 this one is tiny but it's lowkey a little icon, and honestly it does exactly what it says on the tin. no cap. let's get into it πŸŽ€


🌈 NAME 🌈

snd_pcm_capture_empty β€” check whether the capture buffer is empty πŸ’…

like, that's the whole personality. it checks. is the capture buffer empty? yes or no. iconic behavior fr fr.


✨ SYNOPSIS ✨

int snd_pcm_capture_empty (struct snd_pcm_substream *substream );

that's it, that's the call 🫢 one function, one pointer, zero drama.


πŸŽ€ ARGUMENTS πŸŽ€

  • substream β€” the pcm substream instance 🌟 literally the thing you're asking about. hand over your substream and she'll tell you what's up.

πŸ¦‹ DESCRIPTION πŸ¦‹

Checks whether the capture buffer is empty. πŸ’€ yes that's really the whole description, the manpage is not beating the "short and sweet" allegations.

so like, you pass in your substream, and it goes and takes a peek at that capture buffer and tells you if there's nothing in it. vibe check for your audio buffer, basically. no extra lore, no hidden mechanics, i'm not gonna invent any because that's not the vibe πŸ’œ


⭐ RETURN ⭐

Non-zero if empty, or zero if not. πŸ”₯

read that twice bestie, because it's the one place people trip: non-zero means EMPTY, zero means not empty. yes it's backwards from what your brain wants at 2am. that's just how she is. 😭


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/sound/pcm.h 🌈 and the whole squad of friends, in the exact order the page lists them, because we do NOT skip the crew:

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_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_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 genuinely go read snd_pcm_capture_ready(9) and snd_pcm_playback_empty(9) next, they're the sibling energy 🧚


πŸ’‘ friendly reminder: don't mix up snd_pcm_capture_empty(9) with snd_pcm_playback_empty(9) β€” capture and playback are different girlies and they are NOT interchangeable. πŸ™ˆ

and that's the page!! mwah πŸ’‹ this one lives under ./include/sound, dated October 2026, and it's filed as snd_pcm_capture_empty(9) in the Kernel API Manual β€” stay hydrated, lock your irqsave properly, and slay your audio buffers bestie πŸ“πŸ’…πŸ«Ά

πŸ“¦ where this page comes from