Skip to content

Commit

Permalink
[ALSA] ens1371 - added extra delay for ac97 codec initialization
Browse files Browse the repository at this point in the history
ENS1370/1+ driver

Signed-off-by: Jaroslav Kysela <perex@suse.cz>
  • Loading branch information
Jaroslav Kysela committed Jul 28, 2005
1 parent 856def8 commit 072c011
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions sound/pci/ens1370.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 072c011

Please sign in to comment.