audio(1)
audio - Introduction to audio facilities
As shipped in IRIX 6.5. First release of IRIX 6.5.
NAME audio - Introduction to audio facilities DESCRIPTION An IRIS Audio Processor is included with the IRIS Indigo2, Power Indigo2, Indy, Indigo, Onyx2 and O2 systems. It is an optional upgrade for the Onyx and Power Onyx systems (using an Audio/Serial Option card). Audio capabilities include digitizing sound from a microphone or from standard audio line-in using the stereo analog to digital converters, receiving and transmitting data via the serial digital audio interconnects, and sound output to headphones, internal loudspeaker, and standard line-out using the stereo digital to analog converters. Input gain, headphone/loudspeaker level, input and output sampling rates, and input sources are all independently specified with software. Audio software utilities provided with the workstation allow for immediate use of the built-in audio capabilities. Application programs use the audio system through the Audio Library (AL), an application programming interface accompanying the IRIS Development Option. UTILITY PROGRAMS IRIS Digital Media Execution Environment (dmedia_eoe.sw.tools) includes a number of utility programs that allow you to record, play back, and convert sound files. These programs are provided to make your workstation audio immediately useful. For more information, please see the manual page for each of the utility programs listed below. apanel(1) audio control panel playaifc(1) AIFF, AIFF-C sound file player playaiff(1) installed as a symlink to playaifc sfplay(1) sound file player recordaifc(1) AIFF, AIFF-C sound file recorder recordaiff(1) installed as a symlink recordaifc aifcinfo(1) displays information about AIFF-C, AIFF files sfinfo(1) displays information about sound files aifcresample(1) sampling rate conversion utility aiff2aifc(1) converts an AIFF file to an AIFF-C file aifc2aiff(1) converts an AIFF-C file to an AIFF file aifccompress(1) converts an AIFF or AIFF-C file to a compressed format aifcdecompress(1) decompresses an AIFF-C file sfconvert(1) sound file conversion utility soundeditor(1) sound editing with graphical user interface soundfiler(1) sound file conversion with graphical user interface passthru(1) user-level audio input monitor utility The audio execution environment (dmedia_eoe.sw.audio), in addition to required IRIX audio software support, contains the following utility programs: portstat(1) displays status of all open audio ports on system rbview(1) graphically displays status of audio ports AUDIO PROCESSOR FEATURES The audio processor provides many features to support a variety of audio applications. The follows is a overview of the features of the audio processor with an explanation of any differences between audio systems on different workstations. General Features Independent input and output sample rates Simultaneous input and output of audio data to/from applications Multiple applications sending and receiving audio data Input audio from digital inputs and microphone/line independently Output independently to headphone/loudspeaker, line out, and digital out Onyx2 workstations support locking audio sample rates to video Input and Output Analog Input: Microphone (mono or stereo) or Line level (stereo) Variety of sample rates (from less than 8 kHz to 48 kHz) Controllable input attenutation Digital Input: Stereo Compatible with AES3-1992 and EIAJ CP-340 channel coding Sample rate encoded in incoming stream Onyx2 has an ADAT(r) 8-channel digital optical input Input sample rate may serve as sample clock source for analog in, analog out and digital outs Analog Output: Line level (stereo) and Speaker(mono)/Headphone(stereo) Controllable output level for speaker and headphone Variety of sample rates (from less than 8 kHz to 48 kHz) Digital Outputs: Stereo Onyx2 uses AES3-1992 channel coding (professional-level configuration). Others use IEC958 channel coding standard (nominally set to consumer-level configuration) Onyx2 has an ADAT 8-channel digital optical output Electrical Specifications The following describes the electrical characteristics of the audio hardware for Onyx2, Indigo and Indigo2/Indy. Line-level analog input: Computer-controlled attenuators (trim) adjust for a variety of levels. Each input channel may be adjusted in 1 dB steps on Onyx2 and 1.5 dB steps on Indigo and Indigo2/Indy. Nominal Input Impedance: Onyx2: 7.5 kOhm Indigo: 5 kOhm Indigo2: 20 kOhm Indy: 10 kOhm Amplitude at Full-Scale: Onyx2: +6.5 dBV Indigo: 1 Vpp to 10 Vpp Indigo2/Indy: 0.63 Vpp to 8.4 Vpp Microphone input: A monophonic condenser microphone is included with the IRIS Audio Processor. Nominal Input Impedance: Onyx2: 2.2 kOhm Indigo: 2 kOhm Indigo2: 1.5 kOhm Indy: 2.0 kOhm The condenser microphone supplied with your audio system obtains a small amount of power from the microphone input connector (5V on Onyx2, 3V on Indigo2/Indy and Indigo via the respective input impedance shown above). The microphone input connector is compatible with other convential microphones beside the one supplied. Serial Digital Interconnect: The Stereo Serial Digital Audio interconnect is a coaxial digital interconnect that makes noiseless audio connections to DAT machines, professional audio gear, CD players, etc. It corresponds to the electrical characteristics of AES-3id-1995, for distribution of digital audio using 75 Ohm video cable. The interconnect is transformer coupled to prevent ground loops and provide isolation. It supports up to 24 bit, 50kHz sampling. It is based on the following standards: CP-340: EIAJ AES3-1992: Audio Engineering Society AES-3id-1995: Audio Engineering Society IEC958: IEC Line-level analog output: Output Impedance: 47 kOhms [Onyx2]; 600 Ohms [Indigo and Indigo2/Indy] Full-scale amplitude: 6.5 dBV [Onyx2]; 6 Vpp [Indigo]; 4.7 Vpp [Indigo2/Indy] Headphone Output: The stereo headphone output includes separate volume controls for each channel. Volume for each channel may be adjusted to one of 256 linear steps. Output Level Maximum, each channel Indigo Indigo2/Indy 64 Ohm load 180 mW 36 mW 16 Ohm load 280 mW 74 mW The headphone volume also controls the speaker volume on all platforms. [Note: Onyx2 has no built-in loudspeaker]. When the headphones are plugged in, the speaker circuit is disabled. Connectors All audio connectors for Indigo and Indigo2/Indy audio are 3.5 mm (1/8 inch) stereo mini phone connectors, as are microphone and headphone/speaker connectors for Onyx. For those systems which use these connectors, the table below gives the pin assignments. By "input," we mean an input to the computer, and by "output," we mean an output from the computer. Connector Tip Ring Sleeve Microphone (Indigo, Onyx2) Input Not Connected Ground Microphone (Indigo2/Indy) L R Ground Line In L R Ground Line Out L R Ground Headphone Out L R Ground Digital I/O Output Input Ground (for this circuit alone) For Onyx2, Line In and Line Out are RCA-style connectors, and AES Digital In and Out are on 75 ohm BNC connectors. Differences Between Indigo2/Indy and Indigo Audio The Indigo2/Indy audio system represents the second generation of SGI digital audio. The Audio/Serial Option for Onyx/Challenge is, for the most part, identical to the Indigo2/Indy audio system. These systems deviate from an exact replica of the Indigo audio system in the following ways: Digital Signal Processor The original Indigo contains a Motorola 56001 Digital Signal Processor (DSP). This processor is used to maintain real-time flow of audio data to and from the MIPS processor, and to perform mixing operations between audio applications. Indigo2 and Indy do not contain a dedicated DSP chip; instead, the operation of the audio system is split between the HAL2 ASIC, HPC3 ASIC, and software running on the MIPS CPU. Input Attenuation (Trim) As in the original Indigo, normal line input levels may be digitized as full range signals. The input level attenuation control which sets this trim has a larger range of attenuation in Indigo than Indigo2 and Indy. You might have become accustomed to using this trim control (which is mapped to apanel) as an input volume control whose range extends to full input attenuation (zero signal). The Indigo2 and Indy input attenuator does not attenuate the input signal completely, but it does support the full specified range for input digitizations. Headphone Power Output For the same digital audio signal, the headphone driver in Indigo provides noticeably more power (volume) for a given output volume setting than Indigo2 and Indy. Internal Speaker For the same digital audio signal, the internal speaker in Indigo provides noticeably more volume for a given output volume setting than Indigo2 or Indy. Indigo2 and Indy have substantially greater fan noise than Indigo, which increases your perception of this effect. The distance between the listener and the chassis loudspeaker, and the direction of the loudspeaker with respect to the listener, both strongly influence the perceived loudness. Support for Four-Channel Audio On Indigo2 and Indy workstations, the audio processor is capable of four channels of analog line-level input and four channels of analog line-level output. The Audio Control Panel apanel performs the channel mode switch with a toggling menu item. Application programs enable the four-channel capability with an Audio Library procedure call. On workstations without the four-channel capability (e.g., Indigo), applications created to input or output four channels of audio can be executed and tested but monitored only in two-channels. For further information regarding four-channel audio on Indigo2 and Indy workstations see the section below entitled "Four-Channel Audio Support." Support for Stereo Microphones Indigo2 and Indy workstations support up to two channels of microphone-level signals. The Audio Control Panel apanel specifies the microphone channel mode with a toggling menu item. Application programs specify the microphone mode with an Audio Library procedure call. When a stereo microphone is connected and the stereo microphone software is not enabled, the left channel of the microphone is used as the input to the audio system. Four-Channel Audio Support System Modes Indigo2 and Indy systems support four simultaneous analog audio input and output channels. To support this additional functionality while maintaining functional compatibility with the Indigo systems, the Indigo2 and Indy provides two modes of operation: four-channel mode and Indigo mode. By default, the system is in Indigo mode, and remains in it unless you explicitly change to four-channel mode, via apanel. Switching between the modes changes both the electrical properties of the connectors on the back panel and the behavior of the system audio software. Both stereo and four-channel audio applications function in both modes, with some behavioral changes. These electrical and behavioral changes are documented in the rest of this section. Sampling Rates in Four-Channel Mode In four-channel mode, the analog input and analog output sampling rates must be the same. Changing the input sampling rate causes the output sampling rate to become ``Use Input Rate.'' Likewise, changing the output sampling rate causes the input sampling rate to match the output rate. When you switch into four-channel mode, the system must change either the input or the output sampling rate to match the other. To minimally interfere with already running applications, it decides which rate to change based upon whether or not input or output is in use. Note that this rate restriction applies only to the analog I/O channels; the digital input and analog output may still perform simultaneous I/O at different sampling rates. Input selection in Four-Channel Mode In four-channel mode, four channels of analog input are available. The first two channels represent the analog signal at the line input connector; the next two channels represent the analog signal at the microphone input connector. The line input connector always accepts a line-level signal. However, the electrical properties of the microphone connector are configurable. If you select the line-level source from apanel, the microphone connector functions as a line-level input. If you select the microphone source from apanel, the microphone connector accepts either a stereo or mono microphone. If you select digital input in four-channel mode, the digital input is used. Since the digital input is only a two-channel source, it provides only two channels of data to four-channel applications. However, those applications still function properly, as discussed below. Stereo Applications in Four-Channel Mode Applications that perform stereo audio output function in four-channel mode. Because they provide only two channels of audio data, their output appears only at the line output connector, since the headphone output connector represents the second pair of line-level output. Applications that perform stereo audio input function in four-channel mode. If you select an analog input, four channels of data are theoretically available. A stereo input application gets the sum of the two left-channel inputs as its left channel, and the sum of the two right-channel inputs as its right channel. Four-Channel Applications in Indigo Mode Four-channel output applications function in Indigo mode or on Indigo, though there are only two physical output channels. The translation from four to two channels occurs as follows. The application's output is considered as two stereo pairs. The application's two left channels are summed and sent to the left output channel, and its two right channels are summed and sent to the right channel. Four-channel input applications function in Indigo mode, or on Indigo, though there are only two physical input channels. The translation from two to four channels occurs as follows. The application's input is considered as two stereo pairs. The system's stereo input comes into the application's first stereo pair, and the application's second stereo pair contains zeros. Digital Output in Four-Channel Mode The digital output on any IRIS workstation is a stereo output. In four- channel mode, it transmits the first stereo pair of output. CAVEATS AND KNOWN PROBLEMS The following information will allow you to troubleshoot audio problems and also explain some behavior you may observe when using the audio system. Audio CPU Usage As noted above, the Indigo2 and Indy no longer contain a dedicated DSP chip. Thus, the impact of some Audio Library functions upon system performance has changed. In particular, each audio port that remains open consumes a small but relatively constant amount of the MIPS CPU. Output ports tend to be more expensive than input ports, since they require the kernel to perform mixing on behalf of the application. Rate Settings It is meaningless to set the input source to digital input and the output rate to match the input rate while no digital input signal is connected to the workstation. This condition places the hardware in an indeterminate state, and the behavior of the audio system is unpredictable. Output Rates When monitoring digital input streams, the output rate should be set to match the input rate (i.e., ``Input Rate'' on apanel) as opposed to a rate numerically equal to the input rate. This way, the output stream is clocked by the same source as the input stream instead of a numerically equal but independent clock source. When using the ``Digital'' rates (see apanel(1)) for input or output, audio applications compiled before 5.1 may set the sampling rates to a fraction of the digital input rate. SUGGESTED PRACTICES You can get the best performance out of your IRIS audio processor by following some basic audio connection and recording practices: Digital Transfers The best quality recording is made by transferring audio material entirely in the digital domain. If the source of your recording has a serial digital output, use that connection to the workstation's serial digital audio input port to get noise-and-artifact-free audio data as your recorded sound. For example, if you are using the output of one IRIS audio processor as the input to another, using a serial digital audio transfers the audio information exactly, bit-for-bit, with no loss of dynamic range, added noise or distortion. If you use the analog line-out of the first (playing) workstation as the line-in to the recording workstation, you can still make very good recordings, but not as precise as the digital transfer. Note that serial digital transfers can be made for any sampling rate between 30kHz and 50kHz. If you want to use other sampling rates, you must use the analog interconnect. Equipment and Connections Avoid using mono plugs in the stereo connectors, or cables that short some of the signals together. Some cables have attenuation built into them; these should be avoided for most applications. Setting Input Levels The IRIS Audio Processor provides easy ways to make great analog recordings without a great deal of complicated equipment or specialized knowledge. There are, however, a few guidelines to follow which significantly improve the signal quality. Minimizing Input Gain/Maximizing Input Signal The analog input circuitry for microphone and line-in recording has a software-controlled gain setting. The first step in the process of making a good analog recording is to get a ``hot'' (loud, big) enough signal to the input connector BEFORE it gets to the input gain circuit. The input circuitry accommodates signal levels of up to 10Vpp (peak-to-peak) at the line-in connector. This is in excess of the levels produced at most modern consumer equipment line-out connectors. If the source machine for your recording has an output level control, turn it up as far as you can, but not to exceed the 10Vpp level which would introduce clipping distortion. Clipping distortion of this kind can be fairly easily detected by careful listening. Start with the apanel input gain level setting at the ``factory preset'' level which corresponds to ``8'' on the scale. Adjust the input gain level setting so that loudness peaks of the input material ALMOST light up the entire level meter. A low setting of the input gain control with a signal that registers nearly the entire span of the meter gives the best results. Minimizing Output-to-Input Crosstalk The headphone output amplifiers in your workstation are very powerful devices relative to the extremely sensitive circuits used for analog-to-digital conversion in the analog recording process. You can minimize distortion and crosstalk effects between these systems by reducing the headphone volume level as much as possible during critical analog recording. This does not affect the line-out levels. Avoiding Ground Loops The high-quality analog audio instrumentation circuits in your workstation are very sensitive to the implementation of an analog ground voltage reference. You can achieve the best performance by letting the workstation be the only machine in your system of audio equipment that connects its system electrical ground to the safety grounding conductor. Most modern consumer equipment utilizes only two-prong power plugs and remains ground-isolated from the power lines, so this type of equipment does not typically cause a problem. The IRIS workstation chassis is intended to be electrically grounded. It is equipped with a three-wire saftey grounding plug-a plug that has a third (grounding) pin. Do not defeat the purpose of the grounding plug! Take care when connecting an IRIS workstation with other professional- type audio equipment (such as another IRIS workstation), which connects its chassis ground to the safety grounding conductor. In a professional environment, these problems are typically addressed by signal isolation transformers and other techniques. Note that the serial digital audio ports on your IRIS workstation are already isolated by transformers within the machine, so that ground- reference problems do not typically apply to serial digital audio connections. Other Cautions and Advice If your workstation is connected to a monitoring system such as a power amplifier driving speakers or headphones, turn the monitoring system volume down or off before you power the workstation on or off. Do not wear headphones that are plugged into the workstation during power on or off cycles. Do not record or monitor from an input connector that has nothing plugged into it. Never connect a high-power output, such as the speaker output of a power amplifier, to any of the audio connectors on your workstation. Be sure to use the line-out port of the workstation with the line-in port of your monitoring equipment; it performs better than the headphone output as a line-level source.