2 .\" Copyright (c) 1998, Luigi Rizzo
3 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37 PCM audio device infrastructure
39 For a card with bridge driver support, and a PnP card:
42 For a card without bridge driver support, and a non-PnP card,
43 the following lines may be required in
44 .Pa /boot/device.hints :
45 .Cd hint.pcm.0.at="isa"
46 .Cd hint.pcm.0.irq="5"
47 .Cd hint.pcm.0.drq="1"
48 .Cd hint.pcm.0.flags="0x0"
51 Note: There exists some ambiguity in the naming at the moment
52 .Pq Nm sound , pcm , snd .
53 It will be resolved soon by renaming
57 and doing associated changes.
62 driver provides support for
64 audio play and capture.
65 This driver also supports various
70 sound cards, and AC97 mixer.
73 driver attaches, supported devices provide audio record and
77 sound system provides dynamic mixing
81 True full duplex operation is available on most cards.
83 If the sound card is supported by a bridge driver, the
85 driver works in conjunction with the bridge driver.
87 Apart from the usual parameters, the flags field is used to specify
90 channel (generally used for capture in full duplex cards).
91 Flags are set to 0 for cards not using a secondary
93 channel, or to 0x10 + C to specify channel C.
95 The driver works best with
97 cards, which have a very clean
98 architecture and an orthogonal set of features.
99 They also happen to be
100 among the cheapest audio cards on the market.
102 The driver does its best to recognize the installed hardware and drive
103 it correctly so the user is not required to add several lines in
104 .Pa /boot/device.hints .
110 cards this is actually easy
111 since they identify themselves.
114 cards, the driver looks for
116 cards at addresses 0x530 and 0x604 (unless overridden
118 .Pa /boot/device.hints ) .
120 In general, the module
129 or from the command line using the
132 Options which can be specified in
133 .Pa /boot/loader.conf
135 .Bl -tag -width ".Va snd_emu10k1_load" -offset indent
136 .It Va snd_driver_load
140 this option loads all available drivers.
141 .It Va snd_emu10k1_load
145 only the SoundBlaster 5.1 driver and dependent modules will be loaded.
150 load driver for card/chipset foo.
153 To define default values for the different mixer channels,
154 set the channel to the prefered value using hints, e.g.:
155 .Va hint.pcm.0.line Ns = Ns Qq Li 0 .
156 This will mute the input channel per default.
158 Each device can optionally support more playback channels
159 that physical hardware provides by using
164 options can be configured via the
166 interface but can only be manipulated while the device is inactive.
167 .Ss Runtime Configuration
170 variables are available:
171 .Bl -tag -width ".Va hw.snd.report_soft_formats" -offset indent
172 .It Va hw.snd.pcm%d.buffersize
173 Configure the amount of
175 bufferspace available for a device.
176 .It Va hw.snd.targetirqrate
177 Set the default block size such that continuous
178 playback will achieve this
181 This value can be tuned to improve application performance.
182 Increase this value when the sound lags and decrease
183 it if sound stutters or breaks up.
187 the default device for
189 Equivalent to a symlink from
192 .Pa /dev/dsp Ns Va ${hw.snd.unit} .
193 .It Va hw.snd.report_soft_formats
194 Controls the internal format conversion if it is
195 available transparently to the application software.
196 When disabled or not available, the application will
197 only be able to select formats the device natively supports.
198 .It Va hw.snd.verbose
199 Level of verbosity for the
202 Higher values include more output and the highest level,
203 three, should be used when reporting problems.
204 Other options include:
207 Installed devices and their allocated bus resources.
209 The number of playback, record, virtual channels, and
212 Channel information per device including the channel's
213 current format, speed, and pseudo device statistics such as
214 buffer overruns and buffer underruns.
216 File names and versions of the currently sound loaded modules.
218 .It Va hw.snd.maxautovchans
221 setting that only affects devices that have only one playback channel.
222 The sound system will dynamically create up this many
229 .It Va hw.snd.pcm%d.vchans
230 The current number of
232 allocated per device.
233 This can be set to preallocate a certain number of
235 Setting this value to
241 .Ss Recording Channels
242 On devices that have more than one recording source (ie: mic and line),
243 there is a corresponding
247 Channel statistics are only kept while the device is open.
248 So with situations involving overruns and underruns, consider the output
249 while the errant application is open and running.
251 The driver supports most of the
254 functions, and most applications work unmodified.
255 A few differences exist, while memory mapped playback is
256 supported natively and in
258 emulation, memory mapped recording is
262 As a consequence, some applications may need to be recompiled
263 with a slightly modified audio module.
266 for a complete list of the supported
272 driver supports the following sound cards:
276 CS4231, CS4232, CS4236, CS4237 (ISA)
278 Creative Labs SoundBlaster PCI
280 ENSONIQ AudioPCI ES1370/1371
284 Intel 443MX, 810, 815, and 815E integrated sound devices
286 MSS/WSS Compatible DSPs
288 NeoMagic 256AV/ZK (PCI)
292 Trident 4DWave DX/NX (PCI)
299 drivers may create the following
302 .Bl -tag -width ".Pa /dev/audio%d.%d" -compact
303 .It Pa /dev/audio%d.%d
304 Sparc-compatible audio device.
306 Digitized voice device.
307 .It Pa /dev/dspW%d.%d
310 but 16 bits per sample.
311 .It Pa /dev/dspr%d.%d
312 Should be connected to a record codec.
316 status, including all channels and drivers.
319 The first number in the device node
320 represents the unit number of the
328 Additional messages are sometimes recorded when the
329 device is probed and attached, these messages can be viewed with the
334 .It ac97: dac not ready
335 AC97 codec is not likely to be accompanied with the sound card.
336 .It unsupported subdevice XX
337 A device node is not created properly.
360 .Xr snd_via82c686 4 ,
369 .%O "http://www.opensound.com/pguide/oss.pdf"
374 device driver first appeared in
385 The API evolved from the VOXWARE
386 standard which later became OSS standard.
389 .An Luigi Rizzo Aq luigi@iet.unipi.it
392 device driver and this manual page.
393 .An Cameron Grant Aq gandalf@vilnya.demon.co.uk
394 later revised the device driver for
396 .An Seigo Tanimura Aq tanimura@r.dl.itc.u-tokyo.ac.jp
397 revised this manual page.
398 It was then rewritten for
401 Some features of your cards (e.g., global volume control) might not
402 be supported on all devices.