SampleClock control
[Mixer and Controls]

The SampleClock control is used to control the clock source for the adapter. More...

Enumerations

enum  HPI_SAMPLECLOCK_SOURCES {
  HPI_SAMPLECLOCK_SOURCE_LOCAL = 1, HPI_SAMPLECLOCK_SOURCE_AESEBU_SYNC = 2, HPI_SAMPLECLOCK_SOURCE_WORD = 3, HPI_SAMPLECLOCK_SOURCE_WORD_HEADER = 4,
  HPI_SAMPLECLOCK_SOURCE_SMPTE = 5, HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT = 6, HPI_SAMPLECLOCK_SOURCE_NETWORK = 8, HPI_SAMPLECLOCK_SOURCE_PREV_MODULE = 10,
  HPI_SAMPLECLOCK_SOURCE_LAST = 10
}
 SampleClock source values. More...

Functions

HPI_ERR HPI_SampleClock_QuerySource (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hClock, const HW32 dwIndex, HW16 *pwSource)
 Query valid SampleClock sources Iterate dwIndex until an error is returned to get allowed values for SampleClock source in *pwFormat.
HPI_ERR HPI_SampleClock_SetSource (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW16 wSource)
 Sets the clock source for the sample clock.
HPI_ERR HPI_SampleClock_GetSource (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW16 *pwSource)
 Gets the current sample clock source.
HPI_ERR HPI_SampleClock_QuerySourceIndex (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hClock, const HW32 dwIndex, const HW32 dwSource, HW16 *pwSourceIndex)
 Query the available source indices.
HPI_ERR HPI_SampleClock_SetSourceIndex (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW16 wSourceIndex)
 Sets the index for the currently selected source.
HPI_ERR HPI_SampleClock_GetSourceIndex (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW16 *pwSourceIndex)
 Gets the AES/EBU input used to source the adapter clock.
HPI_ERR HPI_SampleClock_QueryLocalRate (const HPI_HSUBSYS *phSubSys, const HPI_HCONTROL hClock, const HW32 dwIndex, HW32 *pdwRate)
 Query samplerates supported by the local PLL of this sampleclock Iterate dwIndex until an error is returned to get the list of valid PLL samplerates.
HPI_ERR HPI_SampleClock_SetLocalRate (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 dwSampleRate)
 Set the samplerate of the sample clock's local PLL This samplerate becomes the sampleclock output rate when the HPI_SAMPLECLOCK_SOURCE_LOCAL source is selected.
HPI_ERR HPI_SampleClock_GetLocalRate (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwSampleRate)
 Get the samplerate of the sample clock's local PLL.
HPI_ERR HPI_SampleClock_SetSampleRate (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 dwSampleRate)
 Sets the adapter samplerate when the SampleClock source is HPI_SAMPLECLOCK_SOURCE_ADAPTER or HPI_SAMPLECLOCK_SOURCE_LOCAL.
HPI_ERR HPI_SampleClock_GetSampleRate (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwSampleRate)
 Gets the current adapter samplerate.
HPI_ERR HPI_SampleClock_SetAuto (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 dwEnable)
 Enable/disable clock autoswitching.
HPI_ERR HPI_SampleClock_GetAuto (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwEnable)
HPI_ERR HPI_SampleClock_SetLocalRateLock (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 dwLock)
 Enable/disable local rate changing.
HPI_ERR HPI_SampleClock_GetLocalRateLock (const HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwLock)

Detailed Description

The SampleClock control is used to control the clock source for the adapter.


Enumeration Type Documentation

enum HPI_SAMPLECLOCK_SOURCES
 

SampleClock source values.

Enumerator:
HPI_SAMPLECLOCK_SOURCE_LOCAL  The sampleclock output is derived from its local samplerate generator.

The local samplerate may be set using HPI_SampleClock_SetLocalRate().

HPI_SAMPLECLOCK_SOURCE_AESEBU_SYNC  The adapter is clocked from a dedicated AES/EBU SampleClock input.
HPI_SAMPLECLOCK_SOURCE_WORD  From external wordclock connector.
HPI_SAMPLECLOCK_SOURCE_WORD_HEADER  Board-to-board header.
HPI_SAMPLECLOCK_SOURCE_SMPTE  FUTURE - SMPTE clock.
HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT  One of the aesebu inputs.
HPI_SAMPLECLOCK_SOURCE_NETWORK  From a network interface e.g.

Cobranet or Livewire at either 48 or 96kHz

HPI_SAMPLECLOCK_SOURCE_PREV_MODULE  From previous adjacent module (ASI2416 only).
HPI_SAMPLECLOCK_SOURCE_LAST  Update this if you add a new clock source.


Function Documentation

HPI_ERR HPI_SampleClock_QuerySource const HPI_HSUBSYS *  phSubSys,
const HPI_HCONTROL  hClock,
const HW32  dwIndex,
HW16 *  pwSource
 

Query valid SampleClock sources Iterate dwIndex until an error is returned to get allowed values for SampleClock source in *pwFormat.

Parameters:
phSubSys  Pointer to HPI subsystem handle
hClock  Control to query
dwIndex  Index for possible attribute values
pwSource  source

HPI_ERR HPI_SampleClock_SetSource const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW16  wSource
 

Sets the clock source for the sample clock.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Subsys handle
hControl  Handle to control of type HPI_CONTROL_SAMPLECLOCK
wSource  Sample clock source - one of HPI_SAMPLECLOCK_SOURCES.

HPI_ERR HPI_SampleClock_GetSource const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW16 *  pwSource
 

Gets the current sample clock source.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Subsys handle
hControl  Handle to control of type HPI_CONTROL_SAMPLECLOCK
pwSource  Sample clock source - one of HPI_SAMPLECLOCK_SOURCES.

HPI_ERR HPI_SampleClock_QuerySourceIndex const HPI_HSUBSYS *  phSubSys,
const HPI_HCONTROL  hClock,
const HW32  dwIndex,
const HW32  dwSource,
HW16 *  pwSourceIndex
 

Query the available source indices.

Currently the only source with indices is HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT. Iterate dwIndex until an error is returned to get allowed values for SampleClock source index in *pwSourceIndex.

Parameters:
phSubSys  Pointer to HPI subsystem handle
hClock  Control to query
dwIndex  Index for possible attribute values
dwSource  Source type
pwSourceIndex  source index

HPI_ERR HPI_SampleClock_SetSourceIndex const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW16  wSourceIndex
 

Sets the index for the currently selected source.

Note, to use this function the source must already be set to a source that supports indices (Currently only HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT). The source retains its index setting if a different source is selected.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Subsys handle
hControl  Handle to control of type HPI_CONTROL_SAMPLECLOCK
wSourceIndex  Index of the source to use

HPI_ERR HPI_SampleClock_GetSourceIndex const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW16 *  pwSourceIndex
 

Gets the AES/EBU input used to source the adapter clock.

Note, to use this function the source must already be set to a source that supports indices (Currently only HPI_SAMPLECLOCK_SOURCE_AESEBU_INPUT) On error, *pwSource index is NOT updated.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Subsys handle
hControl  Handle to control of type HPI_CONTROL_SAMPLECLOCK
pwSourceIndex  Index of the current source

HPI_ERR HPI_SampleClock_QueryLocalRate const HPI_HSUBSYS *  phSubSys,
const HPI_HCONTROL  hClock,
const HW32  dwIndex,
HW32 *  pdwRate
 

Query samplerates supported by the local PLL of this sampleclock Iterate dwIndex until an error is returned to get the list of valid PLL samplerates.

Parameters:
phSubSys  Pointer to HPI subsystem handle
hClock  Control to query
dwIndex  Index for possible attribute values
pdwRate  rate

HPI_ERR HPI_SampleClock_SetLocalRate const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  dwSampleRate
 

Set the samplerate of the sample clock's local PLL This samplerate becomes the sampleclock output rate when the HPI_SAMPLECLOCK_SOURCE_LOCAL source is selected.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_CONTROL_ATTRIBUTE if the adapter has no local PLL

HPI_ERR HPI_SampleClock_GetLocalRate const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  pdwSampleRate
 

Get the samplerate of the sample clock's local PLL.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_CONTROL_ATTRIBUTE if the adapter has no local PLL

HPI_ERR HPI_SampleClock_SetSampleRate const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  dwSampleRate
 

Sets the adapter samplerate when the SampleClock source is HPI_SAMPLECLOCK_SOURCE_ADAPTER or HPI_SAMPLECLOCK_SOURCE_LOCAL.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Deprecated:
Use HPI_SampleClock_SetLocalRate() instead
Parameters:
phSubSys  Subsys handle
hControl  Handle to control of type HPI_CONTROL_SAMPLECLOCK
dwSampleRate  Sample rate to set. Valid values depend on adapter type.

HPI_ERR HPI_SampleClock_GetSampleRate const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  pdwSampleRate
 

Gets the current adapter samplerate.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSys  Subsys handle
hControl  Handle to control of type HPI_CONTROL_SAMPLECLOCK
pdwSampleRate  Current sample rate

HPI_ERR HPI_SampleClock_SetAuto const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  dwEnable
 

Enable/disable clock autoswitching.

When enabled, the adapter clock will be derived from the first valid AESEBU input, or from the local PLL if no inputs are valid.

Adapters supporting auto switch are ASI5111, and ASI50xx family members with AESEBU inputs.

Returns:
hpierr
Parameters:
phSubSys  Subsys handle
hControl  Handle to control of type HPI_CONTROL_SAMPLECLOCK
dwEnable  Auto enable. Either HPI_SWITCH_OFF, or HPI_SWITCH_ON

HPI_ERR HPI_SampleClock_GetAuto const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  pdwEnable
 

Parameters:
phSubSys  Subsys handle
hControl  Handle to control of type HPI_CONTROL_SAMPLECLOCK
pdwEnable  Current auto enable state. Either HPI_SWITCH_OFF, or HPI_SWITCH_ON

HPI_ERR HPI_SampleClock_SetLocalRateLock const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  dwLock
 

Enable/disable local rate changing.

Adapters supporting local clock locking are in the ASI50xx (PCM), ASI54xx (CobraNet), ASI63xx (CobraNet) and ASI64xx (CobraNet) families.

For the ASI50xx family, when enabled (locked), the local clock will be locked to the last rate set by a call to HPI_SampleClock_SetLocalRate().

For the ASI54xx, ASI63xx and ASI64xx families the meaning is a little different. The lock operation disables the software sample rate converters, thereby locking the sample rate of all play and record device to the network clock rate of 48 kHz.

Returns:
hpierr
Parameters:
phSubSys  Subsys handle
hControl  Handle to control of type HPI_CONTROL_SAMPLECLOCK
dwLock  Locked state. Either HPI_SWITCH_OFF, or HPI_SWITCH_ON

HPI_ERR HPI_SampleClock_GetLocalRateLock const HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  pdwLock
 

Parameters:
phSubSys  Subsys handle
hControl  Handle to control of type HPI_CONTROL_SAMPLECLOCK
pdwLock  Locked state. Either HPI_SWITCH_OFF, or HPI_SWITCH_ON


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