Developer World
Spresense SDK Library v1.4.2-3df2e9d
Audio OutputMix API
Collaboration diagram for Audio OutputMix API:

Files

file  audio_outputmix_api.h
 CXD5602 Audio OutputMix API.
 

Classes

struct  AsOutputMixMsgQueId_t
 
struct  AsOutputMixPoolId_t
 
struct  AsOutputMixPoolId_old_t
 
struct  AsCreateOutputMixParam_t
 
struct  AsCreateOutputMixParams_t
 
struct  AsOutputMixDoneParam
 
struct  AsActivateOutputMixer
 
struct  AsDeactivateOutputMixer
 
struct  AsSendDataOutputMixer
 
struct  AsFrameTermFineControl
 
struct  AsInitPostProc
 
struct  OutputMixerCommand
 

Macros

#define AS_FEATURE_OUTPUTMIX_ENABLE
 
#define LENGTH_INITMPP   5
 InitMPP command (AUDCMD_INITMPP) packet length.
 
#define LENGTH_SUB_SETMPP_COMMON   4
 SetMPP command (AUDCMD_SETMPPPARAM) packet length.
 
#define LENGTH_SUB_SETMPP_XLOUD   4
 SetMPP command (AUDCMD_SETMPPPARAM) packet length.
 
#define PF_COMMAND_PACKET_SIZE_MAX   (32)
 

Typedefs

typedef void(* OutputMixerCallback) (MsgQueId requester_dtq, MsgType msgtype, AsOutputMixDoneParam *param)
 
typedef void(* OutputMixerErrorCallback) (uint8_t handle)
 
typedef AsInitPostProc AsSetPostProc
 

Enumerations

enum  AsOutputMixerHandle { OutputMixer0 = 0, OutputMixer1 }
 
enum  AsOutputMixDevice { HPOutputDevice = 0, I2SOutputDevice, A2dpSrcOutputDevice, OutputMixDeviceNum }
 
enum  AsOutputMixerType { MainOnly = 0, SoundEffectOnly, MainSoundEffectMix, OutputMixerTypeNum }
 
enum  AsOutputMixerPostFilter { PostFilterDisable = 0, PostFilterEnable }
 
enum  AsOutputMixDoneCmdType {
  OutputMixActDone = 0, OutputMixDeactDone, OutputMixSetClkRcvDone, OutputMixInitPostDone,
  OutputMixSetPostDone, OutputMixDoneCmdTypeNum
}
 

Functions

bool AS_CreateOutputMixer (FAR AsCreateOutputMixParam_t *param, AudioAttentionCb attcb)
 Create audio output mixer. More...
 
bool AS_CreateOutputMixer (FAR AsCreateOutputMixParams_t *param, AudioAttentionCb attcb)
 
 __attribute__ ((deprecated("\\ \Deprecated create API is used. \ \Use \S_CreateOutputMixer(AsCreateOutputMixParam_t * \ \ AudioAttentionCb)\ \ \\ \))) bool AS_CreateOutputMixer(FAR AsCreateOutputMixParam_t *param)
 
bool AS_CreateOutputMixer (FAR AsCreateOutputMixParams_t *param)
 
bool AS_ActivateOutputMixer (uint8_t handle, FAR AsActivateOutputMixer *actparam)
 Activate audio output mixer. More...
 
bool AS_SendDataOutputMixer (FAR AsSendDataOutputMixer *sendparam)
 Send audio data via outputmixer. More...
 
bool AS_FrameTermFineControlOutputMixer (uint8_t handle, FAR AsFrameTermFineControl *ftermparam)
 Set clock recovery parameters. More...
 
bool AS_InitPostprocOutputMixer (uint8_t handle, FAR AsInitPostProc *initppparam)
 Init Postproces DSP. More...
 
bool AS_SetPostprocOutputMixer (uint8_t handle, FAR AsSetPostProc *setppparam)
 Set parameters Postproces DSP. More...
 
bool AS_DeactivateOutputMixer (uint8_t handle, FAR AsDeactivateOutputMixer *deactparam)
 Deactivate audio output mixer. More...
 
bool AS_DeleteOutputMix (void)
 Delete output mixer. More...
 
bool AS_checkAvailabilityOutputMixer (void)
 Check availability of OutputMixer. More...
 

Detailed Description

Enumeration Type Documentation

◆ AsOutputMixerHandle

Enumerator
OutputMixer0 

OutputMixer No.0.

OutputMixer1 

OutputMixer No.1.

◆ AsOutputMixDevice

Enumerator
HPOutputDevice 

Speaker out.

I2SOutputDevice 

I2S out.

A2dpSrcOutputDevice 

A2DP out.

◆ AsOutputMixerType

Enumerator
MainOnly 

Main.

SoundEffectOnly 

SoundEffet.

MainSoundEffectMix 

Main & SoundEffet.

◆ AsOutputMixerPostFilter

Enumerator
PostFilterDisable 

Disable

PostFilterEnable 

Enable

◆ AsOutputMixDoneCmdType

Enumerator
OutputMixActDone 

Activation done.

OutputMixDeactDone 

Deactivation done.

OutputMixSetClkRcvDone 

Set Clock recovery done.

OutputMixInitPostDone 

Init Postproc command done.

OutputMixSetPostDone 

Set Postproc command done.

Function Documentation

◆ AS_CreateOutputMixer()

bool AS_CreateOutputMixer ( FAR AsCreateOutputMixParam_t param,
AudioAttentionCb  attcb 
)

Create audio output mixer.

Parameters
[in]paramParameters of resources used by output mixer
[in]attcbAttention callback of OutputMixer. NULL means no callback.
Return values
true: success
false: failure

◆ AS_ActivateOutputMixer()

bool AS_ActivateOutputMixer ( uint8_t  handle,
FAR AsActivateOutputMixer actparam 
)

Activate audio output mixer.

Parameters
[in]actparamActivation parameters
Return values
true: success
false: failure

◆ AS_SendDataOutputMixer()

bool AS_SendDataOutputMixer ( FAR AsSendDataOutputMixer sendparam)

Send audio data via outputmixer.

Parameters
[in]sendparamSend data parameters
Return values
true: success
false: failure

◆ AS_FrameTermFineControlOutputMixer()

bool AS_FrameTermFineControlOutputMixer ( uint8_t  handle,
FAR AsFrameTermFineControl ftermparam 
)

Set clock recovery parameters.

Parameters
[in]ftermparamclock recovery parameters
Return values
true: success
false: failure

◆ AS_InitPostprocOutputMixer()

bool AS_InitPostprocOutputMixer ( uint8_t  handle,
FAR AsInitPostProc initppparam 
)

Init Postproces DSP.

Parameters
[in]initppparamcommand parameters
Return values
true: success
false: failure

◆ AS_SetPostprocOutputMixer()

bool AS_SetPostprocOutputMixer ( uint8_t  handle,
FAR AsSetPostProc setppparam 
)

Set parameters Postproces DSP.

Parameters
[in]setppparamcommand parameters
Return values
true: success
false: failure

◆ AS_DeactivateOutputMixer()

bool AS_DeactivateOutputMixer ( uint8_t  handle,
FAR AsDeactivateOutputMixer deactparam 
)

Deactivate audio output mixer.

Parameters
[in]deactparamDeactivation parameters
Return values
true: success
false: failure

◆ AS_DeleteOutputMix()

bool AS_DeleteOutputMix ( void  )

Delete output mixer.

Return values
true: success
false: failure

◆ AS_checkAvailabilityOutputMixer()

bool AS_checkAvailabilityOutputMixer ( void  )

Check availability of OutputMixer.

Return values
true: avaliable
false: Not available