72 lines
2.3 KiB
C
72 lines
2.3 KiB
C
/******************************************************************************
|
|
Copyright (C), 2001-2011, Hisilicon Tech. Co., Ltd.
|
|
******************************************************************************
|
|
File Name : HA.AUDIO.MP3.decode.h
|
|
Version : Initial Draft
|
|
Author : Hisilicon multimedia software group
|
|
Created :
|
|
Last Modified :
|
|
Description :
|
|
Function List :
|
|
History :
|
|
******************************************************************************/
|
|
#ifndef __HISI_AUDIO_DECODER_MP3_H__
|
|
#define __HISI_AUDIO_DECODER_MP3_H__
|
|
|
|
#include "hi_type.h"
|
|
#include "hi_audio_codec.h"
|
|
|
|
#ifdef __cplusplus
|
|
#if __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
#endif /* __cplusplus */
|
|
|
|
#define HA_MP3_ID 0x0003
|
|
#define HA_CODEC_GET_MP3_CHNANEL_MODE_CMD ((((HI_U32)HA_MP3_ID) << 16) | 0x1000)
|
|
#define HA_CODEC_SET_MP3_CHECKONESYNC_CMD ((((HI_U32)HA_MP3_ID) << 16) | 0x1001)
|
|
|
|
typedef struct
|
|
{
|
|
HI_U32 enCmd; /* HA_CODEC_SET_MP3_CHECKONESYNC_CMD */
|
|
HI_BOOL bCheckOneSync;
|
|
} HA_MP3_CHECKONESYNC_FLAG_S;
|
|
|
|
typedef enum
|
|
{
|
|
MP3_CHANNEL_MODE_STEREO = 0,
|
|
MP3_CHANNEL_MODE_JOINTSTERERO,
|
|
MP3_CHANNEL_MODE_DUALSTERERO,
|
|
MP3_CHANNEL_MODE_MONO,
|
|
} HA_MP3_CHANNEL_MODE;
|
|
|
|
typedef struct
|
|
{
|
|
HI_U32 enCmd; /* HA_CODEC_GET_MP3_CHNANEL_MODE_CMD */
|
|
HA_MP3_CHANNEL_MODE* peChannelMode;
|
|
} HA_MP3_GET_CHNANEL_MODE_S;
|
|
|
|
#define HA_MP3_DecGetDefalutOpenParam(pOpenParam) \
|
|
do{ HI_S32 i; \
|
|
((HI_HADECODE_OPENPARAM_S *)(pOpenParam))->enDecMode = HD_DEC_MODE_RAWPCM; \
|
|
((HI_HADECODE_OPENPARAM_S *)(pOpenParam))->pCodecPrivateData = HI_NULL; \
|
|
((HI_HADECODE_OPENPARAM_S *)(pOpenParam))->u32CodecPrivateDataSize = 0; \
|
|
((HI_HADECODE_OPENPARAM_S *)(pOpenParam))->sPcmformat.u32DesiredOutChannels = 2; \
|
|
((HI_HADECODE_OPENPARAM_S *)(pOpenParam))->sPcmformat.bInterleaved = HI_TRUE; \
|
|
((HI_HADECODE_OPENPARAM_S *)(pOpenParam))->sPcmformat.u32BitPerSample = 16; \
|
|
((HI_HADECODE_OPENPARAM_S *)(pOpenParam))->sPcmformat.u32DesiredSampleRate = 48000; \
|
|
for (i = 0; i < HA_AUDIO_MAXCHANNELS; i++) \
|
|
{ \
|
|
((HI_HADECODE_OPENPARAM_S *)pOpenParam)->sPcmformat.enChannelMapping[i] = HA_AUDIO_ChannelNone; \
|
|
} \
|
|
}while(0)
|
|
|
|
#ifdef __cplusplus
|
|
#if __cplusplus
|
|
}
|
|
#endif
|
|
#endif /* __cplusplus */
|
|
|
|
#endif /* __HISI_AUDIO_DECODER_MP3_H__ */
|
|
|