/dev/audio%d.%d
Sparc-compatible audio device.
Freebsd pcm audio device infrastructure
Part of sound(4).
For a card with bridge driver support, and a PnP card: device sound
For a card without bridge driver support, and a non-PnP card, the following lines may be required in /boot/device.hints: hint.pcm.0.at="isa" hint.pcm.0.irq="5" hint.pcm.0.drq="1" hint.pcm.0.flags="0x0"
Note: There exists some ambiguity in the naming at the moment (sound, pcm, snd). It will be resolved soon by renaming device sound to device snd, and doing associated changes.
The sound driver provides support for PCM audio play and capture. This driver also supports various PCI, WSS/MSS compatible, ISA sound cards, and AC97 mixer. Once the sound driver attaches, supported devices provide audio record and playback channels. The FreeBSD sound system provides dynamic mixing “VCHAN” and rate conversion “soft formats”. True full duplex operation is available on most cards.
If the sound card is supported by a bridge driver, the sound driver works in conjunction with the bridge driver.
Apart from the usual parameters, the flags field is used to specify the secondary DMA channel (generally used for capture in full duplex cards). Flags are set to 0 for cards not using a secondary DMA channel, or to 0x10 + C to specify channel C.
The driver works best with WSS/MSS cards, which have a very clean architecture and an orthogonal set of features. They also happen to be among the cheapest audio cards on the market.
The driver does its best to recognize the installed hardware and drive it correctly so the user is not required to add several lines in /boot/device.hints. For PCI and ISA PnP cards this is actually easy since they identify themselves. For legacy ISA cards, the driver looks for MSS cards at addresses 0x530 and 0x604 (unless overridden in /boot/device.hints).
In general, the module snd_foo corresponds to device snd_foo and can be loaded by the boot loader(8) via loader.conf(5) or from the command line using the kldload(8) utility. Options which can be specified in /boot/loader.conf include:
(“NO”) If set to “YES”, this option loads all available drivers.
(“NO”) If set to “YES”, only the SoundBlaster 5.1 driver and dependent modules will be loaded.
(“NO”) If set to “YES”, load driver for card/chipset foo.
To define default values for the different mixer channels, set the channel to the prefered value using hints, e.g.: hint.pcm.0.line="0". This will mute the input channel per default.
Each device can optionally support more playback channels that physical hardware provides by using “virtual channels” or VCHANs. VCHAN options can be configured via the sysctl(8) interface but can only be manipulated while the device is inactive.
The following sysctl(8) variables are available:
Configure the amount of DMA bufferspace available for a device.
Set the default block size such that continuous playback will achieve this IRQ rate. This value can be tuned to improve application performance. Increase this value when the sound lags and decrease it if sound stutters or breaks up.
When using devfs(5), the default device for /dev/dsp. Equivalent to a symlink from /dev/dsp to /dev/dsp${hw.snd.unit}.
Controls the internal format conversion if it is available transparently to the application software. When disabled or not available, the application will only be able to select formats the device natively supports.
Level of verbosity for the /dev/sndstat device. Higher values include more output and the highest level, three, should be used when reporting problems. Other options include:
Installed devices and their allocated bus resources.
The number of playback, record, virtual channels, and flags per device.
Channel information per device including the channel's current format, speed, and pseudo device statistics such as buffer overruns and buffer underruns.
File names and versions of the currently sound loaded modules.
Global VCHAN setting that only affects devices that have only one playback channel. The sound system will dynamically create up this many VCHANs. Set to “0” if no VCHANS are desired.
The current number of VCHANs allocated per device. This can be set to preallocate a certain number of VCHANs. Setting this value to “0” will disable VCHANs for this device.
On devices that have more than one recording source (ie: mic and line), there is a corresponding /dev/dspr%d.%d device.
Channel statistics are only kept while the device is open. So with situations involving overruns and underruns, consider the output while the errant application is open and running.
The driver supports most of the OSS ioctl() functions, and most applications work unmodified. A few differences exist, while memory mapped playback is supported natively and in Linux emulation, memory mapped recording is not due to VM system design. As a consequence, some applications may need to be recompiled with a slightly modified audio module. See ⟨sys/soundcard.h⟩ for a complete list of the supported ioctl() functions.
The sound driver supports the following sound cards:
CS4231, CS4232, CS4236, CS4237 (ISA)
Creative Labs SoundBlaster PCI
Intel 443MX, 810, 815, and 815E integrated sound devices
MSS/WSS Compatible DSPs
OPTi931/82C931 (ISA)
Yamaha OPL-SAx (ISA)
The sound drivers may create the following device nodes:
/dev/audio%d.%d
Sparc-compatible audio device.
/dev/dsp%d.%d
Digitized voice device.
/dev/dspW%d.%d
Like /dev/dsp, but 16 bits per sample.
/dev/dspr%d.%d
Should be connected to a record codec.
/dev/sndstat
Current sound status, including all channels and drivers.
The first number in the device node represents the unit number of the sound device. All sound devices are listed in /dev/sndstat. Additional messages are sometimes recorded when the device is probed and attached, these messages can be viewed with the dmesg(8) utility.
AC97 codec is not likely to be accompanied with the sound card.
A device node is not created properly.