[ALSA] ens1371 - added extra delay for ac97 codec initialization
authorJaroslav Kysela <perex@suse.cz>
Sat, 9 Jul 2005 08:07:55 +0000 (10:07 +0200)
committerJaroslav Kysela <perex@suse.cz>
Thu, 28 Jul 2005 10:22:09 +0000 (12:22 +0200)
ENS1370/1+ driver

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/ens1370.c

index 4e63498a58b229e9a338a7eeae40deb31d6be0f0..d4287338c0425fad626fec0f9fa289d663e001f7 100644 (file)
@@ -685,6 +685,15 @@ static unsigned short snd_es1371_codec_read(ac97_t *ac97,
        return 0;
 }
 
+static void snd_es1371_codec_wait(ac97_t *ac97)
+{
+       msleep(750);
+       snd_es1371_codec_read(ac97, AC97_RESET);
+       snd_es1371_codec_read(ac97, AC97_VENDOR_ID1);
+       snd_es1371_codec_read(ac97, AC97_VENDOR_ID2);
+       msleep(50);
+}
+
 static void snd_es1371_adc_rate(ensoniq_t * ensoniq, unsigned int rate)
 {
        unsigned int n, truncm, freq, result;
@@ -1585,6 +1594,7 @@ static int snd_ensoniq_1371_mixer(ensoniq_t * ensoniq)
        static ac97_bus_ops_t ops = {
                .write = snd_es1371_codec_write,
                .read = snd_es1371_codec_read,
+               .wait = snd_es1371_codec_wait,
        };
 
        if ((err = snd_ac97_bus(card, 0, &ops, NULL, &pbus)) < 0)