/* config codec */ HI_S32 SAMPLE_COMM_AUDIO_CfgAcodec(AIO_ATTR_S *pstAioAttr, HI_BOOL bMacIn) { #ifndef NVP1918 HI_S32 s32Ret = HI_FAILURE; #ifdef DEMO /*** ACODEC_TYPE_CX26828 ***/ s32Ret = SAMPLE_CX26828_SetSmprate(pstAioAttr->enSamplerate); s32Ret |= SAMPLE_CX26828_SetFormat(pstAioAttr->enWorkmode); s32Ret |= SAMPLE_CX26828_SetBitwidth(pstAioAttr->enBitwidth); s32Ret |= SAMPLE_CX26828_SetChnNum(pstAioAttr->u32ChnCnt); #else /*** ACODEC_TYPE_TW2865 ***/ s32Ret = SAMPLE_TW2865_CfgAudio(pstAioAttr->enSamplerate); s32Ret |= SAMPLE_TW2865_SetFormat(pstAioAttr->enWorkmode); s32Ret |= SAMPLE_TW2865_SetBitwidth(pstAioAttr->enBitwidth); /*** ACODEC_TYPE_TLV320 ***/ s32Ret = SAMPLE_Tlv320_CfgAudio(pstAioAttr->enWorkmode, pstAioAttr->enSamplerate); #endif return s32Ret; #endif return 0; }
/* config codec */ HI_S32 SAMPLE_COMM_AUDIO_CfgAcodec(AIO_ATTR_S *pstAioAttr, HI_BOOL bMacIn) { HI_S32 s32Ret = HI_FAILURE; /*** ACODEC_TYPE_TW2865 ***/ s32Ret = SAMPLE_TW2865_CfgAudio(pstAioAttr->enSamplerate); s32Ret |= SAMPLE_TW2865_SetFormat(pstAioAttr->enWorkmode); s32Ret |= SAMPLE_TW2865_SetBitwidth(pstAioAttr->enBitwidth); /*** ACODEC_TYPE_TLV320 ***/ s32Ret = SAMPLE_Tlv320_CfgAudio(pstAioAttr->enWorkmode, pstAioAttr->enSamplerate); return s32Ret; }