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
26 .\" $FreeBSD: src/share/man/man4/pcm.4,v 1.39.2.6 2007/05/23 19:45:49 brueffer Exp $
27 .\" $DragonFly: src/share/man/man4/pcm.4,v 1.8 2007/12/13 20:51:36 swildner Exp $
36 .Nd DragonFly PCM audio device infrastructure
38 To compile this driver into the kernel, place the following line in your
39 kernel configuration file:
40 .Bd -ragged -offset indent
44 For non-PnP sound cards:
45 .Bd -literal -offset indent
46 .Cd "device pcm0 at isa? port? irq 5 drq 1 flags 0x15"
51 driver provides support for
53 audio play and capture.
54 This driver also supports various
59 sound cards, AC97 mixer and High Definition Audio.
62 driver attaches, supported devices provide audio record and
66 sound system provides dynamic mixing
70 True full duplex operation is available on most sound cards.
72 If the sound card is supported by a bridge driver, the
74 driver works in conjunction with the bridge driver.
76 Apart from the usual parameters, the flags field is used to specify
79 channel (generally used for capture in full duplex cards).
80 Flags are set to 0 for cards not using a secondary
82 channel, or to 0x10 + C to specify channel C.
84 The driver does its best to recognize the installed hardware and drive
85 it correctly so the user is not required to add specific settings to
86 the kernel config file.
92 cards this is actually easy
93 since they identify themselves.
96 cards, the driver looks for
98 cards at addresses 0x530 and 0x604 (unless overridden
99 in the kernel config file ) .
101 In general, the module
110 or from the command line using the
113 Options which can be specified in
114 .Pa /boot/loader.conf
116 .Bl -tag -width ".Va snd_emu10k1_load" -offset indent
117 .It Va snd_driver_load
121 this option loads all available drivers.
122 .It Va snd_emu10k1_load
126 only the SoundBlaster 5.1 driver and dependent modules will be loaded.
131 load driver for card/chipset foo.
134 Each device can optionally support more playback channels
135 than physical hardware provides by using
140 options can be configured via the
142 interface but can only be manipulated while the device is inactive.
143 .Ss Runtime Configuration
146 variables are available:
147 .Bl -tag -width ".Va hw.snd.report_soft_formats" -offset indent
148 .It Va hw.snd.pcm%d.buffersize
149 Configure the amount of
151 bufferspace available for a device.
152 .It Va hw.snd.targetirqrate
153 Set the default block size such that continuous
154 playback will achieve this
157 This value can be tuned to improve application performance.
158 Increase this value when the sound lags and decrease
159 it if sound stutters or breaks up.
160 .It Va hw.snd.report_soft_formats
161 Controls the internal format conversion if it is
162 available transparently to the application software.
163 When disabled or not available, the application will
164 only be able to select formats the device natively supports.
165 .It Va hw.snd.verbose
166 Level of verbosity for the
169 Higher values include more output and the highest level,
170 three, should be used when reporting problems.
171 Other options include:
174 Installed devices and their allocated bus resources.
176 The number of playback, record, virtual channels, and
179 Channel information per device including the channel's
180 current format, speed, and pseudo device statistics such as
181 buffer overruns and buffer underruns.
183 File names and versions of the currently loaded sound modules.
185 .It Va hw.snd.maxautovchans
188 setting that only affects devices with only one playback channel available.
189 The sound system will dynamically create up this many
196 .It Va hw.snd.pcm%d.vchans
197 The current number of
199 allocated per device.
200 This can be set to preallocate a certain number of
202 Setting this value to
208 .Ss Recording Channels
209 On devices that have more than one recording source (ie: mic and line),
210 there is a corresponding
214 Channel statistics are only kept while the device is open.
215 So with situations involving overruns and underruns, consider the output
216 while the errant application is open and running.
218 The driver supports most of the
221 functions, and most applications work unmodified.
222 A few differences exist, while memory mapped playback is
223 supported natively and in
225 emulation, memory mapped recording is
229 As a consequence, some applications may need to be recompiled
230 with a slightly modified audio module.
233 for a complete list of the supported
239 drivers may use the following
242 .Bl -tag -width ".Pa /dev/audio%d.%d" -compact
243 .It Pa /dev/audio%d.%d
244 Sparc-compatible audio device.
246 Digitized voice device.
247 .It Pa /dev/dspW%d.%d
250 but 16 bits per sample.
251 .It Pa /dev/dspr%d.%d
252 Should be connected to a record codec.
256 status, including all channels and drivers.
259 The first number in the device node
260 represents the unit number of the
268 Additional messages are sometimes recorded when the
269 device is probed and attached, these messages can be viewed with the
274 .It ac97: dac not ready
275 AC97 codec is not likely to be accompanied with the sound card.
276 .It unsupported subdevice XX
277 A device node is not created properly.
306 .Xr snd_via82c686 4 ,
314 .%O "http://www.opensound.com/pguide/oss.pdf"
319 device driver first appeared in
330 The API evolved from the VOXWARE
331 standard which later became OSS standard.
334 .An Luigi Rizzo Aq luigi@iet.unipi.it
337 device driver and this manual page.
338 .An Cameron Grant Aq gandalf@vilnya.demon.co.uk
339 later revised the device driver for
341 .An Seigo Tanimura Aq tanimura@r.dl.itc.u-tokyo.ac.jp
342 revised this manual page.
343 It was then rewritten for
346 Some features of your sound card (e.g., global volume control) might not
347 be supported on all devices.