snd_pcm_new(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

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


🫢 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