virtsnd_pcm_dev_set_params(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… virtsnd_pcm_dev_set_params(9) β€” like, the Kernel API Manual page, bestie ✨

okay so picture this: it's a Kernel API Manual page, and the star of the show is virtsnd_pcm_dev_set_params β€” the function that sets the parameters of a PCM substream, but on the device side. yes, that side. the cool side. πŸŽ€


🌸 NAME 🌸

virtsnd_pcm_dev_set_params β€” set the parameters of the PCM substream on the device side πŸ’–


✨ SYNOPSIS ✨

int virtsnd_pcm_dev_set_params (struct virtio_pcm_substream *vss ,
unsigned int buffer_bytes , unsigned int period_bytes , unsigned int
channels , snd_pcm_format_t format , unsigned int rate );

that's the whole vibe check right there, no cap πŸ‘‘


πŸ¦‹ ARGUMENTS πŸ¦‹

  • vss β€” the VirtIO PCM substream itself, the main character 🫢
  • buffer_bytes β€” size of the hardware buffer, like how much room the hardware gets to work with πŸ’«
  • period_bytes β€” size of the hardware period πŸŽ€
  • channels β€” the selected number of channels, pick your fighter 🌈
  • format β€” the selected sample format (SNDRV_PCM_FORMAT_XXX), literal format icon behaviour πŸ’…
  • rate β€” the selected frame rate, the tempo of the whole operation πŸ”₯

πŸ’œ CONTEXT πŸ’œ

any context that permits to sleep 😴 β€” yes bestie, you're allowed to sleep here, that's genuinely the requirement, not a metaphor.


⭐ RETURN ⭐

  • 0 on success β€” slay, immaculate, ate πŸ’…
  • -errno on failure β€” not slay, but that's the deal πŸ™ˆ

🌸 SEE ALSO 🌸

kernel file ./sound/virtio/virtio_pcm_ops.c plus the whole friend group πŸ’–:


and that's the page, bestie 🧚 β€” brought to you from ./sound/virtio, dated October 2026, and yes, virtsnd_pcm_dev_set_params(9) is literally right there in the title the whole time πŸ’œ periodt ✨

πŸ“¦ where this page comes from