Lines Matching defs:ac97
204 static unsigned short snd_cs46xx_ac97_read(struct snd_ac97 * ac97,
207 struct snd_cs46xx *chip = ac97->private_data;
209 int codec_index = ac97->num;
286 static void snd_cs46xx_ac97_write(struct snd_ac97 *ac97,
290 struct snd_cs46xx *chip = ac97->private_data;
291 int codec_index = ac97->num;
1716 static void snd_cs46xx_mixer_free_ac97(struct snd_ac97 *ac97)
1718 struct snd_cs46xx *chip = ac97->private_data;
1720 if (snd_BUG_ON(ac97 != chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] &&
1721 ac97 != chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]))
1724 if (ac97 == chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]) {
1725 chip->ac97[CS46XX_PRIMARY_CODEC_INDEX] = NULL;
1729 chip->ac97[CS46XX_SECONDARY_CODEC_INDEX] = NULL;
2153 val = snd_ac97_read(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX], AC97_CSR_ACMODE);
2162 return snd_ac97_update_bits(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX],
2189 static void snd_cs46xx_codec_reset (struct snd_ac97 * ac97)
2195 snd_ac97_write(ac97, AC97_RESET, 0);
2198 if (ac97->num == CS46XX_PRIMARY_CODEC_INDEX) {
2200 snd_cs46xx_ac97_write(ac97, AC97_CSR_ACMODE, 0x0);
2201 } else if (ac97->num == CS46XX_SECONDARY_CODEC_INDEX) {
2203 snd_cs46xx_ac97_write(ac97, AC97_CSR_ACMODE, 0x3);
2218 snd_ac97_read(ac97, AC97_RESET);
2219 snd_ac97_read(ac97, AC97_VENDOR_ID1);
2220 snd_ac97_read(ac97, AC97_VENDOR_ID2);
2222 ext_mid = snd_ac97_read(ac97, AC97_EXTENDED_MID);
2227 snd_ac97_write(ac97, AC97_REC_GAIN, 0x8a05);
2228 if ((err = snd_ac97_read(ac97, AC97_REC_GAIN)) == 0x8a05)
2241 struct snd_ac97_template ac97;
2243 memset(&ac97, 0, sizeof(ac97));
2244 ac97.private_data = chip;
2245 ac97.private_free = snd_cs46xx_mixer_free_ac97;
2246 ac97.num = codec;
2248 ac97.scaps = AC97_SCAP_INV_EAPD;
2262 err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97[codec]);
2321 unsigned int id2 = chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]->id & 0xffff;
2326 snd_ac97_write_cache(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX],
3541 snd_ac97_suspend(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]);
3542 snd_ac97_suspend(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);
3599 snd_ac97_resume(chip->ac97[CS46XX_PRIMARY_CODEC_INDEX]);
3600 snd_ac97_resume(chip->ac97[CS46XX_SECONDARY_CODEC_INDEX]);