![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
Data Structures | |
| struct | tfa9896BiquadM_t |
| biquadm More... | |
| struct | tfa9896FilterM_t |
| filter More... | |
| struct | tfa9896_StateInfoLive_t |
| status info live More... | |
| struct | tfa9896SPKRBST_SpkrModel_t |
| speaker mode More... | |
| struct | tfa9896_audio_format_t |
| Audio format configuration. More... | |
| struct | tfa9896_config_t |
| Initialize structure of TFA9896. More... | |
| struct | tfa9896_handle_t |
| tfa9896 handler More... | |
Macros | |
| #define | TFA_I2C_BITRATE (400000U) |
| TFA I2S bit clock. | |
| #define | TFA9896_I2C_HANDLER_SIZE (CODEC_I2C_MASTER_HANDLER_SIZE) |
| tfa9896 handle size | |
Typedefs | |
| typedef int | int24 |
| type definition | |
Enumerations | |
| enum | _tfa9896_error { kStatus_TFA9896_Ok = MAKE_STATUS(kStatusGroup_Generic, 0), kStatus_TFA9896_DSP_not_running = MAKE_STATUS(kStatusGroup_Generic, 1), kStatus_TFA9896_Bad_Parameter = MAKE_STATUS(kStatusGroup_Generic, 2), kStatus_TFA9896_NotOpen, kStatus_TFA9896_OutOfHandles = MAKE_STATUS(kStatusGroup_Generic, 4), kStatus_TFA9896_StateTimedOut, kStatus_TFA9896_RpcBase = MAKE_STATUS(kStatusGroup_Generic, 100), kStatus_TFA9896_RpcBusy = MAKE_STATUS(kStatusGroup_Generic, 101), kStatus_TFA9896_RpcModId = MAKE_STATUS(kStatusGroup_Generic, 102), kStatus_TFA9896_RpcParamId = MAKE_STATUS(kStatusGroup_Generic, 103), kStatus_TFA9896_RpcInfoId = MAKE_STATUS(kStatusGroup_Generic, 104), kStatus_TFA9896_RpcNotAllowedSpeaker, kStatus_TFA9896_Not_Implemented = MAKE_STATUS(kStatusGroup_Generic, 106), kStatus_TFA9896_Not_Supported = MAKE_STATUS(kStatusGroup_Generic, 107), kStatus_TFA9896_I2C_Fatal, kStatus_TFA9896_I2C_NonFatal, kStatus_TFA9896_Other = MAKE_STATUS(kStatusGroup_Generic, 1000) } |
| status flag More... | |
| enum | tfa9896_DMEM_t { DMEM_PMEM = 0, DMEM_XMEM = 1, DMEM_YMEM = 2, DMEM_IOMEM = 3 } |
| mute dmem More... | |
| enum | tfa9896_mute_t |
| mute status | |
| enum | tfa9896_SpeakerBoostStatusFlagsLive_t |
| speaker boost status flag | |
| enum | tfa9896_bit_width_t { ktfa9896_BitWidth16 = 0x0 } |
| Bit width. More... | |
| enum | tfa9896_protocol_t { kTFA9896_ProtocolI2S = 0x2 } |
| The audio data transfer protocol. More... | |
| enum | tfa9896_sample_rate_t |
| Sample rate. More... | |
Functions | |
| uint16_t | TFA9896_isFactory (tfa9896_handle_t *handle) |
| check if TFA9896 Hardware factory registers are set . More... | |
| uint16_t | TFA9896_GetBits (tfa9896_handle_t *handle, const uint16_t bf) |
| get TFA9896 bitfield value . More... | |
| status_t | TFA9896_SetBits (tfa9896_handle_t *handle, const uint16_t bf, const uint16_t value) |
| set TFA9896 bitfield value . More... | |
| status_t | TFA9896_DSP_System_Stable (tfa9896_handle_t *handle, int *ready) |
| wait for DSP to be stable before RPC communictaons . More... | |
| status_t | TFA9896_ClearOneTimeCalibration (tfa9896_handle_t *handle) |
| clear MTP regsiters to prepare calibraion . More... | |
| status_t | TFA9896_SetOneTimeCalibration (tfa9896_handle_t *handle) |
| set calibartion once registers. More... | |
| status_t | TFA9896_SetFactoryValues (tfa9896_handle_t *handle) |
| set MTP factory values . More... | |
| status_t | TFA9896_CheckICROMversion (tfa9896_handle_t *handle, const unsigned char patchheader[]) |
| check DSP patch suitability to the TFA9896 device . More... | |
| status_t | TFA9896_ProcessPatchFile (tfa9896_handle_t *handle, int length, const unsigned char *bytes) |
| load DSP patch to DSP memeory . More... | |
| status_t | TFA9896_DSPWriteTables (tfa9896_handle_t *handle) |
| set DSP memery table . More... | |
| status_t | TFA9896_DspWriteConfig (tfa9896_handle_t *handle, int length, const unsigned char *pConfigBytes) |
| write DSP config file to DSP memery . More... | |
| status_t | TFA9896_DspWriteSpeakerParameters (tfa9896_handle_t *handle, int length, const unsigned char *pSpeakerBytes) |
| write DSP speaker file to DSP memery . More... | |
| status_t | TFA9896_DspWritePreset (tfa9896_handle_t *handle, int length, const unsigned char *pPresetBytes) |
| write DSP preset file to DSP memery . More... | |
| status_t | TFA9896_Write_FilterBank (tfa9896_handle_t *handle, tfa9896FilterM_t *filter) |
| write DSP filter params to DSP memery . More... | |
| status_t | TFA9896_WaitCalibrateDone (tfa9896_handle_t *handle, int *calibrateDone) |
| wait calibration to be finalized . More... | |
| status_t | TFA9896_DspGetCalibrationImpedance (tfa9896_handle_t *handle, float *pRe25) |
| retrieve calibration impedance value and expose it to user. More... | |
| status_t | TFA9896_PrintCalibration (tfa9896_handle_t *handle) |
| print calibration value . More... | |
| status_t | TFA9896_DSP_Write_Mem_Word (tfa9896_handle_t *handle, unsigned short address, int value, int memtype) |
| write word to IOMEM DSP memeory . More... | |
| status_t | TFA9896_ReadRegister (tfa9896_handle_t *handle, uint8_t subaddress, unsigned short *value) |
| read a hardware regsiter . More... | |
| status_t | TFA9896_WriteRegister (tfa9896_handle_t *handle, uint8_t subaddress, uint16_t value) |
| write a hardware register . More... | |
| status_t | TFA9896_SetMute (tfa9896_handle_t *handle, tfa9896_mute_t mute) |
| mute/unmute TFA9896 codec More... | |
| status_t | TFA9896_SetVolume (tfa9896_handle_t *handle, uint8_t volume_level) |
| Set amplifier volume. More... | |
| status_t | TFA9896_SetOVPBypass (tfa9896_handle_t *handle) |
| set OVP in bypass . More... | |
| status_t | TFA9896_Init (tfa9896_handle_t *handle, tfa9896_config_t *tfa9896Config) |
| Initialize TFA9896. More... | |
| status_t | TFA9896_Deinit (tfa9896_handle_t *handle) |
| DeInitilize TFA9896. More... | |
| status_t | TFA9896_SetFormat (tfa9896_handle_t *handle, uint32_t mclk, uint32_t sampleRate, uint32_t bitWidth) |
| set audio input format . More... | |
| void | TFA9896_Powerdown (tfa9896_handle_t *handle, int powerdown) |
| power-on/off TFA98xx device. More... | |
| struct tfa9896BiquadM_t |
| struct tfa9896FilterM_t |
Data Fields | |
| uint8_t | type |
| (== enum FilterTypes, assure 8bits length) | |
| struct tfa9896_StateInfoLive_t |
| struct tfa9896SPKRBST_SpkrModel_t |
| struct tfa9896_audio_format_t |
Data Fields | |
| tfa9896_sample_rate_t | sampleRate |
| Sample rate. | |
| tfa9896_bit_width_t | bitWidth |
| Bit width. | |
| struct tfa9896_config_t |
Data Fields | |
| tfa9896_protocol_t | protocol |
| Audio transfer protocol. | |
| tfa9896_audio_format_t | format |
| Audio format. | |
| bool | master |
| true is master, false is slave | |
| uint8_t | slaveAddress |
| slave address | |
| codec_i2c_config_t | i2cConfig |
| i2c bus configuration | |
| uint8_t | calibrate |
| user handles calibration! | |
| struct tfa9896_handle_t |
Data Fields | |
| tfa9896_config_t * | config |
| tfa9896 config pointer | |
| enum _tfa9896_error |
| enum tfa9896_DMEM_t |
| enum tfa9896_bit_width_t |
| enum tfa9896_protocol_t |
| uint16_t TFA9896_isFactory | ( | tfa9896_handle_t * | handle | ) |
| handle | TFA9896 codec handle. |
| uint16_t TFA9896_GetBits | ( | tfa9896_handle_t * | handle, |
| const uint16_t | bf | ||
| ) |
| handle | TFA9896 codec handle. |
| bf | to be read |
| status_t TFA9896_SetBits | ( | tfa9896_handle_t * | handle, |
| const uint16_t | bf, | ||
| const uint16_t | value | ||
| ) |
| handle | TFA9896 codec handle. |
| bf | to be set |
| value | to be set |
| status_t TFA9896_DSP_System_Stable | ( | tfa9896_handle_t * | handle, |
| int * | ready | ||
| ) |
| handle | TFA9896 codec handle. |
| ready | DSP system stable status. |
| status_t TFA9896_ClearOneTimeCalibration | ( | tfa9896_handle_t * | handle | ) |
| handle | TFA9896 codec handle. |
| status_t TFA9896_SetOneTimeCalibration | ( | tfa9896_handle_t * | handle | ) |
| handle | TFA9896 codec handle. |
| status_t TFA9896_SetFactoryValues | ( | tfa9896_handle_t * | handle | ) |
| handle | TFA9896 codec handle. |
| status_t TFA9896_CheckICROMversion | ( | tfa9896_handle_t * | handle, |
| const unsigned char | patchheader[] | ||
| ) |
| handle | TFA9896 codec handle. |
| patchheader | pattern to check with. |
| status_t TFA9896_ProcessPatchFile | ( | tfa9896_handle_t * | handle, |
| int | length, | ||
| const unsigned char * | bytes | ||
| ) |
| handle | TFA9896 codec handle. |
| length | of the patch. |
| bytes | that contains patch data. |
| status_t TFA9896_DSPWriteTables | ( | tfa9896_handle_t * | handle | ) |
| handle | TFA9896 codec handle. |
| status_t TFA9896_DspWriteConfig | ( | tfa9896_handle_t * | handle, |
| int | length, | ||
| const unsigned char * | pConfigBytes | ||
| ) |
| handle | TFA9896 codec handle. |
| length | of the config. |
| pConfigBytes | that contains config data. |
| status_t TFA9896_DspWriteSpeakerParameters | ( | tfa9896_handle_t * | handle, |
| int | length, | ||
| const unsigned char * | pSpeakerBytes | ||
| ) |
| handle | TFA9896 codec handle. |
| length | of the speaker data. |
| pSpeakerBytes | that contains speaker data. |
| status_t TFA9896_DspWritePreset | ( | tfa9896_handle_t * | handle, |
| int | length, | ||
| const unsigned char * | pPresetBytes | ||
| ) |
| handle | TFA9896 codec handle. |
| length | of the preset data. |
| pPresetBytes | that contains preset data. |
| status_t TFA9896_Write_FilterBank | ( | tfa9896_handle_t * | handle, |
| tfa9896FilterM_t * | filter | ||
| ) |
| handle | TFA9896 codec handle. |
| filter | of the filter data. |
| status_t TFA9896_WaitCalibrateDone | ( | tfa9896_handle_t * | handle, |
| int * | calibrateDone | ||
| ) |
| handle | TFA9896 codec handle. |
| calibrateDone | calibration done flag. |
| status_t TFA9896_DspGetCalibrationImpedance | ( | tfa9896_handle_t * | handle, |
| float * | pRe25 | ||
| ) |
| handle | TFA9896 codec handle. |
| pRe25 | calibration value. |
| status_t TFA9896_PrintCalibration | ( | tfa9896_handle_t * | handle | ) |
| handle | TFA9896 codec handle. |
| status_t TFA9896_DSP_Write_Mem_Word | ( | tfa9896_handle_t * | handle, |
| unsigned short | address, | ||
| int | value, | ||
| int | memtype | ||
| ) |
| handle | TFA9896 codec handle. |
| address | to be written. |
| value | value write. |
| memtype | to be written. |
| status_t TFA9896_ReadRegister | ( | tfa9896_handle_t * | handle, |
| uint8_t | subaddress, | ||
| unsigned short * | value | ||
| ) |
| handle | TFA9896 codec handle. |
| subaddress | register address. |
| handle | TFA98xx codec handle. |
| subaddress | register address. |
| value | read out register value. |
| status_t TFA9896_WriteRegister | ( | tfa9896_handle_t * | handle, |
| uint8_t | subaddress, | ||
| uint16_t | value | ||
| ) |
| handle | TFA9896 codec handle. |
| subaddress | register address. |
| value | value to write. |
| handle | TFA98xx codec handle. |
| subaddress | register address. |
| value | value to write. |
| status_t TFA9896_SetMute | ( | tfa9896_handle_t * | handle, |
| tfa9896_mute_t | mute | ||
| ) |
mute/unmute TFA98XX codec
| handle | TFA9896 codec handle. |
| mute | mute mode. |
| handle | TFA98xx codec handle. |
| mute | mute mode. |
| status_t TFA9896_SetVolume | ( | tfa9896_handle_t * | handle, |
| uint8_t | volume_level | ||
| ) |
| handle | TFA9896 codec handle. |
| volume_level | volume level. |
| status_t TFA9896_SetOVPBypass | ( | tfa9896_handle_t * | handle | ) |
| handle | TFA98xx codec handle. |
| status_t TFA9896_Init | ( | tfa9896_handle_t * | handle, |
| tfa9896_config_t * | tfa9896Config | ||
| ) |
| handle | TFA98xx codec handle. |
| tfa9896Config | Codec configuration. |
| status_t TFA9896_Deinit | ( | tfa9896_handle_t * | handle | ) |
| handle | TFA98xx codec handle. |
| status_t TFA9896_SetFormat | ( | tfa9896_handle_t * | handle, |
| uint32_t | mclk, | ||
| uint32_t | sampleRate, | ||
| uint32_t | bitWidth | ||
| ) |
| handle | TFA98xx codec handle. |
| mclk | master clock frequency |
| sampleRate | to be set. |
| bitWidth | to be set. |
| void TFA9896_Powerdown | ( | tfa9896_handle_t * | handle, |
| int | powerdown | ||
| ) |
| handle | TFA98xx codec handle. |
| powerdown | to on/off |