/*===========================================================================
FILE: 
   SwiM2MAVAPI.h

DESCRIPTION:
   Sierra Wireless M2M AV Service APIs, Service Type 0xF5

Copyright (C) 2015 Sierra Wireless Incorporated. All rights reserved.
                   Sierra Wireless Proprietary/GTDR
==========================================================================*/

#ifndef __SWI_M2MAV_API_H__
#define __SWI_M2MAV_API_H__
/** 
* \defgroup GroupSwiM2MAV Sierra Wireless M2MAV Service
*/
/*@{*/


/*=========================================================================*/
// Definitions
/*=========================================================================*/
#ifdef GOBIAPI_EXPORTS
#define IMPORTGOBI extern "C" __declspec( dllexport )
#else  //GOBIAPI_EXPORTS
#ifdef __cplusplus
/* C++ callable DLL */
#define IMPORTGOBI extern "C" __declspec( dllimport )
#else
/* C callable DLL */
#define IMPORTGOBI __declspec( dllimport )
#endif
#endif //GOBIAPI_EXPORTS

// Calling convention for API
#define GOBICALLBACK __stdcall
#define GOBICMAPI __stdcall

#ifdef __cplusplus
extern "C" {
#endif

#define MAX_PIFACE_TABLE_SIZE		9

/*=========================================================================*/
// Structs
/*=========================================================================*/
typedef struct
{
    BYTE		PIFACEParamLen;
	BYTE		PIFACEParam[MAX_PIFACE_TABLE_SIZE];
} PIFACETable;

typedef struct
{
    BYTE  			AudioProfile;
    BYTE  			ACDBDevice;
    BYTE  			PIFACEID;
    PIFACETable 	PIFACETbl;
} AudioConfig;

typedef struct
{
    LONG		B0;
    LONG		B1;
    LONG		B2;
    LONG		A1;
    LONG		A2;
} PCMIIRFilter;

typedef struct
{
    BYTE	Profile;
	BYTE	Switch;
	BYTE	Stage;
} PCMIIRSetConfig;

typedef struct
{
    BYTE			Profile;
	BYTE			Stage;
	PCMIIRFilter	Coeff;
} PCMIIRSetCoeff;
#ifdef __cplusplus
};
#endif

/*=========================================================================*/
// Prototypes
/*=========================================================================*/

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to get the profile content. It is similar with 
/// at!avsetprofile?[<generator>]
/// QMI_SWI_M2M_AUDIO_GET_PROFILE 0x01
///
/// \param	pGenerator    [ I ] - Generator
/// \li     0:Voice
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param  pEarMute      [ O ] Ear mute
/// \li 0:Mute
/// \li 1:Unmute
///
/// \param  pMicMute      [ O ] Mic Mute
/// \li 0:Mute
/// \li 1:Unmute
///
/// \param  pOutGenerator [ O ] Generator
/// \li 0:Voice
///
/// \param  pVolume       [ O ] RX volume level
/// \li 0-5
///
/// \param  pCwtMute      [ O ] Call waiting tone mute
/// \li 0:Mute
/// \li 1:Unmute
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetProfile(
    // req params
    BYTE*		pGenerator,
    // resp params
    BYTE*       pProfile,
    BYTE*       pEarMute,
    BYTE*       pMicMute,
    BYTE*       pOutGenerator,
    BYTE*		pVolume,
    BYTE*       pCwtMute
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set the profile content. It is similar 
/// with at!avsetprofile=<profile>[,<earmute>,<micmute>,<generator>,
/// <volume>[,<cwtmute>]]. This command is used to select a profile 
/// with which to establish a circuit-switched call. It will also 
/// change ACDB device and PIFACE which bind to this profile. The 
/// profile selection is persistent.
/// QMI_SWI_M2M_AUDIO_SET_PROFILE 0x02
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pEarMute   [ I ] - Ear mute
/// \li 0:Mute
/// \li 1:Unmute
/// \param	pMicMute   [ I ] - Mic mute
/// \li 0:Mute
/// \li 1:Unmute
/// \param	pGenerator [ I ] - Generator
/// \li 0:Voice
/// \param	pVolume    [ I ] - RX volume level
/// \li 0-5
/// \param	pCwtMute   [ I ] - Call waiting tone mute
/// \li 0:Mute
/// \li 1:Unmute
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetProfile(
    // req params
    BYTE*  		pProfile,
    BYTE*  		pEarMute,
    BYTE*  		pMicMute,
    BYTE*  		pGenerator,
    BYTE*  		pVolume,
    BYTE*       pCwtMute
    // resp params
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to get the RX volume level. It is similar with 
/// at!avsetvol?<profile>,<generator>
/// QMI_SWI_M2M_AUDIO_GET_VOLUME 0x03
///
/// \param	pProfile   [ I ] - Audio profile
/// \li 0-5
/// \param	pGenerator [ I ] - Generator
/// \li 0:Voice
/// \param	pVolume    [ O ] - RX volume level
/// \li 0-5
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetVolume(
    // req params
    BYTE*		pProfile,
    BYTE*  		pGenerator,
    // resp params
    BYTE*  		pVolume
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set the RX volume level. It is similar with 
/// at!avsetvol=<profile>,<generator>,<level>. This command selects the 
/// RX volume level to be used with the selected audio profile. This setting 
/// is stored in non-volatile memory and persists across power cycles. 
/// QMI_SWI_M2M_AUDIO_SET_VOLUME 0x04
///
/// \param	pProfile   [ I ] - Audio profile
/// \li 0-5
/// \param	pGenerator [ I ] - Generator
/// \li 0:Voice
/// \param	pVolume    [ I ] - RX volume level
/// \li 0-5
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetVolume(
    // req params
    BYTE*		pProfile,
    BYTE*  		pGenerator,
    BYTE*  		pVolume
    // resp params
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set audio mute value. It is similar with AT!AVMUTE=<profile>,<earmute>,<micmute>[,<cwtmute>].
/// QMI_SWI_M2M_AUDIO_SET_AVMUTE 0x04
///
/// \param	pProfile   [ I ] - Audio profile
/// \li 0-5
/// \param	pEarMute [ I ] - Ear mute
/// \li 0 - mute
/// \li 1 - unmute
/// \param	pMicMute    [ I ] - MIC mute
/// \li 0 - mute
/// \li 1 - unmute
/// \param	pcwtMute    [ I ] - Waiting tone mute
/// \li 0 - mute
/// \li 1 - unmute
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVMute(
    // req params
    BYTE*  		pProfile,
    BYTE*  		pEarMute,
    BYTE*  		pMicMute,
    BYTE*  		pcwtMute//waiting tone mute
    // resp params
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to get audio mute value. It is similar with AT!AVMUTE?<profile>.
/// QMI_SWI_M2M_AUDIO_GET_AVMUTE 0x1C
///
/// \param	pProfile   [ I ] - Audio profile
/// \li 0-5
/// \param	pEarMute [ O ] - Ear mute
/// \li 0 - mute
/// \li 1 - unmute
/// \param	pMicMute    [ O ] - MIC mute
/// \li 0 - mute
/// \li 1 - unmute
/// \param	pcwtMute    [ O ] - Waiting tone mute
/// \li 0 - mute
/// \li 1 - unmute
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVMute(
    // req params
    BYTE*  		pProfile,
    BYTE*  		pEarMute,
    BYTE*  		pMicMute,
    BYTE*  		pcwtMute//waiting tone mute
    // resp params
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to bind audio profile with ACDB device and physical interface, configure that interface. It is similar with AT!AVCFG=<profile>,<device>,<PIFACE>[,<param1>[,<paramN>]].
/// QMI_SWI_M2M_AUDIO_SET_AVCFG 0x1B
///
/// \param	pProfile   [ I ] - Audio Profile
/// \li 0-5
/// \param	pACDBDevice [ I ] - Audio Calibration Database of the device
/// \li 0 - Vehicle HF
/// \li 1 - Handset 
/// \li 2 - TTY
/// \li 3 - USB
/// \li 4 - N/A
/// \param	pPIFACEID    [ I ] - Physical Interface ID
/// \li 0 - PCM
/// \li 1 - I2S
/// \li 2 - Analog(with internal codec)
/// \li 3 - USB
/// \param	pPIFACETable    [ I ] - Physical Interface Table (only used by PCM)
/// \li BYTE PIFACEParamLen - size of the PIFACEParam
/// \li BYTE PIFACEParam - Parameters of the Physical interface, for PCM:
/// \li Mode: 0-slave, 1-master, 2-Auxiliary PCM  
/// \li Rate: 0-8K, 1-16K 
/// \li Format: 0-Linear, 1- μ-law, 2- A-law
/// \li Padding: 0-disable, 1-enable
/// \li Bits-frame: 0-8 BPF, 1-16 BPF, 2-32 BPF, 3-64 BPF,4-128 BPF,5-256 BPF
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVCFG(
    // req params
    BYTE*  		 pAudioProfile,
    BYTE*  		 pACDBDevice,
    BYTE*  		 pPIFACEID,
    PIFACETable* pPIFACETable
    // resp params
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to get audio bind information. It is similar with AT!AVCFG?.
/// QMI_SWI_M2M_AUDIO_GET_AVCFG 0x1A
///
/// \param	pAudioConfig   [ O ] - pointer to buffer of Audio Configurations
/// \param	pSize          [ I/O ] - In: input buffer size in BYTE Out: number of AudioConfig received
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVCFG(
    // req params
    // resp params
	AudioConfig*	pAudioConfig,
	BYTE*			pSize
);
//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set all audio NV to default value. It is similar with at!avdef. This command sets all the configurable audio parameters stored in NV to default values.  It won’t change value stored in ACDB. 
/// QMI_SWI_M2M_AUDIO_NV_DEF 0x0C
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioNVDef(
    // req params
    // resp params
);
//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set an audio loopback. It is similar with at!avaudiolpbk=<enable>. This command sets up an audio DSP loopback. 
/// QMI_SWI_M2M_AUDIO_SET_LPBK 0x09
///
/// \param	pEnable
/// \li 0 – stop 
/// \li 1 – VOCODER loop
/// \li 2 – internal codec loop
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetLPBK(
    // req params
    BYTE*	pEnable
    // resp params
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to query the RX speakerphone gain. It is similar with AT!AVSPKRGAIN?<profile>. 
/// QMI_SWI_M2M_AUDIO_GET_SPKRGAIN 0x12
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pSpkrGain   [ O ] - RX speakerphone gain
/// \li 0x0 – 0x7fff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetSpeakerGain(
    // req params
    BYTE*		pProfile,
    // resp params
    USHORT*  	pSpkrGain
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set the RX speakerphone gain. It is similar with AT!AVSPKRGAIN=<profile>,<value>. This command sets the speakerphone gain select setting for the specified audio profile.  
/// QMI_SWI_M2M_AUDIO_SET_SPKRGAIN 0x13
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pSpkrGain   [ I ] - RX speakerphone gain
/// \li 0x0 – 0x7fff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetSpeakerGain(
    // req params
    BYTE*  		pProfile,
    USHORT*  	pSpkrGain
    // resp params
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to get the side tone value. It is similar with at!avstg?<profile>
/// QMI_SWI_M2M_AUDIO_GET_STG 0x07
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pGainValue   [ O ] - Side tone Gain value
/// \li 0x0 – 0xffff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetSTG(
    // req params
    BYTE*		pProfile,
    // resp params
    WORD*  		pGainValue
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set the side tone value. It is similar with at!avstg=<profile>,<id>,<value>. This command sets the AFE stone gain and to enable or disable side tone. The setting is stored in non-volatile memory and persists across power cycles. 
///	QMI_SWI_M2M_AUDIO_SET_STG 0x08
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pGainValue   [ I ] - Side tone Gain value
/// \li 0x0 – 0xffff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetSTG(
    // req params
    BYTE*		pProfile,
    WORD*  		pGainValue
	// resp params
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to query the TX volume. It is similar with AT!AVTXVOL?<profile>. 
/// QMI_SWI_M2M_AUDIO_GET_TXVOL 0x0E
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pTxVolume   [ O ] - TX volume 
/// \li 0x0 – 0x7fff
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetTxVolume(
    // req params
    BYTE*		pProfile,
    // resp params
    WORD*  		pTxVolume
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set the TX volume. It is similar with AT!AVTXVOL=<profile>,<value>. This command sets the TX volume gain for the specified audio profile. This gain is applied to the PCM voice packets prior to feeding them into the vocoder, which encodes the PCM packets into a more efficient format for over the air transmission. This setting is stored in non-volatile memory and persists across power cycles. 
/// QMI_SWI_M2M_AUDIO_SET_TXVOL 0x0F
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pTxVolume   [ I ] - TX volume 
/// \li 0x0 – 0x7fff
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetTxVolume(
    // req params
    BYTE*		pProfile,
    WORD*  		pTxVolume
	// resp params
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to query the TX microphone gain. It is similar with AT!AVMICGAIN?<profile>.
/// QMI_SWI_M2M_AUDIO_GET_MICGAIN_REQ 0x10
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pMicGain   [ O ] - TX microphone gain 
/// \li 0x0 – 0x7fff
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetMicGain(
    // req params
    BYTE*		pProfile,
    // resp params
    WORD*  		pMicGain
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set the TX volume. It is similar with AT!AVMICGAIN=<profile>,<value>. This command sets the microphone gain select setting for the specified audio profile.  
/// This setting is stored in non-volatile memory and persists across power cycles. 
/// QMI_SWI_M2M_AUDIO_SET_MICGAIN_REQ 0x11
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pMicGain   [ I ] - TX microphone gain 
/// \li 0x0 – 0x7fff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetMicGain(
    // req params
    BYTE*		pProfile,
    WORD*  		pMicGain
	// resp params
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to get the RX volume of the specified volume level. It is similar with at!avrxvoldb?<profile>,<generator>,<level>
/// QMI_SWI_M2M_AUDIO_GET_VOLDB_REQ 0x05
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pGenerator    [ I ] - Generator
/// \li     0:Voice
/// \param  pVolume       [ I ] Volume level
/// \li 0-5
/// \param  pValue       [ O ] Volume value
/// \li 0x0 – 0x7fff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetVolDB(
    // req params
    BYTE*		pProfile,
    BYTE*  		pGenerator,
    BYTE*  		pLevel,
    // resp params
	WORD*		pValue
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set the RX volume of the specified volume level. It is similar with at!avrxvoldb=<profile>,<generator>,<level>,<volume>. This command sets the volume in the voice volume levels in the RX direction. There are multiple volume levels available to allow end-users to pick the volume level suitable for them when in a phone conversation.  This command allows the OEM to customize the volume within each volume level. This setting is stored in non-volatile memory and persists across power cycles and it takes effect on next call, but no need reset modem.
/// QMI_SWI_M2M_AUDIO_SET_VOLDB_REQ 0x06
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pGenerator    [ I ] - Generator
/// \li     0:Voice
/// \param  pVolume       [ I ] Volume level
/// \li 0-5
/// \param  pValue       [ I ] Volume value
/// \li 0x0 – 0x7fff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetVolDB(
    // req params
    BYTE*		pProfile,
    BYTE*  		pGenerator,
    BYTE*  		pLevel,
    WORD*		pValue
	// resp params
);

/*IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetTXPCMIIR(
    // req params
    BYTE*  			pProfile,
	BYTE*			pOpMode,
	// resp params
	BYTE*           pSwitch,
    BYTE*           pStage,
    PCMIIRFilter*   pFilterCoeff
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetTXPCMIIR(
    // req params
    PCMIIRSetConfig*  	pConfig,
	PCMIIRSetCoeff*		pCoeff
	// resp params
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetRXPCMIIR(
    // req params
    BYTE*  			pProfile,
	BYTE*			pOpMode,
	// resp params
	BYTE*           pSwitch,
    BYTE*           pStage,
    PCMIIRFilter*   pFilterCoeff
);

IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetRXPCMIIR(
    // req params
    PCMIIRSetConfig*  	pConfig,
	PCMIIRSetCoeff*		pCoeff
	// resp params
);*/

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to query audio TX path encoder gain value. It is similar with AT!AVTXG?<profile>.
/// QMI_SWI_M2M_AUDIO_GET_AVTXG 0x1E
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pEncoderGain   [ O ] - Encoder gain 
/// \li 0x0 – 0xffff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVTXG(
    // req params
    BYTE*		pProfile,
    // resp params
    WORD*  		pEncoderGain
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set audio TX path encoder gain value. It is similar with AT!AVTXG=<profile>,<gain>.
/// QMI_SWI_M2M_AUDIO_SET_AVTXG 0x1F
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pEncoderGain   [ I ] - Encoder gain 
/// \li 0x0 – 0xffff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVTXG(
    // req params
    BYTE*		pProfile,
    WORD*  		pEncoderGain
	// resp params
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to query audio RX path decoder gain value. It is similar with AT!AVRXG?<profile>.
/// QMI_SWI_M2M_AUDIO_GET_AVRXG 0x20
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pDecoderGain   [ O ] - Decoder gain 
/// \li 0x0 – 0xffff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVRXG(
    // req params
    BYTE*		pProfile,
    // resp params
    WORD*  		pDecoderGain
);

//////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set audio RX path decoder gain value. It is similar with AT!AVRXG=<profile>,<gain>.
/// QMI_SWI_M2M_AUDIO_SET_AVRXG 0x21
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pDecoderGain   [ I ] - Decoder gain 
/// \li 0x0 – 0xffff
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVRXG(
    // req params
    BYTE*		pProfile,
    WORD*  		pDecoderGain
	// resp params
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to query audio echo canceller enable mode. It is similar with AT!AVEC?<profile>.
/// QMI_SWI_M2M_AUDIO_GET_AVEC_REQ 0x28
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pSwitch   [ O ] - Enable/disable switch
/// \li 0-1
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVEC(
    // req params
    BYTE*		pProfile,
    // resp params
    BYTE*  		pSwitch
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set audio echo canceller enable mode. It is similar with AT!AVEC=<profile>,<switch>.
/// QMI_SWI_M2M_AUDIO_SET_AVEC 0x29
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pSwitch   [ I ] - Enable/disable switch
/// \li 0-1
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVEC(
    // req params
    BYTE*		pProfile,
    BYTE*  		pSwitch
	// resp params
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to query audio noise suppression enable mode. It is similar with AT!AVNS?<profile>.
/// QMI_SWI_M2M_AUDIO_SET_AVNS_REQ 0x2A
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pSwitch   [ O ] - Enable/disable switch
/// \li 0-1
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioGetAVNS(
    // req params
    BYTE*		pProfile,
    // resp params
    BYTE*  		pSwitch
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to set audio noise suppression enable mode. It is similar with AT!AVNS=<profile>,<switch>.
/// QMI_SWI_M2M_AUDIO_SET_AVNS_REQ 0x2B
///
/// \param	pProfile   [ I ] - Audio profile number
/// \li 0-5
/// \param	pSwitch   [ I ] - Enable/disable switch
/// \li 0-1
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioSetAVNS(
    // req params
    BYTE*		pProfile,
    BYTE*  		pSwitch
	// resp params
);

///////////////////////////////////////////////////////////////////////////////
///
/// The message requests to play an audio tone. It is similar with at!avtoneplay=<generator>,<value>[,<duration>]. This command is used to play a specified tone.
/// QMI_SWI_M2M_AUDIO_PLAY_TONE 0x0A
///
/// \param	pGenerator    [ I ] - Generator
/// \li     0:Voice
/// \param	pAudioTone   [ I ] - audio tone 
/// \li 0x00-0x57
/// \param	pToneDuration   [ I ] - Tone duration
/// \li 0-65535 
///
/// \return See GobiErrorCodes.h
///
///////////////////////////////////////////////////////////////////////////////
IMPORTGOBI ULONG GOBICMAPI	SwiM2MAV_AudioPlayTone(
	// req params
	BYTE*		pGenerator,
	BYTE*		pAudioTone,
	USHORT*		pToneDuration //optional
	// resp params
);
/*@}*/ // End of SwiM2MAV group
#endif //SwiM2MAVAPI_H