Share via


Audio CD Driver Test (Compact 7)

3/12/2014

The Audio CD Driver Test assesses the functionality of a CD-ROM block driver that supports the audio CD format. This test reads raw audio track data from an audio CD and writes the data to a .wav file on your development workstation for manual verification of audio quality. This test also assesses the functionality of commands such as play, pause, stop, and seek.

Test Prerequisites

Your device must meet the following requirements before you run this test.

The following table shows the hardware requirements for the Audio CD Driver Test.

Requirement Description

CD/DVD-ROM drive

A CD-ROM drive or CD/DVD-ROM drive. This can be connected via an ATA or USB cable.

A working audio CD

If an audio CD is not in the CD-ROM drive or CD/DVD-ROM drive, test cases are skipped.

Note:

When you run the Audio CD Driver Test, the CTK temporarily copies files to the root directory of the target device. Before running the test, verify that there is at least 0.5 megabytes (MB) of free space in the root directory of the target device. If there is not sufficient space there, the test cannot run.

Subtests

The table below lists the subtests included in this test.

SubTest ID Description

1001

Raw read and compare first sector of each track

Reads in raw mode the first sector of each track by using the IOCTL_CDROM_READ_SG IOCTL. The test then compares the returned data to data from the same sector read by using the IOCTL_CDROM_RAW_READ IOCTL.

This test case fails if the data read by IOCTL_CDROM_READ_SG differs from the data read by IOCTL_CDROM_RAW_READ, or if either IOCTL is not supported.

1002

Raw read twice and compare all CD data 32 sectors/read

Reads each sector from the CD, 32 sectors at a time, first by using the IOCTL_CDROM_READ_SG IOCTL and then by using the IOCTL_CDROM_RAW_READ IOCTL. The test then compares the returned data.

This test case tolerates inconsistencies in the data returned by each IOCTL. Verify that the output log does not contain warnings of bit errors. This test case fails if either IOCTL is not supported.

1003

Raw read and measure throughput using 32 sectors/read

Reads each sector from the CD 32 sectors at a time by using the IOCTL_CDROM_READ_SG IOCTL, and measures and records throughput.

This test case fails if throughput is not adequate to support digital audio playback. This test case fails if the IOCTL is not supported.

2001

Make summary .wav file w/first 500 sectors of each track

Reads the first 500 sectors, one sector at a time, of each track by using the IOCTL_CDROM_READ_SG IOTCL, and saves data to a .wav file. Play back the resulting .wav file on the development workstation to verify audio integrity, and then delete the .wav file.

This test case fails if it cannot open the .wav file. For information about specifying the directory in which to place the .wav file by using the /output parameter, see Command Line Parameters for the Audio CD Driver Test.

This test case fails if the IOCTL is not supported.

2002

Convert entire track to .wav file, 32 sectors/read

Reads an entire track, 32 sectors at a time, and saves data to a .wav file. Specify the track to read by using the /track command-line parameter. Play back the resulting .wav file on the development workstation to verify audio integrity, and then delete the .wav file.

This test case fails if it cannot open the .wav file. For information about specifying the directory in which to place the .wav file by using the /output parameter, see Command Line Parameters for the Audio CD Driver Test.

This test case fails if the IOCTL is not supported.

3001

Play 10s at each track

Assesses the functionality of the IOCTL_CDROM_PLAY_AUDIO_MSF and IOCTL_CDROM_STOP_AUDIO_MSF IOCTLs by playing the first 10 seconds of each track, starting with the first track and ending with the last track. During playback, the test records information about the state of the drive.

This test fails if either IOCTL is not supported, or if the IOCTL_CDROM_READ_Q_CHANNEL IOCTL does not support the IOCTL_CDROM_CURRENT_POSITION IOCTL.

3002

Play 10s at each track in reverse order

Assesses the functionality of the IOCTL_CDROM_PLAY_AUDIO_MSF and IOCTL_CDROM_STOP_AUDIO_MSF IOCTLs by playing the first 10 seconds of each track, starting with the last track and ending with the first track. During playback, the test records information about the state of the drive.

This test fails if either IOCTL is not supported, or if the IOCTL_CDROM_READ_Q_CHANNEL IOCTL does not support the IOCTL_CDROM_CURRENT_POSITION IOCTL.

3003

Seek to the start of each track

Assesses the functionality of the IOCTL_CDROM_SEEK_AUDIO_MSF IOCTL by seeking the start of each track, starting with the first track and ending with the last track.

This test fails if the IOCTL is not supported, or if the IOCTL_CDROM_READ_Q_CHANNEL IOCTL does not support the IOCTL_CDROM_CURRENT_POSITION IOCTL.

3004

Seek to the start of each track in reverse order

Assesses the functionality of the IOCTL_CDROM_SEEK_AUDIO_MSF IOCTL by seeking the start of each track, starting with the last track and ending with the first track.

This test fails if the IOCTL is not supported, or if the IOCTL_CDROM_READ_Q_CHANNEL IOCTL does not support the IOCTL_CDROM_CURRENT_POSITION IOCTL.

3005

Play, pause, and resume each track

Assesses the functionality of the IOCTL_CDROM_PLAY_AUDIO_MSF and IOCTL_CDROM_PAUSE_AUDIO_MSF IOCTLs by alternating between playing and pausing for 10 seconds at the start of each track, starting with the first track and ending with the last track. During playback, the test records information about the state of the drive.

This test fails if the IOCTL is not supported, or if the IOCTL_CDROM_READ_Q_CHANNEL IOCTL does not support the IOCTL_CDROM_CURRENT_POSITION IOCTL.

Setting Up the Test

The device must have a CD or DVD drive capable of reading CDs. There also must be an audio CD in the CD or DVD drive, otherwise the tests will skip.

Running the Test

The Audio CD Driver Test executes the tux -o -d cddatest command by default. With the default command line, the test runs on the first enumerated CD/DVD ROM drive that matches the BLOCK_DRIVER_GUID interface and supports the IOCTL_CDROM_DISC_INFO and IOCTL_CDROM_READ_TOC I/O control codes (IOCTLs).

You can modify the test by editing the command line. To specify one or more of the following optional command line parameters for this test, use the -c command line parameter. The following table shows the command line parameters for the Audio CD Driver Test.

Command line parameter Description

/disk DSKx:

Specifies the device name of the disk to be tested where 'x' is the number of the device, for example, DSK2:. If you do not specify this parameter, the test runs on the first enumerated CD/DVD ROM drive that contains an audio CD matching the BLOCK_DRIVER_GUID interface. Specifying this parameter overrides the automatic detection process and forces the test to use the disk that you specify.

/profile profile

Specifies a profile to filter devices for testing. If you specify a profile name, the test runs on each device that responds to the IOCTL_DISK_DEVICE_INFO IOCTL and, in the STORAGEDEVICEINFO structure, returns a profile name matching the name that you specify. By default, the test does not filter devices by profile.

/output directory

Specifies the directory in which to place .wav files output by the test. Test cases 2001 and 2002 use this value. The default output directory is \release.

/track track_number

Sets the track number to read from the audio CD. Test case 2001 uses this value. The default value is 1.

vol

This option specifies the disk will be opened as a volume drive. Use the -c option, for example: -c"vol".

store

This option specifies the use of the OpenStore() APIs. Use the -c option, for example: -c"store"

Verifying the Test

When the test completes running, verify that "PASS" appears in the test log for all sub-tests.

Troubleshooting the Test

1. If the test are skipping, make sure there is a valid audio CD in the CD or DVD drive connected.

2. Make sure the CD or DVD drive is detected and mounted by the file system when connected.

3. Make sure the appropriate volume or store options are being used. For tests 3001-3005 you may need to use the -c"vol" option.

For additional platform specific issues, consult the CTK articles on the TechNet wiki.

See Also

Other Resources

Storage Media - CD/DVD Tests