---
name: "snd_ac97_set_rate"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/snd_ac97_set_rate"
---

# snd\_ac97\_set\_rate(9)

change the rate of the given input/output.

## NAME

snd\_ac97\_set\_rate - change the rate of the given input/output.

## SYNOPSIS

**int snd\_ac97\_set\_rate(struct snd\_ac97 \*** *ac97***, int** *reg***, unsigned int** *rate***);**

## ARGUMENTS

*ac97*

the ac97 instance

*reg*

the register to change

*rate*

the sample rate to set

## DESCRIPTION

Changes the rate of the given input/output on the codec. If the codec doesn't support VAR, the rate must be 48000 (except for SPDIF).

The valid registers are AC97\_PMC\_MIC\_ADC\_RATE, AC97\_PCM\_FRONT\_DAC\_RATE, AC97\_PCM\_LR\_ADC\_RATE. AC97\_PCM\_SURR\_DAC\_RATE and AC97\_PCM\_LFE\_DAC\_RATE are accepted if the codec supports them. AC97\_SPDIF is accepted as a pseudo register to modify the SPDIF status bits.

## RETURN

Zero if successful, or a negative error code on failure.

## COPYRIGHT
