ASR_BASE
Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/marvell/services/audio/libacm/acm/inc/AuC.h b/marvell/services/audio/libacm/acm/inc/AuC.h
new file mode 100644
index 0000000..a39b182
--- /dev/null
+++ b/marvell/services/audio/libacm/acm/inc/AuC.h
@@ -0,0 +1,322 @@
+/*------------------------------------------------------------
+ (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.
+ -------------------------------------------------------------------------------------------------------------------*/
+
+/**********************************************************************
+*
+* Filename: AuC.h
+*
+* Programmers: Tal Rotbart
+*
+* Description: Declarations of Common AuC services and variables
+*
+* --------------------------------------------------------------------
+* Revision History
+*
+* Date Who Version Description
+* --------------------------------------------------------------------
+*
+**********************************************************************/
+#ifndef AUC_H
+#define AUC_H
+
+#if 0
+#define MAX_VOLUME_VALUE (0x31)
+#define MUTE_ON (0x0)
+#define MUTE_OFF (0x1)
+#endif
+
+//ICAT EXPORTED ENUM
+typedef enum {
+ NON_INITIALIZED // 0
+ , VOICE_IDLE // 1
+ , WAIT_FOR_CSDI_START // 2
+ , WAIT_FOR_CSDI_START_AND_PCM_STREAM // 3
+ , WBCDMA_VOICE // 4
+ , WBCDMA_VOICE_AND_PCM_STREAM // 5
+ , VOICE_HAND_OVER // 6
+ , VOICE_HAND_OVER_AND_PCM_STREAM // 7
+ , WAIT_FOR_CSDI_STOP // 8
+ , WAIT_FOR_CSDI_STOP_AND_PCM_STREAM // 9
+ , GSM_VOICE // 10
+ , GSM_VOICE_AND_PCM_STREAM // 11
+ , PCM_STREAM_ONLY // 12
+ , VOCODER_STREAM // 13
+ , VOCODER_STREAM_AND_PCM_STREAM // 14
+
+#ifdef SS_VT
+ //New state for VT(H.223 in CP side)
+ , VT_H223_VOICE
+#endif
+} Audio_Ctrl_State;
+
+
+typedef enum {
+ TRI_STATE = 0,
+ ACTIVE
+}TriStateMode;
+
+
+// Opcodes:
+enum AudioCtrlCmd {
+ START_VOICE_PATH = 0x0040
+ , END_VOICE_PATH = 0x0041
+ , VOICE_HANDOVER = 0x0042
+ , VOICE_RX_PACKET = 0x0043
+ , AUDIOTOOL_CONTROL = 0x0044
+ , CODEC_IF_CHANGE = 0x0045
+ , VOICE_TEST_CONTROL = 0x0046
+ , PCM_STREAM_CONTROL = 0x0047
+ , VOICE_ACTIVATE_PATH = 0x0048
+ , SELF_INVOCATION = 0x0049
+ , CONFIG_CODEC_DB = 0x004c
+ , AUDIO_DEVICE_CONTROL = 0x004d
+ , AUDIO_PLL_CONTROL = 0x004E
+ , AUDIO_MISCELLANEOUS_FUNC = 0x004F
+#ifdef OPT_IPC
+ , AUDIO_IPC_CONTROL = 0x0050
+ , INIT_IPC_CONTROL = 0x0051
+#endif
+ , COMPANDER_CONTROL_CMD = 0x0052
+ , VAD_DUMP_CMD = 0x0053
+ , COMPANDER_MODE_CMD = 0x0054
+ //,POCVOICE_RX_PCM = 0x0055 // Opcode : 0x55 CP send Rx PCM to MSA
+ , KWS_CONTROL = 0x0055 //
+ , VOICE_RXB_PCM = 0x005b
+ , VOCODER_CONTROL = 0x0060
+ , VOICE_CONTROL = 0x0061
+ , VOLUME_CONTROL = 0x0062
+ , MUTE_CONTROL = 0x0063
+ , NS_CONTROL = 0x0064
+ , EC_CONTROL = 0x0065
+ , EQ_CONTROL = 0x0066
+ , AVC_CONTROL = 0x0067
+ , DTMF_CONTROL = 0x0068
+ , AUX_MODE_CONTROL = 0x0069
+ , EC_TEST_CMD = 0x006a
+ , NS_TEST_CMD = 0x006b
+ , DMA_INT_IND = 0x006b
+ , AVC_TEST_CMD = 0x006c
+ , DITHER_GEN_CONTROL = 0x006d
+ , CTM_CONTROL = 0x006e
+ , EC_FIR_UPDATE_CMD = 0x006f //obsolete
+
+ /*
+ * Jackie, 2011-0107
+ * For the MSA detection of far-end DTMF.
+ * We need to set control parameters into MSA
+ */
+ , DTMFDETECTION_CONTROL = 0x0070
+#if defined (SAMSUNG_NXP)
+ , SPEECH_PLUGIN_TX_OUTPUT_CMD = 0x0071
+ , SPEECH_PLUGIN_CONTROL = 0x0072
+ , SPEECH_PLUGIN_MODULE_CONTROL = 0x0073
+#endif
+
+ , FILTERS_CONTROL = 0x0074 // Opcode : 0x74 for HPF&LPF
+
+#if defined (MSA_MISC_PARAMETERS)
+ , AUDIO_MISC_CONTROL = 0x0075 // Opcode : 0x75 for MISC ITEM new feature
+#endif
+
+ ////Samsung DiamondVoice
+#if defined (SAMSUNG_TOTORO_DIAMONDVOICE)
+ , DIAMONDVOICE_OUTPCMDATA = 0x0076 // DSP send tx/rx PCM to CP audio, which will be sent to DiamondVoice to process.
+#endif
+ , AUDIO_FM_MODE = 0x0076
+
+ , AUDIO_DUALMIC_CONTROL = 0x0077 // Opcode : 0x77 set dual mic parameters
+ , AUDIO_ECALL_CONTROL = 0x0078 // Opcode : 0x78 set ECALL parameters
+
+ , AUDIO_GSSP_CONTROL = 0x0079 // Opcode : 0x79 turn on/off GSSP clock
+ , AUDIO_SSPA_CONTROL = 0x0079 // Opcode : 0x79 turn on/off GSSP clock
+ , AUDIO_GSSP_READ = 0x007a // Opcode : 0x7a read GSSP count
+
+ , AUDIO_TX_PCM = 0x007b // Opcode : 0x7b CP send Tx PCM into MSA
+
+ , HEADPHONE_TYPE_CHECK_WAIT_ACK = 0x007c
+
+ , AUDIO_CODECSET = 0x007d // Opcode : 0x7d CP send codec setting into MSA
+ , AUDIO_CODECGET = 0x007e // Opcode : 0x7e CP request codec setting from MSA
+
+ , AUDIO_VIBRATION_CONTROL = 0x007F
+
+};
+
+enum AudioCtrlMsg {
+ VOICE_TX_PACKET = 0x0040
+ , VOICE_DRIFT_REPORT = 0x0041
+ , END_VOICE_ACK = 0x0042
+ , PCM_STREAM_RECORD = 0x0043
+ , GET_PCM_FRAME = 0x0044
+ , VOICE_DECODER_ACK = 0x0045
+ , VOICE_START_ACK = 0x0046
+ , VOICE_PCM_ACK = 0x0047
+ , VOICE_DEBUG_RX_PACKET = 0x0048
+ , VOICE_DEBUG_PCM = 0x004A
+ , VOICE_CTM_NEGO_REPORT = 0x004B
+
+ //MSA will report detected DTMF code(in ASCII code)
+ , VOICE_GET_DTMF = 0x004C
+
+#if defined (SAMSUNG_NXP)
+ , VOICE_RESERVED = 0x004D
+#endif
+ , VOICE_MISC_REPORT = 0x004E
+ , VOICE_CODEC_REPORT = 0x004F
+
+
+#ifdef OPT_IPC
+ , AUDIO_IPC_REPORT = 0x0050
+#endif
+
+#if defined (MSA_MISC_PARAMETERS)
+ , AUDIO_MISC_REPORT = 0x52 // AUDIO_MISC_REPORT OpCode : 0x52
+#endif
+
+////Samsung DiamondVoice
+//#if defined (SAMSUNG_TOTORO_DIAMONDVOICE)
+// ,DIAMONDVOICE_INPCMDATA = 0x0053 // DSP send tx/rx PCM to CP audio, which will be sent to DiamondVoice to process.
+//#endif
+ , VAD_DUMP_MSG = 0x0053
+ , COMPANDER_REPORT_MSG = 0x0054
+ , WISE_VOICE_MSG = 0x0055
+ , KWS_DETECT_MSG = 0x0056
+ , ECALL_REPORT_MSG = 0x0077
+
+ , AUDIO_GSSP_COUNT = 0x007a // Opcode : 0x7a got GSSP count
+
+ , AUDIO_RX_PCM = 0x007b // Opcode : 0x7b MSA send Rx PCM into CP
+ , HEADPHONE_EVENT_MSG = 0x007c //
+};
+
+
+#if 0
+typedef enum {
+ ECALL_DATA_SET = 0,
+ ECALL_DATA_GET = 1,
+ ECALL_VOICE_SET = 2,
+ ECALL_VOICE_GET = 3,
+ ECALL_TEST_CONTROL = 4,
+ ECALL_TEST_DATA_CONTROL = 5,
+ ECALL_CONNECTED = 6
+}EcallIpcCmdSubOpEnum;
+
+typedef enum {
+ ECALL_DATA_INDICATION = 0,
+ ECALL_DATA_GET_MSG = 1,
+ ECALL_VOICE_INDICATION = 2,
+ ECALL_VOICE_GET_MSG = 3,
+ ECALL_TEST_DATA_ACK = 4,
+ ECALL_TEST_TX_BUFFER_END = 5,
+ ECALL_TEST_RX_CTRL = 6,
+ ECALL_DEBUG = 7
+}EcallIpcMsgSubOpEnum;
+
+//ICAT EXPORTED ENUM
+typedef enum {
+ ECALL_CMD_EIM_ABORT_TERMINATED = 0,
+ ECALL_CMD_EIM_ARM_ACTIVATE = 1,
+ ECALL_CMD_UPDATE_MSD = 2,
+ ECALL_CMD_URC_CONTROL = 3,
+ ECALL_CMD_FEATURE_CONTROL = 4,
+ ECALL_CMD_TIMERS_UPDATE = 5,
+ ECALL_CMD_MSD_UPDATE_CONFIG = 6,
+ ECALL_CMD_RESERVED_3 = 7,
+ ECALL_CMD_NUM_OPCODES
+} EcallUecallDataCmdIdEnum;
+#endif
+
+enum VolumeSide {
+ TX_VOLUME
+ , RX_VOLUME
+ , SIDETONE_VOLUME
+};
+
+enum MuteSide {
+ TX_MUTE,
+ RX_MUTE
+};
+
+enum VoiceHandOver {
+ VOICE_RESUME,
+ VOICE_SUSPEND
+};
+
+
+#if 0
+typedef enum {
+ AMRInitFunc,
+ EnableHwPathCodecFunc,
+ DisableHwPathCodecFunc,
+ EnableHwPathBTFunc,
+ DisableHwPathBTFunc
+}CalledFunctionT;
+
+void AudioTriStateControl(CalledFunctionT CalledFunction);
+
+/*
+ Frame Type AMRcodec Total Class A Class B Class C
+ 0 4,75 95 42 53 0
+ 1 5,15 103 49 54 0
+ 2 5,90 118 55 63 0
+ 3 6,70 134 58 76 0
+ 4 7,40 148 61 87 0
+ 5 7,95 159 75 84 0
+ 6 10,2 204 65 99 40
+ 7 12,2 244 81 103 60 */
+#define CLASS_A_OCTETS_4_75 6
+#define CLASS_B_OCTETS_4_75 7
+#define CLASS_C_OCTETS_4_75 0
+
+#define CLASS_A_OCTETS_5_15 7
+#define CLASS_B_OCTETS_5_15 7
+#define CLASS_C_OCTETS_5_15 0
+
+#define CLASS_A_OCTETS_5_90 7
+#define CLASS_B_OCTETS_5_90 8
+#define CLASS_C_OCTETS_5_90 0
+
+#define CLASS_A_OCTETS_6_70 8
+#define CLASS_B_OCTETS_6_70 10
+#define CLASS_C_OCTETS_6_70 0
+
+#define CLASS_A_OCTETS_7_40 8
+#define CLASS_B_OCTETS_7_40 11
+#define CLASS_C_OCTETS_7_40 0
+
+#define CLASS_A_OCTETS_7_95 10
+#define CLASS_B_OCTETS_7_95 11
+#define CLASS_C_OCTETS_7_95 0
+
+#define CLASS_A_OCTETS_10_2 9
+#define CLASS_B_OCTETS_10_2 13
+#define CLASS_C_OCTETS_10_2 5
+
+#define CLASS_A_OCTETS_12_2 11
+#define CLASS_B_OCTETS_12_2 13
+#define CLASS_C_OCTETS_12_2 8
+
+#define MAX_CLASS_A_OCTETS 11
+#define MAX_CLASS_B_OCTETS 13
+#define MAX_CLASS_C_OCTETS 8
+#endif
+
+#endif // AUC_H