virtsnd_ctl_query_info(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… virtsnd_ctl_query_info β€” from the Kernel API Manual

okay so bestie, welcome to virtsnd_ctl_query_info(9) β€” the little kernel function that walks up to your VirtIO sound device and is like "hey, tell me about your items bestie πŸŽ€". It's giving query the item configuration from the device, and honestly? Iconic behaviour.


✨ SYNOPSIS ✨

int virtsnd_ctl_query_info (struct virtio_snd *snd , int command , int
start_id , int count , size_t size , void *info );

six whole parameters, no cap. let's meet them 🫢


🌸 ARGUMENTS 🌸

  • snd β€” your VirtIO sound device. the main character, literally.
  • command β€” the control request code, written as VIRTIO_SND_R_XXX_INFO in the manual. this is you telling the device what kind of info you want. iykyk.
  • start_id β€” the item start identifier. where the little shopping spree begins πŸ›οΈ
  • count β€” how many items you wanna query. no, you can't have "all of them", pick a number bestie.
  • size β€” the item information size, measured in bytes. units matter, don't be messy.
  • info β€” a buffer for storing the item information. this is where the answers go. she's an empty vessel waiting to be filled with knowledge ✨

πŸ¦‹ CONTEXT πŸ¦‹

Any context that permits to sleep. yes girl, sleep β€” this one's allowed to nap, so don't call her from somewhere that can't πŸ˜΄πŸ’€


πŸ‘‘ RETURN πŸ‘‘

  • 0 on success πŸŽ‰ slay
  • -errno on failure 😭 it's giving error code

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./sound/virtio/virtio_ctl_msg.c β€” plus the whole friend group:

like, the entire group chat. go read them, fr fr.


bestie reminder: info has to actually be big enough for count items of size bytes each. the manual doesn't spell out the drama, but you know how buffers are πŸ™ˆ

mwah πŸ’‹ that's the whole page β€” brought to you from ./sound/virtio, dated October 2026, same as ever. go query something iconic πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from