/* param base ASRC base pointer. param handle ASRC eDMA handle pointer. param asrcConfig asrc configurations. param periphConfig peripheral configuration. param inputSampleRate ASRC input sample rate. param outputSampleRate ASRC output sample rate.  */
status_t ASRC_TransferSetChannelPairConfigEDMA(ASRC_Type *base, asrc_edma_handle_t *handle, asrc_channel_pair_config_t *asrcConfig, uint32_t inSampleRate, uint32_t outSampleRate)
/* param base ASRC base pointer. param handle ASRC eDMA handle pointer. param asrcConfig asrc configurations. param periphConfig peripheral configuration. param inputSampleRate ASRC input sample rate. param outputSampleRate ASRC output sample rate.  */
status_t ASRC_TransferSetChannelPairConfigEDMA(ASRC_Type *base, asrc_edma_handle_t *handle, asrc_channel_pair_config_t *asrcConfig, uint32_t inSampleRate, uint32_t outSampleRate)
{
    assert((handle != NULL) && (NULL != asrcConfig));
    if (ASRC_SetChannelPairConfig(base, handle->channelPair, asrcConfig, inSampleRate, outSampleRate) !=
        kStatus_Success)
    {
        return kStatus_ASRCChannelPairConfigureFailed;
    }
    handle->in.fifoThreshold  = (asrcConfig->inFifoThreshold) * (uint32_t)asrcConfig->audioDataChannels;
    handle->out.fifoThreshold = (asrcConfig->outFifoThreshold) * (uint32_t)asrcConfig->audioDataChannels;
    (void)ASRC_MapSamplesWidth(base, handle->channelPair, &handle->in.sampleWidth, &handle->out.sampleWidth);
    return kStatus_Success;
}