snd_ac97_set_rate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… snd_ac97_set_rate(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual β€” this one's all about snd_ac97_set_rate, and no cap, it's a lil cutie that changes the rate of the given input/output. periodt. πŸŽ€


✨ NAME ✨

snd_ac97_set_rate β€” change the rate of the given input/output. literally what it says on the tin, she's not complicated πŸ¦‹


🌸 SYNOPSIS 🌸

int snd_ac97_set_rate (struct snd_ac97 *ac97 , int reg , unsigned int rate );

like... that's the whole signature. slay. πŸ’…


πŸŽ€ ARGUMENTS πŸŽ€

  • ac97 β€” the ac97 instance, aka the main character of this whole situation πŸ‘‘
  • reg β€” the register to change. yes, you gotta pick one, choose wisely bestie
  • rate β€” the sample rate to set. the number. the vibe. the whole point πŸ“

πŸ’– DESCRIPTION πŸ’–

So it changes the rate of the given input/output on the codec. simple enough, right? 🧚

Here's the catch though β€” if the codec doesn't support VAR, the rate must be 48000 (except for SPDIF, she gets a pass πŸ’€). like, not optional. mandatory. don't come at me.

The valid registers are AC97_PCM_MIC_ADC_RATE, AC97_PCM_FRONT_DAC_RATE, and AC97_PCM_LR_ADC_RATE. those three are the day-ones, the icons, the ones that always show up. 🌈

AC97_PCM_SURR_DAC_RATE and AC97_PCM_LFE_DAC_RATE are also accepted β€” but only if the codec supports them. so like, vibe check your codec first, ngl. πŸ™ˆ

And plot twist: AC97_SPDIF is accepted as a pseudo register to modify the SPDIF status bits. not a real register, just here for the drama, and honestly? iconic. ⭐


πŸ”₯ RETURN πŸ”₯

  • Zero if it's giving success ✨
  • or a negative error code if it's giving failure 😭

🫢 SEE ALSO 🫢

Kernel file ./sound/pci/ac97/ac97_pcm.c and her besties:

go read those too, iykyk πŸ’œ


and that's the whole page bestie, no notes, she ate and left absolutely no crumbs πŸ‘‘

mwah πŸ’‹ this has been your girl signing off β€” brought to you straight from ./sound/pci/ac97, dated October 2026, in the one and only snd_ac97_set_rate(9) era. catch you in the next manpage! πŸŽ€βœ¨

πŸ“¦ where this page comes from