SunVTS 3.0 Test Reference Manual

Chapter 4 Audio Test (audiotest)

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

The audio device is an exclusive use device. Only one process or application can interface with it at a time. This test is not scalable.

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

audiotest Subtests

Table 4-1 audiotest Subtests

Subtest 

Description 

Record/Play Test 

This test plays and records one second of data. It does not check data. This test is run on all audio implementations. 

Crystal Test 

The crystal test measures the accuracy of the crystal that generates the sample rate clock. It does this 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 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/to headphone, line-out, microphone, and line-in ports. The dbri(7)/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 the user is prompted to 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)/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 not audible music indicates a problem. This test is supported on all audio implementations.

audiotest Options

Upon start-up, the SunVTS probe utility determines which audio implementation is present and adjusts the audiotest option menu appropriately. The possible option menus are as follows:

Figure 4-1 audiotest Test Option Menu for audioamd(7)

Graphic

The audioamd(7) is an 8-bit mono, telephone-quality, audio device.

Figure 4-2 audiotest Test Option Menu for Speakerbox dbri(7) audio

Graphic

The speakerbox dbri is a high-quality 16-bit stereo multimedia (coder/decoder (codec).

Figure 4-3 audiotest Test Option Menu for SPARCstation LX dbri(7) without a Speakerbox attached

Graphic

The on-board DBRI interface is a high-quality, 16-bit stereo multimedia codec.

Figure 4-4 audiotest Test Option Menu for on-board dbri(7) for SPARCstation 20 and S240

Graphic

The SPARCstation 20 On-board dbri is a high-quality 16-bit stereo multimedia codec.

Figure 4-5 audiotest Test Option Menu for audiocs(7)

Graphic

The audiocs(7)is an on-board, high-quality 16-bit stereo multimedia codec.

Figure 4-6 audiotest Test Option Menu for audiocs(7) with Internal Loopbacks

Graphic

The audiocs(7) is an on-board, high-quality 16-bit stereo multimedia codec.


Note -

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


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

Table 4-2 audiotest Options

Option 

Description 

Audio Test 

Enables or disables the music play test. This test is enabled by default. 

Audio Output 

Selects the output port for the music play test. 

Volume 

Sets the volume for the music play test. 

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 4-3 audiotest Test Modes

Test Mode 

Description 

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. 

Functional Test 

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. 

 

If you invoke SunVTS through SyMON, the following Functional Test description applies: The record/play test is run. 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. 

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 4-4 audiotest Command Line Syntax

Argument 

Explanation 

dev=/dev/audio_device

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

I=/dev/ioctl_device

Specifies the audio ioctl device to be tested; the default is /dev/audioctl.

M

Enables the music play test. 

L

Enables the loopback test. 

Q

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

S

Enables the speakerbox controls test. 

T=loopback_test_type

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.  

X

Enables the Audio Crystal test. 

E

Continues testing if an error occurs. 

LE 

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

CD 

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

CDD=CD_device_name 

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

CDT=number 

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

CDG=play_gain 

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

CDL=play_time 

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

Shows warning messages during the loopback test. 

MF=filename 

Selects an optional music file. 

TF=filename 

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. 


Note -

64-bit tests are located in the sparcv9 subdirectory: /opt/SUNWvts/bin/sparcv9/testname. If the test is not present in this directory, then it may only be available as a 32-bit test. For more information refer to "32-Bit and 64-Bit Tests".


audiotest Error Messages

Table 4-5 audiotest Error Messages

 

Error Message 

Probable Cause(s) 

Suggested Action (if applicable) 

6000

Signal To Noise ratio too low (name) on name, SNR =number db, Min SNR =number db (text)

Loopback cable is missing or faulty. 

Audio hardware (usually consistent failures). 

System software problem (usually intermittent failures). 

 

6001

Channel Separation too low (name), SEP =number db, Min SEP =number db (text)

Loopback cable is faulty. 

Audio hardware is faulty (usually consistent failures). 

System software problem (usually intermittent failures). 

 

6002

Loop gain is out of range (name), name GAIN =number db, Min =number Max =number db (text)

Loopback cable is missing or faulty. 

Audio hardware is faulty (usually consistent failures). 

System software problem (usually intermittent failures). 

 

8000

Must be super user (root) to execute

The user does not have root privileges. 

 

8012

Invalid audio device (device_name) for Crystal test

The crystal test is not supported on the system audio device. 

 

8013

Invalid audio device (device_name) for Controls test

The system audio device does not support a speakerbox. 

 

8014

Invalid audio device (device_name) for Loopback Quality test

No loopback tests are supported on the system audio device. 

 

8015

Invalid audio device (device_name) for Loopback Quality test (T=number)

The specified loopback test is not supported on the system audio device. 

The specified loopback type is not supported on this audio device. 

 

 

 

8020

Incomplete button press sequence

The required button presses were not detected in the time allowed. 

 

8023

Underrun/Overrun error failure

The audio driver detected underrun or overrun errors while transferring data to the audio device. These errors usually happen when the loopback test is run while during heavy system activity. 

 

8027

name: `name(name=number, name=number, name=number)' system call timeout. No response after number seconds. Device = device_name

The system call is hanging. 

 

Audio hardware (usually consistent failures). 

 

 

System software problem (usually intermittent failures). 

 

 

8028

Audio crystal test did not complete in the expected time, rate = number Hz, time = number usecs, min = number, max = number

Excessive loading on the system. 

Disable all other tests and try again. 

8029

Speaker is an invalid output port for device

The system does not have an on-board speaker. 

 

8032

Failed ioctl name (error_message)

The ioctl( ) system call failed.

See the appended error message. 

8033

Failed mmap (error_message)

The mmap( ) system call failed.

See the appended error message. 

8034

Failed fstat (error_message)

The fstat( ) system call failed.

See the appended error message. 

8035

Failed ftruncate (error_message)

The ftruncate( ) system call failed.

See the appended error message. 

8036

Write to audio device returned error condition (error_message)

The write( ) system call failed.

See the appended error message. 

8037

Read from audio device returned error condition (error_message)

The read( ) system call failed.

See the appended error message. 

8038

Failed to allocate number bytes of memory (error_message)

The memory allocation system call failed, most likely due to a lack of system memory resource.  

See the appended error message. 

8051

Unknown audio device (name=device_name, config=name)

 

 

8052

Unable to get platform name

 

 

8053

Unknown architecture/audio = name / device_name

 

 

8055

Could not open device_name: error_message

The open( ) system call failed

Examine system message files (/var/adm/messages) for other information.

Device does not respond. 

No mmcodec device found.

Unable to communicate with speakerbox. 

 

8075

Invalid audio file format

Specified audio file is not in expected format. 

 

8077

Invalid audio encoding

An unknown audio encoding type was specified. 

 

8090

Only one name loopback can be selected at a time

The user specified more than one loopback test on the same port. 

 

8091

Cannot enable loopback testing without selecting a loopback type

The user enabled loopback testing but did not specify a loopback type.