Files | |
file | audio_player_api.h |
CXD5602 Audio Player API. | |
Classes | |
struct | AsPlayerInputDeviceHdlrForRAM |
struct | AsActivatePlayerParam |
struct | AsActivatePlayer |
struct | SetPlayerStsParam |
struct | AsDeactivatePlayer |
struct | AsInitPlayerParam |
union | AsPcmDataDest |
struct | AsPlayPlayerParam |
struct | AsStopPlayerParam |
struct | AsSetGainParam |
struct | AsRequestNextParam |
struct | PlayerCommand |
struct | AsPlayerMsgQueId_t |
struct | AsPlayerPoolId_t |
struct | AsPlayerPoolId_old_t |
struct | AsCreatePlayerParam_t |
struct | AsCreatePlayerParams_t |
Typedefs | |
typedef void(* | AudioSimpleFifoReadDoneCallbackFunction) (uint32_t size) |
typedef bool(* | MediaPlayerCallback) (AsPlayerEvent evtype, uint32_t result, uint32_t sub_result) |
typedef void(* | DecodeDoneCallback) (AsPcmDataParam param) |
Enumerations | |
enum | AsPlayerEvent { AsPlayerEventAct = 0 , AsPlayerEventInit , AsPlayerEventPlay , AsPlayerEventStop , AsPlayerEventDeact , AsPlayerEventSetGain } |
enum | AsPlayerId { AS_PLAYER_ID_0 = 0 , AS_PLAYER_ID_1 , AS_PLAYER_ID_NUM } |
enum | AsSetActivatePlayer { AS_ACTPLAYER_MAIN = 1 , AS_ACTPLAYER_SUB , AS_ACTPLAYER_BOTH , AS_ACTPLAYER_NUM } |
enum | AsSetPlayerInputDevice { AS_SETPLAYER_INPUTDEVICE_EMMC = 0 , AS_SETPLAYER_INPUTDEVICE_A2DPFIFO , AS_SETPLAYER_INPUTDEVICE_I2SINPUT , AS_SETPLAYER_INPUTDEVICE_RAM , AS_SETPLAYER_INPUTDEVICE_NUM } |
enum | AsSetPlayerOutputDevice { AS_SETPLAYER_OUTPUTDEVICE_SPHP = 0 , AS_SETPLAYER_OUTPUTDEVICE_I2SOUTPUT , AS_SETPLAYER_OUTPUTDEVICE_A2DPFIFO , AS_SETPLAYER_OUTPUTDEVICE_NUM } |
enum | AsStopPlayerStopMode { AS_STOPPLAYER_NORMAL = 0 , AS_STOPPLAYER_ESEND , AS_STOPPLAYER_FORCIBLY = 0xFF } |
enum | AsPcmDataPath { AsPcmDataReply = 0 , AsPcmDataTunnel } |
enum | AsRequestNextType { AsNextNormalRequest = 0 , AsNextStopResRequest } |
Functions | |
bool | AS_CreatePlayer (AsPlayerId id, FAR AsCreatePlayerParam_t *param) |
Create audio main player. More... | |
bool | AS_CreatePlayerMulti (AsPlayerId id, FAR AsCreatePlayerParam_t *param, AudioAttentionCb attcb) |
Create audio main player using memory pool in work area of src. More... | |
bool | AS_CreatePlayerMulti (AsPlayerId id, FAR AsCreatePlayerParams_t *param, AudioAttentionCb attcb) |
__attribute__ ((deprecated("\n \ \n Deprecated create API is used. \ \n Use \"AS_CreatePlayerMulti(AsPlayerId, \ \n AsCreatePlayerParam_t *, \ \n AudioAttentionCb)\". \ \n \ \n"))) bool AS_CreatePlayerMulti(AsPlayerId id | |
bool | AS_CreatePlayerMulti (AsPlayerId id, FAR AsCreatePlayerParams_t *param) |
bool | AS_ActivatePlayer (AsPlayerId id, FAR AsActivatePlayer *actparam) |
Activate audio (sub)player. More... | |
bool | AS_InitPlayer (AsPlayerId id, FAR AsInitPlayerParam *initparam) |
Initialize audio (sub)player. More... | |
bool | AS_PlayPlayer (AsPlayerId id, FAR AsPlayPlayerParam *playparam) |
Play audio (sub)player. More... | |
bool | AS_StopPlayer (AsPlayerId id, FAR AsStopPlayerParam *stopparam) |
Stop audio (sub)player. More... | |
bool | AS_SetPlayerGain (AsPlayerId id, FAR AsSetGainParam *gainparam) |
Set audio gain level of (sub)player. More... | |
bool | AS_RequestNextPlayerProcess (AsPlayerId id, FAR AsRequestNextParam *nextparam) |
Request next process(decode) to (sub)player. More... | |
bool | AS_DeactivatePlayer (AsPlayerId id, FAR AsDeactivatePlayer *deactparam) |
Deactivate (sub)player. More... | |
bool | AS_DeletePlayer (AsPlayerId id) |
Deactivate audio main player. More... | |
bool | AS_checkAvailabilityMediaPlayer (AsPlayerId id) |
Check availability of MediaPlayer. More... | |
Variables | |
FAR AsCreatePlayerParam_t * | param |
Packet length of player command | |
#define | LENGTH_INIT_PLAYER (9) |
InitPlayer command (AUDCMD_INITPLAYER) packet length. | |
#define | LENGTH_INIT_SUBPLAYER (LENGTH_INIT_PLAYER) |
InitSubPlayer command (#AUDCMD_INITSUBPLAYER) packet length. | |
#define | LENGTH_PLAY_PLAYER (2) |
PlayPlayer command (AUDCMD_PLAYPLAYER) packet length. | |
#define | LENGTH_PLAY_SUBPLAYER (LENGTH_PLAY_PLAYER) |
PlaySubPlayer command (#AUDCMD_PLAYSUBPLAYER) packet length. | |
#define | LENGTH_STOP_PLAYER (2) |
StopPlayer command (AUDCMD_STOPPLAYER) packet length. | |
#define | LENGTH_STOP_SUBPLAYER (LENGTH_STOP_PLAYER) |
StopSubPlayer command (#AUDCMD_STOPSUBPLAYER) packet length. | |
#define | LENGTH_CLK_RECOVERY (2) |
ClkRecovery command ("AUDCMD_CLKRECOVERY)packet length. | |
#define | LENGTH_SET_GAIN (2) |
Set audio gain leve command ("AUDCMD_SETGAIN)packet length. | |
#define | LENGTH_SENDPOSTCMD (10) |
Send Pfcommand command ("AUDCMD_SENDPOSTCMD") packet length. | |
typedef void(* AudioSimpleFifoReadDoneCallbackFunction) (uint32_t size) |
SimpliFifo Callback function
[in] | size | : Set read size after reading the SimpleFifo |
typedef void(* DecodeDoneCallback) (AsPcmDataParam param) |
InitPlayer Command (AUDCMD_INITPLAYER, AUDCMD_INITSUBPLAYER) parameter
enum AsPlayerEvent |
enum AsPlayerId |
player id
enum AsSetActivatePlayer |
Select Player Input device
Enumerator | |
---|---|
AS_SETPLAYER_INPUTDEVICE_EMMC | eMMC FileSystem
|
AS_SETPLAYER_INPUTDEVICE_A2DPFIFO | A2DP Media Packet FIFO.
|
AS_SETPLAYER_INPUTDEVICE_I2SINPUT | I2S input.
|
AS_SETPLAYER_INPUTDEVICE_RAM | RAM. |
Select Player Output device
Enumerator | |
---|---|
AS_SETPLAYER_OUTPUTDEVICE_SPHP | CXD5247 SP/HP. |
AS_SETPLAYER_OUTPUTDEVICE_I2SOUTPUT | I2S Output. |
AS_SETPLAYER_OUTPUTDEVICE_A2DPFIFO | A2DP Media Packet FIFO.
|
enum AsStopPlayerStopMode |
enum AsPcmDataPath |
bool AS_CreatePlayer | ( | AsPlayerId | id, |
FAR AsCreatePlayerParam_t * | param | ||
) |
Create audio main player.
[in] | param | Parameters of resources used by audio main player |
true | : success |
false | : failure |
bool AS_CreatePlayerMulti | ( | AsPlayerId | id, |
FAR AsCreatePlayerParam_t * | param, | ||
AudioAttentionCb | attcb | ||
) |
Create audio main player using memory pool in work area of src.
[in] | param | Parameters of resources used by audio main player |
[in] | attcb | Attention callback of Player. NULL means no callback. |
true | : success |
false | : failure |
bool AS_ActivatePlayer | ( | AsPlayerId | id, |
FAR AsActivatePlayer * | actparam | ||
) |
Activate audio (sub)player.
[in] | actparam | Parameters for activation |
true | : success |
false | : failure |
bool AS_InitPlayer | ( | AsPlayerId | id, |
FAR AsInitPlayerParam * | initparam | ||
) |
Initialize audio (sub)player.
[in] | initparam | Parameters for init player setting |
true | : success |
false | : failure |
bool AS_PlayPlayer | ( | AsPlayerId | id, |
FAR AsPlayPlayerParam * | playparam | ||
) |
Play audio (sub)player.
[in] | playparam | Parameters for play player |
true | : success |
false | : failure |
bool AS_StopPlayer | ( | AsPlayerId | id, |
FAR AsStopPlayerParam * | stopparam | ||
) |
Stop audio (sub)player.
[in] | stopparam | Parameters for stop player |
true | : success |
false | : failure |
bool AS_SetPlayerGain | ( | AsPlayerId | id, |
FAR AsSetGainParam * | gainparam | ||
) |
Set audio gain level of (sub)player.
[in] | gainparam | Gain setting parameters |
true | : success |
false | : failure |
bool AS_RequestNextPlayerProcess | ( | AsPlayerId | id, |
FAR AsRequestNextParam * | nextparam | ||
) |
Request next process(decode) to (sub)player.
[in] | nextparam | parameters for next processing |
true | : success |
false | : failure |
bool AS_DeactivatePlayer | ( | AsPlayerId | id, |
FAR AsDeactivatePlayer * | deactparam | ||
) |
Deactivate (sub)player.
[in] | deactparam | Deactivation parameters |
true | : success |
false | : failure |
bool AS_DeletePlayer | ( | AsPlayerId | id | ) |
Deactivate audio main player.
true | : success |
false | : failure |
bool AS_checkAvailabilityMediaPlayer | ( | AsPlayerId | id | ) |
Check availability of MediaPlayer.
true | : avaliable |
false | : Not available |