Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci In auich_calibrate, set sc_ac97_clock to a defau...



details:   https://anonhg.NetBSD.org/src/rev/132745c53e95
branches:  trunk
changeset: 571060:132745c53e95
user:      cube <cube%NetBSD.org@localhost>
date:      Wed Nov 10 14:14:09 2004 +0000

description:
In auich_calibrate, set sc_ac97_clock to a default value of 48000 first.
That way, if the calibration fails or times out, sc_ac97_clock won't be 0
and there won't be a division by zero later in ac97_set_rate.

diffstat:

 sys/dev/pci/auich.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 72d042651205 -r 132745c53e95 sys/dev/pci/auich.c
--- a/sys/dev/pci/auich.c       Wed Nov 10 13:46:14 2004 +0000
+++ b/sys/dev/pci/auich.c       Wed Nov 10 14:14:09 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: auich.c,v 1.75 2004/11/10 04:20:26 kent Exp $  */
+/*     $NetBSD: auich.c,v 1.76 2004/11/10 14:14:09 cube Exp $  */
 
 /*-
  * Copyright (c) 2000, 2004 The NetBSD Foundation, Inc.
@@ -118,7 +118,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.75 2004/11/10 04:20:26 kent Exp $");
+__KERNEL_RCSID(0, "$NetBSD: auich.c,v 1.76 2004/11/10 14:14:09 cube Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1529,7 +1529,7 @@
 
        /* Force the codec to a known state first. */
        sc->codec_if->vtbl->set_clock(sc->codec_if, 48000);
-       rate = 48000;
+       rate = sc->sc_ac97_clock = 48000;
        sc->codec_if->vtbl->set_rate(sc->codec_if, AC97_REG_PCM_LR_ADC_RATE,
            &rate);
 



Home | Main Index | Thread Index | Old Index