summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2009-04-14 22:40:04 +0200
committerJaroslav Kysela <perex@perex.cz>2009-04-14 22:40:04 +0200
commit29dab4fd3176e25dfab6cd763beb02d87973c288 (patch)
tree23a59747d00681e0064b03d4f00f6148aeb9dd6d /sound/pci
parentda2436a23c038055b1da6fe30b6ea2886b1e07b0 (diff)
downloadop-kernel-dev-29dab4fd3176e25dfab6cd763beb02d87973c288.zip
op-kernel-dev-29dab4fd3176e25dfab6cd763beb02d87973c288.tar.gz
[ALSA] intel8x0: fix wrong conditions in ac97_clock measure routine
Also add a little code cleanup. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/intel8x0.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index 6962f94..10f8609 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -2689,7 +2689,7 @@ static void __devinit intel8x0_measure_ac97_clock(struct intel8x0 *chip)
}
ichdev = &chip->ichd[ICHD_PCMOUT];
ichdev->physbuf = subs->dma_buffer.addr;
- ichdev->size = chip->ichd[ICHD_PCMOUT].fragsize = INTEL8X0_TESTBUF_SIZE;
+ ichdev->size = ichdev->fragsize = INTEL8X0_TESTBUF_SIZE;
ichdev->substream = NULL; /* don't process interrupts */
/* set rate */
@@ -2766,10 +2766,10 @@ static void __devinit intel8x0_measure_ac97_clock(struct intel8x0 *chip)
if (pos < 40000 || pos >= 60000)
/* abnormal value. hw problem? */
printk(KERN_INFO "intel8x0: measured clock %ld rejected\n", pos);
- else if (pos > 40500 || pos < 41500)
+ else if (pos > 40500 && pos < 41500)
/* first exception - 41000Hz reference clock */
chip->ac97_bus->clock = 41000;
- else if (pos > 43600 || pos < 44600)
+ else if (pos > 43600 && pos < 44600)
/* second exception - 44100HZ reference clock */
chip->ac97_bus->clock = 44100;
else if (pos < 47500 || pos > 48500)
OpenPOWER on IntegriCloud