snd_hdac_regmap_get_amp(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– snd_hdac_regmap_get_amp(9) πŸ’–

okay bestie, welcome to the Kernel API Manual β€” this one is literally called snd_hdac_regmap_get_amp(9) and it's gonna be so chill. we're reading AMP values off an HD-audio codec. that's it. that's the whole vibe. let's go ✨


🌸 NAME 🌸

snd_hdac_regmap_get_amp β€” Read AMP value πŸŽ€

bestie it reads the AMP value. it's giving "one job, does it well." we love a focused icon. πŸ‘‘


✨ SYNOPSIS ✨

int snd_hdac_regmap_get_amp (struct hdac_device *codec , hda_nid_t nid ,
int ch , int dir , int idx );

five arguments, one int coming back at ya. no cap, that's the whole signature. screenshot it. πŸ“Έ


πŸ¦‹ ARGUMENTS πŸ¦‹

  • codec β€” HD-audio codec πŸ’… this is the codec we're poking at, main character energy fr.
  • nid β€” NID to read the AMP value 🌟 the node id we want the AMP from, iykyk.
  • ch β€” channel (left=0 or right=1) πŸ™ˆ left is 0, right is 1. pick a side bestie, there's only two.
  • dir β€” #HDA_INPUT or #HDA_OUTPUT πŸ”₯ literally which direction, input or output. that's the whole choice.
  • idx β€” the index value (only for input direction) πŸŽ€ heads up: this one only matters when you're going the input direction. input-only behavior, no cap.

πŸ’œ DESCRIPTION πŸ’œ

Read AMP value. that's the assignment and it ate. 🫢

so when you get that value back, here's the tea: the volume is between 0 to 0x7f, and 0x80 = mute bit. so like, 0 through 0x7f is your actual volume range, and 0x80 is the special "shhh, muted" flag. not me thinking that's kinda iconic πŸ’€


🌈 RETURN 🌈

it returns the value... or a negative error. 😭 so like, check your return value bestie, don't just assume it slayed. negative = something went sideways, periodt.

fr fr always check the return, a negative error is not a vibe check you wanna fail πŸ™

⭐ SEE ALSO ⭐

the whole friend group 🫢:

like the stereo version of this one is right there?? snd_hdac_regmap_get_amp_stereo(9) said "let me do it for both channels" πŸ’… go read it next, i'll wait.


✨ mwah, that's a wrap ✨ this little gem lives in ./include/sound, dated October 2026, and the page itself is snd_hdac_regmap_get_amp(9) out of the Kernel API Manual. go forth and read those AMP values, bestie β€” you're gonna do amazing πŸŽ€πŸ’–πŸ¦‹πŸŒΈπŸ‘‘

πŸ“¦ where this page comes from