freebsd-dev/sys/dev/syscons
Poul-Henning Kamp e465985885 The "free-lance" timer in the i8254 is only used for the speaker
these days, so de-generalize the acquire_timer/release_timer api
to just deal with speakers.

The new (optional) MD functions are:
	timer_spkr_acquire()
	timer_spkr_release()
and
	timer_spkr_setfreq()

the last of which configures the timer to generate a tone of a given
frequency, in Hz instead of 1/1193182th of seconds.

Drop entirely timer2 on pc98, it is not used anywhere at all.

Move sysbeep() to kern/tty_cons.c and use the timer_spkr*() if
they exist, and do nothing otherwise.

Remove prototypes and empty acquire-/release-timer() and sysbeep()
functions from the non-beeping archs.

This eliminate the need for the speaker driver to know about
i8254frequency at all.  In theory this makes the speaker driver MI,
contingent on the timer_spkr_*() functions existing but the driver
does not know this yet and still attaches to the ISA bus.

Syscons is more tricky, in one function, sc_tone(), it knows the hz
and things are just fine.

In the other function, sc_bell() it seems to get the period from
the KDMKTONE ioctl in terms if 1/1193182th second, so we hardcode
the 1193182 and leave it at that.  It's probably not important.

Change a few other sysbeep() uses which obviously knew that the
argument was in terms of i8254 frequency, and leave alone those
that look like people thought sysbeep() took frequency in hertz.

This eliminates the knowledge of i8254_freq from all but the actual
clock.c code and the prof_machdep.c on amd64 and i386, where I think
it would be smart to ask for help from the timecounters anyway [TBD].
2008-03-26 20:09:21 +00:00
..
apm APM was calling the suspend process from a timeout. This meant that 2006-05-25 23:06:38 +00:00
blank Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
daemon Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
dragon Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
fade Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
fire Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
green Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
logo Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
rain Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
snake Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
star Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
warp Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
scgfbrndr.c Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
schistory.c Fix -Wundef. 2005-12-04 02:12:43 +00:00
scmouse.c Make the comparsion more obvious. 2007-05-25 13:13:12 +00:00
scterm-dumb.c Fix -Wundef. 2005-12-04 02:12:43 +00:00
scterm-sc.c Remove various bits of conditional Alpha code and fixup a few comments. 2006-05-12 05:04:46 +00:00
scterm.c
sctermvar.h
scvesactl.c Correct the VGA_NO_MODE_CHANGE end marker comment. 2007-01-10 19:04:00 +00:00
scvgarndr.c Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
scvidctl.c Replace explicit calls to video methods with their respective variants 2007-12-29 23:26:59 +00:00
scvtb.c
syscons.c The "free-lance" timer in the i8254 is only used for the speaker 2008-03-26 20:09:21 +00:00
syscons.h Mark the syscons video spin mutex as recursable since it is currently 2008-02-13 23:38:08 +00:00
sysmouse.c In keeping with style(9)'s recommendations on macros, use a ';' 2008-03-16 10:58:09 +00:00