snd_hdac_regmap_update_amp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– snd_hdac_regmap_update_amp β€” update the AMP value πŸ’–

okay so bestie, this is a page straight out of the Kernel API Manual, and it's all about snd_hdac_regmap_update_amp ✨ like the title literally says: it updates the AMP value. that's the whole vibe. let's get into it 🫢


✨ SYNOPSIS ✨

int snd_hdac_regmap_update_amp (struct hdac_device *codec , hda_nid_t
nid , int ch , int dir , int idx , int mask , int val );

that's the signature, copy it exactly, no cap πŸ”₯


πŸŽ€ ARGUMENTS πŸŽ€

  • codec β€” the HD-audio codec πŸ’… like, the whole device you're working on
  • nid β€” the NID you read the AMP value from
  • ch β€” the channel: left=0 or right=1 (pick ur fighter πŸ¦‹)
  • dir β€” either #HDA_INPUT or #HDA_OUTPUT, your direction bestie
  • idx β€” the index value (heads up: this one's only for input direction πŸ‘€)
  • mask β€” the bit mask to set
  • val β€” the bits value to set

🌸 DESCRIPTION 🌸

so what does it actually do?? it updates the AMP value with a bit mask ✨ that's it, that's the tea. mask in, value updated, slay πŸ’…


⭐ RETURN ⭐

  • 0 if the value is unchanged (iconic, nothing happened)
  • 1 if changed (we moved!! πŸ”₯)
  • or a negative error (😭 that's the sad path, handle it)

πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./include/sound/hda_regmap.h β€” go read it, iykyk πŸ“–

the whole friend group fr fr 🌈


ok that's the page!! sourced from ./include/sound in the kernel tree, dated October 2026, and it's the snd_hdac_regmap_update_amp(9) page πŸŽ€ mwah, go update those AMP values bestie πŸ’œπŸ§š
πŸ“¦ where this page comes from