AudioScience HPI Version_4.24.1
Enumerations | Functions

AES/EBU Digital audio receiver controls

Controls

The AESEBU receiver receives audio from a standard digital audio interface (AESEBU or SPDIF). More...

Enumerations

enum  HPI_AESEBU_ERRORS {
  HPI_AESEBU_ERROR_NOT_LOCKED = 0x01, HPI_AESEBU_ERROR_POOR_QUALITY = 0x02, HPI_AESEBU_ERROR_PARITY_ERROR = 0x04, HPI_AESEBU_ERROR_BIPHASE_VIOLATION = 0x08,
  HPI_AESEBU_ERROR_VALIDITY = 0x10, HPI_AESEBU_ERROR_CRC = 0x20
}
 

AES/EBU error status bits.

More...

Functions

hpi_err_t HPI_AESEBU_Receiver_QueryFormat (const hpi_hsubsys_t *phSubSys, const hpi_handle_t hAesRx, const uint32_t dwIndex, uint16_t *pwFormat)
 query formats supported by this aesebu receiver Iterate dwIndex until an error is returned to get allowed values for aesebu format in *pwFormat
hpi_err_t HPI_AESEBU_Receiver_SetFormat (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint16_t wFormat)
 Sets the physical format of the digital audio input to either the balanced, professional AES/EBU input or the unbalanced, consumer S/PDIF input.
hpi_err_t HPI_AESEBU_Receiver_GetFormat (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint16_t *pwFormat)
 Gets the physical format of the digital audio input : either the balanced, professional AES/EBU input or the unbalanced, consumer S/PDIF input.
hpi_err_t HPI_AESEBU_Receiver_GetSampleRate (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint32_t *pdwSampleRate)
 Returns the sample rate of the incoming AES/EBU digital audio stream in *pdwSampleRate.
hpi_err_t HPI_AESEBU_Receiver_GetUserData (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint16_t wIndex, uint16_t *pwData)
 Get one of 4 userdata bytes from the AES/EBU stream.
hpi_err_t HPI_AESEBU_Receiver_GetChannelStatus (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint16_t wIndex, uint16_t *pwData)
 Get one of 24 channel status bytes from the AES/EBU stream.
hpi_err_t HPI_AESEBU_Receiver_GetErrorStatus (const hpi_hsubsys_t *phSubSys, hpi_handle_t hControl, uint16_t *pwErrorData)
 Get error status from the AES/EBU stream.

Detailed Description

The AESEBU receiver receives audio from a standard digital audio interface (AESEBU or SPDIF).

As well as receiving the audio, status and user bits are extracted from the digital bitstream.

aesebu_receiver.png

Enumeration Type Documentation

AES/EBU error status bits.

Returned by HPI_AESEBU_Receiver_GetErrorStatus()

Enumerator:
HPI_AESEBU_ERROR_NOT_LOCKED 

bit0: 1 when PLL is not locked

HPI_AESEBU_ERROR_POOR_QUALITY 

bit1: 1 when signal quality is poor

HPI_AESEBU_ERROR_PARITY_ERROR 

bit2: 1 when there is a parity error

HPI_AESEBU_ERROR_BIPHASE_VIOLATION 

bit3: 1 when there is a bi-phase coding violation

HPI_AESEBU_ERROR_VALIDITY 

bit4: 1 when the validity bit is high

HPI_AESEBU_ERROR_CRC 

bit5: 1 when the CRC error bit is high


Function Documentation

hpi_err_t HPI_AESEBU_Receiver_QueryFormat ( const hpi_hsubsys_t *  phSubSys,
const hpi_handle_t  hAesRx,
const uint32_t  dwIndex,
uint16_t *  pwFormat 
)

query formats supported by this aesebu receiver Iterate dwIndex until an error is returned to get allowed values for aesebu format in *pwFormat

Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hAesRxControl to query
dwIndexIndex for possible attribute values
pwFormataesebu format, one of the HPI_AESEBU_FORMATS

References HPI_ControlQuery().

hpi_err_t HPI_AESEBU_Receiver_SetFormat ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint16_t  wFormat 
)

Sets the physical format of the digital audio input to either the balanced, professional AES/EBU input or the unbalanced, consumer S/PDIF input.

Note that not all audio adpaters will have both kinds of inputs.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to control of type HPI_CONTROL_AESEBU_RECEIVER
wFormatOne of the HPI_AESEBU_FORMATS
hpi_err_t HPI_AESEBU_Receiver_GetFormat ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint16_t *  pwFormat 
)

Gets the physical format of the digital audio input : either the balanced, professional AES/EBU input or the unbalanced, consumer S/PDIF input.

Note:
Not all audio adapters will have both kinds of inputs.
Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to control of type HPI_CONTROL_AESEBU_RECEIVER.
pwFormatcurrent format, one of the HPI_AESEBU_FORMATS.
hpi_err_t HPI_AESEBU_Receiver_GetSampleRate ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint32_t *  pdwSampleRate 
)

Returns the sample rate of the incoming AES/EBU digital audio stream in *pdwSampleRate.

This information is obtained from the channel status bits in the digital audio bitstream.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Return values:
HPI_ERROR_INVALID_OPERATIONif PLL unlocked.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to control of type HPI_CONTROL_AESEBU_RECEIVER
pdwSampleRatesamplerate 0, 32000,44100 or 48000 (or x2, x4) returned
hpi_err_t HPI_AESEBU_Receiver_GetUserData ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint16_t  wIndex,
uint16_t *  pwData 
)

Get one of 4 userdata bytes from the AES/EBU stream.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to control of type HPI_CONTROL_AESEBU_RECEIVER.
wIndexbyte index ranges from 0..3.
pwDatareturned user data.
hpi_err_t HPI_AESEBU_Receiver_GetChannelStatus ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint16_t  wIndex,
uint16_t *  pwData 
)

Get one of 24 channel status bytes from the AES/EBU stream.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to control of type HPI_CONTROL_AESEBU_RECEIVER.
wIndexbyte index ranges from 0..23.
pwDatareturned channel status data.
hpi_err_t HPI_AESEBU_Receiver_GetErrorStatus ( const hpi_hsubsys_t *  phSubSys,
hpi_handle_t  hControl,
uint16_t *  pwErrorData 
)

Get error status from the AES/EBU stream.

Returns:
0 on success, or one of the HPI_ERROR_CODES.
Parameters:
phSubSysVestigial subsys handle (unused), may be set to NULL
hControlHandle to control of type HPI_CONTROL_AESEBU_RECEIVER.
pwErrorDatareturned error status bitfields defined by HPI_AESEBU_ERRORS.