snd_ac97_set_rate(9)
π 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 bestierateβ 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 π₯
Zeroif 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
- 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