36#ifndef __MODULES_INCLUDE_AUDIO_AUDIO_PLAYER_API_H
37#define __MODULES_INCLUDE_AUDIO_AUDIO_PLAYER_API_H
63#include "memutils/message/MsgPacket.h"
71#define AS_FEATURE_PLAYER_ENABLE
77#define AS_FEATURE_OUTPUTMIX_ENABLE
84#define LENGTH_INIT_PLAYER (9)
88#define LENGTH_INIT_SUBPLAYER (LENGTH_INIT_PLAYER)
92#define LENGTH_PLAY_PLAYER (2)
96#define LENGTH_PLAY_SUBPLAYER (LENGTH_PLAY_PLAYER)
100#define LENGTH_STOP_PLAYER (2)
104#define LENGTH_STOP_SUBPLAYER (LENGTH_STOP_PLAYER)
108#define LENGTH_CLK_RECOVERY (2)
112#define LENGTH_SET_GAIN (2)
116#define LENGTH_SENDPOSTCMD (10)
209 AS_SETPLAYER_INPUTDEVICE_NUM
230 AS_SETPLAYER_OUTPUTDEVICE_NUM
267 AsNextNormalRequest = 0,
268 AsNextStopResRequest,
338typedef bool (*MediaPlayerCallback)(
AsPlayerEvent evtype, uint32_t result, uint32_t sub_result);
348 MediaPlayerCallback cb;
381#if !defined(__CC_ARM)
704 \n Deprecated create API is used. \
705 \n Use \"AS_CreatePlayerMulti(AsPlayerId, \
706 \n AsCreatePlayerParam_t *, \
707 \n AudioAttentionCb)\". \
CXD5602 Audio Common Definitions.
CXD5602 Audio Object Layer API.
__attribute__((deprecated("\nDeprecated attention callback type is used. \
\nPlease use \"AudioAttentionCb\" as callback type. \
\n"))) int AS_CreateAudioManager(AudioSubSystemIDs ids
Activate AudioSubSystem[Deprecated] This API is to make it compatible with old application....
void(* AudioAttentionCb)(const ErrorAttentionParam *attparam)
Definition: audio_common_defs.h:810
#define AS_AUDIO_DSP_PATH_LEN
Definition: audio_common_defs.h:693
AsStopPlayerStopMode
Definition: audio_player_api.h:236
AsSetActivatePlayer
Definition: audio_player_api.h:169
bool AS_StopPlayer(AsPlayerId id, FAR AsStopPlayerParam *stopparam)
Stop audio (sub)player.
bool AS_SetPlayerGain(AsPlayerId id, FAR AsSetGainParam *gainparam)
Set audio gain level of (sub)player.
AsPlayerId
Definition: audio_player_api.h:157
bool AS_checkAvailabilityMediaPlayer(AsPlayerId id)
Check availability of MediaPlayer.
bool AS_InitPlayer(AsPlayerId id, FAR AsInitPlayerParam *initparam)
Initialize audio (sub)player.
AsSetPlayerOutputDevice
Definition: audio_player_api.h:216
bool AS_CreatePlayerMulti(AsPlayerId id, FAR AsCreatePlayerParam_t *param, AudioAttentionCb attcb)
Create audio main player using memory pool in work area of src.
bool AS_CreatePlayer(AsPlayerId id, FAR AsCreatePlayerParam_t *param)
Create audio main player.
bool AS_PlayPlayer(AsPlayerId id, FAR AsPlayPlayerParam *playparam)
Play audio (sub)player.
AsPcmDataPath
Definition: audio_player_api.h:252
bool AS_ActivatePlayer(AsPlayerId id, FAR AsActivatePlayer *actparam)
Activate audio (sub)player.
bool AS_DeactivatePlayer(AsPlayerId id, FAR AsDeactivatePlayer *deactparam)
Deactivate (sub)player.
void(* DecodeDoneCallback)(AsPcmDataParam param)
Definition: audio_player_api.h:395
bool AS_RequestNextPlayerProcess(AsPlayerId id, FAR AsRequestNextParam *nextparam)
Request next process(decode) to (sub)player.
bool AS_DeletePlayer(AsPlayerId id)
Deactivate audio main player.
void(* AudioSimpleFifoReadDoneCallbackFunction)(uint32_t size)
Definition: audio_player_api.h:278
AsSetPlayerInputDevice
Definition: audio_player_api.h:187
AsPlayerEvent
Definition: audio_player_api.h:127
@ AS_STOPPLAYER_ESEND
Wait end of es.
Definition: audio_player_api.h:243
@ AS_STOPPLAYER_FORCIBLY
Forcibly stop at system failure.
Definition: audio_player_api.h:246
@ AS_STOPPLAYER_NORMAL
Normal stop (immediately stop)
Definition: audio_player_api.h:239
@ AS_ACTPLAYER_SUB
Activate sub player.
Definition: audio_player_api.h:176
@ AS_ACTPLAYER_MAIN
Activate main player.
Definition: audio_player_api.h:172
@ AS_ACTPLAYER_BOTH
Activate main & sub player.
Definition: audio_player_api.h:180
@ AS_SETPLAYER_OUTPUTDEVICE_SPHP
CXD5247 SP/HP.
Definition: audio_player_api.h:219
@ AS_SETPLAYER_OUTPUTDEVICE_I2SOUTPUT
I2S Output.
Definition: audio_player_api.h:223
@ AS_SETPLAYER_OUTPUTDEVICE_A2DPFIFO
A2DP Media Packet FIFO.
Definition: audio_player_api.h:229
@ AsPcmDataReply
Decodec PCM data will be replied by callback.
Definition: audio_player_api.h:255
@ AsPcmDataTunnel
Decodec PCM data will be sent automatically.
Definition: audio_player_api.h:259
@ AS_SETPLAYER_INPUTDEVICE_I2SINPUT
I2S input.
Definition: audio_player_api.h:204
@ AS_SETPLAYER_INPUTDEVICE_EMMC
eMMC FileSystem
Definition: audio_player_api.h:192
@ AS_SETPLAYER_INPUTDEVICE_RAM
RAM.
Definition: audio_player_api.h:208
@ AS_SETPLAYER_INPUTDEVICE_A2DPFIFO
A2DP Media Packet FIFO.
Definition: audio_player_api.h:198
@ AsPlayerEventAct
Activate.
Definition: audio_player_api.h:130
@ AsPlayerEventSetGain
Set gain.
Definition: audio_player_api.h:150
@ AsPlayerEventInit
Init.
Definition: audio_player_api.h:134
@ AsPlayerEventDeact
Deactivate.
Definition: audio_player_api.h:146
@ AsPlayerEventPlay
Play.
Definition: audio_player_api.h:138
@ AsPlayerEventStop
Stop.
Definition: audio_player_api.h:142
Definition: audio_player_api.h:309
uint8_t reserved1
[in] reserved
Definition: audio_player_api.h:330
uint8_t output_device
[in] Select Player Output device
Definition: audio_player_api.h:322
uint8_t reserved0
[in] reserved
Definition: audio_player_api.h:326
uint8_t input_device
[in] Select Player Input device
Definition: audio_player_api.h:315
AsPlayerInputDeviceHdlrForRAM * ram_handler
[in] Set Player Input device handler, refer following.
Definition: audio_player_api.h:334
Definition: audio_player_api.h:341
AsActivatePlayerParam param
[in] MediaPlayer activation parameters
Definition: audio_player_api.h:344
Definition: audio_player_api.h:634
AsPlayerPoolId_old_t pool_id
[in] ID of memory pool for processing data
Definition: audio_player_api.h:641
AsPlayerMsgQueId_t msgq_id
[in] ID for sending messages to each function
Definition: audio_player_api.h:637
Definition: audio_player_api.h:648
AsPlayerMsgQueId_t msgq_id
[in] ID for sending messages to each function
Definition: audio_player_api.h:651
AsPlayerPoolId_t pool_id
[in] ID of memory pool for processing data
Definition: audio_player_api.h:655
Definition: audio_player_api.h:389
Definition: audio_player_api.h:398
uint8_t reserved1
[in] reserved
Definition: audio_player_api.h:422
uint8_t codec_type
[in] Select InitPlayer codec type
Definition: audio_player_api.h:418
uint8_t channel_number
[in] Select InitPlayer input channels
Definition: audio_player_api.h:404
uint32_t sampling_rate
[in] Select sampling rate of es data
Definition: audio_player_api.h:429
uint8_t bit_length
[in] Select InitPlayer input bit length
Definition: audio_player_api.h:411
[in] Decoded PCM notify message
Definition: audio_player_api.h:452
Definition: audio_common_defs.h:703
Definition: audio_player_api.h:460
AsPcmDataDest pcm_dest
[in] Decode done callback
Definition: audio_player_api.h:475
uint8_t pcm_path
[in] Decoded PCM data path
Definition: audio_player_api.h:467
Definition: audio_player_api.h:573
uint8_t mng
[in] Message queue id of audio_manager
Definition: audio_player_api.h:580
uint8_t mixer
[in] Message queue id of output mixer
Definition: audio_player_api.h:584
uint8_t dsp
[in] Message queue id of DSP
Definition: audio_player_api.h:588
uint8_t player
[in] Message queue id of player
Definition: audio_player_api.h:576
Definition: audio_player_api.h:613
uint8_t pcm
[in] Memory pool id of pcm data
Definition: audio_player_api.h:620
uint8_t es
[in] Memory pool id of es data
Definition: audio_player_api.h:616
uint8_t dsp
[in] Memory pool id of dsp command data
Definition: audio_player_api.h:624
uint8_t src_work
[in] Memory pool id of src work area
Definition: audio_player_api.h:628
Definition: audio_player_api.h:594
MemMgrLite::PoolId dsp
[in] Memory pool id of dsp command data
Definition: audio_player_api.h:605
MemMgrLite::PoolId es
[in] Memory pool id of es data
Definition: audio_player_api.h:597
MemMgrLite::PoolId pcm
[in] Memory pool id of pcm data
Definition: audio_player_api.h:601
MemMgrLite::PoolId src_work
[in] Memory pool id of src work area
Definition: audio_player_api.h:609
Definition: audio_player_api.h:511
uint8_t type
[in] Request type
Definition: audio_player_api.h:517
Definition: audio_player_api.h:494
uint8_t l_gain
[in] Gain level Lch Percentage 0 - 200 %
Definition: audio_player_api.h:499
uint8_t r_gain
[in] Gain level Rch Percentage 0 - 200 %
Definition: audio_player_api.h:505
Definition: audio_player_api.h:482
uint8_t stop_mode
[in] Stop mode which indicates immediate or wait end of es
Definition: audio_player_api.h:488
Definition: MemMgrTypes.h:88
Definition: audio_player_api.h:524
AsSetGainParam set_gain_param
[in] for Adjust sound period (header.command_code==AUDCMD_CLKRECOVERY)
Definition: audio_player_api.h:560
AsDeactivatePlayer deact_param
[in] for deactivate player (header.command_code==AUDCMD_SETREADYSTATUS)
Definition: audio_player_api.h:566
uint8_t player_id
[in] target player id Use AsPlayerId enum type
Definition: audio_player_api.h:529
AsPlayPlayerParam play_param
[in] for PlayPlayer (header.command_code==AUDCMD_PLAYPLAYER)
Definition: audio_player_api.h:546
AsInitPlayerParam init_param
[in] for InitPlayer (header.command_code==AUDCMD_INITPLAYER) (Object Interface==AS_InitPlayer)
Definition: audio_player_api.h:540
AsStopPlayerParam stop_param
[in] for StopPlayer (header.command_code==AUDCMD_STOPPLAYER)
Definition: audio_player_api.h:552
Definition: audio_player_api.h:353
uint8_t post0_enable
[in] post DSP 0 enable
Definition: audio_player_api.h:363
uint8_t active_player
[in] Select activate player
Definition: audio_player_api.h:359
AsActivatePlayerParam player1
[in] Activation parameters for player1
Definition: audio_player_api.h:379
AsActivatePlayerParam player0
[in] Activation parameters for player0
Definition: audio_player_api.h:375
uint8_t post1_enable
[in] post DSP 1 enable
Definition: audio_player_api.h:367
uint8_t reserve0
[in] reserved
Definition: audio_player_api.h:371
Definition: audio_player_api.h:440
DecodeDoneCallback callback
[in] Decoded PCM notify callback
Definition: audio_player_api.h:445