From 1c63b8a60b866acbd95b0e6dd9b7430de61c3da5 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Wed, 25 Aug 2004 19:20:03 +0200 Subject: [PATCH] ALSA CVS update Intel8x0 driver intel8x0: Fixed a long mdelay() A long mdelay() call in prepration of 4/6 channels on nForce is optimized and replaced with msleep(). Signed-off-by: Takashi Iwai --- sound/pci/intel8x0.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index 833c976f10782..737d950875ab6 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -1024,8 +1024,10 @@ static void snd_intel8x0_setup_pcm_out(intel8x0_t *chip, /* reset to 2ch once to keep the 6 channel data in alignment, * to start from Front Left always */ - iputdword(chip, ICHREG(GLOB_CNT), (cnt & 0xcfffff)); - mdelay(50); /* grrr... */ + if (cnt & ICH_PCM_246_MASK) { + iputdword(chip, ICHREG(GLOB_CNT), cnt & ~ICH_PCM_246_MASK); + msleep(50); /* grrr... */ + } } else if (chip->device_type == DEVICE_INTEL_ICH4) { if (sample_bits > 16) cnt |= ICH_PCM_20BIT; -- 2.53.0