snd_sgbuf_get_addr(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ snd_sgbuf_get_addr(9) ✨

okay so this is a page from the Kernel API Manual, and bestie, it is short but it absolutely delivers. Let's get into it πŸ’…


🌸 NAME 🌸

snd_sgbuf_get_addr β€” literally just hands you the physical address at the matching offset. that's the whole job. iconic, honestly πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

dma_addr_t snd_sgbuf_get_addr (struct snd_dma_buffer *dmab , size_t
offset );

πŸ’– ARGUMENTS πŸ’–

  • dmab β€” the buffer allocation info. like, everything you need to know about how this buffer got allocated 🫢
  • offset β€” the offset within the ring buffer. yes, the ring buffer specifically, not just any buffer, iykyk ✨

⭐ RETURN ⭐

it gives you back the physical address. that's it. that's the return value. slay πŸ’…


πŸ”₯ SEE ALSO πŸ”₯

this is the kernel file ./sound/core/memalloc.c, and it comes with a whole friend group 😭 go check out:


lowkey a whole squad of dma helpers, and snd_sgbuf_get_addr is out here doing one (1) thing and doing it well πŸ’€ no cap

and that's the page, bestie! this one lives in ./sound/core, version October 2026, and it's part of the Kernel API Manual 🌈 so go forth and get those physical addresses πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from