sst_send_gain_cmd(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… sst_send_gain_cmd β€” the kernel API manual, but make it make sense

okay so bestie, welcome to the glow-up of sst_send_gain_cmd(9) from the Kernel API Manual ✨ this is the little function that literally sends the gain algorithm IPC over to the FW πŸŽ€ scroll responsibly, she's a kernel function.


🌸 NAME 🌸

sst_send_gain_cmd β€” sends the gain algorithm IPC to the FW. yes that's the whole job. no cap, she does one thing and she eats πŸ’…


✨ SYNOPSIS ✨

int sst_send_gain_cmd (struct sst_data *drv , struct sst_gain_value *gv
, u16 task_id , u16 loc_id , u16 module_id , int mute );

like, look at her signature. iconic. parameter spacing is exactly as the original, don't come for me 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • drv β€” the sst_data. that's it. that's the description. short king energy ngl πŸ‘‘
  • gv β€” the stored value of gain (and she also contains rampduration, so like, bonus data). the main character of the value struct πŸ’–
  • task_id β€” task index πŸ”’
  • loc_id β€” location/position index πŸ“
  • module_id β€” module index 🧩
  • mute β€” a flag that tells you whether this was called from the digital_mute callback or directly. here's the tea though: if it was called from the digital_mute callback, the module will be muted/unmuted based on this flag. and if it was called directly? the flag is always 0. periodt πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

like, first things first: this gets called with sst_data.lock held πŸ”’ don't forget, that's important, iykyk.

now the actual vibe of what she does:

the user-set gain value is sent only if the user-controllable 'mute' control is OFF β€” and that OFF-ness is indicated by gv->mute. so like, gv->mute is your vibe check for whether the gain gets through 🌈

otherwise (mute control is not OFF, bestie), the mute value is what gets sent β€” and that mute value is the MIN value ⬇️ so no sneaky gain slips through while muted, fr fr.

lowkey the whole logic is: gain goes out when mute is off, MIN value goes out when it isn't. two paths, zero drama πŸ’œ

πŸ”₯ SEE ALSO πŸ”₯

like, go read the whole friend group, they all hang out together 🫢✨


and that's the page!! sourced straight from ./sound/soc/intel/atom, dated October 2026, living in the Kernel API Manual πŸŽ€ ty for coming to my ted talk, mwah πŸ’‹

πŸ“¦ where this page comes from