- Obsolete the sc_rest callback. The rest note operation can be done by
the common spkr layer. This also fixes PR kern/56060.
This work-in-progress patch was left in my local tree for years. :(
- Improve calculations of tone and rest length.
- Interrupt-oriented system rather than thread-oriented.
- Improve stability, quality and performance.
- Split playback and record cleanly. Improve halfduplex support.
- Many bugs are fixed including deadlocks, resource leaks, abuses, etc.
- Simplify audio filter mechanism. The encoding/channels/frequency
conversions are completely handled in the upper layer. So the hard-
ware driver only converts its hardware encoding (if necessary).
- audio_hw_if changes:
- Obsoletes query_encoding and add query_format instead.
- Obsoletes set_params and add set_format instead.
- Remove drain, setfd, mappage.
- The call sequences are changed.
- ioctl AUDIO_GETFD/SETFD, AUDIO_GETCHAN/SETCHAN are obsoleted.
- ioctl AUDIO_{QUERY,GET,SET}FORMAT are introduced.
- cleanup config attributes: au*conv and mulaw.
- All hardware drivers should follow it (I've done as much as possible).
Some file paths are changed:
- dev/audio.c -> dev/audio/audio.c (rewritten)
- dev/audiovar.h -> dev/audio/audiovar.h
- dev/audio_dai.h -> dev/audio/audio_dai.h
- dev/audio_if.h -> dev/audio/audio_if.h
- dev/audiobell.c -> dev/audio/audiobell.c
- dev/audiobellvar.h -> dev/audio/audiobellvar.h
- dev/mulaw.[ch] -> dev/audio/mulaw.[ch] + dev/audio/alaw.c
attachment-specific detach functions. Returns EBUSY if the
device instance is busy, based on whether or not a sc->sc_inbuf
is allocated. The buffer is malloc()d at spkropen time, and is
free()d in spkrclose().
Now we can actually implement the MODULE_CMD_FINI command and
unload the driver at will.
Addresses my PR kern/51785
build it for all architectures.
By doing this, we can handle pcppi, audio, or both attachments with
non-built-in modules.
XXX Still to do: the module currently cannot be unloaded, and the
XXX spkr device(s) currently cannot be detached. (Really, two
XXX sides of the same problem.)