AudioScience HPI Version_4.24.1
|
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_BLULINK = 11, HPI_SAMPLECLOCK_SOURCE_LAST = 11 } |
SampleClock source values. More... | |
Functions | |
hpi_err_t | HPI_SampleClock_QuerySource (const hpi_hsubsys_t *phSubSys, const hpi_handle_t hClock, const uint32_t dwIndex, uint16_t *pwSource) |
Query valid SampleClock sources Iterate dwIndex until an error is returned to get allowed values for SampleClock source in *pwFormat. | |
hpi_err_t | HPI_SampleClock_SetSource (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint16_t wSource) |
Sets the clock source for the sample clock. | |
hpi_err_t | HPI_SampleClock_GetSource (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint16_t *pwSource) |
Gets the current sample clock source. | |
hpi_err_t | HPI_SampleClock_QuerySourceIndex (const hpi_hsubsys_t *phSubSys, const hpi_handle_t hClock, const uint32_t dwIndex, const uint32_t dwSource, uint16_t *pwSourceIndex) |
Query the available source indices. | |
hpi_err_t | HPI_SampleClock_SetSourceIndex (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint16_t wSourceIndex) |
Sets the index for the currently selected source. | |
hpi_err_t | HPI_SampleClock_GetSourceIndex (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint16_t *pwSourceIndex) |
Gets the AES/EBU input used to source the adapter clock. | |
hpi_err_t | HPI_SampleClock_QueryLocalRate (const hpi_hsubsys_t *phSubSys, const hpi_handle_t hClock, const uint32_t dwIndex, uint32_t *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_t | HPI_SampleClock_SetLocalRate (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t 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_t | HPI_SampleClock_SetLocalRateEx (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t dwSampleRateHz, uint32_t dwSampleRatePPB) |
Set the samplerate of the sample clock's local PLL in Hz and parts per billion. | |
hpi_err_t | HPI_SampleClock_GetLocalRate (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwSampleRate) |
Get the samplerate of the sample clock's local PLL. | |
hpi_err_t | HPI_SampleClock_GetSampleRate (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwSampleRate) |
Gets the current adapter samplerate. | |
hpi_err_t | HPI_SampleClock_SetAuto (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t dwEnable) |
Enable/disable clock autoswitching. | |
hpi_err_t | HPI_SampleClock_GetAuto (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwEnable) |
hpi_err_t | HPI_SampleClock_SetLocalRateLock (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t dwLock) |
Enable/disable local rate changing. | |
hpi_err_t | HPI_SampleClock_GetLocalRateLock (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwLock) |
The SampleClock control is used to control the clock source for the adapter.
SampleClock source values.
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_BLULINK |
Blu link sample clock. |
HPI_SAMPLECLOCK_SOURCE_LAST |
Update this if you add a new clock source. |
hpi_err_t HPI_SampleClock_QuerySource | ( | const hpi_hsubsys_t * | phSubSys, |
const hpi_handle_t | hClock, | ||
const uint32_t | dwIndex, | ||
uint16_t * | pwSource | ||
) |
Query valid SampleClock sources Iterate dwIndex until an error is returned to get allowed values for SampleClock source in *pwFormat.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hClock | Control to query |
dwIndex | Index for possible attribute values |
pwSource | source |
References HPI_ControlQuery().
hpi_err_t HPI_SampleClock_SetSource | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint16_t | wSource | ||
) |
Sets the clock source for the sample clock.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to control of type HPI_CONTROL_SAMPLECLOCK |
wSource | Sample clock source - one of HPI_SAMPLECLOCK_SOURCES. |
hpi_err_t HPI_SampleClock_GetSource | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint16_t * | pwSource | ||
) |
Gets the current sample clock source.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to control of type HPI_CONTROL_SAMPLECLOCK |
pwSource | Sample clock source - one of HPI_SAMPLECLOCK_SOURCES. |
hpi_err_t HPI_SampleClock_QuerySourceIndex | ( | const hpi_hsubsys_t * | phSubSys, |
const hpi_handle_t | hClock, | ||
const uint32_t | dwIndex, | ||
const uint32_t | dwSource, | ||
uint16_t * | 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.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hClock | Control to query |
dwIndex | Index for possible attribute values |
dwSource | Source type |
pwSourceIndex | source index |
References HPI_ControlQuery().
hpi_err_t HPI_SampleClock_SetSourceIndex | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint16_t | 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.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to control of type HPI_CONTROL_SAMPLECLOCK |
wSourceIndex | Index of the source to use |
hpi_err_t HPI_SampleClock_GetSourceIndex | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint16_t * | 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.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to control of type HPI_CONTROL_SAMPLECLOCK |
pwSourceIndex | Index of the current source |
hpi_err_t HPI_SampleClock_QueryLocalRate | ( | const hpi_hsubsys_t * | phSubSys, |
const hpi_handle_t | hClock, | ||
const uint32_t | dwIndex, | ||
uint32_t * | 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.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hClock | Control to query |
dwIndex | Index for possible attribute values |
pdwRate | rate |
References HPI_ControlQuery().
hpi_err_t HPI_SampleClock_SetLocalRate | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint32_t | 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_ERROR_INVALID_CONTROL_ATTRIBUTE | if the adapter has no local PLL |
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Control to set |
dwSampleRate | Sample rate in Hz |
hpi_err_t HPI_SampleClock_SetLocalRateEx | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint32_t | dwSampleRateHz, | ||
uint32_t | dwSampleRatePPB | ||
) |
Set the samplerate of the sample clock's local PLL in Hz and parts per billion.
This samplerate becomes the sampleclock output rate when the HPI_SAMPLECLOCK_SOURCE_LOCAL source is selected. Note that not all adapters support this call.
HPI_ERROR_INVALID_CONTROL_ATTRIBUTE | if the adapter has no local PLL |
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Control to set |
dwSampleRateHz | Sample rate in Hz |
dwSampleRatePPB | Fractional Hz in parts per billion |
hpi_err_t HPI_SampleClock_GetLocalRate | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint32_t * | pdwSampleRate | ||
) |
Get the samplerate of the sample clock's local PLL.
HPI_ERROR_INVALID_CONTROL_ATTRIBUTE | if the adapter has no local PLL |
hpi_err_t HPI_SampleClock_GetSampleRate | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint32_t * | pdwSampleRate | ||
) |
Gets the current adapter samplerate.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to control of type HPI_CONTROL_SAMPLECLOCK |
pdwSampleRate | Current sample rate |
hpi_err_t HPI_SampleClock_SetAuto | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint32_t | 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.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to control of type HPI_CONTROL_SAMPLECLOCK |
dwEnable | Auto enable. Either HPI_SWITCH_OFF, or HPI_SWITCH_ON |
hpi_err_t HPI_SampleClock_GetAuto | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint32_t * | pdwEnable | ||
) |
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to control of type HPI_CONTROL_SAMPLECLOCK |
pdwEnable | Current auto enable state. Either HPI_SWITCH_OFF, or HPI_SWITCH_ON |
hpi_err_t HPI_SampleClock_SetLocalRateLock | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint32_t | 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 ASI53xx, 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.
When a ASI53xx or ASI63xx is in low latency mode, locked always returns true and is readonly. An attempt to set the lock will return HPI_ERROR_CONTROL_DISABLED.
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to control of type HPI_CONTROL_SAMPLECLOCK |
dwLock | Locked state. Either HPI_SWITCH_OFF, or HPI_SWITCH_ON |
hpi_err_t HPI_SampleClock_GetLocalRateLock | ( | const hpi_hsubsys_t * | phSubSys, |
hpi_handle_t | hControl, | ||
uint32_t * | pdwLock | ||
) |
phSubSys | Vestigial subsys handle (unused), may be set to NULL |
hControl | Handle to control of type HPI_CONTROL_SAMPLECLOCK |
pdwLock | Locked state. Either HPI_SWITCH_OFF, or HPI_SWITCH_ON |