From: Ondrej Zary Date: Wed, 4 Aug 2010 19:56:44 +0000 (+0200) Subject: ALSA: als4000: Fix potentially invalid DMA mode setup X-Git-Tag: v2.6.36-rc1~6^2~16^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c4685849b4d725ab80cd29f5e09f5f128b4724b5;p=platform%2Fkernel%2Flinux-3.10.git ALSA: als4000: Fix potentially invalid DMA mode setup My previous patch assumed that the DMA mode (represented by 3 lowest bits of ALS4K_GCR99_DMA_EMULATION_CTRL register) is set to the default value 0. If that's not the case, it might result in invalid mode to be set. This patch fixes this potential problem. Signed-off-by: Ondrej Zary Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c index 036a9ba..0e247cb 100644 --- a/sound/pci/als4000.c +++ b/sound/pci/als4000.c @@ -765,7 +765,7 @@ static void snd_als4000_configure(struct snd_sb *chip) snd_als4k_gcr_write(chip, i, 0); /* enable burst mode to prevent dropouts during high PCI bus usage */ snd_als4k_gcr_write(chip, ALS4K_GCR99_DMA_EMULATION_CTRL, - snd_als4k_gcr_read(chip, ALS4K_GCR99_DMA_EMULATION_CTRL) | 0x04); + (snd_als4k_gcr_read(chip, ALS4K_GCR99_DMA_EMULATION_CTRL) & ~0x07) | 0x04); spin_unlock_irq(&chip->reg_lock); }