Classes | Enumerator | Variables
Codec_common

Classes

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

Variables

const codec_capability_t_codec_handle::codecCapability
 
codec_config_t_codec_handle::codecConfig
 
void * _codec_config::codecDevConfig
 
uint8_t _codec_handle::codecDevHandle [HAL_CODEC_HANDLER_SIZE]
 
uint32_t _codec_config::codecDevType
 
uint32_t _codec_capability::codecModuleCapability
 
uint32_t _codec_capability::codecPlayCapability
 
uint32_t _codec_capability::codecRecordCapability
 

Driver version

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...
 
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_audio_bit_width { kCODEC_AudioBitWidth16bit = 16U, kCODEC_AudioBitWidth20bit = 20U, kCODEC_AudioBitWidth24bit = 24U, kCODEC_AudioBitWidth32bit = 32U }
 audio bit width 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_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_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_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_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...
 
typedef enum _codec_audio_protocol codec_audio_protocol_t
 AUDIO format definition. More...
 
typedef enum _codec_module codec_module_t
 audio codec module More...
 
typedef enum _codec_module_ctrl_cmd codec_module_ctrl_cmd_t
 audio codec module control cmd More...
 
typedef struct _codec_handle codec_handle_t
 codec handle declaration More...
 
typedef struct _codec_config codec_config_t
 Initialize structure of the codec. More...
 
typedef struct _codec_capability codec_capability_t
 codec capability More...
 
status_t CODEC_Init (codec_handle_t *handle, codec_config_t *config)
 Codec initilization. More...
 
status_t CODEC_Deinit (codec_handle_t *handle)
 Codec de-initilization. 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_ModuleControl (codec_handle_t *handle, codec_module_ctrl_cmd_t cmd, uint32_t data)
 codec module control. More...
 
status_t CODEC_SetVolume (codec_handle_t *handle, uint32_t channel, uint32_t volume)
 set audio codec pl volume. More...
 
status_t CODEC_SetMute (codec_handle_t *handle, uint32_t channel, bool mute)
 set audio codec module mute. 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_SetPlay (codec_handle_t *handle, uint32_t playSource)
 codec set play source. More...
 
#define FSL_CODEC_DRIVER_VERSION   (MAKE_VERSION(2, 2, 0))
 CLOCK driver version 2.2.0. More...
 
#define CODEC_VOLUME_MAX_VALUE   (100U)
 codec maximum volume range More...
 

Detailed Description

Macro Definition Documentation

◆ CODEC_VOLUME_MAX_VALUE

#define CODEC_VOLUME_MAX_VALUE   (100U)

codec maximum volume range

Definition at line 29 of file fsl_codec_common.h.

◆ FSL_CODEC_DRIVER_VERSION

#define FSL_CODEC_DRIVER_VERSION   (MAKE_VERSION(2, 2, 0))

CLOCK driver version 2.2.0.

Definition at line 25 of file fsl_codec_common.h.

Typedef Documentation

◆ codec_audio_protocol_t

AUDIO format definition.

◆ codec_capability_t

codec capability

◆ codec_config_t

typedef struct _codec_config codec_config_t

Initialize structure of the codec.

◆ codec_handle_t

typedef struct _codec_handle codec_handle_t

codec handle declaration

Definition at line 218 of file fsl_codec_common.h.

◆ codec_module_ctrl_cmd_t

audio codec module control cmd

◆ codec_module_t

audio codec module

Enumeration Type Documentation

◆ _codec_audio_bit_width

audio bit width

Enumerator
kCODEC_AudioBitWidth16bit 

audio bit width 16

kCODEC_AudioBitWidth20bit 

audio bit width 20

kCODEC_AudioBitWidth24bit 

audio bit width 24

kCODEC_AudioBitWidth32bit 

audio bit width 32

Definition at line 71 of file fsl_codec_common.h.

◆ _codec_audio_protocol

AUDIO format definition.

Enumerator
kCODEC_BusI2S 

I2S type

kCODEC_BusLeftJustified 

Left justified mode

kCODEC_BusRightJustified 

Right justified mode

kCODEC_BusPCMA 

DSP/PCM A mode

kCODEC_BusPCMB 

DSP/PCM B mode

kCODEC_BusTDM 

TDM mode

Definition at line 43 of file fsl_codec_common.h.

◆ _codec_audio_sample_rate

audio sample rate definition

Enumerator
kCODEC_AudioSampleRate8KHz 

Sample rate 8000 Hz

kCODEC_AudioSampleRate11025Hz 

Sample rate 11025 Hz

kCODEC_AudioSampleRate12KHz 

Sample rate 12000 Hz

kCODEC_AudioSampleRate16KHz 

Sample rate 16000 Hz

kCODEC_AudioSampleRate22050Hz 

Sample rate 22050 Hz

kCODEC_AudioSampleRate24KHz 

Sample rate 24000 Hz

kCODEC_AudioSampleRate32KHz 

Sample rate 32000 Hz

kCODEC_AudioSampleRate44100Hz 

Sample rate 44100 Hz

kCODEC_AudioSampleRate48KHz 

Sample rate 48000 Hz

kCODEC_AudioSampleRate96KHz 

Sample rate 96000 Hz

kCODEC_AudioSampleRate192KHz 

Sample rate 192000 Hz

kCODEC_AudioSampleRate384KHz 

Sample rate 384000 Hz

Definition at line 54 of file fsl_codec_common.h.

◆ _codec_capability_flag

audio codec capability

Enumerator
kCODEC_SupportModuleADC 

codec capability of module ADC

kCODEC_SupportModuleDAC 

codec capability of module DAC

kCODEC_SupportModulePGA 

codec capability of module PGA

kCODEC_SupportModuleHeadphone 

codec capability of module headphone

kCODEC_SupportModuleSpeaker 

codec capability of module speaker

kCODEC_SupportModuleLinein 

codec capability of module linein

kCODEC_SupportModuleLineout 

codec capability of module lineout

kCODEC_SupportModuleVref 

codec capability of module vref

kCODEC_SupportModuleMicbias 

codec capability of module mic bias

kCODEC_SupportModuleMic 

codec capability of module mic bias

kCODEC_SupportModuleI2SIn 

codec capability of module I2S in

kCODEC_SupportModuleI2SOut 

codec capability of module I2S out

kCODEC_SupportModuleMixer 

codec capability of module mixer

kCODEC_SupportModuleI2SInSwitchInterface 

codec capability of module I2S in switch interface

kCODEC_SupportPlayChannelLeft0 

codec capability of play channel left 0

kCODEC_SupportPlayChannelRight0 

codec capability of play channel right 0

kCODEC_SupportPlayChannelLeft1 

codec capability of play channel left 1

kCODEC_SupportPlayChannelRight1 

codec capability of play channel right 1

kCODEC_SupportPlayChannelLeft2 

codec capability of play channel left 2

kCODEC_SupportPlayChannelRight2 

codec capability of play channel right 2

kCODEC_SupportPlayChannelLeft3 

codec capability of play channel left 3

kCODEC_SupportPlayChannelRight3 

codec capability of play channel right 3

kCODEC_SupportPlaySourcePGA 

codec capability of set playback source PGA

kCODEC_SupportPlaySourceInput 

codec capability of set playback source INPUT

kCODEC_SupportPlaySourceDAC 

codec capability of set playback source DAC

kCODEC_SupportPlaySourceMixerIn 

codec capability of set play source Mixer in

kCODEC_SupportPlaySourceMixerInLeft 

codec capability of set play source Mixer in left

kCODEC_SupportPlaySourceMixerInRight 

codec capability of set play source Mixer in right

kCODEC_SupportPlaySourceAux 

codec capability of set play source aux

kCODEC_SupportRecordSourceDifferentialLine 

codec capability of record source differential line

kCODEC_SupportRecordSourceLineInput 

codec capability of record source line input

kCODEC_SupportRecordSourceDifferentialMic 

codec capability of record source differential mic

kCODEC_SupportRecordSourceDigitalMic 

codec capability of record digital mic

kCODEC_SupportRecordSourceSingleEndMic 

codec capability of single end mic

kCODEC_SupportRecordChannelLeft1 

left record channel 1

kCODEC_SupportRecordChannelLeft2 

left record channel 2

kCODEC_SupportRecordChannelLeft3 

left record channel 3

kCODEC_SupportRecordChannelRight1 

right record channel 1

kCODEC_SupportRecordChannelRight2 

right record channel 2

kCODEC_SupportRecordChannelRight3 

right record channel 3

Definition at line 170 of file fsl_codec_common.h.

◆ _codec_module

audio codec module

Enumerator
kCODEC_ModuleADC 

codec module ADC

kCODEC_ModuleDAC 

codec module DAC

kCODEC_ModulePGA 

codec module PGA

kCODEC_ModuleHeadphone 

codec module headphone

kCODEC_ModuleSpeaker 

codec module speaker

kCODEC_ModuleLinein 

codec module linein

kCODEC_ModuleLineout 

codec module lineout

kCODEC_ModuleVref 

codec module VREF

kCODEC_ModuleMicbias 

codec module MIC BIAS

kCODEC_ModuleMic 

codec module MIC

kCODEC_ModuleI2SIn 

codec module I2S in

kCODEC_ModuleI2SOut 

codec module I2S out

kCODEC_ModuleMxier 

codec module mixer

Definition at line 80 of file fsl_codec_common.h.

◆ _codec_module_ctrl_cmd

audio codec module control cmd

Enumerator
kCODEC_ModuleSwitchI2SInInterface 

module digital interface siwtch.

Definition at line 98 of file fsl_codec_common.h.

◆ _codec_module_ctrl_i2s_in_interface

audio codec module digital interface

Enumerator
kCODEC_ModuleI2SInInterfacePCM 

Pcm interface

kCODEC_ModuleI2SInInterfaceDSD 

DSD interface

Definition at line 104 of file fsl_codec_common.h.

◆ _codec_play_channel

codec play channel

Enumerator
kCODEC_PlayChannelHeadphoneLeft 

play channel headphone left

kCODEC_PlayChannelHeadphoneRight 

play channel headphone right

kCODEC_PlayChannelSpeakerLeft 

play channel speaker left

kCODEC_PlayChannelSpeakerRight 

play channel speaker right

kCODEC_PlayChannelLineOutLeft 

play channel lineout left

kCODEC_PlayChannelLineOutRight 

play channel lineout right

kCODEC_PlayChannelLeft0 

play channel left0

kCODEC_PlayChannelRight0 

play channel right0

kCODEC_PlayChannelLeft1 

play channel left1

kCODEC_PlayChannelRight1 

play channel right1

kCODEC_PlayChannelLeft2 

play channel left2

kCODEC_PlayChannelRight2 

play channel right2

kCODEC_PlayChannelLeft3 

play channel left3

kCODEC_PlayChannelRight3 

play channel right3

Definition at line 150 of file fsl_codec_common.h.

◆ _codec_play_source

audio codec module play source value

Enumerator
kCODEC_PlaySourcePGA 

play source PGA, bypass ADC

kCODEC_PlaySourceInput 

play source Input3

kCODEC_PlaySourceDAC 

play source DAC

kCODEC_PlaySourceMixerIn 

play source mixer in

kCODEC_PlaySourceMixerInLeft 

play source mixer in left

kCODEC_PlaySourceMixerInRight 

play source mixer in right

kCODEC_PlaySourceAux 

play source mixer in AUx

Definition at line 138 of file fsl_codec_common.h.

◆ _codec_record_source

audio codec module record source value

Enumerator
kCODEC_RecordSourceDifferentialLine 

record source from differential line

kCODEC_RecordSourceLineInput 

record source from line input

kCODEC_RecordSourceDifferentialMic 

record source from differential mic

kCODEC_RecordSourceDigitalMic 

record source from digital microphone

kCODEC_RecordSourceSingleEndMic 

record source from single microphone

Definition at line 111 of file fsl_codec_common.h.

◆ _codec_reocrd_channel

audio codec record channel

Enumerator
kCODEC_RecordChannelLeft1 

left record channel 1

kCODEC_RecordChannelLeft2 

left record channel 2

kCODEC_RecordChannelLeft3 

left record channel 3

kCODEC_RecordChannelRight1 

right record channel 1

kCODEC_RecordChannelRight2 

right record channel 2

kCODEC_RecordChannelRight3 

right record channel 3

kCODEC_RecordChannelDifferentialPositive1 

differential positive record channel 1

kCODEC_RecordChannelDifferentialPositive2 

differential positive record channel 2

kCODEC_RecordChannelDifferentialPositive3 

differential positive record channel 3

kCODEC_RecordChannelDifferentialNegative1 

differential negative record channel 1

kCODEC_RecordChannelDifferentialNegative2 

differential negative record channel 2

kCODEC_RecordChannelDifferentialNegative3 

differential negative record channel 3

Definition at line 121 of file fsl_codec_common.h.

◆ _codec_status

CODEC status.

Enumerator
kStatus_CODEC_NotSupport 

CODEC not support status

kStatus_CODEC_DeviceNotRegistered 

CODEC device register failed status

kStatus_CODEC_I2CBusInitialFailed 

CODEC i2c bus initialization failed status

kStatus_CODEC_I2CCommandTransferFailed 

CODEC i2c bus command transfer failed status

Definition at line 32 of file fsl_codec_common.h.

Function Documentation

◆ CODEC_Deinit()

status_t CODEC_Deinit ( codec_handle_t handle)

Codec de-initilization.

Parameters
handlecodec handle.
Returns
kStatus_Success is success, else de-initial failed.

brief Codec de-initilization.

param handle codec handle. return kStatus_Success is success, else de-initial failed.

Definition at line 48 of file fsl_codec_common.c.

◆ CODEC_Init()

status_t CODEC_Init ( codec_handle_t handle,
codec_config_t config 
)

Codec initilization.

Parameters
handlecodec handle.
configcodec configurations.
Returns
kStatus_Success is success, else de-initial failed.

brief Codec initilization.

param handle codec handle. param config codec configuration. return kStatus_Success is success, else initial failed.

Definition at line 32 of file fsl_codec_common.c.

◆ CODEC_ModuleControl()

status_t CODEC_ModuleControl ( codec_handle_t handle,
codec_module_ctrl_cmd_t  cmd,
uint32_t  data 
)

codec module control.

This function is used for codec module control, support switch digital interface cmd, can be expand to support codec module specific feature.

Parameters
handlecodec handle.
cmdmodule control cmd, reference _codec_module_ctrl_cmd.
datavalue to write, when cmd is kCODEC_ModuleRecordSourceChannel, the data should be a value combine of channel and source, please reference macro CODEC_MODULE_RECORD_SOURCE_CHANNEL(source, LP, LN, RP, RN), reference codec specific driver for detail configurations.
Returns
kStatus_Success is success, else configure failed.

brief codec module control.

This function is used for codec module control, support switch digital interface cmd, can be expand to support codec module specific feature

param handle codec handle. param cmd module control cmd, reference _codec_module_ctrl_cmd. param data value to write, when cmd is kCODEC_ModuleRecordSourceChannel, the data should be a value combine of channel and source, please reference macro CODEC_MODULE_RECORD_SOURCE_CHANNEL(source, LP, LN, RP, RN), reference codec specific driver for detail configurations. return kStatus_Success is success, else configure failed.

Definition at line 84 of file fsl_codec_common.c.

◆ CODEC_SetFormat()

status_t CODEC_SetFormat ( codec_handle_t handle,
uint32_t  mclk,
uint32_t  sampleRate,
uint32_t  bitWidth 
)

set audio data format.

Parameters
handlecodec handle.
mclkmaster clock frequency in HZ.
sampleRatesample rate in HZ.
bitWidthbit width.
Returns
kStatus_Success is success, else configure failed.

brief set audio data format.

param handle codec handle. param mclk master clock frequency in HZ. param sampleRate sample rate in HZ. param bitWidth bit width. return kStatus_Success is success, else configure failed.

Definition at line 64 of file fsl_codec_common.c.

◆ CODEC_SetMute()

status_t CODEC_SetMute ( codec_handle_t handle,
uint32_t  playChannel,
bool  mute 
)

set audio codec module mute.

Parameters
handlecodec handle.
channelaudio codec play channel, can be a value or combine value of _codec_play_channel.
mutetrue is mute, false is unmute.
Returns
kStatus_Success is success, else configure failed.

brief set audio codec module mute.

param handle codec handle. param channel audio codec play channel, can be a value or combine value of _codec_play_channel. param mute true is mute, false is unmute. return kStatus_Success is success, else configure failed.

Definition at line 136 of file fsl_codec_common.c.

◆ CODEC_SetPlay()

status_t CODEC_SetPlay ( codec_handle_t handle,
uint32_t  playSource 
)

codec set play source.

Parameters
handlecodec handle.
playSourceaudio codec play source, can be a value or combine value of _codec_play_source.
Returns
kStatus_Success is success, else configure failed.

brief codec set play source.

param handle codec handle. param playSource audio codec play source, can be a value or combine value of _codec_play_source.

return kStatus_Success is success, else configure failed.

Definition at line 232 of file fsl_codec_common.c.

◆ CODEC_SetPower()

status_t CODEC_SetPower ( codec_handle_t handle,
codec_module_t  module,
bool  powerOn 
)

set audio codec power.

Parameters
handlecodec handle.
moduleaudio codec module.
powerOntrue is power on, false is power down.
Returns
kStatus_Success is success, else configure failed.

brief set audio codec module power.

param handle codec handle. param module audio codec module. param powerOn true is power on, false is power down. return kStatus_Success is success, else configure failed.

Definition at line 158 of file fsl_codec_common.c.

◆ CODEC_SetRecord()

status_t CODEC_SetRecord ( codec_handle_t handle,
uint32_t  recordSource 
)

codec set record source.

Parameters
handlecodec handle.
recordRourceaudio codec record source, can be a value or combine value of _codec_record_source.
Returns
kStatus_Success is success, else configure failed.

brief codec set record source.

param handle codec handle. param source audio codec record source, can be a value or combine value of _codec_record_source.

return kStatus_Success is success, else configure failed.

Definition at line 180 of file fsl_codec_common.c.

◆ CODEC_SetRecordChannel()

status_t CODEC_SetRecordChannel ( codec_handle_t handle,
uint32_t  leftRecordChannel,
uint32_t  rightRecordChannel 
)

codec set record channel.

Parameters
handlecodec handle.
leftRecordChannelaudio codec record channel, reference _codec_record_channel, can be a value combine of member in _codec_record_channel.
rightRecordChannelaudio codec record channel, reference _codec_record_channel, can be a value combine of member in _codec_record_channel.
Returns
kStatus_Success is success, else configure failed.

brief codec set record channel.

param handle codec handle. param leftRecordChannel audio codec record channel, reference _codec_record_channel, can be a value or combine value of member in _codec_record_channel. param rightRecordChannel audio codec record channel, reference _codec_record_channel, can be a value combine of member in _codec_record_channel.

return kStatus_Success is success, else configure failed.

Definition at line 205 of file fsl_codec_common.c.

◆ CODEC_SetVolume()

status_t CODEC_SetVolume ( codec_handle_t handle,
uint32_t  playChannel,
uint32_t  volume 
)

set audio codec pl volume.

Parameters
handlecodec handle.
channelaudio codec play channel, can be a value or combine value of _codec_play_channel.
volumevolume value, support 0 ~ 100, 0 is mute, 100 is the maximum volume value.
Returns
kStatus_Success is success, else configure failed.

brief set audio codec module volume.

param handle codec handle. param channel audio codec play channel, can be a value or combine value of _codec_play_channel. param volume volume value, support 0 ~ 100, 0 is mute, 100 is the maximum volume value. return kStatus_Success is success, else configure failed.

Definition at line 113 of file fsl_codec_common.c.

Variable Documentation

◆ codecCapability

const codec_capability_t* _codec_handle::codecCapability

codec capability

Definition at line 243 of file fsl_codec_common.h.

◆ codecConfig

codec_config_t* _codec_handle::codecConfig

codec configuration function pointer

Definition at line 242 of file fsl_codec_common.h.

◆ codecDevConfig

void* _codec_config::codecDevConfig

Codec device specific configuration

Definition at line 224 of file fsl_codec_common.h.

◆ codecDevHandle

uint8_t _codec_handle::codecDevHandle[HAL_CODEC_HANDLER_SIZE]

codec device handle

Definition at line 244 of file fsl_codec_common.h.

◆ codecDevType

uint32_t _codec_config::codecDevType

codec type

Definition at line 223 of file fsl_codec_common.h.

◆ codecModuleCapability

uint32_t _codec_capability::codecModuleCapability

codec module capability

Definition at line 230 of file fsl_codec_common.h.

◆ codecPlayCapability

uint32_t _codec_capability::codecPlayCapability

codec play capability

Definition at line 231 of file fsl_codec_common.h.

◆ codecRecordCapability

uint32_t _codec_capability::codecRecordCapability

codec record capability

Definition at line 232 of file fsl_codec_common.h.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:09