Index: sys/dev/vt/vt_core.c =================================================================== --- sys/dev/vt/vt_core.c +++ sys/dev/vt/vt_core.c @@ -1135,6 +1135,13 @@ sysbeep(vw->vw_bell_pitch, vw->vw_bell_duration); } +/* + * Beep with user-provided frequency and duration as specified by a KDMKTONE + * ioctl (compatible with Linux). The frequency is specified as a 8254 PIT + * divisor for a 1.19MHz clock. + * + * See https://tldp.org/LDP/lpg/node83.html. + */ static void vtterm_beep(struct terminal *tm, u_int param) { @@ -1148,6 +1155,7 @@ return; } + /* XXX period unit should be "timer ticks." */ period = ((param >> 16) & 0xffff) * SBT_1MS; freq = 1193182 / (param & 0xffff);