AudioScience HPI Version_4.10.
asi_header_hpi_doxygen.jpg

HPI Reference Manual

Table of contents

Introduction

The AudioScience Hardware Programming Interface (HPI) provides an interface to AudioScience's hardware for operating system device drivers. This interface "abstracts" the audio hardware in a manner similar to Windows' HAL (Hardware Abstraction Layer). Typical hardware would consist of PCI or PCI Express based audio adapters ("sound cards") such as the ASI6644 and Ethernet network based adapters such as the ASI2416

HPI model of the hardware

The HPI views the audio hardware as being made up of the following objects: sub-system, adapter, stream mixer and control

SubSystem and Adapters

In a computer there is an audio sub-system. The sub-system contains different types of audio adapters. An adapter may be a bus-based plug-in card (PCI/PCIe) or an external adapter (network)

For example there may be 4 adapters in the sub-system. 1 of adapter type A, 2 of adapter type B, and 1 of adapter type C. Note that the HPI audio sub-system is only concerned with AudioScience adapters.

All AudioScience adapters have a unique adapter number associated with them. This is physically set on the adapter using a jumper or switch, in a manner similar to the device ID setting on SCSI devices.

Streams

Each audio adapter is made up of 0 or more output_stream(s) and 0 or more input_stream(s). An input_stream is a source of digital audio (record) and a output_stream is a destination for digital audio (playing). A stream can record/play digital audio with specific attributes of channels, sample rate and format.

The number of channels a stream is usually either be (mono) or 2 (stereo). In the case of a forrmat such as DolbyAC3, the number of channels would be 6.

The sampleRate refers to the number of samples per second the stream is playing or recording. Common sample rates are 8kHz, 11.025kHz, 32kHz, 44.1kHz and 48kHz, although the HPI allows almost any sample rate to be specified (to 1Hz resolution)

Mixers

Each adapter also contains a mixer, which routes audio signals between the in/out streams and the physical inputs and outputs on the adapter. A mixer contains controls that serve to alter and route the audio signals as they pass through. Examples of controls include volume and meter.

For example an adapter may have three output streams, but only two physical (stereo) outputs. The mixer would combine the audio signals from the three streams to send to the two physical outs. This is shown in the following diagram.

mixer_diagram1.png

Mixer controls can be located in one of three places: source side, on a connection (between a source and destination) and destination side. In the previous diagram you can see that the meter controls are source side, the volume controls are on a connection between a particular source and destination and the level controls are on the destination side.