-
Notifications
You must be signed in to change notification settings - Fork 1
/
sample_comm.h
426 lines (366 loc) · 15.8 KB
/
sample_comm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
/******************************************************************************
Hisilicon Hi35xx sample programs head file.
Copyright (C), 2010-2011, Hisilicon Tech. Co., Ltd.
******************************************************************************
Modification: 2011-2 Created
******************************************************************************/
#ifndef __SAMPLE_COMM_H__
#define __SAMPLE_COMM_H__
#include "hi_common.h"
#include "hi_comm_sys.h"
#include "hi_comm_vb.h"
#include "hi_comm_isp.h"
#include "hi_comm_vi.h"
#include "hi_comm_vo.h"
#include "hi_comm_venc.h"
#include "hi_comm_vpss.h"
#include "hi_comm_vdec.h"
#include "hi_comm_region.h"
#include "hi_comm_adec.h"
#include "hi_comm_aenc.h"
#include "hi_comm_ai.h"
#include "hi_comm_ao.h"
#include "hi_comm_aio.h"
#include "hi_defines.h"
#include "mpi_sys.h"
#include "mpi_vb.h"
#include "mpi_vi.h"
#include "mpi_vo.h"
#include "mpi_venc.h"
#include "mpi_vpss.h"
#include "mpi_vdec.h"
#include "mpi_region.h"
#include "mpi_adec.h"
#include "mpi_aenc.h"
#include "mpi_ai.h"
#include "mpi_ao.h"
#include "mpi_isp.h"
#include "mpi_ae.h"
#include "mpi_awb.h"
#include "mpi_af.h"
#include "hi_vreg.h"
#include "hi_sns_ctrl.h"
#ifdef __cplusplus
#if __cplusplus
extern "C"{
#endif
#endif /* End of #ifdef __cplusplus */
/*******************************************************
macro define
*******************************************************/
#define FILE_NAME_LEN 128
#define ALIGN_UP(x, a) ((x+a-1)&(~(a-1)))
#define ALIGN_BACK(x, a) ((a) * (((x) / (a))))
#define SAMPLE_SYS_ALIGN_WIDTH 64
#define CHECK_CHN_RET(express,Chn,name)\
do{\
HI_S32 Ret;\
Ret = express;\
if (HI_SUCCESS != Ret)\
{\
printf("\033[0;31m%s chn %d failed at %s: LINE: %d with %#x!\033[0;39m\n", name, Chn, __FUNCTION__, __LINE__, Ret);\
fflush(stdout);\
return Ret;\
}\
}while(0)
#define CHECK_RET(express,name)\
do{\
HI_S32 Ret;\
Ret = express;\
if (HI_SUCCESS != Ret)\
{\
printf("\033[0;31m%s failed at %s: LINE: %d with %#x!\033[0;39m\n", name, __FUNCTION__, __LINE__, Ret);\
return Ret;\
}\
}while(0)
#define SAMPLE_PIXEL_FORMAT PIXEL_FORMAT_YUV_SEMIPLANAR_420
#define TW2865_FILE "/dev/tw2865dev"
#define TW2960_FILE "/dev/tw2960dev"
#define TLV320_FILE "/dev/tlv320aic31"
#if (HICHIP == HI3518E_V200)
#define SAMPLE_VO_DEV_DSD1 0
#define SAMPLE_VO_DEV_DSD0 SAMPLE_VO_DEV_DSD1
#else
#error HICHIP define may be error
#endif
/*** for init global parameter ***/
#define SAMPLE_ENABLE 1
#define SAMPLE_DISABLE 0
#define SAMPLE_NOUSE -1
#define SENSOR_HEIGHT 1080
#define SENSOR_WIDTH 1920
#define SAMPLE_AUDIO_AI_DEV 0
#define SAMPLE_AUDIO_AO_DEV 0
#define SAMPLE_AUDIO_PTNUMPERFRM 320
#define VI_MST_NOTPASS_WITH_VALUE_RETURN(s32TempRet) \
do{\
NOT_PASS(s32TempRet);\
VIMST_ExitMpp();\
return s32TempRet;\
}while(0)
#define VI_PAUSE() do {\
printf("---------------press the Enter key to exit!---------------\n");\
getchar();\
} while (0)
#define SAMPLE_PRT(fmt...) \
do {\
printf("[%s]-%d: ", __FUNCTION__, __LINE__);\
printf(fmt);\
}while(0)
#define CHECK_NULL_PTR(ptr)\
do{\
if(NULL == ptr)\
{\
printf("func:%s,line:%d, NULL pointer\n",__FUNCTION__,__LINE__);\
return HI_FAILURE;\
}\
}while(0)
#ifdef LCD_ILI9341
#define INTF_LCD VO_INTF_LCD_6BIT
#define SYNC_LCD VO_OUTPUT_240X320_50;
#define WIDTH_LCD 240
#define HEIGHT_LCD 320
#endif
#ifdef LCD_ILI9342
#define INTF_LCD VO_INTF_LCD_6BIT
#define SYNC_LCD VO_OUTPUT_320X240_50
#define WIDTH_LCD 320
#define HEIGHT_LCD 240
#endif
#ifdef LCD_OTA5182
#define INTF_LCD VO_INTF_LCD_8BIT
#define SYNC_LCD VO_OUTPUT_320X240_60
#define WIDTH_LCD 320
#define HEIGHT_LCD 240
#endif
#define CHIP_HI3516C_V200 0x3516C200
#define CHIP_HI3518E_V200 0x3518E200
#define CHIP_HI3518E_V201 0x3518E201
#if (CHIP_ID == CHIP_HI3516C_V200)
#define VB_CNT 8
#elif (CHIP_ID == CHIP_HI3518E_V200)
#define VB_CNT 6
#elif (CHIP_ID == CHIP_HI3518E_V201)
#define VB_CNT 4
#else
#error CHIP_ID is not defined
#endif
/*******************************************************
enum define
*******************************************************/
typedef enum sample_ispcfg_opt_e
{
CFG_OPT_NONE = 0,
CFG_OPT_SAVE = 1,
CFG_OPT_LOAD = 2,
CFG_OPT_BUTT
}SAMPLE_CFG_OPT_E;
typedef enum sample_vi_mode_e
{
APTINA_AR0130_DC_720P_30FPS = 0,
APTINA_9M034_DC_720P_30FPS,
APTINA_AR0230_HISPI_1080P_30FPS,
SONY_IMX222_DC_1080P_30FPS,
SONY_IMX222_DC_720P_30FPS,
PANASONIC_MN34222_MIPI_1080P_30FPS,
OMNIVISION_OV9712_DC_720P_30FPS,
OMNIVISION_OV9732_DC_720P_30FPS,
OMNIVISION_OV9750_MIPI_720P_30FPS,
OMNIVISION_OV9752_MIPI_720P_30FPS,
OMNIVISION_OV2718_MIPI_1080P_25FPS,
SAMPLE_VI_MODE_1_D1,
SAMPLE_VI_MODE_BT1120_720P,
SAMPLE_VI_MODE_BT1120_1080P,
}SAMPLE_VI_MODE_E;
typedef enum
{
VI_DEV_BT656_D1_1MUX = 0,
VI_DEV_BT656_D1_4MUX,
VI_DEV_BT656_960H_1MUX,
VI_DEV_BT656_960H_4MUX,
VI_DEV_720P_HD_1MUX,
VI_DEV_1080P_HD_1MUX,
VI_DEV_BUTT
}SAMPLE_VI_DEV_TYPE_E;
typedef enum sample_vi_chn_set_e
{
VI_CHN_SET_NORMAL = 0, /* mirror, flip close */
VI_CHN_SET_MIRROR, /* open MIRROR */
VI_CHN_SET_FLIP, /* open filp */
VI_CHN_SET_FLIP_MIRROR /* mirror, flip */
}SAMPLE_VI_CHN_SET_E;
typedef enum sample_vo_mode_e
{
VO_MODE_1MUX = 0,
VO_MODE_2MUX = 1,
VO_MODE_BUTT
}SAMPLE_VO_MODE_E;
typedef enum sample_rc_e
{
SAMPLE_RC_CBR = 0,
SAMPLE_RC_VBR,
SAMPLE_RC_FIXQP
}SAMPLE_RC_E;
typedef enum sample_rgn_change_type_e
{
RGN_CHANGE_TYPE_FGALPHA = 0,
RGN_CHANGE_TYPE_BGALPHA,
RGN_CHANGE_TYPE_LAYER
}SAMPLE_RGN_CHANGE_TYPE_EN;
/*******************************************************
structure define
*******************************************************/
typedef struct sample_vi_param_s
{
HI_S32 s32ViDevCnt; // VI Dev Total Count
HI_S32 s32ViDevInterval; // Vi Dev Interval
HI_S32 s32ViChnCnt; // Vi Chn Total Count
HI_S32 s32ViChnInterval; // VI Chn Interval
}SAMPLE_VI_PARAM_S;
typedef struct sample_video_loss_s
{
HI_BOOL bStart;
pthread_t Pid;
SAMPLE_VI_MODE_E enViMode;
} SAMPLE_VIDEO_LOSS_S;
typedef struct sample_vi_frame_info_s
{
VB_BLK VbBlk;
VIDEO_FRAME_INFO_S stVideoFrame;
HI_U32 u32FrmSize;
}SAMPLE_VI_FRAME_INFO_S;
typedef struct sample_venc_getstream_s
{
HI_BOOL bThreadStart;
HI_S32 s32Cnt;
}SAMPLE_VENC_GETSTREAM_PARA_S;
typedef struct sample_vi_config_s
{
SAMPLE_VI_MODE_E enViMode;
VIDEO_NORM_E enNorm; /*DC: VIDEO_ENCODING_MODE_AUTO */
ROTATE_E enRotate;
SAMPLE_VI_CHN_SET_E enViChnSet;
WDR_MODE_E enWDRMode;
}SAMPLE_VI_CONFIG_S;
/*******************************************************
function announce
*******************************************************/
HI_S32 SAMPLE_COMM_SYS_GetPicSize(VIDEO_NORM_E enNorm, PIC_SIZE_E enPicSize, SIZE_S *pstSize);
HI_U32 SAMPLE_COMM_SYS_CalcPicVbBlkSize(VIDEO_NORM_E enNorm, PIC_SIZE_E enPicSize, PIXEL_FORMAT_E enPixFmt, HI_U32 u32AlignWidth);
HI_U32 VI_COMM_SYS_CalcPicVbBlkSize(VIDEO_NORM_E enNorm,HI_U32 u32Width ,HI_U32 u32Height, PIXEL_FORMAT_E enPixFmt, HI_U32 u32AlignWidth);
HI_S32 SAMPLE_COMM_SYS_MemConfig(HI_VOID);
HI_VOID SAMPLE_COMM_SYS_Exit(void);
HI_S32 SAMPLE_COMM_SYS_Init(VB_CONF_S *pstVbConf);
HI_S32 SAMPLE_COMM_SYS_Init_With_DCF(VB_CONF_S* pstVbConf);
HI_S32 SAMPLE_COMM_SYS_Payload2FilePostfix(PAYLOAD_TYPE_E enPayload, HI_CHAR* szFilePostfix);
HI_S32 SAMPLE_COMM_ISP_Init(WDR_MODE_E enWDRMode);
HI_VOID SAMPLE_COMM_ISP_Stop(void);
HI_S32 SAMPLE_COMM_ISP_Run(void);
HI_S32 SAMPLE_COMM_ISP_ChangeSensorMode(HI_U8 u8Mode);
HI_S32 SAMPLE_COMM_VI_GetSizeBySensor(PIC_SIZE_E *penSize);
HI_S32 SAMPLE_COMM_VI_GetRgbirAttrBySensor(ISP_RGBIR_ATTR_S *pstRgbirAttr);
HI_S32 SAMPLE_COMM_VI_GetRgbirCtrlBySensor(ISP_RGBIR_CTRL_S *pstRgbirCtrl);
HI_S32 SAMPLE_COMM_VI_Mode2Param(SAMPLE_VI_MODE_E enViMode, SAMPLE_VI_PARAM_S *pstViParam);
HI_S32 SAMPLE_COMM_VI_Mode2Size(SAMPLE_VI_MODE_E enViMode, VIDEO_NORM_E enNorm, SIZE_S *pstSize);
VI_DEV SAMPLE_COMM_VI_GetDev(SAMPLE_VI_MODE_E enViMode, VI_CHN ViChn);
HI_S32 SAMPLE_COMM_VI_StartDev(VI_DEV ViDev, SAMPLE_VI_MODE_E enViMode);
HI_S32 SAMPLE_COMM_VI_StartChn(VI_CHN ViChn, RECT_S *pstCapRect, SIZE_S *pstTarSize, SAMPLE_VI_CONFIG_S* pstViConfig);
HI_S32 SAMPLE_COMM_VI_StartBT656(SAMPLE_VI_CONFIG_S* pstViConfig);
HI_S32 SAMPLE_COMM_VI_StopBT656(SAMPLE_VI_MODE_E enViMode);
HI_S32 SAMPLE_COMM_VI_BindVpss(SAMPLE_VI_MODE_E enViMode);
HI_S32 SAMPLE_COMM_VI_UnBindVpss(SAMPLE_VI_MODE_E enViMode);
HI_S32 SAMPLE_COMM_VI_BindVenc(SAMPLE_VI_MODE_E enViMode);
HI_S32 SAMPLE_COMM_VI_StartMIPI(SAMPLE_VI_CONFIG_S* pstViConfig);
HI_S32 SAMPLE_COMM_VI_UnBindVenc(SAMPLE_VI_MODE_E enViMode);
HI_S32 SAMPLE_COMM_VI_MemConfig(SAMPLE_VI_MODE_E enViMode);
HI_S32 SAMPLE_COMM_VI_GetVFrameFromYUV(FILE *pYUVFile, HI_U32 u32Width, HI_U32 u32Height,HI_U32 u32Stride, VIDEO_FRAME_INFO_S *pstVFrameInfo);
HI_S32 SAMPLE_COMM_VI_ChangeCapSize(VI_CHN ViChn, HI_U32 u32CapWidth, HI_U32 u32CapHeight,HI_U32 u32Width, HI_U32 u32Height);
HI_S32 SAMPLE_COMM_VI_StartVi(SAMPLE_VI_CONFIG_S* pstViConfig);
HI_S32 SAMPLE_COMM_VI_StopVi(SAMPLE_VI_CONFIG_S* pstViConfig);
HI_S32 SAMPLE_COMM_VI_SwitchResParam( SAMPLE_VI_CONFIG_S* pstViConfig,
ISP_PUB_ATTR_S *pstPubAttr,
RECT_S *pstCapRect );
HI_S32 SAMPLE_COMM_VI_StartMIPI_BT1120(SAMPLE_VI_MODE_E enViMode);
HI_S32 SAMPLE_COMM_VI_FPN_CALIBRATE_CONFIG(const char* fpn_file, /* fpn file name */
ISP_FPN_TYPE_E enFpnType, /* line/frame */
PIXEL_FORMAT_E enPixelFormat,
COMPRESS_MODE_E enCompressMode,
HI_U32 u32FrmNum,
HI_U32 u32Threshold);
HI_S32 SAMPLE_COMM_VI_CORRECTION_CONFIG(const char* fpn_file, /* fpn file_name */
ISP_FPN_TYPE_E enFpnType, /* line/frame */
ISP_OP_TYPE_E enOpType, /* auto/manual */
HI_U32 u32Strength, /* strength */
PIXEL_FORMAT_E enPixelFormat);
HI_S32 SAMPLE_COMM_VPSS_MemConfig();
HI_S32 SAMPLE_COMM_VPSS_Start(HI_S32 s32GrpCnt, SIZE_S *pstSize, HI_S32 s32ChnCnt,VPSS_GRP_ATTR_S *pstVpssGrpAttr);
HI_S32 SAMPLE_COMM_VPSS_Stop(HI_S32 s32GrpCnt, HI_S32 s32ChnCnt) ;
HI_S32 SAMPLE_COMM_VPSS_StartGroup(VPSS_GRP VpssGrp, VPSS_GRP_ATTR_S *pstVpssGrpAttr);
HI_S32 SAMPLE_COMM_VPSS_EnableChn(VPSS_GRP VpssGrp, VPSS_CHN VpssChn,
VPSS_CHN_ATTR_S *pstVpssChnAttr,
VPSS_CHN_MODE_S *pstVpssChnMode,
VPSS_EXT_CHN_ATTR_S *pstVpssExtChnAttr);
HI_S32 SAMPLE_COMM_VPSS_StopGroup(VPSS_GRP VpssGrp);
HI_S32 SAMPLE_COMM_VPSS_DisableChn(VPSS_GRP VpssGrp, VPSS_CHN VpssChn);
HI_S32 SAMPLE_COMM_VO_GetWH(VO_INTF_SYNC_E enIntfSync, HI_U32 *pu32W,HI_U32 *pu32H, HI_U32 *pu32Frm);
HI_S32 SAMPLE_COMM_VO_MemConfig(VO_DEV VoDev, HI_CHAR *pcMmzName);
HI_S32 SAMPLE_COMM_VO_StartDev(VO_DEV VoDev, VO_PUB_ATTR_S *pstPubAttr);
HI_S32 SAMPLE_COMM_VO_StopDev(VO_DEV VoDev);
HI_S32 SAMPLE_COMM_VO_StartLayer(VO_LAYER VoLayer,const VO_VIDEO_LAYER_ATTR_S *pstLayerAttr, HI_BOOL bVgsBypass);
HI_S32 SAMPLE_COMM_VO_StopLayer(VO_LAYER VoLayer);
HI_S32 SAMPLE_COMM_VO_StartChn(VO_LAYER VoLayer, SAMPLE_VO_MODE_E enMode);
HI_S32 SAMPLE_COMM_VO_StopChn(VO_LAYER VoLayer, SAMPLE_VO_MODE_E enMode);
HI_S32 SAMPLE_COMM_VO_BindVpss(VO_LAYER VoLayer,VO_CHN VoChn,VPSS_GRP VpssGrp,VPSS_CHN VpssChn);
HI_S32 SAMPLE_COMM_VO_UnBindVpss(VO_LAYER VoLayer,VO_CHN VoChn,VPSS_GRP VpssGrp,VPSS_CHN VpssChn);
HI_S32 SAMPLE_COMM_VO_BindVi(VO_LAYER VoLayer, VO_CHN VoChn, VI_CHN ViChn);
HI_S32 SAMPLE_COMM_VO_UnBindVi(VO_LAYER VoLayer, VO_CHN VoChn);
HI_S32 SAMPLE_COMM_VENC_MemConfig(HI_VOID);
HI_S32 SAMPLE_COMM_VENC_Start(VENC_CHN VencChn, PAYLOAD_TYPE_E enType, VIDEO_NORM_E enNorm, PIC_SIZE_E enSize, SAMPLE_RC_E enRcMode,HI_U32 u32Profile);
HI_S32 SAMPLE_COMM_VENC_Stop(VENC_CHN VencChn);
HI_S32 SAMPLE_COMM_VENC_SnapStart(VENC_CHN VencChn, SIZE_S *pstSize, HI_BOOL bSupportDCF);
HI_S32 SAMPLE_COMM_VENC_SnapProcess(VENC_CHN VencChn, HI_BOOL bSaveJpg, HI_BOOL bSaveThm);
HI_S32 SAMPLE_COMM_VENC_SnapStop(VENC_CHN VencChn);
HI_S32 SAMPLE_COMM_VENC_StartGetStream(HI_S32 s32Cnt);
HI_S32 SAMPLE_COMM_VENC_StopGetStream();
HI_S32 SAMPLE_COMM_VENC_BindVpss(VENC_CHN VencChn,VPSS_GRP VpssGrp,VPSS_CHN VpssChn);
HI_S32 SAMPLE_COMM_VENC_UnBindVpss(VENC_CHN VencChn,VPSS_GRP VpssGrp,VPSS_CHN VpssChn);
HI_S32 SAMPLE_COMM_VENC_StartGetStream_Svc_t(HI_S32 s32Cnt);
HI_S32 SAMPLE_COMM_VDA_MdStart(VDA_CHN VdaChn, HI_U32 u32Chn, SIZE_S *pstSize);
HI_S32 SAMPLE_COMM_VDA_OdStart(VDA_CHN VdaChn, HI_U32 u32Chn, SIZE_S *pstSize);
HI_VOID SAMPLE_COMM_VDA_MdStop(VDA_CHN VdaChn, HI_U32 u32Chn);
HI_VOID SAMPLE_COMM_VDA_OdStop(VDA_CHN VdaChn, HI_U32 u32Chn);
HI_S32 SAMPLE_COMM_AUDIO_CreatTrdAiAo(AUDIO_DEV AiDev, AI_CHN AiChn, AUDIO_DEV AoDev, AO_CHN AoChn);
HI_S32 SAMPLE_COMM_AUDIO_CreatTrdAiAenc(AUDIO_DEV AiDev, AI_CHN AiChn, AENC_CHN AeChn);
HI_S32 SAMPLE_COMM_AUDIO_CreatTrdAencAdec(AENC_CHN AeChn, ADEC_CHN AdChn, FILE *pAecFd);
HI_S32 SAMPLE_COMM_AUDIO_CreatTrdFileAdec(ADEC_CHN AdChn, FILE *pAdcFd);
HI_S32 SAMPLE_COMM_AUDIO_CreatTrdAoVolCtrl(AUDIO_DEV AoDev);
HI_S32 SAMPLE_COMM_AUDIO_DestoryTrdAi(AUDIO_DEV AiDev, AI_CHN AiChn);
HI_S32 SAMPLE_COMM_AUDIO_DestoryTrdAencAdec(AENC_CHN AeChn);
HI_S32 SAMPLE_COMM_AUDIO_DestoryTrdFileAdec(ADEC_CHN AdChn);
HI_S32 SAMPLE_COMM_AUDIO_DestoryTrdAoVolCtrl(AUDIO_DEV AoDev);
HI_S32 SAMPLE_COMM_AUDIO_DestoryAllTrd();
HI_S32 SAMPLE_COMM_AUDIO_AoBindAdec(AUDIO_DEV AoDev, AO_CHN AoChn, ADEC_CHN AdChn);
HI_S32 SAMPLE_COMM_AUDIO_AoUnbindAdec(AUDIO_DEV AoDev, AO_CHN AoChn, ADEC_CHN AdChn);
HI_S32 SAMPLE_COMM_AUDIO_AoBindAi(AUDIO_DEV AiDev, AI_CHN AiChn, AUDIO_DEV AoDev, AO_CHN AoChn);
HI_S32 SAMPLE_COMM_AUDIO_AoUnbindAi(AUDIO_DEV AiDev, AI_CHN AiChn, AUDIO_DEV AoDev, AO_CHN AoChn);
HI_S32 SAMPLE_COMM_AUDIO_AencBindAi(AUDIO_DEV AiDev, AI_CHN AiChn, AENC_CHN AeChn);
HI_S32 SAMPLE_COMM_AUDIO_AencUnbindAi(AUDIO_DEV AiDev, AI_CHN AiChn, AENC_CHN AeChn);
HI_S32 SAMPLE_COMM_AUDIO_CfgAcodec(AIO_ATTR_S *pstAioAttr);
HI_S32 SAMPLE_COMM_AUDIO_DisableAcodec();
HI_S32 SAMPLE_COMM_AUDIO_StartAi(AUDIO_DEV AiDevId, HI_S32 s32AiChnCnt,
AIO_ATTR_S* pstAioAttr, AUDIO_SAMPLE_RATE_E enOutSampleRate, HI_BOOL bResampleEn, HI_VOID* pstAiVqeAttr, HI_U32 u32AiVqeType);
HI_S32 SAMPLE_COMM_AUDIO_StopAi(AUDIO_DEV AiDevId, HI_S32 s32AiChnCnt, HI_BOOL bResampleEn, HI_BOOL bVqeEn);
HI_S32 SAMPLE_COMM_AUDIO_StartAo(AUDIO_DEV AoDevId, HI_S32 s32AoChnCnt,
AIO_ATTR_S* pstAioAttr, AUDIO_SAMPLE_RATE_E enInSampleRate, HI_BOOL bResampleEn, HI_VOID* pstAoVqeAttr, HI_U32 u32AoVqeType);
HI_S32 SAMPLE_COMM_AUDIO_StopAo(AUDIO_DEV AoDevId, HI_S32 s32AoChnCnt, HI_BOOL bResampleEn, HI_BOOL bVqeEn);
HI_S32 SAMPLE_COMM_AUDIO_StartAenc(HI_S32 s32AencChnCnt, HI_U32 u32AencPtNumPerFrm, PAYLOAD_TYPE_E enType);
HI_S32 SAMPLE_COMM_AUDIO_StopAenc(HI_S32 s32AencChnCnt);
HI_S32 SAMPLE_COMM_AUDIO_StartAdec(ADEC_CHN AdChn, PAYLOAD_TYPE_E enType);
HI_S32 SAMPLE_COMM_AUDIO_StopAdec(ADEC_CHN AdChn);
HI_VOID SAMPLE_COMM_SYS_Exit(void);
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif /* End of #ifdef __cplusplus */
#endif /* End of #ifndef __SAMPLE_COMMON_H__ */