[Feature][ZXW-33]merge ZXW 0428 version

Change-Id: I11f167edfea428d9fab198ff00ff1364932d1b0b
diff --git a/ap/lib/libvoice/include/voice_ipc.h b/ap/lib/libvoice/include/voice_ipc.h
new file mode 100755
index 0000000..abe83b2
--- /dev/null
+++ b/ap/lib/libvoice/include/voice_ipc.h
@@ -0,0 +1,52 @@
+#ifdef USE_CAP_SUPPORT

+

+#define VOICEIPC_OK 0

+#define VOICEIPC_ERROR -1

+#define VOICE_WAIT_MSG_FROM_CAP -2 //waitting msg from cap

+

+#define VOICE_IPC_CONTROL_CHANNEL "/dev/rpmsg6"

+#define VOICE_IPC_CONTROL_CHANNEL_SIZE 256

+

+#define VOICE_HEAD_LEN (2 * sizeof(int))

+#define VOICE_CONTROL_MAX_LEN 32

+

+enum  voice_ipc_func_type {

+	IPC_SET_VOICE_DEVICE_MODE = 0,

+    IPC_GET_VOICE_DEVICE_MODE = 1,

+    IPC_SET_RX_VOICE_VOL = 2,

+    IPC_GET_RX_VOICE_VOL = 3,

+    IPC_SET_TX_VOICE_VOL = 4,

+    IPC_GET_TX_VOICE_VOL = 5,

+    IPC_SET_TX_VOICE_MUTE_STATE = 6,

+    IPC_GET_TX_VOICE_MUTE_STATE = 7,

+    IPC_SET_RX_VOICE_MUTE_STATE = 8,

+    IPC_GET_RX_VOICE_MUTE_STATE = 9,

+    IPC_SET_LOOPBACK_ENABLE_STATE = 10,

+    IPC_GET_LOOPBACK_ENABLE_STATE = 11,

+

+    IPC_VOICE_FUNC_MAX

+};

+

+typedef struct {

+    int func_id;

+    int param_len;

+    unsigned char param[VOICE_CONTROL_MAX_LEN];

+}voice_ipc_control_msg;

+

+int voice_ipc_init(void);

+void Voice_Ctrl_Rpmsg_Recv(void);

+

+void ipc_set_voice_device_mode(voice_ipc_control_msg msg);

+void ipc_get_voice_device_mode(voice_ipc_control_msg msg);

+void ipc_set_rx_voice_vol(voice_ipc_control_msg msg);

+void ipc_get_rx_voice_vol(voice_ipc_control_msg msg);

+void ipc_set_tx_voice_vol(voice_ipc_control_msg msg);

+void ipc_get_tx_voice_vol(voice_ipc_control_msg msg);

+void ipc_set_tx_voice_mute_state(voice_ipc_control_msg msg);

+void ipc_get_tx_voice_mute_state(voice_ipc_control_msg msg);

+void ipc_set_rx_voice_mute_state(voice_ipc_control_msg msg);

+void ipc_get_rx_voice_mute_state(voice_ipc_control_msg msg);

+void ipc_set_loopback_enable_state(voice_ipc_control_msg msg);

+void ipc_get_loopback_enable_state(voice_ipc_control_msg msg);

+

+#endif

diff --git a/ap/lib/libvoice/include/voice_lib.h b/ap/lib/libvoice/include/voice_lib.h
index d2baae2..6788b77 100644
--- a/ap/lib/libvoice/include/voice_lib.h
+++ b/ap/lib/libvoice/include/voice_lib.h
@@ -8,7 +8,47 @@
 
 #ifndef __VOICE_LIB_H
 #define __VOICE_LIB_H
+#include <linux/volte_drv.h>
 
+#define AVOICE_TEAK_2G_3G_DEV_NUM 2
+#define AVOICE_SOFT_3G_DEV_NUM 4
+#define AVOICE_4G_DEV_NUM 1
+#define AVOICE_5G_DEV_NUM 1
+
+#ifdef _USE_VOICE_ALSA
+
+
+ typedef enum
+ {
+	 AVOICE_TEAK_2G_3G = 0, 	
+	 AVOICE_SOFT_3G_NB,
+	 AVOICE_SOFT_3G_WB,    
+	 AVOICE_4G_NB,					
+	 AVOICE_4G_WB, 
+	 AVOICE_5G_NB,	  
+	 AVOICE_5G_WB,		 
+	 MAX_AVOICE_MODE			   
+ }T_Alsa_Voice_Mode;
+int alsa_voice_open(int vmode);
+int alsa_voice_close(int vmode);
+
+ 
+#endif
+
+ /*  Voice process channel selection. */
+ typedef enum
+ {
+	 VP_PATH_HANDSET	= 0,
+	 VP_PATH_SPEAKER,
+	 VP_PATH_HEADSET,
+	 VP_PATH_BLUETOOTH,
+	 VP_PATH_BLUETOOTH_NO_NR,
+	 VP_PATH_HSANDSPK,
+ 
+	 VP_PATH_OFF = 255,
+ 
+	 MAX_VP_PATH = VP_PATH_OFF
+ } T_ZDrv_VpPath;
  int voice_close(T_Voice_Para *para);
  int voice_open(T_Voice_Para *para);
  int voice_Vploop(int *path);