snd_soc_dapm_enable_pin(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ snd_soc_dapm_enable_pin ✨

okay so bestie, we're in the Kernel API Manual today and the function we're stanning is snd_soc_dapm_enable_pin πŸ’…


🌸 NAME 🌸

snd_soc_dapm_enable_pin β€” enable pin. that's it. that's the whole name. it enables a pin πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

int snd_soc_dapm_enable_pin (struct snd_soc_dapm_context *dapm , const
char *pin );

like, it returns an int and takes two things. that's the vibe ✨


πŸ’– ARGUMENTS πŸ’–

  • dapm β€” the DAPM context. yes queen, the whole context 🌈
  • pin β€” the pin name. just the name, as a const char * πŸŽ€

πŸ”₯ DESCRIPTION πŸ”₯

so what does it actually do? it enables an input/output pin and its parents or children widgets β€” but only iff there's a valid audio route and an active audio stream πŸ’€ like, it's conditional, it's not just gonna enable stuff for free. no cap.


πŸ’€ NOTE πŸ’€

⚠️ bestie listen to me: snd_soc_dapm_sync needs to be called after this, otherwise DAPM does not do any widget power switching. like, none. zero. zilch. the pin will just be sitting there 😭 so please, for the love of everything, call snd_soc_dapm_sync after. it's giving prerequisites, it's giving "read the docs first" 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

kernel file ./sound/soc/soc-dapm.c and like, the entire friend group:


okay that's the whole page, mwah πŸ’‹ this lil guy lives in ./sound/soc, it's from October 2026, and it's part of the Kernel API Manual β€” go forth and enable those pins responsibly, bestie πŸ§šβ€β™€οΈπŸ’œ

πŸ“¦ where this page comes from