STRUCT VIRTIO_PCM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct virtio_pcm(9) β€” your new fave kernel API manual, bestie πŸ’–

okay so you're reading the manual page for struct virtio_pcm, from the Kernel API Manual (yes that one, section 9, we love her). She's the VirtIO PCM device✨ β€” literally the lil struct that holds your audio life together. Let's get into it.


πŸŽ€ NAME πŸŽ€

struct virtio_pcm β€” the VirtIO PCM device. that's it, that's the vibe. it's giving "audio but make it virtualized" πŸ’…


✨ SYNOPSIS ✨

here's the whole glow-up, no cap, copy it exactly:

struct virtio_pcm {
    struct list_head list;
    u32 nid;
    struct snd_pcm *pcm;
    struct virtio_pcm_stream streams[SNDRV_PCM_STREAM_LAST + 1];
 };

like… iconic. four members, zero notes. 🫢


🌸 Members 🌸

okay bestie, let's do a vibe check on every single field, one by one, because we do NOT skip members in this house:

  • list β€” the VirtIO PCM list entry. she's the linkage, the connective tissue, the "who's in my group chat" energy πŸ”—
  • nid β€” the function group node identifier. a u32. it's her ID, her legal name, her passport πŸͺͺ
  • pcm β€” the kernel PCM device (that's a struct snd_pcm *). the main character, honestly πŸ‘‘
  • streams β€” the VirtIO PCM streams, aka playback AND capture, living in an array of size SNDRV_PCM_STREAM_LAST + 1. both directions, because she's versatile like that πŸ¦‹
not me being obsessed with a struct that just… holds four things. and yet. πŸ”₯

πŸ‘€ SEE ALSO πŸ‘€

go read these next, fr fr, iykyk:

  • the kernel file ./sound/virtio/virtio_pcm.h
  • struct virtio_pcm_substream(9)
  • struct virtio_pcm_stream(9)

they're all in the same clique, you'll love them 🌈


πŸ’œ and that's the whole page! mwah! this one lives in ./sound/virtio, October 2026 edition, and it slayed. go forth and read the header file, bestie β€” periodt. πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from