RTEMS 6.1-rc4
Loading...
Searching...
No Matches
fsl_asrc.h
1/*
2 * Copyright 2019-2021 NXP
3 * All rights reserved.
4 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8#ifndef _FSL_ASRC_H_
9#define _FSL_ASRC_H_
10
11#include "fsl_common.h"
12
18/*******************************************************************************
19 * Definitions
20 ******************************************************************************/
21
24#define FSL_ASRC_DRIVER_VERSION (MAKE_VERSION(2, 1, 2))
26
27#ifndef ASRC_XFER_QUEUE_SIZE
29#define ASRC_XFER_QUEUE_SIZE (4U)
30#endif
32#define FSL_ASRC_CHANNEL_PAIR_COUNT (4U)
34#define FSL_ASRC_CHANNEL_PAIR_FIFO_DEPTH (64U)
35
37#define ASRC_ASRCTR_AT_MASK(index) ((uint32_t)1U << (ASRC_ASRCTR_ATSA_SHIFT + (uint32_t)(index)))
38#define ASRC_ASRCTR_RATIO_MASK(index) ((uint32_t)3U << (ASRC_ASRCTR_IDRA_SHIFT + (uint32_t)(index)*2U))
39#define ASRC_ASRCTR_RATIO(ratio, index) \
40 (((uint32_t)((uint32_t)(ratio) << (ASRC_ASRCTR_IDRA_SHIFT + (uint32_t)(index)*2U))) & ASRC_ASRCTR_RATIO_MASK(index))
41#define ASRC_ASRIER_INPUT_INTERRUPT_MASK(index) ((uint32_t)1U << (ASRC_ASRIER_ADIEA_SHIFT + (uint32_t)(index)))
42#define ASRC_ASRIER_OUTPUTPUT_INTERRUPT_MASK(index) ((uint32_t)1U << (ASRC_ASRIER_ADOEA_SHIFT + (uint32_t)(index)))
43#define ASRC_ASRCNCR_CHANNEL_COUNTER_MASK(index) ((uint32_t)0xFU << (ASRC_ASRCNCR_ANCA_SHIFT + (uint32_t)(index)*4U))
44#define ASRC_ASRCNCR_CHANNEL_COUNTER(counter, index) \
45 ((uint32_t)((uint32_t)(counter) << (ASRC_ASRCNCR_ANCA_SHIFT + (uint32_t)(index)*4U)) & \
46 ASRC_ASRCNCR_CHANNEL_COUNTER_MASK(index))
47#define ASRC_ASRCFG_PRE_MODE_MASK(index) ((uint32_t)3U << (ASRC_ASRCFG_PREMODA_SHIFT + (uint32_t)(index)*4U))
48#define ASRC_ASRCFG_PRE_MODE(mode, index) \
49 ((uint32_t)((uint32_t)(mode) << (ASRC_ASRCFG_PREMODA_SHIFT + (uint32_t)(index)*4U)) & \
50 ASRC_ASRCFG_PRE_MODE_MASK(index))
51#define ASRC_ASRCFG_POST_MODE_MASK(index) ((uint32_t)3U << (ASRC_ASRCFG_POSTMODA_SHIFT + (uint32_t)(index)*4U))
52#define ASRC_ASRCFG_POST_MODE(mode, index) \
53 ((uint32_t)((uint32_t)(mode) << (ASRC_ASRCFG_POSTMODA_SHIFT + (uint32_t)(index)*4U)) & \
54 ASRC_ASRCFG_POST_MODE_MASK(index))
55#define ASRC_ASRCFG_INIT_DONE_MASK(index) ((uint32_t)1U << (ASRC_ASRCFG_INIRQA_SHIFT + (uint32_t)(index)))
56#define ASRC_ASRCSR_INPUT_CLOCK_SOURCE_MASK(index) ((uint32_t)0xFU << (ASRC_ASRCSR_AICSA_SHIFT + (uint32_t)(index)*4U))
57#define ASRC_ASRCSR_INPUT_CLOCK_SOURCE(source, index) \
58 ((uint32_t)((uint32_t)(source) << (ASRC_ASRCSR_AICSA_SHIFT + (uint32_t)(index)*4U)) & \
59 ASRC_ASRCSR_INPUT_CLOCK_SOURCE_MASK(index))
60#define ASRC_ASRCSR_OUTPUT_CLOCK_SOURCE_MASK(index) ((uint32_t)0xFU << (ASRC_ASRCSR_AOCSA_SHIFT + (uint32_t)(index)*4U))
61#define ASRC_ASRCSR_OUTPUT_CLOCK_SOURCE(source, index) \
62 ((uint32_t)((uint32_t)(source) << (ASRC_ASRCSR_AOCSA_SHIFT + (uint32_t)(index)*4U)) & \
63 ASRC_ASRCSR_OUTPUT_CLOCK_SOURCE_MASK(index))
64
65#define ASRC_ASRCDR_INPUT_PRESCALER_MASK(index) \
66 ((uint32_t)(index) < 2U ? ((uint32_t)7U << (ASRC_ASRCDR1_AICPA_SHIFT + (uint32_t)(index)*6U)) : 7U)
67#define ASRC_ASRCDR_INPUT_PRESCALER(prescaler, index) \
68 (((index) < 2U ? ((uint32_t)(prescaler) << (ASRC_ASRCDR1_AICPA_SHIFT + (uint32_t)(index)*6U)) : (prescaler)) & \
69 ASRC_ASRCDR1_INPUT_PRESCALER_MASK(index))
70#define ASRC_ASRCDR_INPUT_DIVIDER_MASK(index) \
71 ((uint32_t)(index) < 2U ? ((uint32_t)7U << (ASRC_ASRCDR1_AICDA_SHIFT + (uint32_t)(index)*6U)) : \
72 (7U << ASRC_ASRCDR1_AICDA_SHIFT))
73#define ASRC_ASRCDR_INPUT_DIVIDER(divider, index) \
74 (((uint32_t)(index) < 2U ? ((uint32_t)(divider) << (ASRC_ASRCDR1_AICDA_SHIFT + (uint32_t)(index)*6U)) : \
75 ((uint32_t)(divider) << ASRC_ASRCDR1_AICDA_SHIFT)) & \
76 ASRC_ASRCDR_INPUT_DIVIDER_MASK(index))
77#define ASRC_ASRCDR_OUTPUT_PRESCALER_MASK(index) \
78 ((uint32_t)(index) < 2U ? ((uint32_t)7U << (ASRC_ASRCDR1_AOCPA_SHIFT + (uint32_t)(index)*6U)) : (7U << 6U))
79#define ASRC_ASRCDR_OUTPUT_PRESCALER(prescaler, index) \
80 (((uint32_t)(index) < 2U ? ((uint32_t)(prescaler) << (ASRC_ASRCDR1_AOCPA_SHIFT + (uint32_t)(index)*6U)) : \
81 ((uint32_t)(prescaler) << 6U)) & \
82 ASRC_ASRCDR_OUTPUT_PRESCALER_MASK(index))
83#define ASRC_ASRCDR_OUTPUT_DIVIDER_MASK(index) \
84 ((uint32_t)(index) < 2U ? ((uint32_t)7U << (ASRC_ASRCDR1_AOCDA_SHIFT + (uint32_t)(index)*6U)) : (7UL << 9U))
85#define ASRC_ASRCDR_OUTPUT_DIVIDER(divider, index) \
86 (((uint32_t)(index) < 2U ? ((uint32_t)(divider) << (ASRC_ASRCDR1_AOCDA_SHIFT + (uint32_t)(index)*6U)) : \
87 ((uint32_t)(divider) << 9U)) & \
88 ASRC_ASRCDR_OUTPUT_DIVIDER_MASK(index))
89
90#define ASCR_ASRCDR_OUTPUT_CLOCK_DIVIDER_PRESCALER(value, index) \
91 (((uint32_t)(index) < 2U ? ((uint32_t)(value) << (ASRC_ASRCDR1_AOCPA_SHIFT + (uint32_t)(index)*6U)) : \
92 ((uint32_t)(value) << 6U)))
93#define ASCR_ASRCDR_INPUT_CLOCK_DIVIDER_PRESCALER(value, index) \
94 (((uint32_t)(index) < 2U ? ((uint32_t)(value) << ((uint32_t)(index)*6U)) : ((uint32_t)(value))))
95
96#define ASRC_IDEAL_RATIO_HIGH(base, index) *(volatile uint32_t *)((uint32_t)(&(base)->ASRIDRHA) + (uint32_t)(index)*8U)
97#define ASRC_IDEAL_RATIO_LOW(base, index) *(volatile uint32_t *)((uint32_t)(&(base)->ASRIDRLA) + (uint32_t)(index)*8U)
98#define ASRC_ASRMCR(base, index) *(volatile uint32_t *)((uint32_t)(&(base)->ASRMCRA) + (uint32_t)(index)*8U)
99#define ASRC_ASRMCR1(base, index) *(volatile uint32_t *)((uint32_t)(&((base)->ASRMCR1[(index)])))
100#define ASRC_ASRDI(base, index) *(volatile uint32_t *)((uint32_t)(&(base)->ASRDIA) + (uint32_t)(index)*8U)
101#define ASRC_ASRDO(base, index) *(volatile uint32_t *)((uint32_t)(&(base)->ASRDOA) + (uint32_t)(index)*8U)
102#define ASRC_ASRDI_ADDR(base, index) (volatile uint32_t *)((uint32_t)(&(base)->ASRDIA) + (uint32_t)(index)*8U)
103#define ASRC_ASRDO_ADDR(base, index) (volatile uint32_t *)((uint32_t)(&(base)->ASRDOA) + (uint32_t)(index)*8U)
104#define ASRC_ASRFST_ADDR(base, index) (*(volatile uint32_t *)((uint32_t)(&(base)->ASRFSTA) + (uint32_t)(index)*8U))
105#define ASRC_GET_CHANNEL_COUNTER(base, index) (((base)->ASRCNCR >> ((uint32_t)(index)*4U)) & 0xFU)
106
110enum
111{
124};
125
128{
133
137enum
138{
155};
156
160enum
161{
162 kASRC_FPInWaitStateInterruptEnable = ASRC_ASRIER_AFPWE_MASK,
163 kASRC_OverLoadInterruptMask = ASRC_ASRIER_AOLIE_MASK,
164 kASRC_DataOutputCInterruptMask = ASRC_ASRIER_ADOEC_MASK,
165 kASRC_DataOutputBInterruptMask = ASRC_ASRIER_ADOEB_MASK,
166 kASRC_DataOutputAInterruptMask = ASRC_ASRIER_ADOEA_MASK,
167 kASRC_DataInputCInterruptMask = ASRC_ASRIER_ADIEC_MASK,
168 kASRC_DataInputBInterruptMask = ASRC_ASRIER_ADIEB_MASK,
169 kASRC_DataInputAInterruptMask = ASRC_ASRIER_ADIEA_MASK,
170};
171
175enum
176{
177 kASRC_StatusDSLCounterReady = ASRC_ASRSTR_DSLCNT_MASK,
178 kASRC_StatusTaskQueueOverLoad = ASRC_ASRSTR_ATQOL_MASK,
179 kASRC_StatusPairCOutputOverLoad = ASRC_ASRSTR_AOOLC_MASK,
180 kASRC_StatusPairBOutputOverLoad = ASRC_ASRSTR_AOOLB_MASK,
181 kASRC_StatusPairAOutputOverLoad = ASRC_ASRSTR_AOOLA_MASK,
182 kASRC_StatusPairCInputOverLoad = ASRC_ASRSTR_AIOLC_MASK,
183 kASRC_StatusPairBInputOverLoad = ASRC_ASRSTR_AIOLB_MASK,
184 kASRC_StatusPairAInputOverLoad = ASRC_ASRSTR_AIOLA_MASK,
185 kASRC_StatusPairCOutputOverflow = ASRC_ASRSTR_AODOC_MASK,
186 kASRC_StatusPairBOutputOverflow = ASRC_ASRSTR_AODOB_MASK,
187 kASRC_StatusPairAOutputOverflow = ASRC_ASRSTR_AODOA_MASK,
188 kASRC_StatusPairCInputUnderflow = ASRC_ASRSTR_AIDUC_MASK,
189 kASRC_StatusPairBInputUnderflow = ASRC_ASRSTR_AIDUB_MASK,
190 kASRC_StatusPairAInputUnderflow = ASRC_ASRSTR_AIDUA_MASK,
191 kASRC_StatusFPInWaitState = ASRC_ASRSTR_FPWT_MASK,
192 kASRC_StatusOverloadError = ASRC_ASRSTR_AOLE_MASK,
204 kASRC_StatusPairCOutputReady = ASRC_ASRSTR_AODFC_MASK,
205 kASRC_StatusPairBOutputReady = ASRC_ASRSTR_AODFB_MASK,
206 kASRC_StatusPairAOutputReady = ASRC_ASRSTR_AODFA_MASK,
207 kASRC_StatusPairCInputReady = ASRC_ASRSTR_AIDEC_MASK,
208 kASRC_StatusPairBInputReady = ASRC_ASRSTR_AIDEB_MASK,
209 kASRC_StatusPairAInputReady = ASRC_ASRSTR_AIDEA_MASK,
214};
215
219enum
220{
221 kASRC_OutputFifoNearFull = ASRC_ASRFSTA_OAFA_MASK,
222 kASRC_InputFifoNearEmpty = ASRC_ASRFSTA_IAEA_MASK,
223};
224
226typedef enum _asrc_ratio
227{
230 2U,
232 3U,
234
237{
249
252{
257
260{
264
267{
271
274{
299
301typedef struct _asrc_transfer
302{
303 void *inData;
304 size_t inDataSize;
305 void *outData;
306 size_t outDataSize;
308
311
313typedef void (*asrc_transfer_callback_t)(ASRC_Type *base, asrc_handle_t *handle, status_t status, void *userData);
314
316typedef struct _asrc_in_handle
317{
319 uint32_t sampleWidth;
320 uint32_t sampleMask;
321 uint32_t fifoThreshold;
324 volatile uint8_t queueUser;
325 volatile uint8_t queueDriver;
327
329typedef struct _asrc_out_handle
330{
332 uint32_t sampleWidth;
333 uint32_t fifoThreshold;
336 volatile uint8_t queueUser;
337 volatile uint8_t queueDriver;
339
342{
345 uint32_t state;
346 void *userData;
353};
354/*******************************************************************************
355 * API
356 ******************************************************************************/
357
358#if defined(__cplusplus)
359extern "C" {
360#endif /*_cplusplus*/
361
372uint32_t ASRC_GetInstance(ASRC_Type *base);
373
382void ASRC_Init(ASRC_Type *base, uint32_t asrcPeripheralClock_Hz);
383
391void ASRC_Deinit(ASRC_Type *base);
392
402void ASRC_SoftwareReset(ASRC_Type *base);
403
414 asrc_channel_pair_t channelPair,
416 uint32_t inputSampleRate,
417 uint32_t outputSampleRate);
418
431uint32_t ASRC_GetOutSamplesSize(ASRC_Type *base,
432 asrc_channel_pair_t channelPair,
433 uint32_t inSampleRate,
434 uint32_t outSampleRate,
435 uint32_t inSamplesize);
436
447uint32_t ASRC_MapSamplesWidth(ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t *inWidth, uint32_t *outWidth);
448
460 asrc_channel_pair_t channelPair,
461 uint32_t *buffer,
462 uint32_t outSampleWidth,
463 uint32_t remainSamples);
464
471static inline void ASRC_ModuleEnable(ASRC_Type *base, bool enable)
472{
473 if (enable)
474 {
475 base->ASRCTR |= ASRC_ASRCTR_ASRCEN_MASK;
476 }
477 else
478 {
479 base->ASRCTR &= ~ASRC_ASRCTR_ASRCEN_MASK;
480 }
481}
482
490static inline void ASRC_ChannelPairEnable(ASRC_Type *base, asrc_channel_pair_t channelPair, bool enable)
491{
492 if (enable)
493 {
494 base->ASRCTR |= 1UL << ((uint32_t)channelPair + 1U);
495 }
496 else
497 {
498 base->ASRCTR &= ~(1UL << ((uint32_t)channelPair + 1U));
499 }
500}
515static inline void ASRC_EnableInterrupt(ASRC_Type *base, uint32_t mask)
516{
517 base->ASRIER |= mask;
518}
519
527static inline void ASRC_DisableInterrupt(ASRC_Type *base, uint32_t mask)
528{
529 base->ASRIER &= ~mask;
530}
531
545static inline uint32_t ASRC_GetStatus(ASRC_Type *base)
546{
547 return base->ASRSTR;
548}
549
557static inline bool ASRC_GetChannelPairInitialStatus(ASRC_Type *base, asrc_channel_pair_t channel)
558{
559 return ((base->ASRCFG >> ASRC_ASRCFG_INIRQA_SHIFT) & (1U << (uint32_t)channel)) == 0U ? false : true;
560}
561
569static inline uint32_t ASRC_GetChannelPairFifoStatus(ASRC_Type *base, asrc_channel_pair_t channelPair)
570{
571 return ASRC_ASRMCR(base, channelPair) & ((uint32_t)kASRC_OutputFifoNearFull | (uint32_t)kASRC_InputFifoNearEmpty);
572}
573
588static inline void ASRC_ChannelPairWriteData(ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t data)
589{
590 ASRC_ASRDI(base, channelPair) = data;
591}
592
601static inline uint32_t ASRC_ChannelPairReadData(ASRC_Type *base, asrc_channel_pair_t channelPair)
602{
603 return ASRC_ASRDO(base, channelPair);
604}
605
613static inline uint32_t ASRC_GetInputDataRegisterAddress(ASRC_Type *base, asrc_channel_pair_t channelPair)
614{
615 return (uint32_t)ASRC_ASRDI_ADDR(base, channelPair);
616}
617
625static inline uint32_t ASRC_GetOutputDataRegisterAddress(ASRC_Type *base, asrc_channel_pair_t channelPair)
626{
627 return (uint32_t)ASRC_ASRDO_ADDR(base, channelPair);
628}
629
640 asrc_channel_pair_t channelPair,
641 uint32_t inputSampleRate,
642 uint32_t outputSampleRate);
643
661 asrc_handle_t *handle,
663 uint32_t inputSampleRate,
664 uint32_t outputSampleRate);
665
680 asrc_handle_t *handle,
681 asrc_channel_pair_t channelPair,
682 asrc_transfer_callback_t inCallback,
683 asrc_transfer_callback_t outCallback,
684 void *userData);
685
699
711
722
733
744
752
755#if defined(__cplusplus)
756}
757#endif /*_cplusplus*/
758
761#endif /* _FSL_ASRC_H_ */
enum _asrc_clock_source asrc_clock_source_t
The ASRC clock source.
enum _asrc_data_align asrc_data_align_t
data alignment
void ASRC_Init(ASRC_Type *base, uint32_t asrcPeripheralClock_Hz)
Definition: fsl_asrc.c:366
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.
Definition: fsl_asrc.c:703
void(* asrc_transfer_callback_t)(ASRC_Type *base, asrc_handle_t *handle, status_t status, void *userData)
ASRC transfer callback prototype.
Definition: fsl_asrc.h:313
struct _asrc_transfer asrc_transfer_t
SAI transfer structure.
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.
Definition: fsl_asrc.c:247
void ASRC_TransferHandleIRQ(ASRC_Type *base, asrc_handle_t *handle)
ASRC convert interrupt handler.
Definition: fsl_asrc.c:919
_asrc_data_width
data width
Definition: fsl_asrc.h:252
enum _asrc_data_width asrc_data_width_t
data width
status_t ASRC_SetIdealRatioConfig(ASRC_Type *base, asrc_channel_pair_t channelPair, uint32_t inputSampleRate, uint32_t outputSampleRate)
ASRC configure ideal ratio. The ideal ratio should be used when input clock source is not avalible.
Definition: fsl_asrc.c:312
void ASRC_TransferAbortConvert(ASRC_Type *base, asrc_handle_t *handle)
Aborts the current convert.
Definition: fsl_asrc.c:875
#define ASRC_XFER_QUEUE_SIZE
ASRC transfer queue size, user can refine it according to use case.
Definition: fsl_asrc.h:29
enum _asrc_audio_channel asrc_audio_channel_t
Number of channels in audio data.
void ASRC_Deinit(ASRC_Type *base)
De-initializes the ASRC peripheral.
Definition: fsl_asrc.c:408
void ASRC_TransferTerminateConvert(ASRC_Type *base, asrc_handle_t *handle)
Terminate all ASRC convert.
Definition: fsl_asrc.c:899
enum _asrc_ratio asrc_ratio_t
ASRC ideal ratio.
struct _asrc_channel_pair_config asrc_channel_pair_config_t
asrc channel pair configuation
_asrc_channel_pair
ASRC channel pair mask.
Definition: fsl_asrc.h:128
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.
Definition: fsl_asrc.c:768
_asrc_audio_channel
Number of channels in audio data.
Definition: fsl_asrc.h:237
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.
Definition: fsl_asrc.c:567
enum _asrc_channel_pair asrc_channel_pair_t
ASRC channel pair mask.
uint32_t ASRC_GetInstance(ASRC_Type *base)
Get instance number of the ASRC peripheral.
Definition: fsl_asrc.c:94
_asrc_data_align
data alignment
Definition: fsl_asrc.h:260
struct _asrc_in_handle asrc_in_handle_t
asrc in handler
status_t ASRC_TransferBlocking(ASRC_Type *base, asrc_channel_pair_t channelPair, asrc_transfer_t *xfer)
Performs an blocking convert on asrc.
Definition: fsl_asrc.c:640
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.
Definition: fsl_asrc.c:445
_asrc_sign_extension
sign extension
Definition: fsl_asrc.h:267
enum _asrc_sign_extension asrc_sign_extension_t
sign extension
status_t ASRC_TransferGetConvertedCount(ASRC_Type *base, asrc_handle_t *handle, size_t *count)
Get converted byte count.
Definition: fsl_asrc.c:848
status_t ASRC_TransferNonBlocking(ASRC_Type *base, asrc_handle_t *handle, asrc_transfer_t *xfer)
Performs an interrupt non-blocking convert on asrc.
Definition: fsl_asrc.c:805
struct _asrc_out_handle asrc_out_handle_t
output handler
void ASRC_SoftwareReset(ASRC_Type *base)
Do software reset .
Definition: fsl_asrc.c:427
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.
Definition: fsl_asrc.c:737
_asrc_ratio
ASRC ideal ratio.
Definition: fsl_asrc.h:227
@ kASRC_StatusInputError
Definition: fsl_asrc.h:194
@ kASRC_StatusPairCInputOverLoad
Definition: fsl_asrc.h:182
@ kASRC_StatusPairBInterrupt
Definition: fsl_asrc.h:211
@ kASRC_StatusPairBOutputOverLoad
Definition: fsl_asrc.h:180
@ kASRC_StatusOverloadError
Definition: fsl_asrc.h:192
@ kASRC_StatusPairAOutputReady
Definition: fsl_asrc.h:206
@ kASRC_StatusPairAInputOverLoad
Definition: fsl_asrc.h:184
@ kASRC_StatusPairAOutputOverLoad
Definition: fsl_asrc.h:181
@ kASRC_StatusPairBInputUnderflow
Definition: fsl_asrc.h:189
@ kASRC_StatusPairAInputReady
Definition: fsl_asrc.h:209
@ kASRC_StatusPairCInterrupt
Definition: fsl_asrc.h:212
@ kASRC_StatusOutputError
Definition: fsl_asrc.h:199
@ kASRC_StatusPairAInputUnderflow
Definition: fsl_asrc.h:190
@ kASRC_StatusPairBOutputReady
Definition: fsl_asrc.h:205
@ kASRC_StatusPairBInputReady
Definition: fsl_asrc.h:208
@ kASRC_StatusPairCOutputOverLoad
Definition: fsl_asrc.h:179
@ kASRC_StatusPairBInputOverLoad
Definition: fsl_asrc.h:183
@ kASRC_StatusPairCInputReady
Definition: fsl_asrc.h:207
@ kASRC_StatusPairAOutputOverflow
Definition: fsl_asrc.h:187
@ kASRC_StatusFPInWaitState
Definition: fsl_asrc.h:191
@ kASRC_StatusPairCOutputOverflow
Definition: fsl_asrc.h:185
@ kASRC_StatusPairCInputUnderflow
Definition: fsl_asrc.h:188
@ kASRC_StatusPairCOutputReady
Definition: fsl_asrc.h:204
@ kASRC_StatusPairBOutputOverflow
Definition: fsl_asrc.h:186
@ kASRC_StatusPairAInterrupt
Definition: fsl_asrc.h:210
@ kASRC_StatusDSLCounterReady
Definition: fsl_asrc.h:177
@ kASRC_StatusTaskQueueOverLoad
Definition: fsl_asrc.h:178
@ kASRC_DataWidth24Bit
Definition: fsl_asrc.h:253
@ kASRC_DataWidth16Bit
Definition: fsl_asrc.h:254
@ kASRC_DataWidth8Bit
Definition: fsl_asrc.h:255
@ kASRC_ChannelPairA
Definition: fsl_asrc.h:129
@ kASRC_ChannelPairC
Definition: fsl_asrc.h:131
@ kASRC_ChannelPairB
Definition: fsl_asrc.h:130
@ kASRC_OutputFifoNearFull
Definition: fsl_asrc.h:221
@ kASRC_InputFifoNearEmpty
Definition: fsl_asrc.h:222
@ kASRC_ChannelsNumber10
Definition: fsl_asrc.h:247
@ kASRC_ChannelsNumber3
Definition: fsl_asrc.h:240
@ kASRC_ChannelsNumber7
Definition: fsl_asrc.h:244
@ kASRC_ChannelsNumber4
Definition: fsl_asrc.h:241
@ kASRC_ChannelsNumber8
Definition: fsl_asrc.h:245
@ kASRC_ChannelsNumber1
Definition: fsl_asrc.h:238
@ kASRC_ChannelsNumber2
Definition: fsl_asrc.h:239
@ kASRC_ChannelsNumber6
Definition: fsl_asrc.h:243
@ kASRC_ChannelsNumber9
Definition: fsl_asrc.h:246
@ kASRC_ChannelsNumber5
Definition: fsl_asrc.h:242
@ kASRC_DataAlignLSB
Definition: fsl_asrc.h:262
@ kASRC_DataAlignMSB
Definition: fsl_asrc.h:261
@ kASRC_DataInputCInterruptMask
Definition: fsl_asrc.h:167
@ kASRC_DataOutputCInterruptMask
Definition: fsl_asrc.h:164
@ kASRC_FPInWaitStateInterruptEnable
Definition: fsl_asrc.h:162
@ kASRC_DataOutputBInterruptMask
Definition: fsl_asrc.h:165
@ kASRC_DataInputAInterruptMask
Definition: fsl_asrc.h:169
@ kASRC_DataInputBInterruptMask
Definition: fsl_asrc.h:168
@ kASRC_DataOutputAInterruptMask
Definition: fsl_asrc.h:166
@ kASRC_OverLoadInterruptMask
Definition: fsl_asrc.h:163
@ kASRC_SignExtension
Definition: fsl_asrc.h:269
@ kASRC_NoSignExtension
Definition: fsl_asrc.h:268
@ kStatus_ASRCInIdle
Definition: fsl_asrc.h:113
@ kStatus_ASRCInQueueIdle
Definition: fsl_asrc.h:123
@ kStatus_ASRCIdle
Definition: fsl_asrc.h:112
@ kStatus_ASRCInvalidArgument
Definition: fsl_asrc.h:116
@ kStatus_ASRCClockConfigureFailed
Definition: fsl_asrc.h:117
@ kStatus_ASRCOutIdle
Definition: fsl_asrc.h:114
@ kStatus_ASRCNotSupport
Definition: fsl_asrc.h:120
@ kStatus_ASRCChannelPairConfigureFailed
Definition: fsl_asrc.h:118
@ kStatus_ASRCConvertError
Definition: fsl_asrc.h:119
@ kStatus_ASRCBusy
Definition: fsl_asrc.h:115
@ kStatus_ASRCOutQueueIdle
Definition: fsl_asrc.h:122
@ kStatus_ASRCQueueFull
Definition: fsl_asrc.h:121
@ kASRC_SampleRate_11025HZ
Definition: fsl_asrc.h:140
@ kASRC_SampleRate_16000HZ
Definition: fsl_asrc.h:142
@ kASRC_SampleRate_22050HZ
Definition: fsl_asrc.h:143
@ kASRC_SampleRate_88200HZ
Definition: fsl_asrc.h:150
@ kASRC_SampleRate_30000HZ
Definition: fsl_asrc.h:145
@ kASRC_SampleRate_32000HZ
Definition: fsl_asrc.h:146
@ kASRC_SampleRate_64000HZ
Definition: fsl_asrc.h:149
@ kASRC_SampleRate_44100HZ
Definition: fsl_asrc.h:147
@ kASRC_SampleRate_48000HZ
Definition: fsl_asrc.h:148
@ kASRC_SampleRate_96000HZ
Definition: fsl_asrc.h:151
@ kASRC_SampleRate_12000HZ
Definition: fsl_asrc.h:141
@ kASRC_SampleRate_8000HZ
Definition: fsl_asrc.h:139
@ kASRC_SampleRate_128000HZ
Definition: fsl_asrc.h:152
@ kASRC_SampleRate_176400HZ
Definition: fsl_asrc.h:153
@ kASRC_SampleRate_24000HZ
Definition: fsl_asrc.h:144
@ kASRC_SampleRate_192000HZ
Definition: fsl_asrc.h:154
@ kASRC_RatioUseIdealRatio
Definition: fsl_asrc.h:231
@ kASRC_RatioUseInternalMeasured
Definition: fsl_asrc.h:229
@ kASRC_RatioNotUsed
Definition: fsl_asrc.h:228
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
#define MAKE_STATUS(group, code)
Construct a status code value from a group and code number.
Definition: fsl_common.h:47
@ kStatusGroup_ASRC
Definition: fsl_common.h:187
Definition: MIMXRT1166_cm4.h:9338
asrc channel pair configuation
Definition: fsl_asrc.h:274
asrc_data_align_t outDataAlign
Definition: fsl_asrc.h:290
asrc_ratio_t sampleRateRatio
Definition: fsl_asrc.h:284
asrc_data_align_t inDataAlign
Definition: fsl_asrc.h:287
asrc_data_width_t outDataWidth
Definition: fsl_asrc.h:289
asrc_data_width_t inDataWidth
Definition: fsl_asrc.h:286
asrc_sign_extension_t outSignExtension
Definition: fsl_asrc.h:291
uint32_t inSourceClock_Hz
Definition: fsl_asrc.h:278
uint8_t outFifoThreshold
Definition: fsl_asrc.h:293
uint8_t inFifoThreshold
Definition: fsl_asrc.h:294
asrc_clock_source_t inClockSource
Definition: fsl_asrc.h:277
asrc_audio_channel_t audioDataChannels
Definition: fsl_asrc.h:275
asrc_clock_source_t outClockSource
Definition: fsl_asrc.h:281
uint32_t outSourceClock_Hz
Definition: fsl_asrc.h:282
bool bufStallWhenFifoEmptyFull
Definition: fsl_asrc.h:296
ASRC handle structure.
Definition: fsl_asrc.h:342
ASRC_Type * base
Definition: fsl_asrc.h:343
asrc_in_handle_t in
Definition: fsl_asrc.h:351
asrc_out_handle_t out
Definition: fsl_asrc.h:352
uint32_t state
Definition: fsl_asrc.h:345
asrc_audio_channel_t audioDataChannels
Definition: fsl_asrc.h:348
void * userData
Definition: fsl_asrc.h:346
asrc_channel_pair_t channelPair
Definition: fsl_asrc.h:349
asrc in handler
Definition: fsl_asrc.h:317
volatile uint8_t queueUser
Definition: fsl_asrc.h:324
uint32_t fifoThreshold
Definition: fsl_asrc.h:321
asrc_transfer_callback_t callback
Definition: fsl_asrc.h:318
volatile uint8_t queueDriver
Definition: fsl_asrc.h:325
uint32_t sampleMask
Definition: fsl_asrc.h:320
uint8_t * asrcQueue[ASRC_XFER_QUEUE_SIZE]
Definition: fsl_asrc.h:322
uint32_t sampleWidth
Definition: fsl_asrc.h:319
size_t transferSamples[ASRC_XFER_QUEUE_SIZE]
Definition: fsl_asrc.h:323
output handler
Definition: fsl_asrc.h:330
size_t transferSamples[ASRC_XFER_QUEUE_SIZE]
Definition: fsl_asrc.h:335
asrc_transfer_callback_t callback
Definition: fsl_asrc.h:331
volatile uint8_t queueDriver
Definition: fsl_asrc.h:337
uint8_t * asrcQueue[ASRC_XFER_QUEUE_SIZE]
Definition: fsl_asrc.h:334
volatile uint8_t queueUser
Definition: fsl_asrc.h:336
uint32_t sampleWidth
Definition: fsl_asrc.h:332
uint32_t fifoThreshold
Definition: fsl_asrc.h:333
SAI transfer structure.
Definition: fsl_asrc.h:302
void * outData
Definition: fsl_asrc.h:305
size_t outDataSize
Definition: fsl_asrc.h:306
void * inData
Definition: fsl_asrc.h:303
size_t inDataSize
Definition: fsl_asrc.h:304
Definition: deflate.c:114