Classes
fsl_codec_common.h File Reference
#include "fsl_common.h"
#include "fsl_codec_adapter.h"
Include dependency graph for fsl_codec_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _codec_capability
 codec capability More...
 
struct  _codec_config
 Initialize structure of the codec. More...
 
struct  _codec_handle
 Codec handle definition. More...
 

Driver version

enum  _codec_audio_bit_width { kCODEC_AudioBitWidth16bit = 16U, kCODEC_AudioBitWidth20bit = 20U, kCODEC_AudioBitWidth24bit = 24U, kCODEC_AudioBitWidth32bit = 32U }
 audio bit width More...
 
enum  _codec_audio_protocol {
  kCODEC_BusI2S = 0U, kCODEC_BusLeftJustified = 1U, kCODEC_BusRightJustified = 2U, kCODEC_BusPCMA = 3U,
  kCODEC_BusPCMB = 4U, kCODEC_BusTDM = 5U
}
 AUDIO format definition. More...
 
enum  _codec_audio_sample_rate {
  kCODEC_AudioSampleRate8KHz = 8000U, kCODEC_AudioSampleRate11025Hz = 11025U, kCODEC_AudioSampleRate12KHz = 12000U, kCODEC_AudioSampleRate16KHz = 16000U,
  kCODEC_AudioSampleRate22050Hz = 22050U, kCODEC_AudioSampleRate24KHz = 24000U, kCODEC_AudioSampleRate32KHz = 32000U, kCODEC_AudioSampleRate44100Hz = 44100U,
  kCODEC_AudioSampleRate48KHz = 48000U, kCODEC_AudioSampleRate96KHz = 96000U, kCODEC_AudioSampleRate192KHz = 192000U, kCODEC_AudioSampleRate384KHz = 384000U
}
 audio sample rate definition More...
 
enum  _codec_capability_flag {
  kCODEC_SupportModuleADC = 1U << 0U, kCODEC_SupportModuleDAC = 1U << 1U, kCODEC_SupportModulePGA = 1U << 2U, kCODEC_SupportModuleHeadphone = 1U << 3U,
  kCODEC_SupportModuleSpeaker = 1U << 4U, kCODEC_SupportModuleLinein = 1U << 5U, kCODEC_SupportModuleLineout = 1U << 6U, kCODEC_SupportModuleVref = 1U << 7U,
  kCODEC_SupportModuleMicbias = 1U << 8U, kCODEC_SupportModuleMic = 1U << 9U, kCODEC_SupportModuleI2SIn = 1U << 10U, kCODEC_SupportModuleI2SOut = 1U << 11U,
  kCODEC_SupportModuleMixer = 1U << 12U, kCODEC_SupportModuleI2SInSwitchInterface = 1U << 13U, kCODEC_SupportPlayChannelLeft0 = 1U << 0U, kCODEC_SupportPlayChannelRight0 = 1U << 1U,
  kCODEC_SupportPlayChannelLeft1 = 1U << 2U, kCODEC_SupportPlayChannelRight1 = 1U << 3U, kCODEC_SupportPlayChannelLeft2 = 1U << 4U, kCODEC_SupportPlayChannelRight2 = 1U << 5U,
  kCODEC_SupportPlayChannelLeft3 = 1U << 6U, kCODEC_SupportPlayChannelRight3 = 1U << 7U, kCODEC_SupportPlaySourcePGA = 1U << 8U, kCODEC_SupportPlaySourceInput = 1U << 9U,
  kCODEC_SupportPlaySourceDAC = 1U << 10U, kCODEC_SupportPlaySourceMixerIn = 1U << 11U, kCODEC_SupportPlaySourceMixerInLeft = 1U << 12U, kCODEC_SupportPlaySourceMixerInRight = 1U << 13U,
  kCODEC_SupportPlaySourceAux = 1U << 14U, kCODEC_SupportRecordSourceDifferentialLine = 1U << 0U, kCODEC_SupportRecordSourceLineInput = 1U << 1U, kCODEC_SupportRecordSourceDifferentialMic = 1U << 2U,
  kCODEC_SupportRecordSourceDigitalMic = 1U << 3U, kCODEC_SupportRecordSourceSingleEndMic = 1U << 4U, kCODEC_SupportRecordChannelLeft1 = 1U << 6U, kCODEC_SupportRecordChannelLeft2 = 1U << 7U,
  kCODEC_SupportRecordChannelLeft3 = 1U << 8U, kCODEC_SupportRecordChannelRight1 = 1U << 9U, kCODEC_SupportRecordChannelRight2 = 1U << 10U, kCODEC_SupportRecordChannelRight3 = 1U << 11U
}
 audio codec capability More...
 
enum  _codec_module {
  kCODEC_ModuleADC = 0U, kCODEC_ModuleDAC = 1U, kCODEC_ModulePGA = 2U, kCODEC_ModuleHeadphone = 3U,
  kCODEC_ModuleSpeaker = 4U, kCODEC_ModuleLinein = 5U, kCODEC_ModuleLineout = 6U, kCODEC_ModuleVref = 7U,
  kCODEC_ModuleMicbias = 8U, kCODEC_ModuleMic = 9U, kCODEC_ModuleI2SIn = 10U, kCODEC_ModuleI2SOut = 11U,
  kCODEC_ModuleMxier = 12U
}
 audio codec module More...
 
enum  _codec_module_ctrl_cmd { kCODEC_ModuleSwitchI2SInInterface = 0U }
 audio codec module control cmd More...
 
enum  _codec_module_ctrl_i2s_in_interface { kCODEC_ModuleI2SInInterfacePCM = 0U, kCODEC_ModuleI2SInInterfaceDSD = 1U }
 audio codec module digital interface More...
 
enum  _codec_play_channel {
  kCODEC_PlayChannelHeadphoneLeft = 1U, kCODEC_PlayChannelHeadphoneRight = 2U, kCODEC_PlayChannelSpeakerLeft = 4U, kCODEC_PlayChannelSpeakerRight = 8U,
  kCODEC_PlayChannelLineOutLeft = 16U, kCODEC_PlayChannelLineOutRight = 32U, kCODEC_PlayChannelLeft0 = 1U, kCODEC_PlayChannelRight0 = 2U,
  kCODEC_PlayChannelLeft1 = 4U, kCODEC_PlayChannelRight1 = 8U, kCODEC_PlayChannelLeft2 = 16U, kCODEC_PlayChannelRight2 = 32U,
  kCODEC_PlayChannelLeft3 = 64U, kCODEC_PlayChannelRight3 = 128U
}
 codec play channel More...
 
enum  _codec_play_source {
  kCODEC_PlaySourcePGA = 1U, kCODEC_PlaySourceInput = 2U, kCODEC_PlaySourceDAC = 4U, kCODEC_PlaySourceMixerIn = 1U,
  kCODEC_PlaySourceMixerInLeft = 2U, kCODEC_PlaySourceMixerInRight = 4U, kCODEC_PlaySourceAux = 8U
}
 audio codec module play source value More...
 
enum  _codec_record_source {
  kCODEC_RecordSourceDifferentialLine = 1U, kCODEC_RecordSourceLineInput = 2U, kCODEC_RecordSourceDifferentialMic = 4U, kCODEC_RecordSourceDigitalMic = 8U,
  kCODEC_RecordSourceSingleEndMic = 16U
}
 audio codec module record source value More...
 
enum  _codec_reocrd_channel {
  kCODEC_RecordChannelLeft1 = 1U, kCODEC_RecordChannelLeft2 = 2U, kCODEC_RecordChannelLeft3 = 4U, kCODEC_RecordChannelRight1 = 1U,
  kCODEC_RecordChannelRight2 = 2U, kCODEC_RecordChannelRight3 = 4U, kCODEC_RecordChannelDifferentialPositive1 = 1U, kCODEC_RecordChannelDifferentialPositive2 = 2U,
  kCODEC_RecordChannelDifferentialPositive3 = 4U, kCODEC_RecordChannelDifferentialNegative1 = 8U, kCODEC_RecordChannelDifferentialNegative2 = 16U, kCODEC_RecordChannelDifferentialNegative3 = 32U
}
 audio codec record channel More...
 
enum  _codec_status { kStatus_CODEC_NotSupport = MAKE_STATUS(kStatusGroup_CODEC, 0U), kStatus_CODEC_DeviceNotRegistered = MAKE_STATUS(kStatusGroup_CODEC, 1U), kStatus_CODEC_I2CBusInitialFailed, kStatus_CODEC_I2CCommandTransferFailed }
 CODEC status. More...
 
typedef enum _codec_audio_protocol codec_audio_protocol_t
 AUDIO format definition. More...
 
typedef struct _codec_capability codec_capability_t
 codec capability More...
 
typedef struct _codec_config codec_config_t
 Initialize structure of the codec. More...
 
status_t CODEC_Deinit (codec_handle_t *handle)
 Codec de-initilization. More...
 
typedef struct _codec_handle codec_handle_t
 codec handle declaration More...
 
status_t CODEC_Init (codec_handle_t *handle, codec_config_t *config)
 Codec initilization. More...
 
typedef enum _codec_module_ctrl_cmd codec_module_ctrl_cmd_t
 audio codec module control cmd More...
 
typedef enum _codec_module codec_module_t
 audio codec module More...
 
status_t CODEC_ModuleControl (codec_handle_t *handle, codec_module_ctrl_cmd_t cmd, uint32_t data)
 codec module control. More...
 
status_t CODEC_SetFormat (codec_handle_t *handle, uint32_t mclk, uint32_t sampleRate, uint32_t bitWidth)
 set audio data format. More...
 
status_t CODEC_SetMute (codec_handle_t *handle, uint32_t channel, bool mute)
 set audio codec module mute. More...
 
status_t CODEC_SetPlay (codec_handle_t *handle, uint32_t playSource)
 codec set play source. More...
 
status_t CODEC_SetPower (codec_handle_t *handle, codec_module_t module, bool powerOn)
 set audio codec power. More...
 
status_t CODEC_SetRecord (codec_handle_t *handle, uint32_t recordRource)
 codec set record source. More...
 
status_t CODEC_SetRecordChannel (codec_handle_t *handle, uint32_t leftRecordChannel, uint32_t rightRecordChannel)
 codec set record channel. More...
 
status_t CODEC_SetVolume (codec_handle_t *handle, uint32_t channel, uint32_t volume)
 set audio codec pl volume. More...
 
#define CODEC_VOLUME_MAX_VALUE   (100U)
 codec maximum volume range More...
 
#define FSL_CODEC_DRIVER_VERSION   (MAKE_VERSION(2, 2, 0))
 CLOCK driver version 2.2.0. More...
 


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57