Lines Matching refs:channelPair

36 …ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t *destAddress, uint32_t samples, uint32_…
49 asrc_channel_pair_t channelPair,
113 …ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t *destAddress, uint32_t samples, uint32_… in ASRC_ReadNonBlocking() argument
117 volatile uint32_t *srcAddr = ASRC_ASRDO_ADDR(base, channelPair); in ASRC_ReadNonBlocking()
127 asrc_channel_pair_t channelPair, in ASRC_WriteNonBlocking() argument
135 volatile uint32_t *destAddr = ASRC_ASRDI_ADDR(base, channelPair); in ASRC_WriteNonBlocking()
247 uint32_t ASRC_MapSamplesWidth(ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t *inWidth, … in ASRC_MapSamplesWidth() argument
250 …inRegWidth = (ASRC_ASRMCR1(base, channelPair) & ASRC_ASRMCR1_IWD_MASK) >> ASRC_ASRMCR1_IWD_SHIFT, in ASRC_MapSamplesWidth()
251 outRegWidth = ASRC_ASRMCR1(base, channelPair) & ASRC_ASRMCR1_OW16_MASK, in ASRC_MapSamplesWidth()
252 …inDataAlign = (ASRC_ASRMCR1(base, channelPair) & ASRC_ASRMCR1_IMSB_MASK) >> ASRC_ASRMCR1_IMSB_SHI… in ASRC_MapSamplesWidth()
253 …outDataAlign = (ASRC_ASRMCR1(base, channelPair) & ASRC_ASRMCR1_OMSB_MASK) >> ASRC_ASRMCR1_OMSB_SHI… in ASRC_MapSamplesWidth()
313 asrc_channel_pair_t channelPair, in ASRC_SetIdealRatioConfig() argument
348 ASRC_IDEAL_RATIO_HIGH(base, channelPair) = ASRC_ASRIDRHA_IDRATIOA_H(ratio >> 24U); in ASRC_SetIdealRatioConfig()
349 ASRC_IDEAL_RATIO_LOW(base, channelPair) = ASRC_ASRIDRLA_IDRATIOA_L(ratio); in ASRC_SetIdealRatioConfig()
350 base->ASRCTR &= ~ASRC_ASRCTR_AT_MASK(channelPair); in ASRC_SetIdealRatioConfig()
351 asrcfg &= ~(ASRC_ASRCFG_PRE_MODE_MASK(channelPair) | ASRC_ASRCFG_POST_MODE_MASK(channelPair)); in ASRC_SetIdealRatioConfig()
352 …asrcfg |= ASRC_ASRCFG_PRE_MODE(preProc, channelPair) | ASRC_ASRCFG_POST_MODE(postProc, channelPair in ASRC_SetIdealRatioConfig()
446 asrc_channel_pair_t channelPair, in ASRC_SetChannelPairConfig() argument
471 …32_t asrctr = base->ASRCTR & (~(ASRC_ASRCTR_AT_MASK(channelPair) | ASRC_ASRCTR_RATIO_MASK(channelP… in ASRC_SetChannelPairConfig()
473 asrctr |= ASRC_ASRCTR_AT_MASK(channelPair); in ASRC_SetChannelPairConfig()
475 asrctr |= ASRC_ASRCTR_RATIO(config->sampleRateRatio, channelPair); in ASRC_SetChannelPairConfig()
479 uint32_t asrcncr = base->ASRCNCR & (~ASRC_ASRCNCR_CHANNEL_COUNTER_MASK(channelPair)); in ASRC_SetChannelPairConfig()
480 … base->ASRCNCR = asrcncr | ASRC_ASRCNCR_CHANNEL_COUNTER(config->audioDataChannels, channelPair); in ASRC_SetChannelPairConfig()
485 …(~(ASRC_ASRCSR_INPUT_CLOCK_SOURCE_MASK(channelPair) | ASRC_ASRCSR_OUTPUT_CLOCK_SOURCE_MASK(channel… in ASRC_SetChannelPairConfig()
486 asrcsr |= ASRC_ASRCSR_OUTPUT_CLOCK_SOURCE(config->outClockSource, channelPair); in ASRC_SetChannelPairConfig()
489 asrcsr |= ASRC_ASRCSR_INPUT_CLOCK_SOURCE(config->inClockSource, channelPair); in ASRC_SetChannelPairConfig()
496 … (~(ASRC_ASRCDR_INPUT_PRESCALER_MASK(channelPair) | ASRC_ASRCDR_INPUT_DIVIDER_MASK(channelPair) | in ASRC_SetChannelPairConfig()
497 … ASRC_ASRCDR_OUTPUT_PRESCALER_MASK(channelPair) | ASRC_ASRCDR_OUTPUT_DIVIDER_MASK(channelPair))); in ASRC_SetChannelPairConfig()
500 ASRC_CalculateClockDivider(outputSampleRate, config->outSourceClock_Hz), channelPair); in ASRC_SetChannelPairConfig()
504 ASRC_CalculateClockDivider(inputSampleRate, config->inSourceClock_Hz), channelPair); in ASRC_SetChannelPairConfig()
507 if (channelPair == kASRC_ChannelPairC) in ASRC_SetChannelPairConfig()
517 …ASRC_ASRMCR1(base, channelPair) = ASRC_ASRMCR1_OW16(config->outDataWidth) | ASRC_ASRMCR1_IWD(confi… in ASRC_SetChannelPairConfig()
521 uint32_t asrmcra = ASRC_ASRMCR(base, channelPair) & in ASRC_SetChannelPairConfig()
529 ASRC_ASRMCR(base, channelPair) = asrmcra; in ASRC_SetChannelPairConfig()
533 …if (ASRC_SetIdealRatioConfig(base, channelPair, inputSampleRate, outputSampleRate) != kStatus_Succ… in ASRC_SetChannelPairConfig()
540 ASRC_ChannelPairEnable(base, channelPair, true); in ASRC_SetChannelPairConfig()
543 while (!ASRC_GetChannelPairInitialStatus(base, channelPair)) in ASRC_SetChannelPairConfig()
549 ASRC_ChannelPairWriteData(base, channelPair, 0U); in ASRC_SetChannelPairConfig()
568 asrc_channel_pair_t channelPair, in ASRC_GetOutSamplesSize() argument
575 uint32_t outSamplesBufSize = 0U, audioChannels = ASRC_GET_CHANNEL_COUNTER(base, channelPair); in ASRC_GetOutSamplesSize()
577 …asrc_data_width_t outWdith = (base->ASRMCR1[channelPair] & ASRC_ASRMCR1_OW16_MASK) == ASRC_ASRMCR1… in ASRC_GetOutSamplesSize()
580 …asrc_data_align_t outAlign = (base->ASRMCR1[channelPair] & ASRC_ASRMCR1_OMSB_MASK) == ASRC_ASRMCR1… in ASRC_GetOutSamplesSize()
583 …uint32_t inWdith = (base->ASRMCR1[channelPair] & ASRC_ASRMCR1_IWD_MASK) >> ASRC_ASRMCR1_I… in ASRC_GetOutSamplesSize()
584 …asrc_data_align_t inAlign = (base->ASRMCR1[channelPair] & ASRC_ASRMCR1_IMSB_MASK) == ASRC_ASRMCR1_… in ASRC_GetOutSamplesSize()
588 …bool signExtend = (base->ASRMCR1[channelPair] & ASRC_ASRMCR1_OSGN_MASK) == ASRC_ASRMCR1_OSGN_MASK … in ASRC_GetOutSamplesSize()
640 status_t ASRC_TransferBlocking(ASRC_Type *base, asrc_channel_pair_t channelPair, asrc_transfer_t *x… in ASRC_TransferBlocking() argument
644 uint32_t inWaterMark = ASRC_ASRMCR(base, channelPair) & ASRC_ASRMCRA_INFIFO_THRESHOLDA_MASK, in ASRC_TransferBlocking()
645 … outWaterMark = (ASRC_ASRMCR(base, channelPair) & ASRC_ASRMCRA_OUTFIFO_THRESHOLDA_MASK) >> in ASRC_TransferBlocking()
647 audioChannels = ASRC_GET_CHANNEL_COUNTER(base, channelPair); in ASRC_TransferBlocking()
652 inSampleMask = ASRC_MapSamplesWidth(base, channelPair, &inWidth, &outWidth); in ASRC_TransferBlocking()
662 if ((status & (1UL << ((uint32_t)channelPair + ASRC_ASRSTR_AIDEA_SHIFT))) != 0U) in ASRC_TransferBlocking()
666 …ASRC_WriteNonBlocking(base, channelPair, (uint32_t *)(uint32_t)inAddr, onceWriteSamples, inSampleM… in ASRC_TransferBlocking()
674 if ((status & (1UL << ((uint32_t)channelPair + ASRC_ASRSTR_AODFA_SHIFT))) != 0U) in ASRC_TransferBlocking()
676 … ASRC_ReadNonBlocking(base, channelPair, (uint32_t *)(uint32_t)outAddr, outWaterMark, outWidth); in ASRC_TransferBlocking()
684 … ASRC_GetRemainFifoSamples(base, channelPair, (uint32_t *)(uint32_t)outAddr, outWidth, outSamples); in ASRC_TransferBlocking()
713 …if (ASRC_SetChannelPairConfig(base, handle->channelPair, config, inputSampleRate, outputSampleRate… in ASRC_TransferSetChannelPairConfig()
720 …ASRC_MapSamplesWidth(base, handle->channelPair, &handle->in.sampleWidth, &handle->out.sampleWidth); in ASRC_TransferSetChannelPairConfig()
736 …ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t *buffer, uint32_t outSampleWidth, uint3… in ASRC_GetRemainFifoSamples() argument
739 uint32_t audioChannels = ASRC_GET_CHANNEL_COUNTER(base, channelPair); in ASRC_GetRemainFifoSamples()
741 …((ASRC_ASRFST_ADDR(base, channelPair) & ASRC_ASRFSTA_OUTFIFO_FILLA_MASK) >> ASRC_ASRFSTA_OUTFIFO_F… in ASRC_GetRemainFifoSamples()
749 … ASRC_ReadNonBlocking(base, channelPair, (uint32_t *)buffer, remainSamplesInFifo, outSampleWidth); in ASRC_GetRemainFifoSamples()
768 asrc_channel_pair_t channelPair, in ASRC_TransferCreateHandle() argument
779 s_asrcHandle[instance][channelPair] = handle; in ASRC_TransferCreateHandle()
784 handle->channelPair = channelPair; in ASRC_TransferCreateHandle()
826 ASRC_EnableInterrupt(base, ASRC_ASRIER_INPUT_INTERRUPT_MASK(handle->channelPair) | in ASRC_TransferNonBlocking()
828 ASRC_ASRIER_OUTPUTPUT_INTERRUPT_MASK(handle->channelPair)); in ASRC_TransferNonBlocking()
943 if ((status & (1UL << ((uint32_t)handle->channelPair + ASRC_ASRSTR_AODFA_SHIFT))) != 0U) in ASRC_TransferHandleIRQ()
947 ASRC_ReadNonBlocking(base, handle->channelPair, in ASRC_TransferHandleIRQ()
957 if ((status & (1UL << ((uint32_t)handle->channelPair + ASRC_ASRSTR_AIDEA_SHIFT))) != 0U) in ASRC_TransferHandleIRQ()
963 ASRC_WriteNonBlocking(base, handle->channelPair, in ASRC_TransferHandleIRQ()
985 … base, handle->channelPair, (uint32_t *)(uint32_t)handle->out.asrcQueue[handle->out.queueDriver], in ASRC_TransferHandleIRQ()