1.\" 2.\" Copyright (c) 1998, Luigi Rizzo 3.\" All rights reserved. 4.\" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 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. 13.\" 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 24.\" SUCH DAMAGE. 25.\" 26.\" $FreeBSD$ 27.\" 28.Dd June 3, 1998 29.Dt PCM 4 30.Os FreeBSD 31.Sh NAME 32.Nm pcm , 33.Nm snd 34.Nd FreeBSD PCM audio device driver 35.Sh SYNOPSIS 36For a card with bridge driver support, and a PnP card: 37.Cd "device pcm" 38.Pp 39For a card without bridge driver support, and a non-PnP card: 40.Cd "device pcm0 at isa? port? irq 5 drq 1 flags 0x15" 41.Sh DESCRIPTION 42The 43.Nm 44driver provides support for PCM audio play and capture. 45This driver 46also supports various PCI and WSS/MSS compatible ISA sound cards, and 47AC97 mixer. 48True full duplex operation is available on most cards. 49.Pp 50If your sound card is supported by a bridge driver, 51.Nm 52driver works 53in conjunction with the bridge driver. 54.Pp 55Apart from the usual parameters, the flags field is used to specify 56the secondary DMA channel (generally used for capture in full duplex 57cards). Flags are set to 0 for cards not using a secondary DMA 58channel, or to 0x10 + C to specify channel C. 59.Pp 60The driver works best with WSS/MSS cards, which have a very clean 61architecture and an orthogonal set of features. 62They also happen to be 63among the cheapest audio cards on the market. 64.Pp 65The driver does its best to recognize the installed harware and drive 66it correctly, so that you don't have to give too many details in the 67kernel config files. 68For PCI and ISA PnP cards this is actually easy 69since they identify themselves. 70For legacy ISA cards, the driver looks 71for MSS cards at addresses 0x530 and 0x604 (obviously, unless overridden 72in the kernel config file by specifying an address). 73 74.Sh IOCTL 75The driver supports most of the Voxware ioctls(), and most 76applications work unmodified (including popular mpeg players and linux 77binaries). A few 78differences exist (the most important one is the ability to use 79memory-mapped access to the audio buffers). As a consequence, some 80applications may need to be recompiled with a slightly modified 81audio module. See /usr/include/sys/soundcard.h for a complete 82list of the supported ioctls. 83 84.Sh SUPPORTED CARDS 85.Pp 86Below we include a list of supported codecs/cards. 87If your sound card 88is not listed here, it may be supported by a bridge driver. 89 90.Bl -tag -width 2m % begin list 91.It CS4237, CS4236, CS4232, CS4231 (ISA) 92.Pp 93All these cards work perfectly in full duplex using the MSS mode. 94This chipset is used, among others, on the A/Open AW35 and AW32, on 95some Intel motherboards, and (the CS4231) on some non-PnP cards. 96.Pp 97The CS4232 is reported as buggy in the Voxware documentation but 98I am not sure if this is true. 99On one of my Intel motherboards, 100capture does not work simply because the capture DMA channel is 101not wired to the ISA DMA controller. 102 103.It Yamaha OPL-SAx (ISA) 104.Pp 105Works perfectly in all modes. 106This chip is used in several PnP cards, 107but also (in non-PnP mode) on motherboards and laptops (e.g. the 108Toshiba Libretto). 109 110.It OPTi931 (ISA) 111.Pp 112The chip is buggy, but the driver has many workarounds to make it work 113in full duplex because for some time these were the only full duplex 114cards I could find. u-law formats uses U8 format internally because of 115a bug in the chip. 116 117.It Trident 4DWave DX/NX (PCI) 118.Pp 119.It ENSONIQ AudioPCI ES1370/1371 (PCI) 120.Pp 121Creative Labs SoundBlaster PCI is supported as well. 122 123.It ESS Solo-1/1E (PCI) 124.Pp 125.It NeoMagic 256AV/ZX (PCI) 126.Pp 127.El 128.Sh FILES 129The following commonly used symbolic links to real device nodes 130should be present: 131.Pp 132.Bl -tag -width /dev/sequencer -compact 133.It Pa /dev/audio 134Sparc-compatible audio device 135.It Pa /dev/dsp 136Digitized voice device 137.It Pa /dev/dspW 138Like 139.Pa /dev/dsp , 140but 16 bits per sample 141.It Pa /dev/midi 142Raw midi access device 143.It Pa /dev/mixer 144Control port mixer device 145.It Pa /dev/music 146Level 2 sequencer interface 147.It Pa /dev/sequencer 148Sequencer device 149.It Pa /dev/pss 150Programmable device interface 151.El 152.Pp 153Each symbolic link refers to a device node of the same name, 154but with a unit number appended. 155The unit number for each device matches the unit number of the 156device probed at boot time. 157Device probe messages can be examined with the 158.Xr dmesg 8 159utility. 160.Pp 161All the appropriate device nodes and symbolic links 162for the 163.Ql pcm0 164device would created with the following commands: 165.Bd -literal -offset indent 166cd /dev; sh MAKEDEV snd0 167.Ed 168.Pp 169Similarly, the device nodes and symbolic links for the 170.Ql pcm1 171device would be created as follows: 172.Bd -literal -offset indent 173cd /dev; sh MAKEDEV snd1 174.Ed 175.Pp 176Since the 177.Pa /dev/MAKEDEV 178utility creates symbolic links that will be used by 179many utilities by default, 180the device nodes and symbolic links for the 181preferred audio device in systems with multiple audio devices 182should be created last. 183.Sh DIAGNOSTICS AND TROUBLESHOOTING 184.Bl -tag -width 2m 185.It ac97: dac not ready 186AC97 codec is not likely to be accompanied with the sound card. 187 188.It unsupported subdevice XX 189A device node is not created properly. 190 191.El 192.Sh BUGS 193Some features of your cards (e.g. global volume control) might not 194be supported on all devices. 195.Sh HISTORY 196The 197.Nm 198device driver first appeared in 199.Fx 2.2.6 , 200rewritten in 201.Fx 4.0 . 202.Sh SEE ALSO 203.Xr csa 4 , 204.Xr gusc 4 , 205.Xr sbc 4 206.Sh AUTHORS 207.An Luigi Rizzo Aq luigi@iet.unipi.it 208initially wrote the 209.Nm 210device driver and this manual page. 211.An Cameron Grant Aq gandalf@vilnya.demon.co.uk 212totally revised the device driver. 213.An Seigo Tanimura Aq tanimura@r.dl.itc.u-tokyo.ac.jp 214revised this manual page. 215