Commit 728a2cf4 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update - Takashi Iwai <tiwai@suse.de>

ES1968 driver,AC97 Codec Core
fixed the compilation with the recent ac97 and info changes.
parent 8b775b41
......@@ -2097,8 +2097,8 @@ void snd_ac97_resume(ac97_t *ac97)
}
__reset_ready:
if (bus->init)
bus->init(ac97);
if (ac97->bus->init)
ac97->bus->init(ac97);
is_ad18xx = (ac97->flags & AC97_AD_MULTI);
if (is_ad18xx) {
......@@ -2107,11 +2107,11 @@ void snd_ac97_resume(ac97_t *ac97)
if (! ac97->spec.ad18xx.id[codec])
continue;
/* select single codec */
ac97->write(ac97, AC97_AD_SERIAL_CFG, ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
ac97->write(ac97, AC97_AD_CODEC_CFG, ac97->spec.ad18xx.codec_cfg[codec]);
ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
ac97->bus->write(ac97, AC97_AD_CODEC_CFG, ac97->spec.ad18xx.codec_cfg[codec]);
}
/* select all codecs */
ac97->write(ac97, AC97_AD_SERIAL_CFG, 0x7000);
ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, 0x7000);
}
/* restore ac97 status */
......@@ -2130,12 +2130,12 @@ void snd_ac97_resume(ac97_t *ac97)
if (! ac97->spec.ad18xx.id[codec])
continue;
/* select single codec */
ac97->write(ac97, AC97_AD_SERIAL_CFG, ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, ac97->spec.ad18xx.unchained[codec] | ac97->spec.ad18xx.chained[codec]);
/* update PCM bits */
ac97->write(ac97, AC97_PCM, ac97->spec.ad18xx.pcmreg[codec]);
ac97->bus->write(ac97, AC97_PCM, ac97->spec.ad18xx.pcmreg[codec]);
}
/* select all codecs */
ac97->write(ac97, AC97_AD_SERIAL_CFG, 0x7000);
ac97->bus->write(ac97, AC97_AD_SERIAL_CFG, 0x7000);
continue;
} else if (i == AC97_AD_TEST ||
i == AC97_AD_CODEC_CFG ||
......
......@@ -2037,15 +2037,20 @@ static irqreturn_t snd_es1968_interrupt(int irq, void *dev_id, struct pt_regs *r
static int __devinit
snd_es1968_mixer(es1968_t *chip)
{
ac97_bus_t bus, *pbus;
ac97_t ac97;
snd_ctl_elem_id_t id;
int err;
memset(&bus, 0, sizeof(bus));
bus.write = snd_es1968_ac97_write;
bus.read = snd_es1968_ac97_read;
if ((err = snd_ac97_bus(chip->card, &bus, &pbus)) < 0)
return err;
memset(&ac97, 0, sizeof(ac97));
ac97.write = snd_es1968_ac97_write;
ac97.read = snd_es1968_ac97_read;
ac97.private_data = chip;
if ((err = snd_ac97_mixer(chip->card, &ac97, &chip->ac97)) < 0)
if ((err = snd_ac97_mixer(pbus, &ac97, &chip->ac97)) < 0)
return err;
/* attach master switch / volumes for h/w volume control */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment