SPARCstation 4/5
PowerPC Edition
x86 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).
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.
Ultra systems have ports for microphone, line in, headphone and line out.
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 Type | Version |
SPARCstation 4/5 | a |
Ultra | b |
reserved | c |
PowerPC | d |
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.
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 Rate | Encoding | Precision | Channels |
8000 Hz | *m-law or A-law | 8 | 1 |
9600 Hz | *m-law or A-law | 8 | 1 |
11025 Hz | *m-law or A-law | 8 | 1 |
16000 Hz | *m-law or A-law | 8 | 1 |
18900 Hz | *m-law or A-law | 8 | 1 |
22050 Hz | *m-law or A-law | 8 | 1 |
32000 Hz | *m-law or A-law | 8 | 1 |
37800 Hz | *m-law or A-law | 8 | 1 |
44100 Hz | *m-law or A-law | 8 | 1 |
48000 Hz | *m-law or A-law | 8 | 1 |
8000 Hz | linear | 16 | 1 or 2 |
9600 Hz | linear | 16 | 1 or 2 |
11025 Hz | linear | 16 | 1 or 2 |
16000 Hz | linear | 16 | 1 or 2 |
18900 Hz | linear | 16 | 1 or 2 |
22050 Hz | linear | 16 | 1 or 2 |
32000 Hz | linear | 16 | 1 or 2 |
37800 Hz | linear | 16 | 1 or 2 |
44100 Hz | linear | 16 | 1 or 2 |
48000 Hz | linear | 16 | 1 or 2 |
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.)
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.
As described in audio(7I) , it is possible to request asynchronous notification of changes in the state of an audio device.
audiocs errors are defined in the audio(7I) , man pages.
The physical device names are very system dependent and are rarely used by programmers. For example:
The programmer should instead use the generic device names listed below:
Crystal Semiconductor, Inc., data sheet for the CS4231 16-Bit, 48 kHz, Multimedia Audio Codec Publication number DS111PP2.
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).