Macros | Functions | Variables
fsl_codec_adapter.c File Reference
#include "fsl_codec_adapter.h"
#include "fsl_codec_common.h"
Include dependency graph for fsl_codec_adapter.c:

Go to the source code of this file.

Macros

#define HAL_WM8960_MAP_MODULE(module)
 wm8960 map module More...
 
#define HAL_WM8960_MAP_PROTOCOL(protocol)
 wm8960 map protocol More...
 
#define HAL_WM8960_MODULE_CAPABILITY
 module capability definition More...
 
#define HAL_WM8960_PLAY_CAPABILITY
 
#define HAL_WM8960_RECORD_CAPABILITY
 

Functions

status_t HAL_CODEC_Deinit (void *handle)
 Codec de-initilization. More...
 
status_t HAL_CODEC_Init (void *handle, void *config)
 Codec initilization. More...
 
status_t HAL_CODEC_ModuleControl (void *handle, uint32_t cmd, uint32_t data)
 codec module control. More...
 
status_t HAL_CODEC_SetFormat (void *handle, uint32_t mclk, uint32_t sampleRate, uint32_t bitWidth)
 set audio data format. More...
 
status_t HAL_CODEC_SetMute (void *handle, uint32_t playChannel, bool isMute)
 set audio codec module mute. More...
 
status_t HAL_CODEC_SetPlay (void *handle, uint32_t playSource)
 codec set play source. More...
 
status_t HAL_CODEC_SetPower (void *handle, uint32_t module, bool powerOn)
 set audio codec module power. More...
 
status_t HAL_CODEC_SetRecord (void *handle, uint32_t recordSource)
 codec set record source. More...
 
status_t HAL_CODEC_SetRecordChannel (void *handle, uint32_t leftRecordChannel, uint32_t rightRecordChannel)
 codec set record channel. More...
 
status_t HAL_CODEC_SetVolume (void *handle, uint32_t playChannel, uint32_t volume)
 set audio codec module volume. More...
 

Variables

static const codec_capability_t s_wm8960_capability
 

Macro Definition Documentation

◆ HAL_WM8960_MAP_MODULE

#define HAL_WM8960_MAP_MODULE (   module)
Value:
(module == kCODEC_ModuleADC ? \
kWM8960_ModuleADC : \
module == kCODEC_ModuleDAC ? \
kWM8960_ModuleDAC : \
module == kCODEC_ModuleVref ? \
kWM8960_ModuleVREF : \
module == kCODEC_ModuleHeadphone ? \
kWM8960_ModuleHP : \
module == kCODEC_ModuleMicbias ? \
kWM8960_ModuleMICB : \
module == kCODEC_ModuleMic ? \
kWM8960_ModuleMIC : \
module == kCODEC_ModuleLinein ? \
kWM8960_ModuleLineIn : \
module == kCODEC_ModuleSpeaker ? \
kWM8960_ModuleSpeaker : \

wm8960 map module

Definition at line 39 of file fsl_codec_adapter.c.

◆ HAL_WM8960_MAP_PROTOCOL

#define HAL_WM8960_MAP_PROTOCOL (   protocol)
Value:
(protocol == kCODEC_BusI2S ? \
kWM8960_BusI2S : \
protocol == kCODEC_BusLeftJustified ? \
kWM8960_BusLeftJustified : \
protocol == kCODEC_BusRightJustified ? \
kWM8960_BusRightJustified : \

wm8960 map protocol

Definition at line 29 of file fsl_codec_adapter.c.

◆ HAL_WM8960_MODULE_CAPABILITY

#define HAL_WM8960_MODULE_CAPABILITY
Value:

module capability definition

Definition at line 15 of file fsl_codec_adapter.c.

◆ HAL_WM8960_PLAY_CAPABILITY

#define HAL_WM8960_PLAY_CAPABILITY
Value:

Definition at line 19 of file fsl_codec_adapter.c.

◆ HAL_WM8960_RECORD_CAPABILITY

#define HAL_WM8960_RECORD_CAPABILITY

Variable Documentation

◆ s_wm8960_capability

const codec_capability_t s_wm8960_capability
static
Initial value:
= {
.codecPlayCapability = HAL_WM8960_PLAY_CAPABILITY,
.codecModuleCapability = HAL_WM8960_MODULE_CAPABILITY,
.codecRecordCapability = HAL_WM8960_RECORD_CAPABILITY,
}

Definition at line 66 of file fsl_codec_adapter.c.

kCODEC_SupportModuleDAC
@ kCODEC_SupportModuleDAC
Definition: fsl_codec_common.h:173
kCODEC_ModuleMxier
@ kCODEC_ModuleMxier
Definition: fsl_codec_common.h:94
kCODEC_ModuleHeadphone
@ kCODEC_ModuleHeadphone
Definition: fsl_codec_common.h:85
kCODEC_BusI2S
@ kCODEC_BusI2S
Definition: fsl_codec_common.h:45
HAL_WM8960_PLAY_CAPABILITY
#define HAL_WM8960_PLAY_CAPABILITY
Definition: fsl_codec_adapter.c:19
kCODEC_SupportModuleHeadphone
@ kCODEC_SupportModuleHeadphone
Definition: fsl_codec_common.h:175
kCODEC_SupportModuleADC
@ kCODEC_SupportModuleADC
Definition: fsl_codec_common.h:172
kCODEC_ModuleMic
@ kCODEC_ModuleMic
Definition: fsl_codec_common.h:91
kCODEC_SupportModulePGA
@ kCODEC_SupportModulePGA
Definition: fsl_codec_common.h:174
HAL_WM8960_MODULE_CAPABILITY
#define HAL_WM8960_MODULE_CAPABILITY
module capability definition
Definition: fsl_codec_adapter.c:15
kCODEC_ModuleSpeaker
@ kCODEC_ModuleSpeaker
Definition: fsl_codec_common.h:86
kWM8960_BusPCMB
@ kWM8960_BusPCMB
Definition: fsl_wm8960.h:255
kCODEC_ModuleADC
@ kCODEC_ModuleADC
Definition: fsl_codec_common.h:82
kCODEC_BusPCMA
@ kCODEC_BusPCMA
Definition: fsl_codec_common.h:48
kCODEC_SupportPlayChannelRight1
@ kCODEC_SupportPlayChannelRight1
Definition: fsl_codec_common.h:190
kWM8960_ModuleOMIX
@ kWM8960_ModuleOMIX
Definition: fsl_wm8960.h:212
kCODEC_ModuleLineout
@ kCODEC_ModuleLineout
Definition: fsl_codec_common.h:88
kCODEC_SupportPlayChannelLeft2
@ kCODEC_SupportPlayChannelLeft2
Definition: fsl_codec_common.h:191
kCODEC_SupportPlaySourcePGA
@ kCODEC_SupportPlaySourcePGA
Definition: fsl_codec_common.h:196
HAL_WM8960_RECORD_CAPABILITY
#define HAL_WM8960_RECORD_CAPABILITY
Definition: fsl_codec_adapter.c:24
kCODEC_SupportPlayChannelRight0
@ kCODEC_SupportPlayChannelRight0
Definition: fsl_codec_common.h:188
kCODEC_BusPCMB
@ kCODEC_BusPCMB
Definition: fsl_codec_common.h:49
kWM8960_ModuleLineOut
@ kWM8960_ModuleLineOut
Definition: fsl_wm8960.h:210
kWM8960_BusI2S
@ kWM8960_BusI2S
Definition: fsl_wm8960.h:251
kCODEC_ModuleMicbias
@ kCODEC_ModuleMicbias
Definition: fsl_codec_common.h:90
kWM8960_BusPCMA
@ kWM8960_BusPCMA
Definition: fsl_wm8960.h:254
kCODEC_SupportPlaySourceDAC
@ kCODEC_SupportPlaySourceDAC
Definition: fsl_codec_common.h:198
kCODEC_BusLeftJustified
@ kCODEC_BusLeftJustified
Definition: fsl_codec_common.h:46
kCODEC_SupportPlayChannelLeft1
@ kCODEC_SupportPlayChannelLeft1
Definition: fsl_codec_common.h:189
kCODEC_SupportModuleSpeaker
@ kCODEC_SupportModuleSpeaker
Definition: fsl_codec_common.h:176
kWM8960_ModuleADC
@ kWM8960_ModuleADC
Definition: fsl_wm8960.h:203
kCODEC_BusRightJustified
@ kCODEC_BusRightJustified
Definition: fsl_codec_common.h:47
kCODEC_SupportPlayChannelRight2
@ kCODEC_SupportPlayChannelRight2
Definition: fsl_codec_common.h:192
kCODEC_ModuleLinein
@ kCODEC_ModuleLinein
Definition: fsl_codec_common.h:87
kCODEC_ModuleVref
@ kCODEC_ModuleVref
Definition: fsl_codec_common.h:89
kCODEC_ModuleDAC
@ kCODEC_ModuleDAC
Definition: fsl_codec_common.h:83
kCODEC_SupportPlayChannelLeft0
@ kCODEC_SupportPlayChannelLeft0
Definition: fsl_codec_common.h:187


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