aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/syscons/syscons.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/syscons/syscons.c')
-rw-r--r--sys/dev/syscons/syscons.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index 6a389604d3ab..6c349668410d 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -4258,6 +4258,11 @@ sc_respond(scr_stat *scp, const u_char *p, int count, int wakeup)
}
}
+/*
+ * pitch is the divisor for 1.193182MHz PIT clock. By dividing 1193172 / pitch,
+ * we convert it back to Hz.
+ * duration is in ticks of 1/hz.
+ */
void
sc_bell(scr_stat *scp, int pitch, int duration)
{
@@ -4277,7 +4282,7 @@ sc_bell(scr_stat *scp, int pitch, int duration)
} else if (duration != 0 && pitch != 0) {
if (scp != scp->sc->cur_scp)
pitch *= 2;
- sysbeep(1193182 / pitch, duration);
+ sysbeep(1193182 / pitch, SBT_1S * duration / hz);
}
}