aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCameron Grant <cg@FreeBSD.org>2000-05-15 02:10:27 +0000
committerCameron Grant <cg@FreeBSD.org>2000-05-15 02:10:27 +0000
commit942aeab7345ce70acd157bc3fa6c63d0bd138ce2 (patch)
tree4babe7a53eec1bbe63066a60b47ed7a55646fcb1
parentf4180808d2de50a2381b73370829f50f3706ba79 (diff)
downloadsrc-942aeab7345ce70acd157bc3fa6c63d0bd138ce2.tar.gz
src-942aeab7345ce70acd157bc3fa6c63d0bd138ce2.zip
fix a speed bug that nobody noticed
Notes
Notes: svn path=/head/; revision=60571
-rw-r--r--sys/dev/sound/isa/ess.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/sound/isa/ess.c b/sys/dev/sound/isa/ess.c
index 60727644cd84..879c0299c17c 100644
--- a/sys/dev/sound/isa/ess.c
+++ b/sys/dev/sound/isa/ess.c
@@ -495,11 +495,12 @@ ess_calcspeed9(int *spd)
/* rate = source / (256 - divisor) */
/* divisor = 256 - (source / rate) */
speed = *spd;
- t0 = 256 - (793800 / speed);
- s0 = 793800 / (256 - t0);
+ t0 = 128 - (793800 / speed);
+ s0 = 793800 / (128 - t0);
- t1 = 0x80 | (256 - (768000 / speed));
- s1 = 768000 / (256 - t1);
+ t1 = 128 - (768000 / speed);
+ s1 = 768000 / (128 - t1);
+ t1 |= 0x80;
use0 = (ABS(speed - s0) < ABS(speed - s1))? 1 : 0;