aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAriff Abdullah <ariff@FreeBSD.org>2007-07-11 14:27:45 +0000
committerAriff Abdullah <ariff@FreeBSD.org>2007-07-11 14:27:45 +0000
commit05cba74005bf73f2a3d854ecfc4a9e4fed0340ed (patch)
treeb6542164c00ab594b5f10aafb6e9b8c9820cfa55
parent8d9a89a3a0c142317a4ff383d610d07116fd95ae (diff)
Notes
-rw-r--r--sys/dev/sound/pci/ich.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c
index cebf0b6cf032..64e2eec38986 100644
--- a/sys/dev/sound/pci/ich.c
+++ b/sys/dev/sound/pci/ich.c
@@ -783,7 +783,11 @@ ich_calibrate(void *arg)
return;
}
- actual_48k_rate = ((uint64_t)ch->blksz * 250000) / wait_us;
+ /* Just in case the timecounter screwed. It is possible, really. */
+ if (wait_us > 0)
+ actual_48k_rate = ((uint64_t)ch->blksz * 250000) / wait_us;
+ else
+ actual_48k_rate = 48000;
if (actual_48k_rate < 47500 || actual_48k_rate > 48500) {
sc->ac97rate = actual_48k_rate;