Commit 2b8d9088 authored by Jaroslav Kysela's avatar Jaroslav Kysela

[ALSA] Use msleep() in ac97 callbacks

CS46xx driver,NM256 driver
Use msleep() instead of mdelay() in ac97 callbacks (spinlock was removed).
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 47bf2b01
...@@ -113,7 +113,7 @@ static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip, ...@@ -113,7 +113,7 @@ static unsigned short snd_cs46xx_codec_read(cs46xx_t *chip,
if ((tmp & ACCTL_VFRM) == 0) { if ((tmp & ACCTL_VFRM) == 0) {
snd_printk(KERN_WARNING "cs46xx: ACCTL_VFRM not set 0x%x\n",tmp); snd_printk(KERN_WARNING "cs46xx: ACCTL_VFRM not set 0x%x\n",tmp);
snd_cs46xx_pokeBA0(chip, BA0_ACCTL, (tmp & (~ACCTL_ESYN)) | ACCTL_VFRM ); snd_cs46xx_pokeBA0(chip, BA0_ACCTL, (tmp & (~ACCTL_ESYN)) | ACCTL_VFRM );
mdelay(50); msleep(50);
tmp = snd_cs46xx_peekBA0(chip, BA0_ACCTL + offset); tmp = snd_cs46xx_peekBA0(chip, BA0_ACCTL + offset);
snd_cs46xx_pokeBA0(chip, BA0_ACCTL, tmp | ACCTL_ESYN | ACCTL_VFRM ); snd_cs46xx_pokeBA0(chip, BA0_ACCTL, tmp | ACCTL_ESYN | ACCTL_VFRM );
......
...@@ -1130,7 +1130,7 @@ snd_nm256_ac97_read(ac97_t *ac97, unsigned short reg) ...@@ -1130,7 +1130,7 @@ snd_nm256_ac97_read(ac97_t *ac97, unsigned short reg)
return 0; return 0;
res = snd_nm256_readw(chip, chip->mixer_base + reg); res = snd_nm256_readw(chip, chip->mixer_base + reg);
/* Magic delay. Bleah yucky. */ /* Magic delay. Bleah yucky. */
udelay(1000); msleep(1);
return res; return res;
} }
...@@ -1151,7 +1151,7 @@ snd_nm256_ac97_write(ac97_t *ac97, ...@@ -1151,7 +1151,7 @@ snd_nm256_ac97_write(ac97_t *ac97,
/* Wait for the write to take, too. */ /* Wait for the write to take, too. */
while (tries-- > 0) { while (tries-- > 0) {
snd_nm256_writew(chip, base + reg, val); snd_nm256_writew(chip, base + reg, val);
udelay(1000); /* a little delay here seems better.. */ msleep(1); /* a little delay here seems better.. */
if (snd_nm256_ac97_ready(chip)) if (snd_nm256_ac97_ready(chip))
return; return;
} }
......
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