snd_pcm_stre...qsave_nested(9)
π snd_pcm_stream_lock_irqsave_nested(9) β the Kernel API Manual, but make it make sense
okay so bestie, we're deep in the Linux kernel sound subsystem rn, and this page is from the Kernel API Manual (yes, the (9) means it's a kernel-internals thing, not a command you type in your shell, don't try it in bash ilysm).
β¨ NAME β¨
snd_pcm_stream_lock_irqsave_nested β Single-nested PCM stream locking π
like, it locks the PCM stream, but make it nested. one level of nested. exactly one. we'll get there.
πΈ SYNOPSIS πΈ
snd_pcm_stream_lock_irqsave_nested (substream , flags );
that's the whole call, she's compact, she's iconic π
π¦ ARGUMENTS π¦
substreamβ the PCM substream. the main character of this whole operation π«Άflagsβ irq flags. yes, those irq flags. you know the ones. keep them safe, they're precious β¨
π DESCRIPTION π
so this locks the PCM stream exactly like snd_pcm_stream_lock_irqsave does (same energy, same vibe), BUT with the single-depth lockdep subclass. π₯
it's giving "same lock, but lockdep can tell this nesting level apart from the others." single-depth. one nest. not two, not zero β literally just the one, no cap. π
π SEE ALSO π
and now, the friend group. the whole squad. every single one of them. ngl this is a long list but we don't skip anyone in this house π
kernel file ./include/sound/pcm.h β go read it, it's right there:
snd_pcm_stream_linked(9)snd_pcm_stream_lock_irqsave(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_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)
literally the entire extended universe, iykyk π
nerd note bestie: this is kernel-internal API, not a userspace thing. you won't find her in your$PATH. she lives in./include/sound. π§
π sign-off π
source/version: ./include/sound Β· dated October 2026 β that's a wrap, love you, go lock your streams responsibly ππβ
π¦ 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