Lines Matching refs:ac97
240 struct snd_ac97 *ac97; member
398 static void snd_via82xx_codec_wait(struct snd_ac97 *ac97) in snd_via82xx_codec_wait() argument
400 struct via82xx_modem *chip = ac97->private_data; in snd_via82xx_codec_wait()
402 err = snd_via82xx_codec_ready(chip, ac97->num); in snd_via82xx_codec_wait()
407 static void snd_via82xx_codec_write(struct snd_ac97 *ac97, in snd_via82xx_codec_write() argument
411 struct via82xx_modem *chip = ac97->private_data; in snd_via82xx_codec_write()
417 xval = !ac97->num ? VIA_REG_AC97_CODEC_ID_PRIMARY : VIA_REG_AC97_CODEC_ID_SECONDARY; in snd_via82xx_codec_write()
422 snd_via82xx_codec_ready(chip, ac97->num); in snd_via82xx_codec_write()
425 static unsigned short snd_via82xx_codec_read(struct snd_ac97 *ac97, unsigned short reg) in snd_via82xx_codec_read() argument
427 struct via82xx_modem *chip = ac97->private_data; in snd_via82xx_codec_read()
431 xval = ac97->num << VIA_REG_AC97_CODEC_ID_SHIFT; in snd_via82xx_codec_read()
432 xval |= ac97->num ? VIA_REG_AC97_SECONDARY_VALID : VIA_REG_AC97_PRIMARY_VALID; in snd_via82xx_codec_read()
439 ac97->num, snd_via82xx_codec_xread(chip)); in snd_via82xx_codec_read()
444 if (snd_via82xx_codec_valid(chip, ac97->num) >= 0) { in snd_via82xx_codec_read()
653 snd_ac97_write(chip->ac97, AC97_LINE1_RATE, params_rate(hw_params)); in snd_via82xx_hw_params()
654 snd_ac97_write(chip->ac97, AC97_LINE1_LEVEL, 0); in snd_via82xx_hw_params()
867 static void snd_via82xx_mixer_free_ac97(struct snd_ac97 *ac97) in snd_via82xx_mixer_free_ac97() argument
869 struct via82xx_modem *chip = ac97->private_data; in snd_via82xx_mixer_free_ac97()
870 chip->ac97 = NULL; in snd_via82xx_mixer_free_ac97()
876 struct snd_ac97_template ac97; in snd_via82xx_mixer_new() local
890 memset(&ac97, 0, sizeof(ac97)); in snd_via82xx_mixer_new()
891 ac97.private_data = chip; in snd_via82xx_mixer_new()
892 ac97.private_free = snd_via82xx_mixer_free_ac97; in snd_via82xx_mixer_new()
893 ac97.pci = chip->pci; in snd_via82xx_mixer_new()
894 ac97.scaps = AC97_SCAP_SKIP_AUDIO | AC97_SCAP_POWER_SAVE; in snd_via82xx_mixer_new()
895 ac97.num = chip->ac97_secondary; in snd_via82xx_mixer_new()
897 err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97); in snd_via82xx_mixer_new()
1023 snd_ac97_suspend(chip->ac97); in snd_via82xx_suspend()
1035 snd_ac97_resume(chip->ac97); in snd_via82xx_resume()