This is AASRC channel related configuration parameters and API
Files | |
| file | aasrc_ch.h |
| AASRC channel related parameters and API. | |
Data Structures | |
| struct | AASRC_ChLockObj |
| AASRC Channel lock semaphore structure. More... | |
| struct | AASRC_FifoCfg |
| Hardware FIFO setup structure. More... | |
| struct | AASRC_FifoErrorStatus |
| Hardware FIFO setup structure. More... | |
| struct | AASRC_ChStatus |
| AASRC channel status register. More... | |
| struct | AASRC_ChCfg |
| AASRC configuration parameters for the channel. More... | |
| struct | AASRC_ClockZoneConfig |
| Hardware setup clock zones. More... | |
| struct | AASRC_ChClkCfg |
| AASRC Channel Clock Config. More... | |
| struct | AASRC_ChObj |
| AASRC Channel object. More... | |
Functions | |
| AASRC_ChHandle | AASRC_chOpen (uint8_t chIdx, AASRC_Handle drvHandle) |
| Function to allocate a required ASRC channel. More... | |
| AASRC_ChHandle | AASRC_getChHandle (uint8_t instIdx, uint8_t chIdx) |
| This function returns the handle of an open AASRC Channel from the instance index & channel index. More... | |
| int32_t | AASRC_chConfigInit (AASRC_ChHandle chHandle) |
| Function initialize AASRC_ChCfg. More... | |
| int32_t | AASRC_chConfig (AASRC_ChHandle chHandle) |
| Function to configure ASRC channels. More... | |
| int32_t | AASRC_chEnable (AASRC_ChHandle chHandle) |
| AASRC channel enable. More... | |
| int32_t | AASRC_chDisable (AASRC_ChHandle chHandle) |
| AASRC channel disable. More... | |
| int32_t | AASRC_isChEnabled (AASRC_ChHandle chHandle, uint32_t *isEnabled) |
| is ASRC channel enabled More... | |
| int32_t | AASRC_chClose (AASRC_ChHandle chHandle) |
| AASRC channel close. More... | |
Macros | |
| #define | AASRC_DEFAULT_IN_FIFO_THRESHOLD (16U) |
| Default Input fifo threshold. More... | |
| #define | AASRC_DEFAULT_OUT_FIFO_THRESHOLD (16U) |
| Default Output fifo threshold. More... | |
| #define | AASRC_MAX_IN_FIFO_THRESHOLD (32U) |
| Max Input fifo threshold. More... | |
| #define | AASRC_MAX_OUT_FIFO_THRESHOLD (16U) |
| Max Output fifo threshold. More... | |
| #define | AASRC_MAX_ATTENUATION (255U) |
| AASRC maximum attenuation setting. More... | |
| #define | AASRC_MAX_DEEMPHASIS_MODES (4U) |
| AASRC maximum number of de-emphasis modes. More... | |
| #define | AASRC_SRC_FIFO_CONTROL_REG_OFFSET (0x00000010U) |
| SRC Fifo control register offset. More... | |
| #define | AASRC_SRC_FIFO_CONTROL(x) |
| Find base address of SRC 'x' Fifo Control Register. More... | |
| #define | AASRC_SRC_CONTROL_REG_OFFSET (0x00000010U) |
| SRC control register offset. More... | |
| #define | AASRC_SRC_CONTROL(x) |
| Find base address of SRC 'x' Control Register. More... | |
| #define | AASRC_SRC_STATUS_REG_OFFSET (0x00000010U) |
| SRC status register offset. More... | |
| #define | AASRC_SRC_STATUS(x) |
| Find base address of SRC 'x' Status Register. More... | |
| #define | AASRC_GROUP_FIFO_CONTROL_REG_OFFSET (0x00000008U) |
| SRC Group fifo control register offset. More... | |
| #define | AASRC_GROUP_FIFO_CONTROL(x) |
| Find base address of Group 'x' Fifo Control Register. More... | |
| #define | AASRC_GROUP_SRC_CONTROL_REG_OFFSET (0x00000008U) |
| SRC Group control register offset. More... | |
| #define | AASRC_GROUP_SRC_CONTROL(x) |
| Find base address of Group 'x' Control Register. More... | |
| #define | AASRC_GROUP_SELECT_REG_OFFSET (0x00000004U) |
| SRC Group select register offset. More... | |
| #define | AASRC_INPUT_GROUP_SELECT(x) |
| Find base address of Input Group 'x' Select Register. More... | |
| #define | AASRC_OUTPUT_GROUP_SELECT(x) |
| Find base address of Output Group 'x' Select Register. More... | |
AASRC Channel Id | |
|
Values used to determine the channel number used for AASRC communication. This determines which ASRC channel to use. | |
| #define | AASRC_CHANNEL_0 (0U) |
| #define | AASRC_CHANNEL_1 (1U) |
| #define | AASRC_CHANNEL_2 (2U) |
| #define | AASRC_CHANNEL_3 (3U) |
| #define | AASRC_CHANNEL_4 (4U) |
| #define | AASRC_CHANNEL_5 (5U) |
| #define | AASRC_CHANNEL_6 (6U) |
| #define | AASRC_CHANNEL_7 (7U) |
AASRC Group Id | |
|
This represents the number of channel groups available in the AASRC IPs. Max number of groups in the chip is SOC dependent. | |
| #define | AASRC_GROUP0 (0U) |
| #define | AASRC_GROUP1 (1U) |
| #define | AASRC_GROUP2 (2U) |
| #define | AASRC_GROUP3 (3U) |
AASRC Data Length | |
|
AASRC allowed sample word length | |
| #define | AASRC_SAMPLE_WORD_LENGTH_24 (24U) |
| #define | AASRC_SAMPLE_WORD_LENGTH_20 (20U) |
| #define | AASRC_SAMPLE_WORD_LENGTH_18 (18U) |
| #define | AASRC_SAMPLE_WORD_LENGTH_16 (16U) |
AASRC Group Delay | |
|
Interpolation filter group delay supported by AASRC. This represents the number of samples which are prebuffered prior to the re-sampler function. | |
| #define | AASRC_GROUP_DELAY_64 (64U) |
| #define | AASRC_GROUP_DELAY_32 (32U) |
| #define | AASRC_GROUP_DELAY_16 (16U) |
| #define | AASRC_GROUP_DELAY_8 (8U) |
| #define AASRC_DEFAULT_IN_FIFO_THRESHOLD (16U) |
Default Input fifo threshold.
| #define AASRC_DEFAULT_OUT_FIFO_THRESHOLD (16U) |
Default Output fifo threshold.
| #define AASRC_MAX_IN_FIFO_THRESHOLD (32U) |
Max Input fifo threshold.
| #define AASRC_MAX_OUT_FIFO_THRESHOLD (16U) |
Max Output fifo threshold.
| #define AASRC_CHANNEL_0 (0U) |
| #define AASRC_CHANNEL_1 (1U) |
| #define AASRC_CHANNEL_2 (2U) |
| #define AASRC_CHANNEL_3 (3U) |
| #define AASRC_CHANNEL_4 (4U) |
| #define AASRC_CHANNEL_5 (5U) |
| #define AASRC_CHANNEL_6 (6U) |
| #define AASRC_CHANNEL_7 (7U) |
| #define AASRC_GROUP0 (0U) |
| #define AASRC_GROUP1 (1U) |
| #define AASRC_GROUP2 (2U) |
| #define AASRC_GROUP3 (3U) |
| #define AASRC_SAMPLE_WORD_LENGTH_24 (24U) |
| #define AASRC_SAMPLE_WORD_LENGTH_20 (20U) |
| #define AASRC_SAMPLE_WORD_LENGTH_18 (18U) |
| #define AASRC_SAMPLE_WORD_LENGTH_16 (16U) |
| #define AASRC_GROUP_DELAY_64 (64U) |
| #define AASRC_GROUP_DELAY_32 (32U) |
| #define AASRC_GROUP_DELAY_16 (16U) |
| #define AASRC_GROUP_DELAY_8 (8U) |
| #define AASRC_MAX_ATTENUATION (255U) |
AASRC maximum attenuation setting.
| #define AASRC_MAX_DEEMPHASIS_MODES (4U) |
AASRC maximum number of de-emphasis modes.
| #define AASRC_SRC_FIFO_CONTROL_REG_OFFSET (0x00000010U) |
SRC Fifo control register offset.
| #define AASRC_SRC_FIFO_CONTROL | ( | x | ) |
Find base address of SRC 'x' Fifo Control Register.
| #define AASRC_SRC_CONTROL_REG_OFFSET (0x00000010U) |
SRC control register offset.
| #define AASRC_SRC_CONTROL | ( | x | ) |
Find base address of SRC 'x' Control Register.
| #define AASRC_SRC_STATUS_REG_OFFSET (0x00000010U) |
SRC status register offset.
| #define AASRC_SRC_STATUS | ( | x | ) |
Find base address of SRC 'x' Status Register.
| #define AASRC_GROUP_FIFO_CONTROL_REG_OFFSET (0x00000008U) |
SRC Group fifo control register offset.
| #define AASRC_GROUP_FIFO_CONTROL | ( | x | ) |
Find base address of Group 'x' Fifo Control Register.
| #define AASRC_GROUP_SRC_CONTROL_REG_OFFSET (0x00000008U) |
SRC Group control register offset.
| #define AASRC_GROUP_SRC_CONTROL | ( | x | ) |
Find base address of Group 'x' Control Register.
| #define AASRC_GROUP_SELECT_REG_OFFSET (0x00000004U) |
SRC Group select register offset.
| #define AASRC_INPUT_GROUP_SELECT | ( | x | ) |
Find base address of Input Group 'x' Select Register.
| #define AASRC_OUTPUT_GROUP_SELECT | ( | x | ) |
Find base address of Output Group 'x' Select Register.
| AASRC_ChHandle AASRC_chOpen | ( | uint8_t | chIdx, |
| AASRC_Handle | drvHandle | ||
| ) |
Function to allocate a required ASRC channel.
Opens an ASRC channel requested by the user. The channel types could be mono, stereo or a synchronized group of mono channels. This function takes care of the hardware resource allocation for opening a channel.
| chIdx | [IN] Index of channel config to use in the AASRC Channel Config array |
| drvHandle | AASRC_Handle returned from AASRC_open() |
| AASRC_ChHandle AASRC_getChHandle | ( | uint8_t | instIdx, |
| uint8_t | chIdx | ||
| ) |
This function returns the handle of an open AASRC Channel from the instance index & channel index.
| instIdx | [IN] Index of instance config to use in the AASRC Driver Config array |
| chIdx | [IN] Index of channel config to use in the AASRC Channel Config array |
| int32_t AASRC_chConfigInit | ( | AASRC_ChHandle | chHandle | ) |
Function initialize AASRC_ChCfg.
initializes the AASRC_ChCfg structure to its default values
| chHandle | [IN] channel handle returned from AASRC_chOpen() |
| int32_t AASRC_chConfig | ( | AASRC_ChHandle | chHandle | ) |
Function to configure ASRC channels.
This configures an ASRC channel or a group of ASRC channels
| chHandle | [IN] channel handle returned from AASRC_chOpen() |
| int32_t AASRC_chEnable | ( | AASRC_ChHandle | chHandle | ) |
AASRC channel enable.
This function enables the given ASRC channel via the chHandle. This is like getting the ASRC channels and data path out of reset.
| chHandle | [IN] channel handle returned from AASRC_chOpen() |
| int32_t AASRC_chDisable | ( | AASRC_ChHandle | chHandle | ) |
AASRC channel disable.
This function dsiables the given ASRC channel via the chHandle. Channel disable is like a reset. It clears the datapath for the ASRC channel
| chHandle | [IN] channel handle returned from AASRC_chOpen() |
| int32_t AASRC_isChEnabled | ( | AASRC_ChHandle | chHandle, |
| uint32_t * | isEnabled | ||
| ) |
is ASRC channel enabled
This function checks if a given ASRC channel via the chHandle is enabled or not. This setting is directly read from the hardware.
| chHandle | [IN] channel handle returned from AASRC_chOpen() |
| isEnabled | [IN] set to 1 if the channel is enabled and 0 if it is not |
| int32_t AASRC_chClose | ( | AASRC_ChHandle | chHandle | ) |
AASRC channel close.
closes the asrc channel pointed by the chHandle and frees the hardware resources for another AASRC_chOpen() call
| chHandle | [IN] channel handle returned from AASRC_chOpen() |
|
extern |
Externally defined driver configuration array.
| AASRC_ChLockObj gAasrcChLockObj |
AASRC Channel lock object.