Subject: PC-speaker driver / timer support functions
To: None <freebsd-hackers@freefall.cdrom.com>
From: S|ren Schmidt <sos@login.dkuug.dk>
List: current-users
Date: 01/09/1994 23:44:28
Hi gang !

I've played more with the "audio" speaker driver.

The RTC timer is not suitible for use as the system timer, 
as it is to difficult to handle gettimeofday with enough
resolution.
What I've done instead is having functions to acquire
timer0, with new interrupt rate and an optional function
to call on each interrupt, it allso scales the new rate 
and calls hardclock() as close to "hz" as possible.
There is a function to release timer0 as well, restoring
the old "hz" rate and the call to hardclock().
What remains is a little rewrite of gettimeofday() to use
the new timer rate to optain the current time with enough
resolution.

Lets use /dev/audio.

I like the idea of having this stuff as a LKM, possibly 
sharing /dev/audio with drivers for "real" sound hardware
through a usermode program. The usermode program could test
for the different hardware types, selecting the right one
or defaulting to this speaker driver.

I don't know how much use there is for the old speaker 
driver (its kind of outdated), but it could happily coexist
with this one if there is another set of functions to
make sharing of timer2 possible (acquire/realese with 
rate and mode).

Does someone have docs on the sun /dev/audio interface ??
I would like to implement this interface as close as
possible (man page on ioctls calls?).


                                           Soeren Schmidt
                                           sos@login.dkuug.dk

------------------------------------------------------------------------------