Adapter


Functions

HPI_ERR HPI_AdapterOpen (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex)
 Opens an adapter for use.
HPI_ERR HPI_AdapterClose (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex)
 Closes the adapter associated with the wAdapterIndex.
HPI_ERR HPI_AdapterSetMode (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW32 dwAdapterMode)
 Sets the operating mode of an adapter.
HPI_ERR HPI_AdapterSetModeEx (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW32 dwAdapterMode, HW16 wQueryOrSet)
 Adapter set mode extended.
HPI_ERR HPI_AdapterGetMode (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW32 *pdwAdapterMode)
 Read the current adapter mode setting.
HPI_ERR HPI_AdapterGetInfo (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 (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 (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 *wAssertPresent, char *pszAssert, HW16 *pwLineNumber)
 Returns DSP generated assert messages.
HPI_ERR HPI_AdapterTestAssert (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 wAssertId)
 This function tests that asserts are working correctly on the selected adapter.
HPI_ERR HPI_AdapterDebugRead (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW32 dwDspAddress, char *pBuffer, int *dwCountBytes)
HPI_ERR HPI_AdapterSetProperty (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 wProperty, HW16 wParameter1, HW16 wParameter2)
 Set an adapter property to a value.
HPI_ERR HPI_AdapterGetProperty (HPI_HSUBSYS *phSubSys, HW16 wAdapterIndex, HW16 wProperty, HW16 *pwParameter1, HW16 *pwParameter2)
 Gets the value of an adapter property.

Function Documentation

HPI_ERR HPI_AdapterOpen 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 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_AdapterSetMode 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 Adapter Modes

HPI_ERR HPI_AdapterSetModeEx 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 Adapter Modes
wQueryOrSet  set or query the mode

HPI_ERR HPI_AdapterGetMode 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 - Adapter Modes.

HPI_ERR HPI_AdapterGetInfo 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 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 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. 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 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_AdapterDebugRead HPI_HSUBSYS *  phSubSys,
HW16  wAdapterIndex,
HW32  dwDspAddress,
char *  pBuffer,
int *  dwCountBytes
 

Parameters:
phSubSys  Pointer to HPI subsystem handle.
wAdapterIndex  Index of adapterIndex

HPI_ERR HPI_AdapterSetProperty 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 Adapter properties to set
wParameter1  Adapter property parameter 1.
wParameter2  Adapter property parameter 2.

HPI_ERR HPI_AdapterGetProperty 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 Adapter properties to get.
pwParameter1  Returned adapter property parameter 1.
pwParameter2  Returned adapter property parameter 2.


Generated on Tue Nov 18 12:59:30 2008 for AudioScience HPI by  doxygen 1.4.6-NO