snd_hda_set_pin_ctl(9)
π snd_hda_set_pin_ctl(9) β like, the safest way to set a pin-control value π
okay bestie, welcome to the Kernel API Manual β¨ this is snd_hda_set_pin_ctl, and honestly? she's giving responsible queen energy. no cap.
β¨ NAME β¨
snd_hda_set_pin_ctl β Set a pin-control value safely π«Ά (yes, the "safely" is the whole point, we'll get there)
πΈ SYNOPSIS πΈ
int snd_hda_set_pin_ctl (struct hda_codec *codec , hda_nid_t pin ,
unsigned int val );
like, that's the whole signature. int going in, int coming out, we love a consistent icon π
π¦ ARGUMENTS π¦
codecβ the codec instance π« the main character of this whole operationpinβ the pin NID you wanna set the control on π― the specific little guyvalβ the pin-control value, and it's made ofAC_PINCTL_*bits π§© stack 'em up
π DESCRIPTION π
so here's the tea β this function sets the pin-control value on the given pin, but β and this is the slay part β it filters out the invalid pin-control bits when the pin doesn't actually have those capabilities. it literally does the vibe check for you π
for example: when PIN_HP gets passed but the pin has no HP-drive capability? the HP bit is just... omitted. not me quietly deleting the bit you can't have π iconic behavior honestly.
BUT β and this is a big but, listen up β the function doesn't check the input VREF capability bits, though. like, at all. so if you need to guess the right value, use snd_hda_get_default_vref π she'll help you out.
also fr fr: this function is only for analog pins, not for HDMI pins. HDMI girlies, this is not your function, sorry not sorry π
π SEE ALSO π
- Kernel file
./sound/hda/common/hda_local.hπ snd_hda_set_pin_ctl_cache(9)snd_hda_query_pin_caps(9)snd_hda_override_pin_caps(9)
all the sisters in the same friend group, go say hi π«Άβ¨
k that's the whole page, mwah π this came to you from ./sound/hda/common, dated October 2026, and yes she's still serving snd_hda_set_pin_ctl(9) realness β bye bestie, go set some pins safely ππ¦
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms