SampleClock control
[Mixer and Controls]

The SampleClock control is used to control the clock source for the adapter. 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 (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW16 wSource)
 Sets the clock source for the sample clock.
HPI_ERR HPI_SampleClock_GetSource (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 (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW16 wSourceIndex)
 Sets the index for the currently selected source.
HPI_ERR HPI_SampleClock_GetSourceIndex (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_API HPI_SampleClock_SetLocalRate (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_API HPI_SampleClock_GetLocalRate (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwSampleRate)
 Get the samplerate of the sample clock's local PLL.
HPI_ERR HPI_SampleClock_SetSampleRate (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 (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwSampleRate)
 Gets the current adapter samplerate.
HPI_ERR HPI_SampleClock_SetAuto (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 dwAuto)
 Enable/disable clock autoswitching.
HPI_ERR HPI_SampleClock_GetAuto (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwAuto)
HPI_ERR HPI_SampleClock_SetLocalRateLock (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 dwLock)
 Enable/disable local rate changing.
HPI_ERR HPI_SampleClock_GetLocalRateLock (HPI_HSUBSYS *phSubSys, HPI_HCONTROL hControl, HW32 *pdwLock)

Detailed Description

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


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 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_SOURCE_XXX SampleClock source values.

HPI_ERR HPI_SampleClock_GetSource 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_SOURCE_XXX SampleClock source values.

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 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 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_API HPI_SampleClock_SetLocalRate 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_API HPI_SampleClock_GetLocalRate 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 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 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 HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  dwAuto
 

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
dwAuto  Auto enable. Either HPI_SWITCH_OFF, or HPI_SWITCH_ON

HPI_ERR HPI_SampleClock_GetAuto HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32 *  pdwAuto
 

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

HPI_ERR HPI_SampleClock_SetLocalRateLock HPI_HSUBSYS *  phSubSys,
HPI_HCONTROL  hControl,
HW32  dwLock
 

Enable/disable local rate changing.

When enabled (locked), the local clock will be locked to the last rate set by a call to HPI_SampleClock_SetLocalRate().

Adapters supporting local clock locking are in the ASI50xx family.

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 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 Tue Nov 18 12:59:31 2008 for AudioScience HPI by  doxygen 1.4.6-NO