Developer World
Spresense SDK Library v3.3.0-375c679
Audio Effector API
Collaboration diagram for Audio Effector API:

Files

file  audio_effector_api.h
 CXD5602 Audio Effector API.
 

Classes

struct  InitMFEParam
 
struct  StartBBParam
 
struct  StopBBParam
 
struct  SetBaseBandStatusParam
 
struct  AsEffectorMsgQueId_t
 
struct  AsEffectorPoolId_t
 
struct  AsCreateEffectorParam_t
 

Macros

#define AS_FEATURE_EFFECTOR_ENABLE
 
#define CHECK_XLOUD_VOLUME_RANGE(vol)    (bool)(((0 <= (vol)) && ((vol) <= 59)) ? true : false)
 

Enumerations

enum  AsOutputDevice { AS_OUTPUT_DEVICE_I2S2CH = 0x03 , AS_OUTPUT_DEVICE_SP2CH = 0x30 , AS_OUTPUT_DEVICE_SP2CH_I2S2CH = (AS_OUTPUT_DEVICE_I2S2CH | AS_OUTPUT_DEVICE_SP2CH) }
 
enum  AsInputDevice { AS_INPUT_DEVICE_I2S2CH = 0x0003 , AS_INPUT_DEVICE_AMIC1CH = 0x0100 , AS_INPUT_DEVICE_AMIC1CH_I2S2CH = (AS_INPUT_DEVICE_I2S2CH | AS_INPUT_DEVICE_AMIC1CH) , AS_INPUT_DEVICE_AMIC4CH_I2S2CH = (AS_INPUT_DEVICE_I2S2CH | 0x0F00) }
 
enum  AsSpOutputData { AS_MPP_OUTPUT_I2SIN = 0 , AS_SP_OUTPUT_DATA_NUM }
 
enum  AsI2sOutputData { AS_MFE_OUTPUT_MICSIN = 0 , AS_MIC_THROUGH , AS_I2S_OUTPUT_DATA_NUM }
 
enum  AsSelectOutputMic { AS_SELECT_MIC1_OR_MIC2 = 0x06 , AS_SELECT_MIC0_OR_MIC3 = 0x09 }
 
enum  AsMfeModeId { AS_MFE_MODE_RECOGNITION = 0 , AS_MFE_MODE_SPEAKING , AS_MFE_MODE_NUM }
 
enum  AsMfeIncludeEchoCancel { AS_NOINCLUDE_ECHOCANCEL = 0 , AS_INCLUDE_ECHOCANCEL , AS_MFE_INC_ECHOCANCEL_NUM }
 
enum  AsMfeEnableEchoCancel { AS_DISABLE_ECHOCANCEL = 0 , AS_ENABLE_ECHOCANCEL , AS_MFE_ENBL_ECHOCANCEL_NUM }
 
enum  AsMppModeId { AS_MPP_MODE_XLOUD_ONLY = 0 , AS_MPP_MODE_NUM }
 
enum  AsMppCoefModeId { AS_MPP_COEF_SPEAKER = 0 , AS_MPP_COEF_HEADPHONE , AS_MPP_COEF_NUM }
 
enum  AsMppXloudModeId { AS_MPP_XLOUD_MODE_NORMAL = 0 , AS_MPP_XLOUD_MODE_SPEAKING , AS_MPP_XLOUD_MODE_DISABLE , AS_MPP_XLOUD_MODE_NUM }
 
enum  AsMppEaxModeId { AS_MPP_EAX_DISABLE = 0 , AS_MPP_EAX_ENABLE , AS_MPP_EAX_NUM }
 
enum  AsSetBBStsWithMfe { AS_SET_BBSTS_WITH_MFE_NONE = 0 , AS_SET_BBSTS_WITH_MFE_ACTIVE , AS_SET_BBSTS_WITH_MFE_NUM }
 
enum  AsSetBBStsWithVoiceCommand { AS_SET_BBSTS_WITH_VCMD_NONE = 0 , AS_SET_BBSTS_WITH_VCMD_ACTIVE , AS_SET_BBSTS_WITH_VCMD_NUM }
 
enum  AsSetBBStsWithMpp { AS_SET_BBSTS_WITH_MPP_NONE = 0 , AS_SET_BBSTS_WITH_MPP_ACTIVE , AS_SET_BBSTS_WITH_MPP_NUM }
 

Functions

bool AS_CreateEffector (FAR AsCreateEffectorParam_t *param, AudioAttentionCb attcb)
 Activate sound effector feature. More...
 
 __attribute__ ((deprecated("\n \ \n Deprecated create API is used. \ \n Use \"AS_CreateEffector(AsCreateEffectorParam_t * \ \n AudioAttentionCb)\". \ \n \ \n"))) bool AS_CreateEffector(FAR AsCreateEffectorParam_t *param)
 
bool AS_DeleteEffector (void)
 Deactivate sound effector feature. More...
 

sub code for SETMPPPARAM command(0x2C)

#define SUB_SETMPP_COMMON   0x00
 Sub Code: MPP common setting.
 
#define SUB_SETMPP_XLOUD   0x01
 Sub Code: MPP xLOUD setting.
 

Packet length of command

#define LENGTH_STARTBB   3
 StartBB command (AUDCMD_STARTBB) packet length.
 
#define LENGTH_STOPBB   3
 StopBB command (AUDCMD_STOPBB) packet length.
 

Detailed Description

Macro Definition Documentation

◆ CHECK_XLOUD_VOLUME_RANGE

#define CHECK_XLOUD_VOLUME_RANGE (   vol)     (bool)(((0 <= (vol)) && ((vol) <= 59)) ? true : false)

Check xLOUD volume range

Enumeration Type Documentation

◆ AsOutputDevice

Select Output Device

Enumerator
AS_OUTPUT_DEVICE_I2S2CH 

I2S 2ch.

Deprecated:
It will be removed in the future
AS_OUTPUT_DEVICE_SP2CH 

SP/HP 2ch.

Deprecated:
It will be removed in the future
AS_OUTPUT_DEVICE_SP2CH_I2S2CH 

I2S 2ch, SP/HP 2ch.

◆ AsInputDevice

Select Input Device

Enumerator
AS_INPUT_DEVICE_I2S2CH 

I2S 2ch.

Deprecated:
It will be removed in the future
AS_INPUT_DEVICE_AMIC1CH 

Analog Mic 1ch.

Deprecated:
It will be removed in the future
AS_INPUT_DEVICE_AMIC1CH_I2S2CH 

Analog Mic 1ch, I2S 2ch.

AS_INPUT_DEVICE_AMIC4CH_I2S2CH 

Analog Mic 4ch, I2S 2ch.

Deprecated:
It will be removed in the future

◆ AsSpOutputData

Select SP/HP output data

Enumerator
AS_MPP_OUTPUT_I2SIN 

MPP output (I2S in)

◆ AsI2sOutputData

Select I2S output data

Enumerator
AS_MFE_OUTPUT_MICSIN 

MFE output (MIC in)

AS_MIC_THROUGH 

MIC through.

◆ AsSelectOutputMic

Select output MIC channels (valid only StartBBParam.I2S_output_data == AS_MIC_THROUGH)

Enumerator
AS_SELECT_MIC1_OR_MIC2 

MIC1 and MIC2.

AS_SELECT_MIC0_OR_MIC3 

MIC0 and MIC3.

◆ AsMfeModeId

Select MFE mode

Enumerator
AS_MFE_MODE_RECOGNITION 

Voice Recognition mode (default)

AS_MFE_MODE_SPEAKING 

Voice Speaking mode.

◆ AsMfeIncludeEchoCancel

Select EchoCancel configuration

Enumerator
AS_NOINCLUDE_ECHOCANCEL 

Not include echochancel function.

AS_INCLUDE_ECHOCANCEL 

Incluce echochancel function.

◆ AsMfeEnableEchoCancel

Select EchoCancel function

Enumerator
AS_DISABLE_ECHOCANCEL 

EchoCancel OFF.

AS_ENABLE_ECHOCANCEL 

EchoCancel ON.

Deprecated:
It will be removed in the future

◆ AsMppModeId

Select MPP mode

Enumerator
AS_MPP_MODE_XLOUD_ONLY 

xLOUD only

◆ AsMppCoefModeId

Select MPP coefficient table

Enumerator
AS_MPP_COEF_SPEAKER 

for Speaker

AS_MPP_COEF_HEADPHONE 

for Headphone

◆ AsMppXloudModeId

Select xLOUD mode

Enumerator
AS_MPP_XLOUD_MODE_NORMAL 

Normal mode.

AS_MPP_XLOUD_MODE_SPEAKING 

Speaking mode.

AS_MPP_XLOUD_MODE_DISABLE 

Disable.

◆ AsMppEaxModeId

Select EAX mode

Enumerator
AS_MPP_EAX_DISABLE 

Off.

AS_MPP_EAX_ENABLE 

On.

◆ AsSetBBStsWithMfe

Select MFE function

Enumerator
AS_SET_BBSTS_WITH_MFE_NONE 

no MFE function

AS_SET_BBSTS_WITH_MFE_ACTIVE 

MFE active.

◆ AsSetBBStsWithVoiceCommand

Select Voice Command function

Enumerator
AS_SET_BBSTS_WITH_VCMD_NONE 

no Voice Command function

AS_SET_BBSTS_WITH_VCMD_ACTIVE 

Voice Command active.

◆ AsSetBBStsWithMpp

Select MPP function

Enumerator
AS_SET_BBSTS_WITH_MPP_NONE 

no MPP function

AS_SET_BBSTS_WITH_MPP_ACTIVE 

MPP active.

Deprecated:
It will be removed in the future

Function Documentation

◆ AS_CreateEffector()

bool AS_CreateEffector ( FAR AsCreateEffectorParam_t param,
AudioAttentionCb  attcb 
)

Activate sound effector feature.

Parameters
[in]paramParameters of resources used by sound effector
[in]attcbAttention callback of Player. NULL means no callback.
Return values
true: success
false: failure

◆ AS_DeleteEffector()

bool AS_DeleteEffector ( void  )

Deactivate sound effector feature.

Return values
true: success
false: failure