## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### PMADDE Functions

The PMADDE tool uses Stream Programming Interface Functions to test your audio device driver. The Data Stream menu on the Audio Device Driver Exerciser window includes the following choices: (See Stream Setup and Control for additional information on SPI functions.)

SpiGet Handler

This option sends an SpiGetHandler function to return a stream handler ID and ensure the stream handler is loaded. Although this function does not perform any actions on the audio device driver, you must complete this function before creating a stream.

SpiCreate

This option sends an SpiCreateStream function to the stream handler to create a data stream of a given data type. The data is then passed to the audio device driver using a DDCMD_REG_STREAM message, which establishes a communication link and registers a stream instance with the device driver.

SpiAssociate

This option sends an SpiAssociate function to link a stream object with a given stream source or target. A data object must be identified for use with a stream before the stream can be started.

SpiStart

This option sends an SpiStartStream function to start data streaming for a stream instance or group of streams. The device driver receives several calls including DDCMD_SETUP, DDCMD_WRITE, and DDCMD_CONTROL (DDCMD_START) messages.

SpiStop

This option sends an SpiStopStream function to the stream handler, which is translated to the audio device driver as a DDCMD_CONTROL (DDCMD_STOP) message.

SpiInstall Protocol

This option sends an SpiInstallProtocol function to install stream protocol in the stream handler. It also generates an internal Stream Protocol Control Block (SPCB) key, which is used to differentiate between multiple SPCBs of the same data stream type. If your device driver can perform using a type of data format that the MMPM/2 subsystem currently does not use as its default, use this option to install new protocol that your device driver supports.

SpiDestroy

This option sends an SpiDisableSync function to destroy the stream you created with SpiCreate. SpiDestroy calls the DDCMD_CONTROL (DDCMD_STOP) and DDCMD_DEREG_STREAM messages at the inter-device driver communication (IDC) level. (See Inter-Device Driver Communication (IDC) Interface.)

SpiSeek

This option sends an SpiSeekStream function to set the time within the audio device driver. You can seek the stream to a certain position, back to 0, or position it forward.

SpiQuery Time

This option sends an SpiGetTime function to the stream handler, which issues a DDCMD_STATUS message to the audio device driver to report the current stream time in milliseconds.