snd_pcm_stop_xrun(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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:


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