Initial import of NFC GNSS SDK project
This commit is contained in:
@@ -0,0 +1,200 @@
|
||||
/*------------------------------------------------------------
|
||||
(C) Copyright [2006-2008] Marvell International Ltd.
|
||||
All Rights Reserved
|
||||
------------------------------------------------------------*/
|
||||
|
||||
/*--------------------------------------------------------------------------------------------------------------------
|
||||
INTEL CONFIDENTIAL
|
||||
Copyright 2006 Intel Corporation All Rights Reserved.
|
||||
The source code contained or described herein and all documents related to the source code ("Material") are owned
|
||||
by Intel Corporation or its suppliers or licensors. Title to the Material remains with Intel Corporation or
|
||||
its suppliers and licensors. The Material contains trade secrets and proprietary and confidential information of
|
||||
Intel or its suppliers and licensors. The Material is protected by worldwide copyright and trade secret laws and
|
||||
treaty provisions. No part of the Material may be used, copied, reproduced, modified, published, uploaded, posted,
|
||||
transmitted, distributed, or disclosed in any way without Intel's prior express written permission.
|
||||
|
||||
No license under any patent, copyright, trade secret or other intellectual property right is granted to or
|
||||
conferred upon you by disclosure or delivery of the Materials, either expressly, by implication, inducement,
|
||||
estoppel or otherwise. Any license under such intellectual property rights must be express and approved by
|
||||
Intel in writing.
|
||||
-------------------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
#include "diags.h"
|
||||
#include "platform.h"
|
||||
#include "audio_config.h"
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
Global function for FOTA upgrade.
|
||||
0: system in NOT in FOTA upgrade, should do audio processing
|
||||
1: system is in FOTA upgrade, should bypass audio processing
|
||||
***************************************************************************/
|
||||
extern BOOL IsMiniSystem(void);
|
||||
|
||||
|
||||
extern void audioPhase1Init_internal(void);
|
||||
extern void audioPhase2Init_internal(void);
|
||||
extern void audioServerPhase2Init_internal(void);
|
||||
extern void audioGsmResumeCB_internal(void);
|
||||
extern void audioGsmSuspendCB_internal(void);
|
||||
extern void amrSuspend_internal(void);
|
||||
extern void amrResume_internal(void);
|
||||
extern void LteVoiceSuspend_internal(void);
|
||||
extern void LteVoiceResume_internal(void);
|
||||
extern BOOL CraneCodecADCOnOff_internal(BOOL OnOff);
|
||||
|
||||
|
||||
static void audioGsmCB_NULL(void)
|
||||
{
|
||||
DIAG_FILTER(AUDIO, Voice, audioGsmCB_NULL, DIAG_ERROR)
|
||||
diagTextPrintf("audioGsmCB_NULL");
|
||||
}
|
||||
|
||||
|
||||
static void Audio_Init_FakeBind(void)
|
||||
{
|
||||
|
||||
|
||||
#if !defined (INTEL_2CHIP_PLAT_BVD)
|
||||
#if !NO_APLP
|
||||
#if defined (_AUDIO_HANDOVER_)
|
||||
#if defined (INTEL_UPGRADE_DUAL_RAT )
|
||||
extern void audioBindGsmResume(void(*)());
|
||||
extern void audioBindGsmSuspend(void(*)());
|
||||
extern void audioBindGsmStartTest(void(*)());
|
||||
extern void audioBindGsmStopTest(void(*)());
|
||||
audioBindGsmResume(audioGsmCB_NULL);
|
||||
audioBindGsmSuspend(audioGsmCB_NULL);
|
||||
audioBindGsmStartTest(audioGsmCB_NULL);
|
||||
audioBindGsmStopTest(audioGsmCB_NULL);
|
||||
#endif /*INTEL_UPGRADE_DUAL_RAT */
|
||||
#endif /*_AUDIO_HANDOVER_*/
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
void audioServerPhase2Init(void)
|
||||
{
|
||||
if(!IsMiniSystem())
|
||||
{
|
||||
audioServerPhase2Init_internal();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Function: audioPhase1Init
|
||||
* Description:
|
||||
* Parameters: none
|
||||
* Return Value: none .
|
||||
***************************************************************************/
|
||||
//ICAT EXPORTED FUNCTION - Audio,Common,audioPhase1Init
|
||||
void audioPhase1Init(void)
|
||||
{
|
||||
if(!IsMiniSystem())
|
||||
{
|
||||
audioPhase1Init_internal();
|
||||
}
|
||||
else
|
||||
{
|
||||
Audio_Init_FakeBind();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#if !NO_APLP
|
||||
/****************************************************************************
|
||||
* Function: audioPhase2Init
|
||||
* Description:
|
||||
* Parameters: none
|
||||
* Return Value: none .
|
||||
***************************************************************************/
|
||||
//ICAT EXPORTED FUNCTION - Audio,Common,audioPhase2Init
|
||||
void audioPhase2Init(void)
|
||||
{
|
||||
if(!IsMiniSystem())
|
||||
{
|
||||
audioPhase2Init_internal();
|
||||
}
|
||||
}
|
||||
#endif // !NO_APLP
|
||||
|
||||
|
||||
/****************************************************************************
|
||||
* Function: amrResume
|
||||
* Description: AudioCtrl API - called to resume AMR activity when it is suspended.
|
||||
* Call: Protocol Stack
|
||||
* Parameters: none
|
||||
* Return Value: none .
|
||||
***************************************************************************/
|
||||
//ICAT EXPORTED FUNCTION - Audio,Voice,amrResume
|
||||
void amrResume(void)
|
||||
{
|
||||
if(!IsMiniSystem())
|
||||
{
|
||||
amrResume_internal();
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Function: amrSuspend
|
||||
* Description: AudioCtrl API - called to temporary suspend AMR activity
|
||||
* during hard handover.
|
||||
* Call: Protocol Stack
|
||||
* Parameters: none
|
||||
* Return Value: none .
|
||||
***************************************************************************/
|
||||
//ICAT EXPORTED FUNCTION - Audio,Voice,amrSuspend
|
||||
void amrSuspend(void)
|
||||
{
|
||||
if(!IsMiniSystem())
|
||||
{
|
||||
amrSuspend_internal();
|
||||
}
|
||||
}
|
||||
|
||||
void audioGsmSuspendCB(void)
|
||||
{
|
||||
if(!IsMiniSystem())
|
||||
{
|
||||
audioGsmSuspendCB_internal();
|
||||
}
|
||||
}
|
||||
|
||||
void audioGsmResumeCB(void)
|
||||
{
|
||||
if(!IsMiniSystem())
|
||||
{
|
||||
audioGsmResumeCB_internal();
|
||||
}
|
||||
}
|
||||
|
||||
void LteVoiceSuspend()//LTE handover/reselect to GSM/UMTS
|
||||
{
|
||||
if(!IsMiniSystem())
|
||||
{
|
||||
LteVoiceSuspend_internal();
|
||||
}
|
||||
}
|
||||
|
||||
//ICAT EXPORTED FUNCTION - ADEMO, Voice, LteVoiceResume
|
||||
void LteVoiceResume()//LTE handover/reselect to GSM/UMTS fails || GSM/UMTS handover to LTE
|
||||
{
|
||||
if(!IsMiniSystem())
|
||||
{
|
||||
LteVoiceResume_internal();
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CraneCodecADCOnOff(BOOL OnOff)
|
||||
{
|
||||
if(!IsMiniSystem())
|
||||
{
|
||||
return CraneCodecADCOnOff_internal(OnOff);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user