snd_pcm_new(9)
β¨ snd_pcm_new β create a new PCM instance β¨
okay so bestie, this is snd_pcm_new from section 9 (Kernel API Manual), and it's literally the glow-up moment where a fresh PCM instance gets born π no cap, it's giving main character energy in ./sound/core/pcm.c.
πΈ SYNOPSIS πΈ
int snd_pcm_new (struct snd_card *card , const char *id , int device ,
int playback_count , int capture_count , struct snd_pcm **rpcm );
π ARGUMENTS π
cardβ the card instance π³ like, the whole sound card this lil baby PCM belongs to.idβ the id string π·οΈ a cute lil name tag fr.deviceβ the device index (zero based) π’ yes bestie, zero based, we start counting at 0 like civilized people.playback_countβ the number of substreams for playback π how many streams can sing out loud.capture_countβ the number of substreams for capture π€ how many streams can listen in.rpcmβ the pointer to store the new pcm instance π you hand it a pointer-to-pointer and it drops the new PCM in there, iconic.
π¦ DESCRIPTION π¦
Creates a new PCM instance β¨ that's the whole vibe.
β οΈ important bestie!! The pcm operators have not been set yet β you gotta do that afterwards on the new instance via snd_pcm_set_ops. Don't forget, or it's gonna be a whole mess π
π₯ RETURN π₯
Zero if successful π, or a negative error code on failure π.
π SEE ALSO π
- Kernel file
./sound/core/pcm.c snd_pcm_format_name(9)snd_pcm_new_stream(9)snd_pcm_new_internal(9)snd_pcm_notify(9)
π«Ά and that's the whole page bestie, no notes. it lives in ./sound/core, the date on it is October 2026, and it's snd_pcm_new(9) β go forth and make PCMs πππ§
π¦ 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