\" $NetBSD$
\"
\" Copyright (c) 2008 The NetBSD Foundation, Inc.
\" All rights reserved.
\"
\" Written by Cherry G. Mathew <
[email protected]> with bits and pieces
\" from auich(4) and ym(4)
\"
\" Redistribution and use in source and binary forms, with or without
\" modification, are permitted provided that the following conditions
\" are met:
\" 1. Redistributions of source code must retain the above copyright
\" notice, this list of conditions and the following disclaimer.
\" 2. Redistributions in binary form must reproduce the above copyright
\" notice, this list of conditions and the following disclaimer in the
\" documentation and/or other materials provided with the distribution.
\"
\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
\" POSSIBILITY OF SUCH DAMAGE.
Dd September 19, 2008
Dt PWMAUDIO 4
Os
Sh NAME
Nm pwmaudio
Nd pwmaudio PC Speaker audio(4) device driver using Pulse Width Modulation
Sh SYNOPSIS
Cd audio* at pcppi?
Sh DESCRIPTION
The
Nm
pwmaudio device driver uses the attimer(4) and the pcppi(4) device
to drive the PC Speaker on ISA architecture motherboards, via Pulse
Width Modulation. PWM allows PCM encoded waveforms to be played with
dubious quality, via the PC speaker.
Pp
A sysctl node 'hw.attimer?.samplingrate' is provided to fine tune the
sampling rate from between 8000Hz to 44000Hz.
Pp
A mixer interface provides a single control, "Speaker". Note that
most modern PC audio hardware routes the PC Speaker output via a sound
card, which has a separate mixer control, as well as mute/unmute for
that channel.
Pp
This driver differs from the
Xr spkr 4
driver, which uses a custom,
Xr ioctl 2
based interface to play monotonic sounds, while this driver interfaces
to the
Xr audio 4
driver to export a full fledged sound interface via /dev/audio
Sh SEE ALSO
Xr spkr 4 ,
Xr pcppi 4 ,
Xr attimer 4 ,
Xr audio 4
Sh HISTORY
The
Nm
device driver appeared in
Nx 6.0 .
Sh BUGS
Switching the system timecounter back and forth between i8254 and
APIC-Fast seems affect playback sometimes.
Sh AUTHORS
The
Nm
driver was written by
An Cherry G. Mathew <
[email protected]>