|
enum | {
kStatus_ASRCIdle = MAKE_STATUS(kStatusGroup_ASRC, 0),
kStatus_ASRCInIdle = MAKE_STATUS(kStatusGroup_ASRC, 1),
kStatus_ASRCOutIdle = MAKE_STATUS(kStatusGroup_ASRC, 2),
kStatus_ASRCBusy = MAKE_STATUS(kStatusGroup_ASRC, 3),
kStatus_ASRCInvalidArgument = MAKE_STATUS(kStatusGroup_ASRC, 4),
kStatus_ASRCClockConfigureFailed = MAKE_STATUS(kStatusGroup_ASRC, 5),
kStatus_ASRCChannelPairConfigureFailed = MAKE_STATUS(kStatusGroup_ASRC, 6),
kStatus_ASRCConvertError = MAKE_STATUS(kStatusGroup_ASRC, 7),
kStatus_ASRCNotSupport = MAKE_STATUS(kStatusGroup_ASRC, 8),
kStatus_ASRCQueueFull = MAKE_STATUS(kStatusGroup_ASRC, 9),
kStatus_ASRCOutQueueIdle = MAKE_STATUS(kStatusGroup_ASRC, 10),
kStatus_ASRCInQueueIdle = MAKE_STATUS(kStatusGroup_ASRC, 11)
} |
| ASRC return status. More...
|
|
enum | asrc_channel_pair_t {
kASRC_ChannelPairA = 0,
kASRC_ChannelPairB = 1,
kASRC_ChannelPairC = 2
} |
| channel pair mask More...
|
|
enum | {
kASRC_SampleRate_8000HZ = 8000U,
kASRC_SampleRate_11025HZ = 11025U,
kASRC_SampleRate_12000HZ = 12000U,
kASRC_SampleRate_16000HZ = 16000U,
kASRC_SampleRate_22050HZ = 22050U,
kASRC_SampleRate_24000HZ = 24000U,
kASRC_SampleRate_30000HZ = 30000U,
kASRC_SampleRate_32000HZ = 32000U,
kASRC_SampleRate_44100HZ = 44100U,
kASRC_SampleRate_48000HZ = 48000U,
kASRC_SampleRate_64000HZ = 64000U,
kASRC_SampleRate_88200HZ = 88200U,
kASRC_SampleRate_96000HZ = 96000U,
kASRC_SampleRate_128000HZ = 128000U,
kASRC_SampleRate_176400HZ = 176400U,
kASRC_SampleRate_192000HZ = 192000U
} |
| ASRC support sample rate. More...
|
|
enum | {
kASRC_FPInWaitStateInterruptEnable = ASRC_ASRIER_AFPWE_MASK,
kASRC_OverLoadInterruptMask = ASRC_ASRIER_AOLIE_MASK,
kASRC_DataOutputCInterruptMask = ASRC_ASRIER_ADOEC_MASK,
kASRC_DataOutputBInterruptMask = ASRC_ASRIER_ADOEB_MASK,
kASRC_DataOutputAInterruptMask = ASRC_ASRIER_ADOEA_MASK,
kASRC_DataInputCInterruptMask = ASRC_ASRIER_ADIEC_MASK,
kASRC_DataInputBInterruptMask = ASRC_ASRIER_ADIEB_MASK,
kASRC_DataInputAInterruptMask = ASRC_ASRIER_ADIEA_MASK
} |
| The ASRC interrupt enable flag. More...
|
|
enum | {
kASRC_StatusDSLCounterReady = ASRC_ASRSTR_DSLCNT_MASK,
kASRC_StatusTaskQueueOverLoad = ASRC_ASRSTR_ATQOL_MASK,
kASRC_StatusPairCOutputOverLoad = ASRC_ASRSTR_AOOLC_MASK,
kASRC_StatusPairBOutputOverLoad = ASRC_ASRSTR_AOOLB_MASK,
kASRC_StatusPairAOutputOverLoad = ASRC_ASRSTR_AOOLA_MASK,
kASRC_StatusPairCInputOverLoad = ASRC_ASRSTR_AIOLC_MASK,
kASRC_StatusPairBInputOverLoad = ASRC_ASRSTR_AIOLB_MASK,
kASRC_StatusPairAInputOverLoad = ASRC_ASRSTR_AIOLA_MASK,
kASRC_StatusPairCOutputOverflow = ASRC_ASRSTR_AODOC_MASK,
kASRC_StatusPairBOutputOverflow = ASRC_ASRSTR_AODOB_MASK,
kASRC_StatusPairAOutputOverflow = ASRC_ASRSTR_AODOA_MASK,
kASRC_StatusPairCInputUnderflow = ASRC_ASRSTR_AIDUC_MASK,
kASRC_StatusPairBInputUnderflow = ASRC_ASRSTR_AIDUB_MASK,
kASRC_StatusPairAInputUnderflow = ASRC_ASRSTR_AIDUA_MASK,
kASRC_StatusFPInWaitState = ASRC_ASRSTR_FPWT_MASK,
kASRC_StatusOverloadError = ASRC_ASRSTR_AOLE_MASK,
kASRC_StatusInputError,
kASRC_StatusOutputError,
kASRC_StatusPairCOutputReady = ASRC_ASRSTR_AODFC_MASK,
kASRC_StatusPairBOutputReady = ASRC_ASRSTR_AODFB_MASK,
kASRC_StatusPairAOutputReady = ASRC_ASRSTR_AODFA_MASK,
kASRC_StatusPairCInputReady = ASRC_ASRSTR_AIDEC_MASK,
kASRC_StatusPairBInputReady = ASRC_ASRSTR_AIDEB_MASK,
kASRC_StatusPairAInputReady = ASRC_ASRSTR_AIDEA_MASK,
kASRC_StatusPairAInterrupt = kASRC_StatusPairAInputReady | kASRC_StatusPairAOutputReady,
kASRC_StatusPairBInterrupt = kASRC_StatusPairBInputReady | kASRC_StatusPairBOutputReady,
kASRC_StatusPairCInterrupt = kASRC_StatusPairCInputReady | kASRC_StatusPairCOutputReady
} |
| The ASRC interrupt status. More...
|
|
enum | {
kASRC_OutputFifoNearFull = ASRC_ASRFSTA_OAFA_MASK,
kASRC_InputFifoNearEmpty = ASRC_ASRFSTA_IAEA_MASK
} |
| ASRC channel pair status. More...
|
|
enum | asrc_ratio_t {
kASRC_RatioNotUsed = 0U,
kASRC_RatioUseInternalMeasured,
kASRC_RatioUseIdealRatio
} |
| ASRC ideal ratio. More...
|
|
enum | asrc_clock_source_t {
kASRC_ClockSourceNotAvalible = -1U,
kASRC_ClockSourceBitClock0 = 0U,
kASRC_ClockSourceBitClock1 = 1U,
kASRC_ClockSourceBitClock2 = 2U,
kASRC_ClockSourceBitClock3 = 3U,
kASRC_ClockSourceBitClock4 = 4U,
kASRC_ClockSourceBitClock5 = 5U,
kASRC_ClockSourceBitClock6 = 6U,
kASRC_ClockSourceBitClock7 = 7U,
kASRC_ClockSourceBitClock8 = 8U,
kASRC_ClockSourceBitClock9 = 9U,
kASRC_ClockSourceBitClocka = 10U,
kASRC_ClockSourceBitClockb = 11U,
kASRC_ClockSourceBitClockc = 12U,
kASRC_ClockSourceBitClockd = 13U,
kASRC_ClockSourceBitClocke = 14U
} |
| The ASRC clock source. More...
|
|
enum | asrc_audio_channel_t {
kASRC_ChannelsNumber1 = 1U,
kASRC_ChannelsNumber2 = 2U,
kASRC_ChannelsNumber3 = 3U,
kASRC_ChannelsNumber4 = 4U,
kASRC_ChannelsNumber5 = 5U,
kASRC_ChannelsNumber6 = 6U,
kASRC_ChannelsNumber7 = 7U,
kASRC_ChannelsNumber8 = 8U,
kASRC_ChannelsNumber9 = 9U,
kASRC_ChannelsNumber10 = 10U
} |
| Number of channels in audio data. More...
|
|
enum | asrc_data_width_t {
kASRC_DataWidth24Bit = 0U,
kASRC_DataWidth16Bit = 1U,
kASRC_DataWidth8Bit = 2U
} |
| data width More...
|
|
enum | asrc_data_align_t {
kASRC_DataAlignMSB = 1U,
kASRC_DataAlignLSB = 0U
} |
| data alignment More...
|
|
enum | asrc_sign_extension_t {
kASRC_NoSignExtension = 0U,
kASRC_SignExtension = 1U
} |
| sign extension More...
|
|
|
uint32_t | ASRC_GetInstance (ASRC_Type *base) |
| Get instance number of the ASRC peripheral. More...
|
|
void | ASRC_Init (ASRC_Type *base, uint32_t asrcPeripheralClock_Hz) |
| brief Initializes the asrc peripheral. More...
|
|
void | ASRC_Deinit (ASRC_Type *base) |
| De-initializes the ASRC peripheral. More...
|
|
void | ASRC_SoftwareReset (ASRC_Type *base) |
| Do software reset . More...
|
|
status_t | ASRC_SetChannelPairConfig (ASRC_Type *base, asrc_channel_pair_t channelPair, asrc_channel_pair_config_t *config, uint32_t inputSampleRate, uint32_t outputSampleRate) |
| ASRC configure channel pair. More...
|
|
uint32_t | ASRC_GetOutSamplesSize (ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t inSampleRate, uint32_t outSampleRate, uint32_t inSamplesize) |
| Get output sample buffer size. More...
|
|
uint32_t | ASRC_MapSamplesWidth (ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t *inWidth, uint32_t *outWidth) |
| Map register sample width to real sample width. More...
|
|
uint32_t | ASRC_GetRemainFifoSamples (ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t *buffer, uint32_t outSampleWidth, uint32_t remainSamples) |
| Get left samples in fifo. More...
|
|
static void | ASRC_ModuleEnable (ASRC_Type *base, bool enable) |
| ASRC module enable. More...
|
|
static void | ASRC_ChannelPairEnable (ASRC_Type *base, asrc_channel_pair_t channelPair, bool enable) |
| ASRC enable channel pair. More...
|
|
|
status_t | ASRC_TransferSetChannelPairConfig (ASRC_Type *base, asrc_handle_t *handle, asrc_channel_pair_config_t *config, uint32_t inputSampleRate, uint32_t outputSampleRate) |
| ASRC configure channel pair. More...
|
|
void | ASRC_TransferCreateHandle (ASRC_Type *base, asrc_handle_t *handle, asrc_channel_pair_t channelPair, asrc_transfer_callback_t inCallback, asrc_transfer_callback_t outCallback, void *userData) |
| Initializes the ASRC handle. More...
|
|
status_t | ASRC_TransferNonBlocking (ASRC_Type *base, asrc_handle_t *handle, asrc_transfer_t *xfer) |
| Performs an interrupt non-blocking convert on asrc. More...
|
|
status_t | ASRC_TransferBlocking (ASRC_Type *base, asrc_channel_pair_t channelPair, asrc_transfer_t *xfer) |
| Performs an blocking convert on asrc. More...
|
|
status_t | ASRC_TransferGetConvertedCount (ASRC_Type *base, asrc_handle_t *handle, size_t *count) |
| Get converted byte count. More...
|
|
void | ASRC_TransferAbortConvert (ASRC_Type *base, asrc_handle_t *handle) |
| Aborts the current convert. More...
|
|
void | ASRC_TransferTerminateConvert (ASRC_Type *base, asrc_handle_t *handle) |
| Terminate all ASRC convert. More...
|
|
void | ASRC_TransferHandleIRQ (ASRC_Type *base, asrc_handle_t *handle) |
| ASRC convert interrupt handler. More...
|
|