sof_ipc4_get_audio_fmt(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sof_ipc4_get_audio_fmt(9) πŸ’…

okay so this is a page from the Kernel API Manual, bestie, and it's genuinely so niche and so iconic at the same time. it's all about sof_ipc4_get_audio_fmt β€” a function that pulls the list of available audio formats out of swidget->tuples. yep. that's the whole vibe. let's get into it πŸŽ€


✨ NAME ✨

sof_ipc4_get_audio_fmt β€” get available audio formats from swidget->tuples

like literally, that's its job. it goes and fetches the audio formats that are chillin' inside swidget->tuples. no cap 🫢


🌸 SYNOPSIS 🌸

int sof_ipc4_get_audio_fmt (struct snd_soc_component *scomp , struct
snd_sof_widget *swidget , struct sof_ipc4_available_audio_format
*available_fmt , struct sof_ipc4_base_module_cfg *module_base_cfg );

it returns an int, and yes it takes four args, we love a four-arg moment πŸ’…


πŸ¦‹ ARGUMENTS πŸ¦‹

  • scomp β€” pointer to pointer to SOC component. yes, pointer to pointer. double the pointer, double the slay ✨
  • swidget β€” pointer to struct snd_sof_widget containing tuples. this is where the audio formats are actually living, iykyk πŸ‘‘
  • available_fmt β€” pointer to struct sof_ipc4_available_audio_format being filling in. that's what the page says, "being filling in", and honestly? we're keeping it exactly as is. it's the format struct that's getting filled in 🧚
  • module_base_cfg β€” Pointer to the base_config in the module init IPC payload. capital P, we respect it πŸ”₯

⭐ RETURN ⭐

0 if successful. that's it. that's the return value. zero means we ate and left no crumbs πŸ“


🌈 SEE ALSO 🌈

  • Kernel file ./sound/soc/sof/ipc4-topology.c β€” go read it, bestie, that's where the lore lives πŸ’œ

lowkey important reminder: keep every path and param name exactly as written, no renaming, no merging, no inventing. we're cute but we're accurate πŸ’€

okay that's the whole page!! short and sweet and honestly kind of a main character for a kernel function. this gem comes to you from ./sound/soc/sof, dated October 2026 β€” so yes, it's lowkey from the future, and it's giving time traveler energy πŸ¦‹βœ¨ bye bestie, go fill in those formats πŸ’–

πŸ“¦ where this page comes from