Deleted Added
full compact
pcm.4 (122767) pcm.4 (130582)
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 unchanged lines hidden (view full) ---

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.\"
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 unchanged lines hidden (view full) ---

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: head/share/man/man4/pcm.4 122767 2003-11-15 19:53:22Z trhodes $
26.\" $FreeBSD: head/share/man/man4/pcm.4 130582 2004-06-16 08:33:57Z ru $
27.\"
28.Dd November 14, 2003
29.Dt PCM 4
30.Os
31.Sh NAME
32.Nm pcm ,
33.Nm snd
27.\"
28.Dd November 14, 2003
29.Dt PCM 4
30.Os
31.Sh NAME
32.Nm pcm ,
33.Nm snd
34.Nd FreeBSD PCM audio device infrastructure
34.Nd
35.Fx
36PCM audio device infrastructure
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,
40the following lines may be required in
41.Pa /boot/device.hints :
42.Cd hint.pcm.0.at="isa"

--- 58 unchanged lines hidden (view full) ---

101cards, the driver looks for
102.Tn MSS
103cards at addresses 0x530 and 0x604 (unless overridden
104in
105.Pa /boot/device.hints ) .
106.Ss Boot Variables
107In general, the module
108.Pa snd_foo
37.Sh SYNOPSIS
38For a card with bridge driver support, and a PnP card:
39.Cd "device pcm"
40.Pp
41For a card without bridge driver support, and a non-PnP card,
42the following lines may be required in
43.Pa /boot/device.hints :
44.Cd hint.pcm.0.at="isa"

--- 58 unchanged lines hidden (view full) ---

103cards, the driver looks for
104.Tn MSS
105cards at addresses 0x530 and 0x604 (unless overridden
106in
107.Pa /boot/device.hints ) .
108.Ss Boot Variables
109In general, the module
110.Pa snd_foo
109corresponds to device foo and can be
110loaded by the boot loader via
111.Pa boot/loader.conf
111corresponds to
112.Cd "device foo"
113and can be
114loaded by the boot
115.Xr loader 8
116via
117.Xr loader.conf 5
112or from the command line using the
113.Xr kldload 8
114utility.
115Options which can be specified in
116.Pa /boot/loader.conf
117include:
118or from the command line using the
119.Xr kldload 8
120utility.
121Options which can be specified in
122.Pa /boot/loader.conf
123include:
118.Bl -tag -width snd_emu10k1_load -offset indent
124.Bl -tag -width ".Va snd_emu10k1_load" -offset indent
119.It Va snd_driver_load
125.It Va snd_driver_load
120.Pq Dq NO
126.Pq Dq Li NO
121If set to
127If set to
122.Dq YES ,
128.Dq Li YES ,
123this option loads all available drivers.
124.It Va snd_emu10k1_load
129this option loads all available drivers.
130.It Va snd_emu10k1_load
125.Pq Dq NO
131.Pq Dq Li NO
126If set to
132If set to
127.Dq YES ,
128Only the SoundBlaster 5.1 driver and dependent modules will be loaded.
133.Dq Li YES ,
134only the SoundBlaster 5.1 driver and dependent modules will be loaded.
129.It Va snd_foo_load
135.It Va snd_foo_load
130.Pq Dq NO
136.Pq Dq Li NO
131If set to
137If set to
132.Dq YES ,
138.Dq Li YES ,
133load driver for card/chipset foo.
134.El
139load driver for card/chipset foo.
140.El
135.Ss VCHANS
141.Ss VCHANs
136Each device can optionally support more playback channels
137that physical hardware provides by using
138.Dq virtual channels
139or
140.Tn VCHANs .
141.Tn VCHAN
142options can be configured via the
143.Xr sysctl 8
144interface but can only be manipulated while the device is inactive.
145.Ss Runtime Configuration
146The following
147.Xr sysctl 8
142Each device can optionally support more playback channels
143that physical hardware provides by using
144.Dq virtual channels
145or
146.Tn VCHANs .
147.Tn VCHAN
148options can be configured via the
149.Xr sysctl 8
150interface but can only be manipulated while the device is inactive.
151.Ss Runtime Configuration
152The following
153.Xr sysctl 8
148tunables are available:
149.Bl -tag -width ".It Va hw.snd.report_soft_formats" -offset indent
154variables are available:
155.Bl -tag -width ".Va hw.snd.report_soft_formats" -offset indent
150.It Va hw.snd.pcm%d.buffersize
151Configure the amount of
152.Tn DMA
153bufferspace available for a device.
154.It Va hw.snd.targetirqrate
155Set the default block size such that continuous
156playback will achieve this
157.Tn IRQ

--- 4 unchanged lines hidden (view full) ---

162.It Va hw.snd.unit
163When using
164.Xr devfs 5 ,
165the default device for
166.Pa /dev/dsp .
167Equivalent to a symlink from
168.Pa /dev/dsp
169to
156.It Va hw.snd.pcm%d.buffersize
157Configure the amount of
158.Tn DMA
159bufferspace available for a device.
160.It Va hw.snd.targetirqrate
161Set the default block size such that continuous
162playback will achieve this
163.Tn IRQ

--- 4 unchanged lines hidden (view full) ---

168.It Va hw.snd.unit
169When using
170.Xr devfs 5 ,
171the default device for
172.Pa /dev/dsp .
173Equivalent to a symlink from
174.Pa /dev/dsp
175to
170.Pa /dev/dsp${hw.snd.unit} .
176.Pa /dev/dsp Ns Va ${hw.snd.unit} .
171.It Va hw.snd.report_soft_formats
172Controls the internal format conversion if it is
173available transparently to the application software.
174When disabled or not available, the application will
175only be able to select formats the device natively supports.
176.It Va hw.snd.verbose
177Level of verbosity for the
178.Pa /dev/sndstat
179device.
180Higher values include more output and the highest level,
177.It Va hw.snd.report_soft_formats
178Controls the internal format conversion if it is
179available transparently to the application software.
180When disabled or not available, the application will
181only be able to select formats the device natively supports.
182.It Va hw.snd.verbose
183Level of verbosity for the
184.Pa /dev/sndstat
185device.
186Higher values include more output and the highest level,
181three, should be used when reported problems.
187three, should be used when reporting problems.
182Other options include:
188Other options include:
1830 - Installed devices and their allocated bus resources.
1841 - The number of playback, record, virtual channels, and
189.Bl -tag -width 2n
190.It 0
191Installed devices and their allocated bus resources.
192.It 1
193The number of playback, record, virtual channels, and
185flags per device.
194flags per device.
1862 - Channel information per device including the channel's
195.It 2
196Channel information per device including the channel's
187current format, speed, and pseudo device statistics such as
188buffer overruns and buffer underruns.
197current format, speed, and pseudo device statistics such as
198buffer overruns and buffer underruns.
1893 - File names and versions of the currently sound loaded modules.
199.It 3
200File names and versions of the currently sound loaded modules.
201.El
190.It Va hw.snd.maxautovchans
191Global
192.Tn VCHAN
193setting that only affects devices that have only one playback channel.
194The sound system will dynamically create up this many
195.Tn VCHANs .
196Set to
197.Dq 0

--- 22 unchanged lines hidden (view full) ---

220So with situations involving overruns and underruns, consider the output
221while the errant application is open and running.
222.Ss IOCTL Support
223The driver supports most of the
224.Tn OSS
225.Fn ioctl
226functions, and most applications work unmodified.
227A few differences exist, while memory mapped playback is
202.It Va hw.snd.maxautovchans
203Global
204.Tn VCHAN
205setting that only affects devices that have only one playback channel.
206The sound system will dynamically create up this many
207.Tn VCHANs .
208Set to
209.Dq 0

--- 22 unchanged lines hidden (view full) ---

232So with situations involving overruns and underruns, consider the output
233while the errant application is open and running.
234.Ss IOCTL Support
235The driver supports most of the
236.Tn OSS
237.Fn ioctl
238functions, and most applications work unmodified.
239A few differences exist, while memory mapped playback is
228supported natively and in Linux emulation, memory mapped recording is
240supported natively and in
241.Tn Linux
242emulation, memory mapped recording is
229not due to
230.Tn VM
231system design.
232As a consequence, some applications may need to be recompiled
233with a slightly modified audio module.
234See
235.In sys/soundcard.h
236for a complete list of the supported
237.Fn ioctl
238functions.
243not due to
244.Tn VM
245system design.
246As a consequence, some applications may need to be recompiled
247with a slightly modified audio module.
248See
249.In sys/soundcard.h
250for a complete list of the supported
251.Fn ioctl
252functions.
239.Ss SUPPORTED CARDS
253.Ss Supported Cards
240Below we include a list of supported codecs/cards.
241If your sound card
242is not listed here, it may be supported by a bridge driver.
243.Bl -tag -width 2m
244.It CS4237, CS4236, CS4232, CS4231 (ISA)
245All these cards work perfectly in full duplex using the MSS mode.
246This chipset is used, among others, on the A/Open AW35 and AW32, on
247some Intel motherboards, and (the CS4231) on some non-PnP cards.
248.Pp
249The CS4232 is reported as buggy in the Voxware documentation but
250I am not sure if this is true.
251On one of my Intel motherboards,
252capture does not work simply because the capture DMA channel is
253not wired to the ISA DMA controller.
254.It Yamaha OPL-SAx (ISA)
255Works perfectly in all modes.
256This chip is used in several PnP cards,
254Below we include a list of supported codecs/cards.
255If your sound card
256is not listed here, it may be supported by a bridge driver.
257.Bl -tag -width 2m
258.It CS4237, CS4236, CS4232, CS4231 (ISA)
259All these cards work perfectly in full duplex using the MSS mode.
260This chipset is used, among others, on the A/Open AW35 and AW32, on
261some Intel motherboards, and (the CS4231) on some non-PnP cards.
262.Pp
263The CS4232 is reported as buggy in the Voxware documentation but
264I am not sure if this is true.
265On one of my Intel motherboards,
266capture does not work simply because the capture DMA channel is
267not wired to the ISA DMA controller.
268.It Yamaha OPL-SAx (ISA)
269Works perfectly in all modes.
270This chip is used in several PnP cards,
257but also (in non-PnP mode) on motherboards and laptops (e.g. the
271but also (in non-PnP mode) on motherboards and laptops (e.g., the
258Toshiba Libretto).
259.It OPTi931 (ISA)
260The chip is buggy, but the driver has many workarounds to make it work
261in full duplex because for some time these were the only full duplex
272Toshiba Libretto).
273.It OPTi931 (ISA)
274The chip is buggy, but the driver has many workarounds to make it work
275in full duplex because for some time these were the only full duplex
262cards I could find. u-law formats uses U8 format internally because of
276cards I could find.
277U-law format uses U8 format internally because of
263a bug in the chip.
264.It Trident 4DWave DX/NX (PCI)
265.It ENSONIQ AudioPCI ES1370/1371 (PCI)
266Creative Labs SoundBlaster PCI is supported as well.
267.It ESS Solo-1/1E (PCI)
268.It NeoMagic 256AV/ZX (PCI)
269.El
270.Sh FILES
271The
272.Nm
273drivers may create the following
274device nodes:
275.Pp
278a bug in the chip.
279.It Trident 4DWave DX/NX (PCI)
280.It ENSONIQ AudioPCI ES1370/1371 (PCI)
281Creative Labs SoundBlaster PCI is supported as well.
282.It ESS Solo-1/1E (PCI)
283.It NeoMagic 256AV/ZX (PCI)
284.El
285.Sh FILES
286The
287.Nm
288drivers may create the following
289device nodes:
290.Pp
276.Bl -tag -width "/dev/dspr%d.%dXXX" -compact
291.Bl -tag -width ".Pa /dev/audio%d.%d" -compact
277.It Pa /dev/audio%d.%d
278Sparc-compatible audio device.
279.It Pa /dev/dsp%d.%d
280Digitized voice device.
281.It Pa /dev/dspW%d.%d
282Like
283.Pa /dev/dsp ,
284but 16 bits per sample.
285.It Pa /dev/dspr%d.%d
286Should be connected to a record codec.
287.It Pa /dev/sndstat
288Current
289.Nm
290status, including all channels and drivers.
291.El
292.Pp
293The first number in the device node
294represents the unit number of the
292.It Pa /dev/audio%d.%d
293Sparc-compatible audio device.
294.It Pa /dev/dsp%d.%d
295Digitized voice device.
296.It Pa /dev/dspW%d.%d
297Like
298.Pa /dev/dsp ,
299but 16 bits per sample.
300.It Pa /dev/dspr%d.%d
301Should be connected to a record codec.
302.It Pa /dev/sndstat
303Current
304.Nm
305status, including all channels and drivers.
306.El
307.Pp
308The first number in the device node
309represents the unit number of the
295.Nm PCM
310.Nm
296device.
297All
298.Nm
311device.
312All
313.Nm
299PCM
300devices are listed
301in
314devices are listed
315in
302.Pa /dev/sndstat.
316.Pa /dev/sndstat .
303Additional messages are sometimes recorded when the
304device is probed and attached, these messages can be viewed with the
305.Xr dmesg 8
306utility.
307.Sh DIAGNOSTICS
317Additional messages are sometimes recorded when the
318device is probed and attached, these messages can be viewed with the
319.Xr dmesg 8
320utility.
321.Sh DIAGNOSTICS
308.Bl -tag -width 2m
322.Bl -diag
309.It ac97: dac not ready
310AC97 codec is not likely to be accompanied with the sound card.
311.It unsupported subdevice XX
312A device node is not created properly.
313.El
314.Sh BUGS
323.It ac97: dac not ready
324AC97 codec is not likely to be accompanied with the sound card.
325.It unsupported subdevice XX
326A device node is not created properly.
327.El
328.Sh BUGS
315Some features of your cards (e.g. global volume control) might not
329Some features of your cards (e.g., global volume control) might not
316be supported on all devices.
317.Sh HISTORY
318The
319.Nm
320device driver first appeared in
330be supported on all devices.
331.Sh HISTORY
332The
333.Nm
334device driver first appeared in
321.Fx 2.2.6 written by Luigi Rizzo.
335.Fx 2.2.6
336written by
337.An Luigi Rizzo .
322It was later
323rewritten in
338It was later
339rewritten in
324.Fx 4.0 by Cameron Grant.
340.Fx 4.0
341by
342.An Cameron Grant .
325The API evolved from the VOXWARE
326standard which later became OSS standard.
327.Sh SEE ALSO
328.Xr csa 4 ,
329.Xr gusc 4 ,
330.Xr sbc 4 ,
331.Xr devfs 5 ,
332.Xr loader.conf 5 ,

--- 20 unchanged lines hidden ---
343The API evolved from the VOXWARE
344standard which later became OSS standard.
345.Sh SEE ALSO
346.Xr csa 4 ,
347.Xr gusc 4 ,
348.Xr sbc 4 ,
349.Xr devfs 5 ,
350.Xr loader.conf 5 ,

--- 20 unchanged lines hidden ---