The beep duration of pccard event and syscons is changed on the kernel compiled with ``options HZ=1000'' option. Checking code using sysbeep, I found hz depend coding in sys/pccard/pccard_beep.c, sys/i386/isa/pcvt/pcvt_kbd.c, sys/dev/syscons/syscons.h, sys/pc98/pc98/sc_machdep.h. These four codes have hard coded duration of sysbeep function, but the unit of sysbeep's duration argument is 1/hz second. Thus, the duration scaling of hz is needed. Furthermore, sc_bell's duration is loaded from escape sequence in sys/dev/syscons/scterm-sc.c, sys/pc98/pc98/scterm-sck.c. From kbdcontrol manual and usr.sbin/kbdcontrol/kbdcontrol.c coding, the unit of duration value in escape sequence is 10msec. Thus hz scaling is needed in the case hz != 100. The codes calling timeout with hard coded ticks would cause the same problem. Fix: o sys/pccard/pccard_beep.c Add hz scaling code to pccard_beep_sub and pccard_beep_start. o sys/i386/isa/pcvt/pcvt_kbd.c Add hz scaling to PLING and PLONG macros. o sys/dev/syscons/syscons.h, sys/pc98/pc98/sc_machdep.h Add hz scaling to BELL_DURATION macro. o sys/dev/syscons/scterm-sc.c, sys/pc98/pc98/scterm-sck.c Add hz scaling code to ``set bell pitch and duration'' escape sequence. ---- How-To-Repeat: Add ``options HZ=1000'' and install new kernel. Hear pccard beep/syscons beep.
State Changed From-To: open->analyzed I have committed the syscons part of the patch, the pcvt, pc98 and pccard parts are left for the respective maintainers.
Responsible Changed From-To: freebsd-bugs->imp imp asked for it:wq
State Changed From-To: analyzed->closed I was the last straggler on this PR. I've committed it, so it is time to close it.