C H A P T E R  3

Audio Test (audiotest)

audiotest Description

The audiotest verifies the hardware and software components of the audio subsystem. This test supports all Sun audio implementations.

Note - audiocs and audio drivers could cause hangs when performing audiotest with other SunVTS tests during very heavy system load. audio driver hangs could occur on audbri platforms such as SS10. audiotest captures the hangs caused by the audiocs driver and occasionally attempts to retry.

This test works with exclusive access devices (only one process or application available at a time), or with newer audio devices that support the software mixer feature available in the Solaris OS.

Note - audiotest turns the mixer off automatically at run time. Shut down all audio applications before running audiotest, as Online mode is not supported. The mixer is restored after testing.

This test is not scalable.

The availability of the following subtests depends on the particular audio implementation being tested.

audiotest Subtests

TABLE 3-1 audiotest Subtests



Record/Play test

This test plays and records one second of data, but does not check the data. This test runs on all audio implementations.

Crystal test

This test measures the accuracy of the crystal that generates the sample rate clock, by playing a one-second signal and then measuring the actual time required to play the signal. This measurement is performed for each of the eight standard sample rates. This test is available for dbri(7) and audiocs(7) audio implementations.

Loopback tests

This test verifies the functionality and signal quality of the audio ports. The test simultaneously plays and records a known signal. The recorded signal is analyzed for loop gain and signal-to-noise ratio plus distortion. This analysis is repeated at various sample rates, encodings, precisions, and channels.

The audio ports that are supported depend on the audio implementation under test. The audiocs(7) implementation supports loopbacks from and to headphone, line-out, microphone, and line-in ports. The dbri(7) and speakerbox implementation supports fewer ports. The audioamd(7) implementation does not support loopback tests. Most tests require a stereo loopback cable.

Note: The microphone loopback tests require special hardware, and are used by manufacturing centers and special test facilities. Do not invoke the microphone loopback tests unless you have the required hardware.

Controls test

This test verifies the three control buttons on the Sun speakerbox. The Controls test plays music while you press the Volume Down, Volume Up, and Mute buttons in a specific order. If no button is pressed in 30 seconds the test fails. This test is only supported on the dbri(7) and speakerbox implementation.

Audio test

This test plays a 30-second music file out of the speaker or headphone. The full benefit of this test is only realized if the user listens to the output. Badly distorted audio or inaudible music indicates a problem. This test is supported on all audio implementations.

audiotest Options

To reach the following dialog box, right-click on the test name in the System Map and select Test Parameter Options. If you do not see this test in the System Map, you might need to expand the collapsed groups, or your system might not include the device appropriate to this test. Refer to the SunVTS User's Guidefor more details.
FIGURE 3-1 audiotest Test Parameter Options Dialog Box

Screenshot of the audiotest Test Parameter Options dialog box

Note - Upon startup, the SunVTS probe utility determines which audio implementation is present and adjusts the audiotest Option menu appropriately. Your dialog box might look different than the one pictured here, but will contain some or all of these options.

Note - The internal loopbacks are only active if the audio jacks are unused (nothing is connected).

Some options can only be selected through the command line. See the command-line option descriptions in audiotest Command-Line Syntax.

TABLE 3-2 audiotest Options



Audio Output

Selects the output port for the Music Play test.


Sets the volume for the Music Play test.

Audio test

Enables or disables the Music Play test. This test is enabled by default.

Loopback test

Enables or disables the Loopback test. A loopback cable must be installed between the selected ports to run external loopback tests. This test is disabled by default.

Loopback type

Selects the type of Loopback test to run.

Crystal test

Enables or disables the Crystal test. This test is disabled by default.

Controls test

Enables or disables the speakerbox Controls test. This is an interactive test. The user is prompted to press the control buttons on the speakerbox. This test is disabled by default.

Note - Do not run the Crystal test while running other SunVTS tests. The Crystal test is timing-dependent. If the system is too busy, it fails due to time-out errors.

audiotest Test Modes

TABLE 3-3 audiotest Supported Test Modes

Test Mode


Connection test

A simple open and close is performed. No data is transferred. The test returns a pass if the device can be opened and closed successfully. If the device cannot be opened because it is busy, then it is assumed that the device is successfully connected to another process and the test passes.


The record/play test is run and you can choose to run any of the tests described earlier. In this mode, the test will fail if the device is busy.

audiotest Command-Line Syntax

/opt/SUNWvts/bin/audiotest standard_arguments -o dev=/dev/sound/unit_no,I=/devioctl_device,M,L,Q,S,T=loopback_test_type,X,E,LE,CD,CDD=CD_device_name,CDT=track_number,CDG=play_gain,CDL=play_time,W,MF=filename,TF=filename

TABLE 3-4 audiotest Command-Line Syntax




Specifies the audio device to be tested. The default is dev=/dev/audio.


Specifies the audio ioctl device to be tested. The default is


Enables the Music Play test.


Enables the Loopback test.


Enables the Quality test. This option does the same thing as L option except that it prints an extra status message upon completion.


Enables the speakerbox Controls test.


Specifies the type of Loopback test. The default is 1. The choices are listed below:

  • 0--Codec Internal Loopback (CS4231 audio only)
  • 1--Line-in/Line-out
  • 2--Headphone/Line-in
  • 3--Headphone/Microphone
  • 4--Speaker/CD-input
  • I1--Internal Line-in/Line-out
  • I2--Internal Spk/Mic
  • I3--Internal Headphone/Aux1
  • I4--Internal Speaker/Aux1
  • I5--Internal Headphone/Mic


Note: Test type 0 is always run by default on CS4231 audio implementations. Test types 3 and 4 require special hardware, and are used by manufacturing centers and special test facilities. Do not invoke these tests unless you have the required hardware.


Enables the Audio Crystal test.


Continues testing if an error occurs.


Loops on error. This plays the signal data in a continuous loop.


Enables the cdtest. This is for systems with an internal CD-ROM drive. A CD-ROM with music tracks must be loaded prior to running this test.


Specifies the raw device name for the CD-ROM drive. The default is CDD=/dev/rdsk/c0t6d0s0.


Specifies the track number of the CD-ROM to play. The default is to play the first track on the disc.


Specifies the play gain of the CD Play test (0 to 255). The default is 120.


Specifies the number of seconds to run the CD Play test. The default is 30 seconds.


Shows warning messages during the Loopback test.


Selects an optional music file.


Specifies an optional tolerance file.

Note: The tolerance file is used by manufacturing centers and special test facilities. Do not use this option unless you are familiar with the tolerance file format.