/* param base ASRC base pointer. param handle ASRC transactional handle pointer. param config ASRC channel pair configuration pointer. param inputSampleRate in audio data sample rate. param outputSampleRate out audio data sample rate.  */
status_t ASRC_TransferSetChannelPairConfig(ASRC_Type *base, asrc_handle_t *handle, asrc_channel_pair_config_t *config, uint32_t inputSampleRate, uint32_t outputSampleRate)
/* param base ASRC base pointer. param handle ASRC transactional handle pointer. param config ASRC channel pair configuration pointer. param inputSampleRate in audio data sample rate. param outputSampleRate out audio data sample rate.  */
status_t ASRC_TransferSetChannelPairConfig(ASRC_Type *base, asrc_handle_t *handle, asrc_channel_pair_config_t *config, uint32_t inputSampleRate, uint32_t outputSampleRate)
{
    assert(handle != NULL);
    handle->in.fifoThreshold  = config->inFifoThreshold * (uint32_t)config->audioDataChannels;
    handle->out.fifoThreshold = config->outFifoThreshold * (uint32_t)config->audioDataChannels;
    handle->audioDataChannels = config->audioDataChannels;
    if (ASRC_SetChannelPairConfig(base, handle->channelPair, config, inputSampleRate, outputSampleRate) !=
        kStatus_Success)
    {
        return kStatus_ASRCChannelPairConfigureFailed;
    }
    handle->in.sampleMask =
        ASRC_MapSamplesWidth(base, handle->channelPair, &handle->in.sampleWidth, &handle->out.sampleWidth);
    return kStatus_Success;
}