Files

992 lines
31 KiB
C
Executable File

/*********************************************************************
* LEGAL DISCLAIMER
*
* (Header of MediaTek Software/Firmware Release or Documentation)
*
* BY OPENING OR USING THIS FILE, BUYER HEREBY UNEQUIVOCALLY
* ACKNOWLEDGES AND AGREES THAT THE SOFTWARE/FIRMWARE AND ITS
* DOCUMENTATIONS ("MEDIATEK SOFTWARE") RECEIVED FROM MEDIATEK AND/OR
* ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON AN "AS-IS" BASIS ONLY.
* MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY
* WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH
* MAY BE USED BY, INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK
* SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY
* WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO NOT BE
* RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
* SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
* BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND
* CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED
* HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
* MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR
* SERVICE CHARGE PAID BY BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE
* AT ISSUE.
*
* THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN
* ACCORDANCE WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING
* ITS CONFLICT OF LAWS PRINCIPLES.
**********************************************************************
*/
/**
* \file adam.h
* \brief This file is adam header file of Adaptive DSP Access Manager APIs that will be exported for others to use.
* \author Serena Huang, Quark Li,Guanhu Zou
* \date 2020-05-26
* \version A001
* \copyright EcoNet Inc
*/
/************************************************************************
* I N C L U D E S
*************************************************************************
*/
#include "eva_constant.h"
#include "eva_struct.h"
/************************************************************************
* D E F I N E S & C O N S T A N T S
*************************************************************************
*/
#ifndef _ADAM_H_
#define _ADAM_H_
#define ADAM_VERSION "0.1.75"
#define ADAM_DSP_NUM (2)
#define ADAM_INFC_NUM MAX_CHAN_NUM
typedef struct {
char* version;
uint8 dspNum;
uint8 infcNum;
} adamConfig_t;
/**
* \brief This function allocate ADAM resource and activate ADAM process.
*
* This function allocate ADAM resource and activate ADAM process. submit by Guanhu.Zou 20200529
* \retval EXEC_SUCCESS Success.
* \retval EXEC_FAIL Fail.
* \note
* This function allocate ADAM resource and activate ADAM process.
* \par Example
* \snippet adam.c allocate ADAM resource and activate ADAM process.
*/
exCode_e adamInit(void);
/**
* \brief This function deactivate ADAM process and release resource.
*
* This function deactivate ADAM process and release resource. submit by Guanhu.Zou 20200529
* \retval EXEC_SUCCESS Success.
* \retval UNKNOWN_ERROR unknown error occurs.
* \retval FUNC_UNSUPPORT function is not supported.
* \note
* This function deactivate ADAM process and release resource.
* \par Example
* \snippet adam.c deactivate ADAM process and release resource.
*/
exCode_e adamExit(void);
/**
* \brief This function get ADAM's configuration information.
*
* This function get ADAM's configuration information. submit by Guanhu.Zou 20200529
* \param[out] pAdamConf: output the ADAM configuration information got from DSP.
* \retval EXEC_SUCCESS success.
* \note
* This function get ADAM's configuration information.
* \par Example
* \snippet adam.c get ADAM's configuration information.
*/
exCode_e adamQuery(adamConfig_t *pAdamConf);
/**
* \brief This function poll DSP and interface event.
*
* This function poll DSP and interface event. submit by Guanhu.Zou 20200529
* \param[out] pEvent: event got from DSP.
* \param[in] mode: BLOCKING:block mode; NON_BLOCKING:no block mode.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function poll DSP and interface event.
* \par Example
* \snippet adam.c poll DSP and interface event.
*/
exCode_e adamPollEvent(blockMode_e mode, event_t *pEvent);
/**
* \brief This function load and initialize DSP.
*
* This function load and initialize DSP. submit by Guanhu.Zou 20200529
* \param[in] dsp: DSP ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function load and initialize DSP.
* \par Example
* \snippet adam.c load and initialize DSP.
*/
exCode_e adamDspInvoke(dspId_e dsp);
/**
* \brief This function terminate and unload DSP.
*
* This function terminate and unload DSP. submit by Guanhu.Zou 20200529
* \param[in] dsp: DSP ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function terminate and unload DSP.
* \par Example
* \snippet adam.c terminate and unload DSP.
*/
exCode_e adamDspRevoke(dspId_e dsp);
/**
* \brief This function query DSP support feature and active status.
*
* This function query DSP support feature and active status. submit by Guanhu.Zou 20200529.
* \param[out] dspActive: DSP active status.
* \param[out] pFeature: DSP feature.
* \param[in] dsp: DSP ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function query DSP support feature and active status.
* \par Example
* \snippet adam.c query DSP support feature and active status.
*/
exCode_e adamDspQuery(dspId_e dsp, activeState_e *dspActive, dspFeature_t *pFeature);
/**
* \brief This function configure Tone profile.
*
* This function configure Tone profile. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] toneId: tone ID.
* \param[in] pTone: tone profile.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure Tone profile.
* \par Example
* \snippet adam.c configure Tone profile.
*/
exCode_e adamDspConfigTone(dspId_e dsp, uint16 toneId, tone_t *pTone);
/**
* \brief This function configure CPT profile.
*
* This function configure CPT profile. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] pCpt: CPT profile.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure CPT profile.
* \par Example
* \snippet adam.c configure CPT profile.
*/
exCode_e adamDspConfigCpt(dspId_e dsp, cpt_t *pCpt);
/**
* \brief This function query channel configuration.
*
* This function query channel configuration. submit by Guanhu.Zou 20200529.
* \param[out] pChanConf: channel configuration.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function query channel configuration.
* \par Example
* \snippet adam.c query channel configuration.
*/
exCode_e adamChanQuery(dspId_e dsp, chanId_e ch, chanConfig_t *pChanConf);
/**
* \brief This function configure channel.
*
* This function configure channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] pChanConf: channel configuration.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure channel.
* \par Example
* \snippet adam.c configure channel.
*/
exCode_e adamChanConfig(dspId_e dsp, chanId_e ch, chanConfig_t *pChanConf);
/**
* \brief This function replace pcm data on channel.
*
* This function replace pcm data on channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] pReplaceConf: replace configuration.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function replace pcm data on channel.
* \par Example
* \snippet adam.c replace pcm data on channel.
*/
exCode_e adamDSPReplaceData(dspId_e dsp, chanId_e ch, replaceData_t *pReplaceConf);
/**
* \brief This function play tone to specific channel.
*
* This function play tone to specific channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] pToneSeq: tone information.
* \param[in] repeat: the repeat time of playing tone.
* \param[in] dur: the duration time of playing tone.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function play tone to specific channel.
* \par Example
* \snippet adam.c play tone to specific channel.
*/
exCode_e adamChanPlayTone(dspId_e dsp, chanId_e ch, toneSeq_t *pToneSeq, uint32 repeat, uint32 dur);
/**
* \brief This function set pcm loopback.
*
* This function set pcm loopback. pcm loopback between ch 0 and ch 1, no dsp process and rtp process is involved if
pcm loopback is enabled.submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] en: pcm loopback enable flag.
* \retval EXEC_SUCCESS: success.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function set pcm loopback.
* \par Example
* \snippet adam.c set pcm loopback.
*/
exCode_e adamPcmLoopback(dspId_e dsp, enableControl_e en);
/**
* \brief This function set rtp loopback.
*
* This function set rtp loopback. rtp loopback for a channel, work like a echo, the incomming rtp data is echoed back
without dsp processing if rtp loopback of the channel is enabled.submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] en: rtp loopback enable flag.
* \retval EXEC_SUCCESS: success.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function set rtp loopback.
* \par Example
* \snippet adam.c set rtp loopback.
*/
exCode_e adamRtpLoopback(dspId_e dsp, chanId_e ch, enableControl_e en);
/**
* \brief This function set DSP loopback.
*
* This function set DSP loopback. dsp loopback for a channel, work like a echo, the incomming rtp data is echoed back
after dsp processing if dsp loopback of the channel is enabled.submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] en: rtp loopback enable flag.
* \retval EXEC_SUCCESS: success.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function set DSP loopback.
* \par Example
* \snippet adam.c set DSP loopback.
*/
exCode_e adamDspLoopback(dspId_e dsp, chanId_e ch, enableControl_e en) ;
/**
* \brief This function play DTMF tone to specific channel.
*
* This function play DTMF tone to specific channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] digit: digit number need to be play.
* \param[in] dur: the duration time of playing DTMF tone.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function play DTMF tone to specific channel.
* \par Example
* \snippet adam.c play DTMF tone to specific channel.
*/
exCode_e adamChanPlayDtmf(dspId_e dsp, chanId_e ch, char digit, uint32 dur);
/**
* \brief This function stop tone for specific channel.
*
* This function stop tone for specific channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function stop tone for specific channel.
* \par Example
* \snippet adam.c stop tone for specific channel.
*/
exCode_e adamChanStopTone(dspId_e dsp, chanId_e ch);
/**
* \brief This function play caller ID for specific channel.
*
* This function play caller ID for specific channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] pcid: caller ID configuration.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function play caller ID for specific channel.
* \par Example
* \snippet adam.c play caller ID for specific channel.
*/
exCode_e adamChanPlayCid(dspId_e dsp, chanId_e ch, cid_t *pCid);
/**
* \brief This function play type II caller ID for specific channel.
*
* This function play type II caller ID for specific channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] pcid: caller ID configuration.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function play type II caller ID for specific channel.
* \par Example
* \snippet adam.c play type II caller ID for specific channel.
*/
exCode_e adamChanPlayType2Cid(dspId_e dsp, chanId_e ch, cid_t *pCid);
/**
* \brief This function dump pcm data for specific channel.
*
* This function dump pcm data for specific channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] pDstAddr: the destination IP address for dumping pcm data
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function dump pcm data for specific channel.
* \par Example
* \snippet adam.c dump pcm data for specific channel.
*/
exCode_e adamChanDumpPcm(dspId_e dsp, chanId_e ch, netAddr_t *pDstAddr);
/**
* \brief This function play DTMF caller ID for specific channel.
*
* This function play DTMF caller ID for specific channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] pCid: caller ID configuration.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function play DTMF caller ID for specific channel.
* \par Example
* \snippet adam.c play DTMF caller ID for specific channel.
*/
exCode_e adamChanPlayDtmfCid(dspId_e dsp, chanId_e ch, cid_t *pCid);
/**
* \brief This function query stream configuration.
*
* This function query stream configuration. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] strm: stream ID.
* \param[out] pStrmActive: stream active status.
* \param[out] pStrmConf: stream configuration.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function query stream configuration.
* \par Example
* \snippet adam.c query stream configuration.
*/
exCode_e adamStrmQuery(dspId_e dsp, chanId_e ch, strmId_e strm, activeState_e *pStrmActive, strmConfig_t *pStrmConf);
/**
* \brief This function configure stream.
*
* This function configure stream. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] strm: stream ID.
* \param[out] pStrmConf: stream configuration.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure stream.
* \par Example
* \snippet adam.c configure stream.
*/
exCode_e adamStrmConfig(dspId_e dsp, chanId_e ch, strmId_e strm, strmConfig_t *pStrmConf);
/**
* \brief This function enable a streamming process.
*
* This function enable a streamming process. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] strm: stream ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function enable a streamming process.
* \par Example
* \snippet adam.c enable a streamming process.
*/
exCode_e adamStrmStart(dspId_e dsp, chanId_e ch, strmId_e strm);
/**
* \brief This function disable a streamming process.
*
* This function disable a streamming process. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] strm: stream ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function disable a streamming process.
* \par Example
* \snippet adam.c disable a streamming process.
*/
exCode_e adamStrmStop(dspId_e dsp, chanId_e ch, strmId_e strm);
/**
* \brief This function disable all streamming process.
*
* This function disable all streamming process. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function disable all streamming process.
* \par Example
* \snippet adam.c disable all streamming process.
*/
exCode_e adamStrmStopAll(dspId_e dsp);
/**
* \brief This function send DTMF relay packet to the session destination.
*
* This function send DTMF relay packet to the session destination. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] strm: stream ID.
* \param[in] dtmf: digit number need to be sent.
* \param[in] dur: duration time.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function send DTMF relay packet to the session destination.
* \par Example
* \snippet adam.c send DTMF relay packet to the session destination.
*/
exCode_e adamStrmSendDtmfr(dspId_e dsp, chanId_e ch, strmId_e strm, dtmf_e dtmf, uint32 dur);
/**
* \brief This function play tone to specific stream.
*
* This function play tone to specific stream. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] strm: stream ID.
* \param[in] pToneSeq: tone information.
* \param[in] repeat: repeat time of playing tone.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function play tone to specific stream.
* \par Example
* \snippet adam.c play tone to specific stream.
*/
exCode_e adamStrmPlayTone(dspId_e dsp, chanId_e ch, strmId_e strm, toneSeq_t *pToneSeq, uint32 repeat);
/**
* \brief This function stop tone for specific stream.
*
* This function stop tone for specific stream. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] strm: stream ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function stop tone for specific stream.
* \par Example
* \snippet adam.c stop tone for specific stream.
*/
exCode_e adamStrmStopTone(dspId_e dsp, chanId_e ch, strmId_e strm);
/**
* \brief This function play DTMF tone for specific stream.
*
* This function play DTMF tone for specific stream. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] digit: digit number need to be play.
* \param[in] duration: the duration time of playing DTMF tone.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function play DTMF tone for specific stream.
* \par Example
* \snippet adam.c play DTMF tone for specific stream.
*/
exCode_e adamStrmPlayDtmf(dspId_e dsp, chanId_e ch, char digit, uint32 duration);
/**
* \brief This function query stream media information statistics.
*
* This function query stream media information statistics. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] strm: stream ID.
* \param[out] pMediaInfo: media information statistics got from DSP.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function query stream media information statistics.
* \par Example
* \snippet adam.c query stream media information statistics.
*/
exCode_e adamStrmQueryMediaInfo(dspId_e dsp, chanId_e ch, strmId_e strm, mediaInfo_t *pMediaInfo);
/**
* \brief This function reset stream media information statistics.
*
* This function reset stream media information statistics. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \param[in] strm: stream ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function reset stream media information statistics.
* \par Example
* \snippet adam.c reset stream media information statistics.
*/
exCode_e adamStrmResetMediaInfo(dspId_e dsp, chanId_e ch, strmId_e strm);
/**
* \brief This function query interface configuration.
*
* This function query interface configuration. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[out] pInfcConf: interface configuration.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function query interface configuration.
* \par Example
* \snippet adam.c query interface configuration.
*/
exCode_e adamInfcQuery(infcId_e infc, infcConfig_t *pInfcConf);
/**
* \brief This function configure fxs line state.
*
* This function configure fxs line state. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[in] state: line state.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure fxs line state.
* \par Example
* \snippet adam.c configure fxs line state.
*/
exCode_e adamInfcConfigLine(infcId_e infc, lineState_e state);
/**
* \brief This function configure interface simulate hook state.
*
* This function configure interface simulate hook state. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[in] state: simulate hook state.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure interface simulate hook state.
* \par Example
* \snippet adam.c configure interface simulate hook state.
*/
exCode_e adamInfcSimulateHook(infcId_e infc, hookState_e state);
/**
* \brief This function configure interface hook state.
*
* This function configure interface hook state. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[in] state: hook state.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure interface hook state.
* \par Example
* \snippet adam.c configure interface hook state.
*/
exCode_e adamInfcConfigHook(infcId_e infc, hookState_e state);
/**
* \brief This function configure interface ring cadence.
*
* This function configure interface ring cadence. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[in] pRingProf: ring profile.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure interface ring cadence.
* \par Example
* \snippet adam.c configure interface ring cadence.
*/
exCode_e adamInfcConfigRing(infcId_e infc, ringProfile_t *pRingProf);
/**
* \brief This function enable line ringing.
*
* This function enable line ringing. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[in] dur: duration.
* \param[in] pCid: caller ID information which contain ring configuration.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function enable line ringing.
* \par Example
* \snippet adam.c enable line ringing.
*/
exCode_e adamInfcRing(infcId_e infc, uint32 dur, cid_t *pCid);
/**
* \brief This function disable line ringing.
*
* This function disable line ringing. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function disable line ringing.
* \par Example
* \snippet adam.c disable line ringing.
*/
exCode_e adamInfcStopRing(infcId_e infc);
/**
* \brief This function configure interface hook threshold.
*
* This function configure interface hook threshold. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[in] pHookTs: hook threshold.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure interface hook threshold.
* \par Example
* \snippet adam.c configure interface hook threshold.
*/
exCode_e adamInfcConfigHookTs(infcId_e infc, hookThreshold_t *pHookTs);
/**
* \brief This function configure hardware profile.
*
* This function configure hardware profile. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[in] hwProfId: hardware profile ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure hardware profile.
* \par Example
* \snippet adam.c configure hardware profile.
*/
exCode_e adamInfcConfigHwProf(infcId_e infc,hwProf_e hwProfId);
/**
* \brief This function configure slic profile.
*
* This function configure slic profile. submit by Guanhu.Zou 20200529.
* \param[in] slicProf: slic profile ID.
* \param[in] slicProfLen: slic profile length.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure slic profile.
* \par Example
* \snippet adam.c configure slic profile.
*/
exCode_e adamInfcConfigSlicProf(unsigned char* slicProf, int slicProfLen);
/**
* \brief This function configure ring parameter.
*
* This function configure ring parameter. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[in] ringParams: ring parameter.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function configure ring parameter.
* \par Example
* \snippet adam.c configure ring parameter.
*/
exCode_e adamInfcRingParams(infcId_e infc, infcRingParams_t* ringParams);
/**
* \brief This function execute line test.
*
* This function execute line test. submit by Guanhu.Zou 20200529.
* \param[in] lineTest: line test information.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function execute line test.
* \par Example
* \snippet adam.c execute line test.
*/
exCode_e adamInfcLineTest(infcLineTest_t* lineTest);
/**
* \brief This function query slic type.
*
* This function query slic type. submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[out] slicParams: slic parameter query from DSP.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function query slic type.
* \par Example
* \snippet adam.c query slic type.
*/
exCode_e adamInfcSlicTypeQuery(infcId_e infc, slicParams_t* slicParams);
/**
* \brief This function set DC feed parameter.
*
* This function set DC feed parameter.submit by Guanhu.Zou 20200529.
* \param[in] infc: interface ID.
* \param[in] dcFeedParams: DC feed parameter.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function set DC feed parameter.
* \par Example
* \snippet adam.c set DC feed parameter.
*/
exCode_e adamInfcDcFeedParams(infcId_e infc, infcDcFeedParams_t* dcFeedParams) ;
/**
* \brief This function execute china unicom inside and outside line test.
*
* This function execute china unicom inside and outside line test. submit by Guanhu.Zou 20200529.
* \param[in] lineTest: line test information.
* \param[in] slicType: slic type.
* \param[in] unicomLineTest: unicom line test information.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function execute china unicom inside and outside line test.
* \par Example
* \snippet adam.c execute china unicom inside and outside line test.
*/
exCode_e adamInfcCULineTest(infcLineTest_t* lineTest, int slicType, infcUnicomLineTest_t* unicomLineTest);
/**
* \brief This function active special channel.
*
* This function active special channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function active special channel.
* \par Example
* \snippet adam.c active special channel.
*/
exCode_e adamChanStart(dspId_e dsp, chanId_e ch);
/**
* \brief This function disactive special channel.
*
* This function disactive special channel. submit by Guanhu.Zou 20200529.
* \param[in] dsp: DSP ID.
* \param[in] ch: channel ID.
* \retval EXEC_SUCCESS: success.
* \retval EXEC_FAIL: fail.
* \retval FUNC_UNSUPPORT: function is not supported.
* \retval INVALID_PARAM : param is wrong.
* \note
* This function disactive special channel.
* \par Example
* \snippet adam.c disactive special channel.
*/
exCode_e adamChanStop(dspId_e dsp, chanId_e ch);
#endif