[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    audiocs(7d) manual page Table of Contents

Name

audiocs - Crystal Semiconductor 4231 audio Interface

Availability

SPARCstation 4/5

PowerPC Edition

x86 Systems

Description

Audiocs is an audio interface that provides line in and line out ports for audio devices. It can be either an integrated device or an add-in option card.

Audio Interfaces

SPARC Systems

SPARCstation 5 systems have the Multimedia Codec integrated onto the CPU board of the machine. In the "onboard" Codec, there are microphone, line in, headphone, and line out ports located on the system back panel. In addition, the headphone and microphone ports do not have the input detection circuitry to determine whether or not there is currently headphones or a microphone plugged in. There is no interface on the SPARCstation 5 for the speakerbox to connect to.

SPARCstation 4 systems have ports for microphone, line in, headphone, and line out, as well as a port for an internal CD-ROM.

For all SPARCstations, the new Sun Microphone II is recommended for normal desktop audio recording. Other audio sources may be recorded by connecting their line output to the line input (audio sources may also be connected from their headphone output if the volume is adjusted properly).

Audio Interfaces

PowerPC Edition and x86 Systems

The Multimedia Codec may be found as either an integrated motherboard device, or as an add-in option card. PowerPC systems typically offer a variety of audio inputs and outputs, such as microphone, line in, headphone, line out, and internal mono (beeper) speaker. An internal CD-ROM is also a common input option.

Audio Interfaces

Ultra Systems

Ultra systems have ports for microphone, line in, headphone and line out.

Application Program Interface

Applications that open /dev/audio may use the AUDIO_GETDEV ioctl to determine which audio device is being used. The audiocs driver will return the string "SUNW,CS4231" in the name field of the audio_device structure. The version field will contain one of the following values, depending upon the platform:

Platform TypeVersion
SPARCstation 4/5a
Ultra b
reservedc
PowerPCd

The config field will contain the following value: "onboard1" on a /dev/audio stream associated with the onboard Multimedia Codec.

The AUDIO_SETINFO ioctl controls device configuration parameters. When an application modifies the record.buffer_size field using the AUDIO_SETINFO ioctl, the driver will constrain it to be non-zero and up to a maximum of 8180 bytes.

Audio Data Formats

The Multimedia 4231 Codec audiocs device supports the audio formats listed in the following table. When the device is open for simultaneous play and record, the input and output data formats must match.

Supported Audio Data Formats
Sample RateEncodingPrecisionChannels
8000 Hz*m-law or A-law81
9600 Hz*m-law or A-law81
11025 Hz*m-law or A-law81
16000 Hz*m-law or A-law81
18900 Hz*m-law or A-law81
22050 Hz*m-law or A-law81
32000 Hz*m-law or A-law81
37800 Hz*m-law or A-law81
44100 Hz*m-law or A-law81
48000 Hz*m-law or A-law81
8000 Hzlinear161 or 2
9600 Hzlinear161 or 2
11025 Hzlinear161 or 2
16000 Hzlinear161 or 2
18900 Hzlinear161 or 2
22050 Hzlinear161 or 2
32000 Hzlinear161 or 2
37800 Hzlinear161 or 2
44100 Hzlinear161 or 2
48000 Hzlinear161 or 2

Audio Ports

The record.avail_ports and play.avail_ports fields of the audio_info structure report the available input and output ports. In most environments, the audiocs device supports three input ports, except the Ultra product family which supports only two. These input ports are selected by setting the record.port field to either AUDIO_MICROPHONE , AUDIO_LINE_IN , or AUDIO_INTERNAL_CD_IN . (Ultra systems do not support AUDIO_INTERNAL_CD_IN .) If you select the AUDIO_INTERNAL_CD_IN this will select input from the internal CD drive, if present. This will allow you to gather data from the CD without having to hook up a connecting line from the headphone jack to the line input jack. The play.port field may be set to any combination of AUDIO_SPEAKER , AUDIO_HEADPHONE , and AUDIO_LINE_OUT by OR ’ing the desired port names together. (Note: On some systems, the headphone and line out ports internally share the same circuitry; in these cases, it is not possible to enable either output exclusively.)

Sample Granularity

Since the audiocs device manipulates buffers of audio data, at any given time the reported input and output sample counts will vary from the actual sample count by no more than the size of the buffers it is transferring. Programs should, in general, not rely on absolute accuracy of the play.samples and record.samples fields of the audio_info structure.

Audio Status Change Notification

As described in audio(7I) , it is possible to request asynchronous notification of changes in the state of an audio device.

Errors

audiocs errors are defined in the audio(7I) , man pages.

Files

The physical device names are very system dependent and are rarely used by programmers. For example:

SPARC

/devices/iommu@f,e0000000/sbus@f,e0001000/SUNW,CS4231@2,c00000:sound,audio

PowerPC Edition

/devices/pci/pci8086,484@0/SUNW,CS4231@1,830:sound,audio

The programmer should instead use the generic device names listed below:

/dev/audio
symbolic link to the system’s primary audio device, not necessarily a audiocs based audio device
/dev/audioctl
control device for the above audio device
/dev/sound/0*
represents the first audio device on the system and is not necessarily based on audiocs
/dev/sound/0
first audio device in the system
/dev/sound/0ctl
audio control for above device
/usr/demo/SOUND
audio demonstration programs and other files

See Also

ioctl(2) , audio(7I) , streamio(7I)

Crystal Semiconductor, Inc., data sheet for the CS4231 16-Bit, 48 kHz, Multimedia Audio Codec Publication number DS111PP2.

Notes:

The AUDIO_INTERNAL_CD_IN is another new functionality addition. Because of this, audiotool will now have a new button appear in the record popup box that will allow the user of audiotool to switch to the internal CD (if present).


Table of Contents