summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/alpha/alpha/clock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/alpha/alpha/clock.c b/sys/alpha/alpha/clock.c
index e320aba..ececbeb 100644
--- a/sys/alpha/alpha/clock.c
+++ b/sys/alpha/alpha/clock.c
@@ -496,12 +496,14 @@ sysbeep(int pitch, int period)
splx(x);
return (-1); /* XXX Should be EBUSY, but nobody cares anyway. */
}
- pitch = TIMER_DIV(pitch);
+
+ if (pitch) pitch = TIMER_DIV(pitch);
+
outb(TIMER_CNTR2, pitch);
outb(TIMER_CNTR2, (pitch>>8));
if (!beeping) {
/* enable counter2 output to speaker */
- outb(IO_PPI, inb(IO_PPI) | 3);
+ if (pitch) outb(IO_PPI, inb(IO_PPI) | 3);
beeping = period;
timeout(sysbeepstop, (void *)NULL, period);
}
OpenPOWER on IntegriCloud