snd_pcm_kernel_ioctl(9)
π snd_pcm_kernel_ioctl β like, the kernel-space PCM ioctl moment
okay so bestie, this is a page from the Kernel API Manual (yes the (9) section, we're in kernel dev territory now, very main character of us) β¨
πΈ NAME πΈ
snd_pcm_kernel_ioctl β execute a PCM ioctl in the kernel-space, no userspace round trip needed π«Ά
π SYNOPSIS π
int snd_pcm_kernel_ioctl (struct snd_pcm_substream *substream , unsigned
int cmd , void *arg );
β¨ ARGUMENTS β¨
substreamβ the PCM substream π like, the actual stream you're messing withcmdβ the IOCTL cmd π₯ the thing you want doneargβ the IOCTL argument π whatever that cmd needs passed along
π¦ DESCRIPTION π¦
So this function is provided primarily for the OSS layer and USB gadget drivers β that's literally who it's for, no cap π
And here's the vibe check: it allows only the limited set of ioctls π which are:
hw_paramssw_paramspreparestartdraindropforward
That's the whole list, periodt. Not more, not extra. So don't come in here expecting the full buffet, bestie π it's a curated menu only.
π RETURN π
- zero if it slayed (successful) β¨
- a negative error code if it did NOT slay π
π SEE ALSO π
kernel file ./sound/core/pcm_native.c β that's where the realness lives π§
and 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_stop_xrun(9)snd_pcm_suspend_all(9)snd_pcm_prepare(9)snd_pcm_lib_default_mmap(9)snd_pcm_lib_mmap_iomem(9)
π ngl, that limited-ioctl thing is the whole personality of this function, so if your cmd isn't on the list, it's giving not today.
okay that's the page bestie, ily, go write some kernel code π«ΆπΈ
sign-off szn: this one's filed under ./sound/core, dated October 2026, and the page itself is snd_pcm_kernel_ioctl(9) β mwah, iconic, no notes π
β¨
π¦ 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