snd_pcm_stop_xrun(9)
β¨ snd_pcm_stop_xrun(9) β¨
okay so this is a page from the Kernel API Manual and honestly? it's a little baddie. it does one thing and it does it well. let's get into it π«Ά
π NAME
snd_pcm_stop_xrun β stop the running streams as XRUN. that's it. that's the whole personality. no cap.
πΈ SYNOPSIS
int snd_pcm_stop_xrun (struct snd_pcm_substream *substream );
π ARGUMENTS
substreamβ the PCM substream instance. like, the actual stream bestie, hand it over π
π¦ DESCRIPTION
so this one stops the given running substream β and all the linked substreams too, they're coming with her, no one gets left behind β and it does it as XRUN.
and here's the iconic part, the main character plot twist: unlike snd_pcm_stop, this function takes the substream lock by itself. she does not need you to hold the door. she's got it. π₯
fr fr remember that difference, because it's literally the whole point of this function existing. iykyk.
β RETURN
Zero if successful π or a negative error code π (so, you know. check it. please. for me.)
π SEE ALSO
Kernel file ./sound/core/pcm_native.c plus the whole friend group:
snd_pcm_stream_lock(9)snd_pcm_stream_unlock(9)snd_pcm_stream_lock_irq(9)snd_pcm_stream_unlock_irq(9)snd_pcm_stream_unlock_irqrestore(9)snd_pcm_set_state(9)snd_pcm_get_state(9)snd_pcm_hw_params_choose(9)snd_pcm_start(9)snd_pcm_stop(9)snd_pcm_drain_done(9)snd_pcm_suspend_all(9)snd_pcm_prepare(9)snd_pcm_kernel_ioctl(9)snd_pcm_lib_default_mmap(9)snd_pcm_lib_mmap_iomem(9)
anyway that's the whole page, love her, she's efficient π
sign-off time, besties: this little gem lives over in ./sound/core, it's dated October 2026, and the source/version line is just snd_pcm_stop_xrun(9) β the queen signing her own name. periodt. πβ¨
π¦ 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