Adapter


Modules

 Adapter types/product ids

Enumerations

enum  HPI_ADAPTER_PROPERTIES { ,
  HPI_ADAPTER_PROPERTY_GROUPING = 2, HPI_ADAPTER_PROPERTY_ENABLE_SSX2 = 3, HPI_ADAPTER_PROPERTY_SSX2_SETTING = 4, HPI_ADAPTER_PROPERTY_READONLYBASE = 256,
  HPI_ADAPTER_PROPERTY_LATENCY = 256, HPI_ADAPTER_PROPERTY_GRANULARITY = 257, HPI_ADAPTER_PROPERTY_CURCHANNELS = 258, HPI_ADAPTER_PROPERTY_SOFTWARE_VERSION = 259,
  HPI_ADAPTER_PROPERTY_MAC_ADDRESS_MSB = 260, HPI_ADAPTER_PROPERTY_MAC_ADDRESS_LSB = 261, HPI_ADAPTER_PROPERTY_EXTENDED_ADAPTER_TYPE = 262, HPI_ADAPTER_PROPERTY_LOGTABLEN = 263 ,
  HPI_ADAPTER_PROPERTY_IP_ADDRESS = 265, HPI_ADAPTER_PROPERTY_BUFFER_UPDATE_COUNT = 266, HPI_ADAPTER_PROPERTY_INTERVAL = 267, HPI_ADAPTER_PROPERTY_CAPS1 = 268,
  HPI_ADAPTER_PROPERTY_CAPS2 = 269, HPI_ADAPTER_PROPERTY_SYNC_HEADER_CONNECTIONS = 270, HPI_ADAPTER_PROPERTY_SUPPORTS_SSX2 = 271
}
 Adapter properties These are used in HPI_AdapterSetProperty() and HPI_AdapterGetProperty(). More...
enum  HPI_ADAPTER_MODE_CMDS
 Adapter mode commands. More...
enum  HPI_ADAPTER_MODES {
  HPI_ADAPTER_MODE_4OSTREAM = 1, HPI_ADAPTER_MODE_6OSTREAM = 2, HPI_ADAPTER_MODE_8OSTREAM = 3, HPI_ADAPTER_MODE_16OSTREAM = 4,
  HPI_ADAPTER_MODE_1OSTREAM = 5, HPI_ADAPTER_MODE_1 = 6, HPI_ADAPTER_MODE_2 = 7, HPI_ADAPTER_MODE_3 = 8,
  HPI_ADAPTER_MODE_MULTICHANNEL = 9, HPI_ADAPTER_MODE_12OSTREAM = 10, HPI_ADAPTER_MODE_9OSTREAM = 11, HPI_ADAPTER_MODE_MONO = 12,
  HPI_ADAPTER_MODE_LOW_LATENCY = 13
}
 Adapter Modes These are used by HPI_AdapterSetModeEx(). More...

Functions

HPI_ERR HPI_AdapterOpen (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex)
 Opens an adapter for use.
HPI_ERR HPI_AdapterClose (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex)
 Closes the adapter associated with the wAdapterIndex.
HPI_ERR HPI_AdapterFindObject (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 wObjectType, HW16 wObjectIndex, HW16 *pDspIndex)
 Find the DSP index of a particular object instance.
HPI_ERR HPI_AdapterSetMode (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW32 dwAdapterMode)
 Sets the operating mode of an adapter.
HPI_ERR HPI_AdapterSetModeEx (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW32 dwAdapterMode, HW16 wQueryOrSet)
 Adapter set mode extended.
HPI_ERR HPI_AdapterGetMode (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW32 *pdwAdapterMode)
 Read the current adapter mode setting.
HPI_ERR HPI_AdapterGetInfo (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 *pwNumOutStreams, HW16 *pwNumInStreams, HW16 *pwVersion, HW32 *pdwSerialNumber, HW16 *pwAdapterType)
 Obtains information about the specified adapter, including the number of output streams and number of input streams, version, serial number and it's type.
HPI_ERR HPI_AdapterGetModuleByIndex (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 wModuleIndex, HW16 *pwNumOutputs, HW16 *pwNumInputs, HW16 *pwVersion, HW32 *pdwSerialNumber, HW16 *pwModuleType, HPI_HANDLE *phModule)
 Obtains information about the specified module on an adapter, including the number of outputs and number of inputs, version, serial number and type.
HPI_ERR HPI_AdapterGetAssert (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 *wAssertPresent, char *pszAssert, HW16 *pwLineNumber)
 Returns DSP generated assert messages.
HPI_ERR HPI_AdapterTestAssert (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 wAssertId)
 This function tests that asserts are working correctly on the selected adapter.
HPI_ERR HPI_AdapterSetProperty (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 wProperty, HW16 wParameter1, HW16 wParameter2)
 Set an adapter property to a value.
HPI_ERR HPI_AdapterGetProperty (const HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 wProperty, HW16 *pwParameter1, HW16 *pwParameter2)
 Gets the value of an adapter property.

Enumeration Type Documentation

enum HPI_ADAPTER_PROPERTIES
 

Adapter properties These are used in HPI_AdapterSetProperty() and HPI_AdapterGetProperty().

Enumerator:
HPI_ADAPTER_PROPERTY_GROUPING  Adapter grouping property Indicates whether the adapter supports the grouping API (for ASIO and SSX2).
HPI_ADAPTER_PROPERTY_ENABLE_SSX2  Driver SSX2 property Tells the kernel driver to turn on SSX2 stream mapping.

This feature is not used by the DSP. In fact the call is completely processed by the driver and is not passed on to the DSP at all.

HPI_ADAPTER_PROPERTY_SSX2_SETTING  Adapter SSX2 property Indicates the state of the adapter's SSX2 setting.

This setting is stored in non-volatile memory on the adapter. A typical call sequence would be to use HPI_ADAPTER_PROPERTY_SSX2_SETTING to set SSX2 on the adapter and then to reload the driver. The driver would query HPI_ADAPTER_PROPERTY_SSX2_SETTING during startup and if SSX2 is set, it would then call HPI_ADAPTER_PROPERTY_ENABLE_SSX2 to enable SSX2 stream mapping within the kernel level of the driver.

HPI_ADAPTER_PROPERTY_READONLYBASE  Base number for readonly properties.
HPI_ADAPTER_PROPERTY_LATENCY  Readonly adapter latency property.

This property returns in the input and output latency in samples. Property 1 is the estimated input latency in samples, while Property 2 is that output latency in samples.

HPI_ADAPTER_PROPERTY_GRANULARITY  Readonly adapter granularity property.

The granulariy is the smallest size chunk of stereo samples that is processed by the adapter. This property returns the record granularity in samples in Property 1. Property 2 returns the play granularity.

HPI_ADAPTER_PROPERTY_CURCHANNELS  Readonly adapter number of current channels property.

Property 1 is the number of record channels per record device. Property 2 is the number of play channels per playback device.

HPI_ADAPTER_PROPERTY_SOFTWARE_VERSION  Readonly adapter software version.

The SOFTWARE_VERSION property returns the version of the software running on the adapter as Major.Minor.Release. Property 1 contains Major in bits 15..8 and Minor in bits 7..0. Property 2 contains Release in bits 7..0.

HPI_ADAPTER_PROPERTY_MAC_ADDRESS_MSB  Readonly adapter MAC address MSBs.

The MAC_ADDRESS_MSB property returns the most significant 32 bits of the MAC address. Property 1 contains bits 47..32 of the MAC address. Property 2 contains bits 31..16 of the MAC address.

HPI_ADAPTER_PROPERTY_MAC_ADDRESS_LSB  Readonly adapter MAC address LSBs The MAC_ADDRESS_LSB property returns the least significant 16 bits of the MAC address.

Property 1 contains bits 15..0 of the MAC address.

HPI_ADAPTER_PROPERTY_EXTENDED_ADAPTER_TYPE  Readonly extended adapter type number The EXTENDED_ADAPTER_TYPE property returns the 4 digits of an extended adapter type, i.e ASI8920-0022, 0022 is the extended type.

The digits are returned as ASCII characters rather than the hex digits that are returned for the main type Property 1 returns the 1st two (left most) digits, i.e "00" in the example above, the upper byte being the left most digit. Property 2 returns the 2nd two digits, i.e "22" in the example above

HPI_ADAPTER_PROPERTY_LOGTABLEN  Readonly debug log buffer information.
HPI_ADAPTER_PROPERTY_IP_ADDRESS  Readonly adapter IP address For 192.168.1.101 Property 1 returns the 1st two (left most) digits, i.e 192*256 + 168 in the example above, the upper byte being the left most digit.

Property 2 returns the 2nd two digits, i.e 1*256 + 101 in the example above,

HPI_ADAPTER_PROPERTY_BUFFER_UPDATE_COUNT  Readonly adapter buffer processed count.

Returns a buffer processed count that is incremented every time all buffers for all streams are updated. This is useful for checking completion of all stream operations across the adapter when using grouped streams.

HPI_ADAPTER_PROPERTY_INTERVAL  Readonly mixer and stream intervals.

These intervals are measured in mixer frames. To convert to time, divide by the adapter samplerate.

The mixer interval is the number of frames processed in one mixer iteration. The stream update interval is the interval at which streams check for and process data, and BBM host buffer counters are updated.

Property 1 is the mixer interval in mixer frames. Property 2 is the stream update interval in mixer frames.

HPI_ADAPTER_PROPERTY_CAPS1  Adapter capabilities 1 Property 1 - adapter can do multichannel (SSX1) Property 2 - adapter can do stream grouping (supports SSX2).
HPI_ADAPTER_PROPERTY_CAPS2  Adapter capabilities 2 Property 1 - adapter can do samplerate conversion (MRX) Property 2 - adapter can do timestretch (TSX).
HPI_ADAPTER_PROPERTY_SYNC_HEADER_CONNECTIONS  Readonly adapter sync header connection count.
HPI_ADAPTER_PROPERTY_SUPPORTS_SSX2  Readonly supports SSX2 property.

Indicates the adapter supports SSX2 in some mode setting. The return value is true (1) or false (0). If the current adapter mode is MONO SSX2 is disabled, even though this property will return true.

enum HPI_ADAPTER_MODE_CMDS
 

Adapter mode commands.

Used in wQueryOrSet field of HPI_AdapterSetModeEx().

enum HPI_ADAPTER_MODES
 

Adapter Modes These are used by HPI_AdapterSetModeEx().

Warning:
- more than 16 possible modes breaks a bitmask in the Windows WAVE DLL
Enumerator:
HPI_ADAPTER_MODE_4OSTREAM  4 outstream mode.

  • ASI6114: 1 instream
  • ASI6044: 4 instreams
  • ASI6012: 1 instream
  • ASI6102: no instreams
  • ASI6022, ASI6122: 2 instreams
  • ASI5111, ASI5101: 2 instreams
  • ASI652x, ASI662x: 2 instreams
  • ASI654x, ASI664x: 4 instreams
HPI_ADAPTER_MODE_6OSTREAM  6 outstream mode.

  • ASI6012: 1 instream,
  • ASI6022, ASI6122: 2 instreams
  • ASI652x, ASI662x: 4 instreams
HPI_ADAPTER_MODE_8OSTREAM  8 outstream mode.

  • ASI6114: 8 instreams
  • ASI6118: 8 instreams
  • ASI6585: 8 instreams
HPI_ADAPTER_MODE_16OSTREAM  16 outstream mode.

  • ASI6416 16 instreams
  • ASI6518, ASI6618 16 instreams
  • ASI6118 16 mono out and in streams
HPI_ADAPTER_MODE_1OSTREAM  one outstream mode.

  • ASI5111 1 outstream, 1 instream
HPI_ADAPTER_MODE_1  ASI504X mode 1.

12 outstream, 4 instream 0 to 48kHz sample rates (see ASI504X datasheet for more info).

HPI_ADAPTER_MODE_2  ASI504X mode 2.

4 outstreams, 4 instreams at 0 to 192kHz sample rates (see ASI504X datasheet for more info).

HPI_ADAPTER_MODE_3  ASI504X mode 3.

4 outstreams, 4 instreams at 0 to 192kHz sample rates (see ASI504X datasheet for more info).

HPI_ADAPTER_MODE_MULTICHANNEL  ASI504X multichannel mode.

2 outstreams -> 4 line outs = 1 to 8 channel streams), 4 lineins -> 1 instream (1 to 8 channel streams) at 0-48kHz. For more info see the SSX Specification.

HPI_ADAPTER_MODE_12OSTREAM  12 outstream mode.

  • ASI6514, ASI6614: 2 instreams
  • ASI6540,ASI6544: 8 instreams
  • ASI6640,ASI6644: 8 instreams
HPI_ADAPTER_MODE_9OSTREAM  9 outstream mode.

  • ASI6044: 8 instreams
HPI_ADAPTER_MODE_MONO  mono mode.

  • ASI6416: 16 outstreams/instreams
  • ASI5402: 2 outstreams/instreams
HPI_ADAPTER_MODE_LOW_LATENCY  Low latency mode.

  • ASI6416/ASI6316: 1 16 channel outstream and instream


Function Documentation

HPI_ERR HPI_AdapterOpen const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex
 

Opens an adapter for use.

The adapter is specified by wAdapterIndex which corresponds to the adapter index on the adapter hardware (typically set using jumpers or switch).

Parameters:
phSubSys Pointer to HPI subsystem handle.
wAdapterIndex Index of the adapter to be opened. For PCI adapters this ranges from 0-15. Network adapter indicies start at 1000.
Returns:
0 on success, or one of the HPI_ERROR_CODES.

HPI_ERR HPI_AdapterClose const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex
 

Closes the adapter associated with the wAdapterIndex.

Parameters:
phSubSys Pointer to HPI subsystem handle.
wAdapterIndex Index of the adapter to be opened. For PCI adapters this ranges from 0-15. Network adapter indicies start at 1000.
Returns:
0 on success, or one of the HPI_ERROR_CODES.

HPI_ERR HPI_AdapterFindObject const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW16  wObjectType,
HW16  wObjectIndex,
HW16 *  pDspIndex
 

Find the DSP index of a particular object instance.

Only ever implemented for ISTREAM

Deprecated:
DSP index is not visible above HPI backend level now.

HPI_ERR HPI_AdapterSetMode const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW32  dwAdapterMode
 

Sets the operating mode of an adapter.

The adapter must be restarted for the mode to take effect. Under Windows this means that the computer must be rebooted.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_BAD_ADAPTER_MODE if an unsupported mode is set
Parameters:
phSubSys  Pointer to HPI subsystem handle.
wAdapterIndex  Index of adapter to set mode on.
dwAdapterMode  One of the HPI_ADAPTER_MODES

HPI_ERR HPI_AdapterSetModeEx const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW32  dwAdapterMode,
HW16  wQueryOrSet
 

Adapter set mode extended.

This updated version of HPI_AdapterSetMode() allows querying supported modes.
When wQueryOrSet=HPI_ADAPTER_MODE_QUERY doesn't set the mode, but the return value reflects whether the mode is valid for the adapter.
When wQueryOrSet=HPI_ADAPTER_MODE_SET, the mode of the adapter is changed if valid.
The adapter must be restarted for the mode to take affect. Under Windows this means that the computer must be rebooted.

Returns:

0 on success, or one of the HPI_ERROR_CODES.

Return values:
0 the adapter supports the given mode - no error
HPI_ERROR_BAD_ADAPTER_MODE if an unsupported mode is set or queried
HPI_ERROR_XXX code if an error occurs.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
wAdapterIndex  Index of adapter to set mode on.
dwAdapterMode  One of the HPI_ADAPTER_MODES
wQueryOrSet  set or query the mode

HPI_ERR HPI_AdapterGetMode const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW32 *  pdwAdapterMode
 

Read the current adapter mode setting.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
wAdapterIndex  Index of adapter to get mode from.
pdwAdapterMode  The returned adapter mode. Will be one of - HPI_ADAPTER_MODES.

HPI_ERR HPI_AdapterGetInfo const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW16 *  pwNumOutStreams,
HW16 *  pwNumInStreams,
HW16 *  pwVersion,
HW32 *  pdwSerialNumber,
HW16 *  pwAdapterType
 

Obtains information about the specified adapter, including the number of output streams and number of input streams, version, serial number and it's type.

The adapter is assumed to have one mixer.

Parameters:
phSubSys Pointer to HPI subsystem handle.
wAdapterIndex Index of adapter to read adapter information from.
pwNumOutStreams Number of output streams (play) on the adapter.
pwNumInStreams Number of input streams (record) on the adapter.
pwVersion Adapter hardware and DSP software version information. The 16bit word contains the following information:
BitsDescriptionRange
b15-13DSP software major version0..7
b12-b7DSP software minor version0..63
b6-b3Adapter PCB revisionA..P represented as 0..15
b2-b0Adapter assembly revision0..7
pdwSerialNumber Adapter serial number. Starts at 1 and goes up.
pwAdapterType Adapter ID code, defined in HPI.H. Examples are HPI_ADAPTER_ASI6114 (0x6114).
Returns:
0 on success, or one of the HPI_ERROR_CODES.

HPI_ERR HPI_AdapterGetModuleByIndex const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW16  wModuleIndex,
HW16 *  pwNumOutputs,
HW16 *  pwNumInputs,
HW16 *  pwVersion,
HW32 *  pdwSerialNumber,
HW16 *  pwModuleType,
HPI_HANDLE *  phModule
 

Obtains information about the specified module on an adapter, including the number of outputs and number of inputs, version, serial number and type.

Parameters:
phSubSys Pointer to HPI subsystem handle.
wAdapterIndex Index of adapter to read from.
wModuleIndex Index of module to return information for. Iterate from 0 until an error is returned to get info about all modules
pwNumOutputs Number of outputs on the module.
pwNumInputs Number of inputs on the module.
pwVersion Module hardware and DSP software version information. See HPI_AdapterGetInfo()
pdwSerialNumber Adapter serial number. Starts at 1 and goes up.
pwModuleType Module ID code, defined in HPI.H If a module position is empty, this parameter==0. If a module position contains an unidentified module this parameter==0xFFFF.
phModule A handle to the module. This parameter is reserved for future use.
Returns:
0 on success, or one of the HPI_ERROR_CODES.

HPI_ERR HPI_AdapterGetAssert const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW16 *  wAssertPresent,
char *  pszAssert,
HW16 *  pwLineNumber
 

Returns DSP generated assert messages.

Most ASI adapters have a small buffer that can collect up to 16 asserts that are conditionally generated as the DSP code is running. This API provides a mechanism for the host to read any asserts pending in the queue.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
wAdapterIndex  Adpater index to read assert from.
wAssertPresent  Set to 1 if an assert was returned, otherwise it returns 0.
pszAssert  char buffer to contain the returned assert string. String should be declared as
char szAssert[HPI_STRING_LEN].
pwLineNumber  The line number that caused the assert.

HPI_ERR HPI_AdapterTestAssert const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW16  wAssertId
 

This function tests that asserts are working correctly on the selected adapter.

The message processing code on the target adapter generates an assert when this function is called and that assert can then be read back using the HPI_AdapterGetAssert() function.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Pointer to HPI subsystem handle.
wAdapterIndex  Index of adapter to generate the assert.
wAssertId  An assert id number that is returned as the line number in HPI_AdapterGetAssert().

HPI_ERR HPI_AdapterSetProperty const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW16  wProperty,
HW16  wParameter1,
HW16  wParameter2
 

Set an adapter property to a value.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  HPI subsystem handle.
wAdapterIndex  Adapter index.
wProperty  Which of the HPI_ADAPTER_PROPERTIES to set
wParameter1  Adapter property parameter 1.
wParameter2  Adapter property parameter 2.

HPI_ERR HPI_AdapterGetProperty const HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW16  wProperty,
HW16 *  pwParameter1,
HW16 *  pwParameter2
 

Gets the value of an adapter property.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  HPI subsystem handle.
wAdapterIndex  Adapter index.
wProperty  One of HPI_ADAPTER_PROPERTIES to get.
pwParameter1  Returned adapter property parameter 1.
pwParameter2  Returned adapter property parameter 2.


Generated on Thu Jul 29 09:56:41 2010 for AudioScience HPI by  doxygen 1.4.6-NO