snd_soc_dapm...cted_widgets(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… snd_soc_dapm_dai_get_connected_widgets (and the Kernel API Manual, bestie) ✨

okay so picture this: you're deep in the kernel, it's giving "Kernel API Manual" energy, and you need to know what audio widgets are actually alive rn. That's this function. Her full government name is snd_soc_dapm_dai_get_connected_widgets. Iconic, long, slays.

🌸 NAME 🌸

snd_soc_dapm_dai_get_connected_widgets β€” query audio path and it's widgets. πŸ’– (yes the original said "it's", we don't fix it, we respect the text fr fr)

πŸŽ€ SYNOPSIS πŸŽ€

int snd_soc_dapm_dai_get_connected_widgets (struct snd_soc_dai *dai ,
int stream , struct snd_soc_dapm_widget_list **list , bool
(*custom_stop_condition)(struct snd_soc_dapm_widget *, enum
snd_soc_dapm_direction) );

✨ ARGUMENTS ✨

  • dai β€” the soc DAI. that's the main character right there πŸ‘‘
  • stream β€” stream direction. which way the vibes flow πŸ¦‹
  • list β€” list of active widgets for this stream. the guest list, basically πŸ’…
  • custom_stop_condition β€” (optional) a function meant to stop the widget graph walk based on custom logic. like your bestie grabbing your arm at the mall going "girl we're done here" πŸ™ˆ

🌈 DESCRIPTION 🌈

So what does she do? She queries the DAPM graph as to whether a valid audio stream path exists for the initial stream specified by name. This takes into account current mixer and mux kcontrol settings. Then she creates a list of valid widgets. Obsessed. ✨

Optionally, she can be supplied with a function acting as a stopping condition. This function takes the dapm widget currently being examined and the walk direction as an arguments, and it should return true if the walk should be stopped and false otherwise. Very demure, very "know when to leave the party" energy πŸŽ€

Returns the number of valid paths or negative error. So like β€” positive number = we ate πŸ“, negative = it's giving πŸ’€.

🫢 SEE ALSO 🫢

Kernel file ./sound/soc/soc-dapm.c and honestly the whole friend group:


and that's the whole page, no cap πŸ’œ this lil baddie lives in ./sound/soc, and the manual itself is dated October 2026 β€” yeah, from the future, main character energy only. byeee πŸ§šβ€β™€οΈβ­

πŸ“¦ where this page comes from