[Feature][ZXW-41] merged 0601 version

Change-Id: I667af6bb09d65581d455b73f8984c160b2c67ad8
diff --git a/ap/lib/libatext/ext_audio_func.c b/ap/lib/libatext/ext_audio_func.c
index f1b45a7..143a6d2 100755
--- a/ap/lib/libatext/ext_audio_func.c
+++ b/ap/lib/libatext/ext_audio_func.c
@@ -15,6 +15,7 @@
 #ifdef _USE_VOICE_ALSA

 #include "tinyalsa/audio_mixer_ctrl.h"

 #include "voice_lib.h"

+#include "voice_ipc.h"

 #endif

 //#include "ext_regist.h"

 //#include "softap_api.h"

@@ -479,6 +480,46 @@
 	return AT_END;

 }

 

+int extAt_CAP_VALSA_act_func (int at_fd, char * at_paras, void * *res_msg, int * res_msglen)

+{

+	char *at_str = NULL;

+	UINT32 ret = DRV_SUCCESS;

+

+	int mode = 0;

+    int enable = 0;

+	

+	UINT16 onOff = 0;

+	at_str = at_paras;

+	printf("extAt_CAP_VALSA_act_func, at_paras:%s \n", at_paras);

+

+	ret = sscanf (at_str, "%d,%d", &mode,&enable);

+	onOff = enable;

+	printf("extAt_CAP_VALSA_act_func mode=%d,enable=%d,ret=%d\n",mode,enable,ret);

+

+	if (ret == 2) {

+		if(onOff == 1)

+		{

+			ret = cap_alsa_voice_open(mode);

+			printf("extAt_CAP_VALSA_act_func alsa_voice_open,ret=%d\n",ret);

+		}

+		else

+		{

+			ret = cap_alsa_voice_close(mode);

+			printf("extAt_CAP_VALSA_act_func alsa_voice_close,ret=%d\n",ret);

+			

+		}		

+		if (ret == DRV_SUCCESS) {

+			*res_msg = at_ok_build();

+			*res_msglen = strlen (*res_msg);

+			return AT_END;

+		}

+	}

+	*res_msg = at_err_build(ATERR_PROC_FAILED);

+	*res_msglen = strlen (*res_msg);

+	

+	return AT_END;

+}

+

 #endif

 

 void ext_audio_regist_init(void)

@@ -501,6 +542,7 @@
 

 	register_serv_func2("VALSA=", 0, 0, 0, extAt_VALSA_act_func, NULL);

 	register_serv_func2("VPATH=", 0, 0, 0, extAt_VPATH_act_func, NULL);

+    register_serv_func2("CAP_VALSA=", 0, 0, 0, extAt_CAP_VALSA_act_func, NULL);

 	

 #endif

 }

diff --git a/ap/lib/libatext/ext_normal_func.c b/ap/lib/libatext/ext_normal_func.c
index 90116eb..3c170fa 100644
--- a/ap/lib/libatext/ext_normal_func.c
+++ b/ap/lib/libatext/ext_normal_func.c
@@ -1534,16 +1534,20 @@
 	{

 		*res_msg = at_err_build(retCode); 

 	}

-	if (cardSlotFlag == 1)

-	{

-		snprintf(tmp,sizeof(tmp),"%d,%d,%d,%d,%d",simCard0PreFlag, simCard0Flag, simCard1PreFlag, simCard1Flag, cardSlotFlag);

-	}

 	else

 	{

-		snprintf(tmp,sizeof(tmp),"%d,%d",simCard0PreFlag, simCard0Flag);

+		if (cardSlotFlag == 1)

+		{

+			snprintf(tmp,sizeof(tmp),"%d,%d,%d,%d,%d",simCard0PreFlag, simCard0Flag, simCard1PreFlag, simCard1Flag, cardSlotFlag);

+		}

+		else

+		{

+			snprintf(tmp,sizeof(tmp),"%d,%d",simCard0PreFlag, simCard0Flag);

+		}

+		

+		*res_msg = at_query_result_build("ZCARDSWITCH", tmp);

 	}

 	

-	*res_msg = at_query_result_build("ZCARDSWITCH", tmp);

 	*res_msglen = strlen(*res_msg);

 	return AT_END;

 }

diff --git a/ap/lib/libatext/ext_wdt_func.c b/ap/lib/libatext/ext_wdt_func.c
index db6806d..d0df9f6 100644
--- a/ap/lib/libatext/ext_wdt_func.c
+++ b/ap/lib/libatext/ext_wdt_func.c
@@ -244,11 +244,13 @@
 	ret=ioctl(fd, RPMSG_SET_INT_FLAG, NULL);

 	if(ret<0){

 	 	at_print(AT_DEBUG,"cap add  ioctl FAIL\n");

+		close(fd);

 		return AT_END;	

 	}		

 	ret=write(fd, &ctx, 4);

 	if(ret<0){

 	 	at_print(AT_DEBUG,"cap add  write FAIL\n");

+		close(fd);

 		return AT_END;	

 	}

 	

@@ -278,11 +280,13 @@
 	ret=ioctl(fd, RPMSG_SET_INT_FLAG, NULL);

 	if(ret<0){

 	 	at_print(AT_DEBUG,"cap add  ioctl FAIL\n");

+		close(fd);

 		return AT_END;	

 	}		

 	ret=write(fd, &ctx, 4);

 	if(ret<0){

 	 	at_print(AT_DEBUG,"cap add  write FAIL\n");

+		close(fd);

 		return AT_END;	

 	}

 

diff --git a/ap/lib/libatreg/atreg_common.h b/ap/lib/libatreg/atreg_common.h
index 3ea1dc3..7c51d29 100755
--- a/ap/lib/libatreg/atreg_common.h
+++ b/ap/lib/libatreg/atreg_common.h
Binary files differ
diff --git a/ap/lib/libatreg/atreg_thread.c b/ap/lib/libatreg/atreg_thread.c
index 714cd01..034c744 100755
--- a/ap/lib/libatreg/atreg_thread.c
+++ b/ap/lib/libatreg/atreg_thread.c
@@ -233,12 +233,12 @@
 static void atreg_ser_cb_proc(void *patreg_instance, unsigned char *aucDataBuf)

 {	

     int send_ret = -1;

-	unsigned char res_msg[MAX_MSG_LEN] = {0};

+	unsigned char res_msg[MSG_DATA_MAX_LEN] = {0};

 	struct atreg_ser_instance_t *patreg_ser_instance = (struct atreg_ser_instance_t *)patreg_instance;

 

 	patreg_ser_instance->cb(aucDataBuf, res_msg);

 	

-	send_ret = ipc_send_message2(atreg_common_ctx.modid, MODULE_ID_AT_CTL, patreg_ser_instance->rsp_msg_id, sizeof(res_msg), (unsigned char *)res_msg, 0);

+	send_ret = ipc_send_message2(atreg_common_ctx.modid, MODULE_ID_AT_CTL, patreg_ser_instance->rsp_msg_id, strlen(res_msg), (unsigned char *)res_msg, 0);

 	if (0 != send_ret) {	

 		slog(ATREG_PRINT, SLOG_ERR, "Err: atreg_ser_cb_proc ipc fail!\n");

 	}

diff --git a/ap/lib/libaudiomix/mix.c b/ap/lib/libaudiomix/mix.c
index f0de0f9..35a8c31 100755
--- a/ap/lib/libaudiomix/mix.c
+++ b/ap/lib/libaudiomix/mix.c
@@ -33,13 +33,13 @@
 { 

 	if(audio_mix_devfd == MIX_DEV_INVALID_ID)

 	{

-        printf("zte audio /dev/audio_mix_device zDrvAudioMix_WriteOneFrame invalid dev!\n");

+        printf("audio /dev/audio_mix_device zDrvAudioMix_WriteOneFrame invalid dev!\n");

         return DRV_ERROR;

 	} 

     

 	if(write(audio_mix_devfd, pBuf, uiLen) <= 0)

 	{

-        printf("zte audio /dev/audio_mix_device zDrvAudioMix_WriteOneFrame write failed!\n");

+        printf("audio /dev/audio_mix_device zDrvAudioMix_WriteOneFrame write failed!\n");

 		return DRV_ERROR;

 	} 

 

@@ -52,13 +52,13 @@
     printf("open end! audio_mix_devfd=%d, audioType=%d, sample_rate=%d\n", audio_mix_devfd, cfgParam->audioType, cfgParam->sample_rate);

 	if(audio_mix_devfd < 0)

 	{

-        printf("zte audio /dev/audio_mix_device zDrvAudioMix_Open failed!\n");

+        printf("audio /dev/audio_mix_device zDrvAudioMix_Open failed!\n");

 		return DRV_ERROR;

 	}  

      

 	if(ioctl(audio_mix_devfd, AUDIOMIX_IOCTL_SET_CFG, cfgParam) < 0)

 	{ 

-        printf("zte audio /dev/audio_mix_device set cfg failed!\n");

+        printf("audio /dev/audio_mix_device set cfg failed!\n");

 		goto err;

 	}

     

@@ -66,7 +66,7 @@
 err: 

 	close(audio_mix_devfd);

 	audio_mix_devfd = MIX_DEV_INVALID_ID;

-    printf("zte audio /dev/audio_mix_device zDrvAudioMix_Open failed!\n");

+    printf("audio /dev/audio_mix_device zDrvAudioMix_Open failed!\n");

 	return DRV_ERROR;

 

 }

@@ -75,7 +75,7 @@
 {

 	if(audio_mix_devfd == MIX_DEV_INVALID_ID)

 	{

-        printf("zte audio /dev/audio_mix_device zDrvAudioMix_Close invalid dev!\n");

+        printf("audio /dev/audio_mix_device zDrvAudioMix_Close invalid dev!\n");

 		return DRV_ERROR;

 	}

 	close(audio_mix_devfd); 

diff --git a/ap/lib/liblpa/libes10.a b/ap/lib/liblpa/libes10.a
index 427839c..0b47108 100644
--- a/ap/lib/liblpa/libes10.a
+++ b/ap/lib/liblpa/libes10.a
Binary files differ
diff --git a/ap/lib/libnvram/libnvram.a b/ap/lib/libnvram/libnvram.a
index f277738..41560ba 100644
--- a/ap/lib/libnvram/libnvram.a
+++ b/ap/lib/libnvram/libnvram.a
Binary files differ
diff --git a/ap/lib/libnvram/libnvram.so b/ap/lib/libnvram/libnvram.so
index 7272e8b..2c0325b 100755
--- a/ap/lib/libnvram/libnvram.so
+++ b/ap/lib/libnvram/libnvram.so
Binary files differ
diff --git a/ap/lib/libnvram/libnvram_sc.a b/ap/lib/libnvram/libnvram_sc.a
index 8b2c418..b37ddd2 100644
--- a/ap/lib/libnvram/libnvram_sc.a
+++ b/ap/lib/libnvram/libnvram_sc.a
Binary files differ
diff --git a/ap/lib/libnvram/libnvram_sc.so b/ap/lib/libnvram/libnvram_sc.so
index a654f8a..27f79e2 100755
--- a/ap/lib/libnvram/libnvram_sc.so
+++ b/ap/lib/libnvram/libnvram_sc.so
Binary files differ
diff --git a/ap/lib/libps/220A1_all/amt/amt.a b/ap/lib/libps/220A1_all/amt/amt.a
index 1ea0ba1..f6caacb 100644
--- a/ap/lib/libps/220A1_all/amt/amt.a
+++ b/ap/lib/libps/220A1_all/amt/amt.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/appstart/appstart.a b/ap/lib/libps/220A1_all/appstart/appstart.a
index c075c5c..a00fbb8 100644
--- a/ap/lib/libps/220A1_all/appstart/appstart.a
+++ b/ap/lib/libps/220A1_all/appstart/appstart.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/drv/amr.a b/ap/lib/libps/220A1_all/drv/amr.a
index a6ba81b..0622ef8 100644
--- a/ap/lib/libps/220A1_all/drv/amr.a
+++ b/ap/lib/libps/220A1_all/drv/amr.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/drv/audio_base.a b/ap/lib/libps/220A1_all/drv/audio_base.a
index 15e8f62..8805c80 100644
--- a/ap/lib/libps/220A1_all/drv/audio_base.a
+++ b/ap/lib/libps/220A1_all/drv/audio_base.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/drv/chip.a b/ap/lib/libps/220A1_all/drv/chip.a
index 304182b..ea2b416 100644
--- a/ap/lib/libps/220A1_all/drv/chip.a
+++ b/ap/lib/libps/220A1_all/drv/chip.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/drv/drv_sdk.a b/ap/lib/libps/220A1_all/drv/drv_sdk.a
index 9c92bec..5bc884d 100644
--- a/ap/lib/libps/220A1_all/drv/drv_sdk.a
+++ b/ap/lib/libps/220A1_all/drv/drv_sdk.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/drv/public.a b/ap/lib/libps/220A1_all/drv/public.a
index e905155..17c61e5 100644
--- a/ap/lib/libps/220A1_all/drv/public.a
+++ b/ap/lib/libps/220A1_all/drv/public.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/drv/webrtc.a b/ap/lib/libps/220A1_all/drv/webrtc.a
index e1014de..fa18ada 100644
--- a/ap/lib/libps/220A1_all/drv/webrtc.a
+++ b/ap/lib/libps/220A1_all/drv/webrtc.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/gsml1/dwddrv.a b/ap/lib/libps/220A1_all/gsml1/dwddrv.a
index 7dc8767..ee86db0 100644
--- a/ap/lib/libps/220A1_all/gsml1/dwddrv.a
+++ b/ap/lib/libps/220A1_all/gsml1/dwddrv.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/gsml1/l1g.a b/ap/lib/libps/220A1_all/gsml1/l1g.a
index 41d9d19..6a9cb35 100644
--- a/ap/lib/libps/220A1_all/gsml1/l1g.a
+++ b/ap/lib/libps/220A1_all/gsml1/l1g.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/phy/phy.a b/ap/lib/libps/220A1_all/phy/phy.a
index a139770..7b8097e 100644
--- a/ap/lib/libps/220A1_all/phy/phy.a
+++ b/ap/lib/libps/220A1_all/phy/phy.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_osa_linux.a b/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_osa_linux.a
index b985f16..ea713b1 100644
--- a/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_osa_linux.a
+++ b/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_osa_linux.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_psm.a b/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_psm.a
index 1a71317..99228b1 100644
--- a/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_psm.a
+++ b/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_psm.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_sup.a b/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_sup.a
index 3b802a3..46120f8 100644
--- a/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_sup.a
+++ b/ap/lib/libps/220A1_all/plat/armv7-a/GCC/plat_sup.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/plat/plat_osa_linux.a b/ap/lib/libps/220A1_all/plat/plat_osa_linux.a
index b985f16..ea713b1 100644
--- a/ap/lib/libps/220A1_all/plat/plat_osa_linux.a
+++ b/ap/lib/libps/220A1_all/plat/plat_osa_linux.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/plat/plat_psm.a b/ap/lib/libps/220A1_all/plat/plat_psm.a
index 1a71317..99228b1 100644
--- a/ap/lib/libps/220A1_all/plat/plat_psm.a
+++ b/ap/lib/libps/220A1_all/plat/plat_psm.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/plat/plat_sup.a b/ap/lib/libps/220A1_all/plat/plat_sup.a
index 3b802a3..46120f8 100644
--- a/ap/lib/libps/220A1_all/plat/plat_sup.a
+++ b/ap/lib/libps/220A1_all/plat/plat_sup.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/as_com.a b/ap/lib/libps/220A1_all/ps/as_com.a
index a604b29..db2c130 100644
--- a/ap/lib/libps/220A1_all/ps/as_com.a
+++ b/ap/lib/libps/220A1_all/ps/as_com.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/as_gsm.a b/ap/lib/libps/220A1_all/ps/as_gsm.a
index 66a95b5..ac6656e 100644
--- a/ap/lib/libps/220A1_all/ps/as_gsm.a
+++ b/ap/lib/libps/220A1_all/ps/as_gsm.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/ati.a b/ap/lib/libps/220A1_all/ps/ati.a
index 6813e4e..f7e0287 100644
--- a/ap/lib/libps/220A1_all/ps/ati.a
+++ b/ap/lib/libps/220A1_all/ps/ati.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/com.a b/ap/lib/libps/220A1_all/ps/com.a
index b6bd6a2..5458540 100644
--- a/ap/lib/libps/220A1_all/ps/com.a
+++ b/ap/lib/libps/220A1_all/ps/com.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/el2_up.a b/ap/lib/libps/220A1_all/ps/el2_up.a
index 3df271a..4768b9d 100644
--- a/ap/lib/libps/220A1_all/ps/el2_up.a
+++ b/ap/lib/libps/220A1_all/ps/el2_up.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/eudbg.a b/ap/lib/libps/220A1_all/ps/eudbg.a
index cb7d416..d572130 100644
--- a/ap/lib/libps/220A1_all/ps/eudbg.a
+++ b/ap/lib/libps/220A1_all/ps/eudbg.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/eurrc.a b/ap/lib/libps/220A1_all/ps/eurrc.a
index e2092c1..f81c062 100644
--- a/ap/lib/libps/220A1_all/ps/eurrc.a
+++ b/ap/lib/libps/220A1_all/ps/eurrc.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/l1e.a b/ap/lib/libps/220A1_all/ps/l1e.a
index 6a75108..ea5b4b9 100644
--- a/ap/lib/libps/220A1_all/ps/l1e.a
+++ b/ap/lib/libps/220A1_all/ps/l1e.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/nas.a b/ap/lib/libps/220A1_all/ps/nas.a
index 068b29f..359e324 100644
--- a/ap/lib/libps/220A1_all/ps/nas.a
+++ b/ap/lib/libps/220A1_all/ps/nas.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/ul1t.a b/ap/lib/libps/220A1_all/ps/ul1t.a
index f59136f..942fee6 100644
--- a/ap/lib/libps/220A1_all/ps/ul1t.a
+++ b/ap/lib/libps/220A1_all/ps/ul1t.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/ul2_up.a b/ap/lib/libps/220A1_all/ps/ul2_up.a
index 2010f2d..47efe8f 100644
--- a/ap/lib/libps/220A1_all/ps/ul2_up.a
+++ b/ap/lib/libps/220A1_all/ps/ul2_up.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/urrc.a b/ap/lib/libps/220A1_all/ps/urrc.a
index e9f7545..68c6061 100644
--- a/ap/lib/libps/220A1_all/ps/urrc.a
+++ b/ap/lib/libps/220A1_all/ps/urrc.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/wl1w.a b/ap/lib/libps/220A1_all/ps/wl1w.a
index b1507bf..be3964f 100644
--- a/ap/lib/libps/220A1_all/ps/wl1w.a
+++ b/ap/lib/libps/220A1_all/ps/wl1w.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ps/wl2_up.a b/ap/lib/libps/220A1_all/ps/wl2_up.a
index 3485b62..63ec98d 100644
--- a/ap/lib/libps/220A1_all/ps/wl2_up.a
+++ b/ap/lib/libps/220A1_all/ps/wl2_up.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/psbase/base.a b/ap/lib/libps/220A1_all/psbase/base.a
index 1fc3ccd..f266f65 100644
--- a/ap/lib/libps/220A1_all/psbase/base.a
+++ b/ap/lib/libps/220A1_all/psbase/base.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ref/com.a b/ap/lib/libps/220A1_all/ref/com.a
index f8ebb20..fe03e6d 100644
--- a/ap/lib/libps/220A1_all/ref/com.a
+++ b/ap/lib/libps/220A1_all/ref/com.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/ref/ref_drv.a b/ap/lib/libps/220A1_all/ref/ref_drv.a
index 7a252a9..f7706d9 100644
--- a/ap/lib/libps/220A1_all/ref/ref_drv.a
+++ b/ap/lib/libps/220A1_all/ref/ref_drv.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/tools/tools.a b/ap/lib/libps/220A1_all/tools/tools.a
index cbcb460..46c2304 100644
--- a/ap/lib/libps/220A1_all/tools/tools.a
+++ b/ap/lib/libps/220A1_all/tools/tools.a
Binary files differ
diff --git a/ap/lib/libps/220A1_all/usat/usat.a b/ap/lib/libps/220A1_all/usat/usat.a
index dd071f9..ce3444e 100644
--- a/ap/lib/libps/220A1_all/usat/usat.a
+++ b/ap/lib/libps/220A1_all/usat/usat.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/amt/amt.a b/ap/lib/libps/220A1_vehicle_dc/amt/amt.a
index 0ff39bc..84cd78d 100644
--- a/ap/lib/libps/220A1_vehicle_dc/amt/amt.a
+++ b/ap/lib/libps/220A1_vehicle_dc/amt/amt.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/appstart/appstart.a b/ap/lib/libps/220A1_vehicle_dc/appstart/appstart.a
index 626edae..54cd910 100644
--- a/ap/lib/libps/220A1_vehicle_dc/appstart/appstart.a
+++ b/ap/lib/libps/220A1_vehicle_dc/appstart/appstart.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/drv/amr.a b/ap/lib/libps/220A1_vehicle_dc/drv/amr.a
index 7ef398a..fb294e6 100644
--- a/ap/lib/libps/220A1_vehicle_dc/drv/amr.a
+++ b/ap/lib/libps/220A1_vehicle_dc/drv/amr.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/drv/audio_base.a b/ap/lib/libps/220A1_vehicle_dc/drv/audio_base.a
index 00f1ae9..29b01db 100644
--- a/ap/lib/libps/220A1_vehicle_dc/drv/audio_base.a
+++ b/ap/lib/libps/220A1_vehicle_dc/drv/audio_base.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/drv/chip.a b/ap/lib/libps/220A1_vehicle_dc/drv/chip.a
index 6cc286c..273fe4b 100644
--- a/ap/lib/libps/220A1_vehicle_dc/drv/chip.a
+++ b/ap/lib/libps/220A1_vehicle_dc/drv/chip.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/drv/drv_sdk.a b/ap/lib/libps/220A1_vehicle_dc/drv/drv_sdk.a
index e666538..f99861a 100644
--- a/ap/lib/libps/220A1_vehicle_dc/drv/drv_sdk.a
+++ b/ap/lib/libps/220A1_vehicle_dc/drv/drv_sdk.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/drv/public.a b/ap/lib/libps/220A1_vehicle_dc/drv/public.a
index d688b1b..5532b38 100644
--- a/ap/lib/libps/220A1_vehicle_dc/drv/public.a
+++ b/ap/lib/libps/220A1_vehicle_dc/drv/public.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/drv/webrtc.a b/ap/lib/libps/220A1_vehicle_dc/drv/webrtc.a
index 833c1e1..cfff397 100644
--- a/ap/lib/libps/220A1_vehicle_dc/drv/webrtc.a
+++ b/ap/lib/libps/220A1_vehicle_dc/drv/webrtc.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/gsml1/dwddrv.a b/ap/lib/libps/220A1_vehicle_dc/gsml1/dwddrv.a
index 2d89451..3120415 100644
--- a/ap/lib/libps/220A1_vehicle_dc/gsml1/dwddrv.a
+++ b/ap/lib/libps/220A1_vehicle_dc/gsml1/dwddrv.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/gsml1/l1g.a b/ap/lib/libps/220A1_vehicle_dc/gsml1/l1g.a
index f7d0c58..be6decb 100644
--- a/ap/lib/libps/220A1_vehicle_dc/gsml1/l1g.a
+++ b/ap/lib/libps/220A1_vehicle_dc/gsml1/l1g.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/optee/optee_crypto.a b/ap/lib/libps/220A1_vehicle_dc/optee/optee_crypto.a
new file mode 100644
index 0000000..58da128
--- /dev/null
+++ b/ap/lib/libps/220A1_vehicle_dc/optee/optee_crypto.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/optee/optee_mbedtls.a b/ap/lib/libps/220A1_vehicle_dc/optee/optee_mbedtls.a
new file mode 100644
index 0000000..c5b1b85
--- /dev/null
+++ b/ap/lib/libps/220A1_vehicle_dc/optee/optee_mbedtls.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/optee/optee_ta.a b/ap/lib/libps/220A1_vehicle_dc/optee/optee_ta.a
new file mode 100644
index 0000000..3f3b602
--- /dev/null
+++ b/ap/lib/libps/220A1_vehicle_dc/optee/optee_ta.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/optee/optee_tee.a b/ap/lib/libps/220A1_vehicle_dc/optee/optee_tee.a
new file mode 100644
index 0000000..23351a2
--- /dev/null
+++ b/ap/lib/libps/220A1_vehicle_dc/optee/optee_tee.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/optee/optee_tomcrypt.a b/ap/lib/libps/220A1_vehicle_dc/optee/optee_tomcrypt.a
new file mode 100644
index 0000000..cd12b4d
--- /dev/null
+++ b/ap/lib/libps/220A1_vehicle_dc/optee/optee_tomcrypt.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/optee/optee_utee.a b/ap/lib/libps/220A1_vehicle_dc/optee/optee_utee.a
new file mode 100644
index 0000000..843f9ad
--- /dev/null
+++ b/ap/lib/libps/220A1_vehicle_dc/optee/optee_utee.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/optee/optee_utils.a b/ap/lib/libps/220A1_vehicle_dc/optee/optee_utils.a
new file mode 100644
index 0000000..b0b9f29
--- /dev/null
+++ b/ap/lib/libps/220A1_vehicle_dc/optee/optee_utils.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/phy/phy.a b/ap/lib/libps/220A1_vehicle_dc/phy/phy.a
index 8768a92..2a5a990 100644
--- a/ap/lib/libps/220A1_vehicle_dc/phy/phy.a
+++ b/ap/lib/libps/220A1_vehicle_dc/phy/phy.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_osa_linux.a b/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_osa_linux.a
index 78968bc..b6d7df2 100644
--- a/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_osa_linux.a
+++ b/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_osa_linux.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_psm.a b/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_psm.a
index 1ea275a..0efbccb 100644
--- a/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_psm.a
+++ b/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_psm.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_sup.a b/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_sup.a
index de4e73b..257cca0 100644
--- a/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_sup.a
+++ b/ap/lib/libps/220A1_vehicle_dc/plat/armv7-a/GCC/plat_sup.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/plat/plat_osa_linux.a b/ap/lib/libps/220A1_vehicle_dc/plat/plat_osa_linux.a
index 78968bc..b6d7df2 100644
--- a/ap/lib/libps/220A1_vehicle_dc/plat/plat_osa_linux.a
+++ b/ap/lib/libps/220A1_vehicle_dc/plat/plat_osa_linux.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/plat/plat_psm.a b/ap/lib/libps/220A1_vehicle_dc/plat/plat_psm.a
index 1ea275a..0efbccb 100644
--- a/ap/lib/libps/220A1_vehicle_dc/plat/plat_psm.a
+++ b/ap/lib/libps/220A1_vehicle_dc/plat/plat_psm.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/plat/plat_sup.a b/ap/lib/libps/220A1_vehicle_dc/plat/plat_sup.a
index de4e73b..257cca0 100644
--- a/ap/lib/libps/220A1_vehicle_dc/plat/plat_sup.a
+++ b/ap/lib/libps/220A1_vehicle_dc/plat/plat_sup.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/as_com.a b/ap/lib/libps/220A1_vehicle_dc/ps/as_com.a
index 6a116b0..db3b5c7 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/as_com.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/as_com.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/as_gsm.a b/ap/lib/libps/220A1_vehicle_dc/ps/as_gsm.a
index ba47da1..7caad11 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/as_gsm.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/as_gsm.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/ati.a b/ap/lib/libps/220A1_vehicle_dc/ps/ati.a
index 25f4c4c..5b20b5d 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/ati.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/ati.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/com.a b/ap/lib/libps/220A1_vehicle_dc/ps/com.a
index 7ebc15f..9355aa9 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/com.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/com.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/el2_up.a b/ap/lib/libps/220A1_vehicle_dc/ps/el2_up.a
index 99afdd3..c61b12a 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/el2_up.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/el2_up.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/eudbg.a b/ap/lib/libps/220A1_vehicle_dc/ps/eudbg.a
index 1d7f9c4..dad6901 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/eudbg.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/eudbg.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/eurrc.a b/ap/lib/libps/220A1_vehicle_dc/ps/eurrc.a
index 7b87f6d..a30e758 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/eurrc.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/eurrc.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/l1e.a b/ap/lib/libps/220A1_vehicle_dc/ps/l1e.a
index 2c8d624..7b3a6f1 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/l1e.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/l1e.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/nas.a b/ap/lib/libps/220A1_vehicle_dc/ps/nas.a
index 84ae344..870ff76 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/nas.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/nas.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/ul1t.a b/ap/lib/libps/220A1_vehicle_dc/ps/ul1t.a
index b854971..47fdecc 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/ul1t.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/ul1t.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/ul2_up.a b/ap/lib/libps/220A1_vehicle_dc/ps/ul2_up.a
index 644783e..3de3f9e 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/ul2_up.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/ul2_up.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/urrc.a b/ap/lib/libps/220A1_vehicle_dc/ps/urrc.a
index bcabc2d..e4df089 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/urrc.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/urrc.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/wl1w.a b/ap/lib/libps/220A1_vehicle_dc/ps/wl1w.a
index e4ba53c..bac80c8 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/wl1w.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/wl1w.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ps/wl2_up.a b/ap/lib/libps/220A1_vehicle_dc/ps/wl2_up.a
index 610514a..bdd6ab4 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ps/wl2_up.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ps/wl2_up.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/psbase/base.a b/ap/lib/libps/220A1_vehicle_dc/psbase/base.a
index 1f15bda..d0a4e02 100644
--- a/ap/lib/libps/220A1_vehicle_dc/psbase/base.a
+++ b/ap/lib/libps/220A1_vehicle_dc/psbase/base.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ref/com.a b/ap/lib/libps/220A1_vehicle_dc/ref/com.a
index bdefe4e..0d10194 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ref/com.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ref/com.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/ref/ref_drv.a b/ap/lib/libps/220A1_vehicle_dc/ref/ref_drv.a
index 119084e..5fd74e3 100644
--- a/ap/lib/libps/220A1_vehicle_dc/ref/ref_drv.a
+++ b/ap/lib/libps/220A1_vehicle_dc/ref/ref_drv.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/tools/tools.a b/ap/lib/libps/220A1_vehicle_dc/tools/tools.a
index 737164e..3ed7a85 100644
--- a/ap/lib/libps/220A1_vehicle_dc/tools/tools.a
+++ b/ap/lib/libps/220A1_vehicle_dc/tools/tools.a
Binary files differ
diff --git a/ap/lib/libps/220A1_vehicle_dc/usat/usat.a b/ap/lib/libps/220A1_vehicle_dc/usat/usat.a
index fa62f75..af46dfc 100644
--- a/ap/lib/libps/220A1_vehicle_dc/usat/usat.a
+++ b/ap/lib/libps/220A1_vehicle_dc/usat/usat.a
Binary files differ
diff --git a/ap/lib/libsoft_timer/libsoft_timer.a b/ap/lib/libsoft_timer/libsoft_timer.a
index 5928666..35fb679 100644
--- a/ap/lib/libsoft_timer/libsoft_timer.a
+++ b/ap/lib/libsoft_timer/libsoft_timer.a
Binary files differ
diff --git a/ap/lib/libsoft_timer/libsoft_timer.so b/ap/lib/libsoft_timer/libsoft_timer.so
index 1eca733..95dbf22 100755
--- a/ap/lib/libsoft_timer/libsoft_timer.so
+++ b/ap/lib/libsoft_timer/libsoft_timer.so
Binary files differ
diff --git a/ap/lib/libsoft_timer/libsoft_timer_sc.a b/ap/lib/libsoft_timer/libsoft_timer_sc.a
index 027e69c..7016a73 100644
--- a/ap/lib/libsoft_timer/libsoft_timer_sc.a
+++ b/ap/lib/libsoft_timer/libsoft_timer_sc.a
Binary files differ
diff --git a/ap/lib/libsoft_timer/libsoft_timer_sc.so b/ap/lib/libsoft_timer/libsoft_timer_sc.so
index 1f59c76..8a9d759 100755
--- a/ap/lib/libsoft_timer/libsoft_timer_sc.so
+++ b/ap/lib/libsoft_timer/libsoft_timer_sc.so
Binary files differ
diff --git a/ap/lib/libsoftap/netotherapi.c b/ap/lib/libsoftap/netotherapi.c
index c1d73ce..62edaaf 100755
--- a/ap/lib/libsoftap/netotherapi.c
+++ b/ap/lib/libsoftap/netotherapi.c
@@ -320,6 +320,35 @@
 			return 0;
 		}
 		break;
+	case TXERR:
+		if ((field = getField(semiColon, " ", 10))) {
+			errno = 0;
+			result_data_num = strtoull(field, NULL, 10);
+			if (errno == ERANGE)// kw ERRNO.NOT_CHECKED
+			{
+				printf("strtoull errno %d: %s\n", errno, strerror(errno));
+			}
+			if (result_data_num < 0 || result_data_num > LLONG_MAX-1)
+				result_data_num = 0;
+			*result_data = result_data_num;
+			
+			return 0; //kw 3
+		}
+		break;
+	case TXDROP:
+		if ((field = getField(semiColon, " ", 11))) {
+			errno = 0;
+			result_data_num = strtoull(field, NULL, 10);
+			if (errno == ERANGE)// kw ERRNO.NOT_CHECKED
+			{
+				printf("strtoull errno %d: %s\n", errno, strerror(errno));
+			}
+			if (result_data_num < 0 || result_data_num > LLONG_MAX-1)
+				result_data_num = 0;
+			*result_data = result_data_num;
+			return 0;
+		}
+		break;
 	case RXBYTE:
 		if ((field = getField(semiColon, " ", 0))) {
 			errno = 0;
@@ -349,6 +378,34 @@
 			return 0;
 		}
 		break;
+	case RXERR:
+		if ((field = getField(semiColon, " ", 2))) {
+			errno = 0;
+			result_data_num = strtoull(field, NULL, 10);
+			if (errno == ERANGE)// kw ERRNO.NOT_CHECKED
+			{
+				printf("strtoull errno %d: %s\n", errno, strerror(errno));
+			}
+			if (result_data_num < 0 || result_data_num > LLONG_MAX-1)
+				result_data_num = 0;
+			*result_data = result_data_num;
+			return 0;
+		}
+		break;
+	case RXDROP:
+		if ((field = getField(semiColon, " ", 3))) {
+			errno = 0;
+			result_data_num = strtoull(field, NULL, 10);
+			if (errno == ERANGE)// kw ERRNO.NOT_CHECKED
+			{
+				printf("strtoull errno %d: %s\n", errno, strerror(errno));
+			}
+			if (result_data_num < 0 || result_data_num > LLONG_MAX-1)
+				result_data_num = 0;
+			*result_data = result_data_num;
+			return 0;
+		}
+		break;
 	}
 	return -1;
 }
diff --git a/ap/lib/libtinyalsa/audio_mixer_ctrl.c b/ap/lib/libtinyalsa/audio_mixer_ctrl.c
index c4ffb76..3ec6fe3 100755
--- a/ap/lib/libtinyalsa/audio_mixer_ctrl.c
+++ b/ap/lib/libtinyalsa/audio_mixer_ctrl.c
@@ -1718,7 +1718,7 @@
     string = mixer_ctl_get_enum_string(ctl, val);	
 
 	if(string == NULL){
-		fprintf(stderr, "Invalid string=%d\n",string);
+		fprintf(stderr, "err, string is NULL \n");
 		return -2;		
 	}
 	printf("%s: string=%s !\n",__func__,string);
diff --git a/ap/lib/libtinyalsa/tinyalsa_voice_ref.c b/ap/lib/libtinyalsa/tinyalsa_voice_ref.c
index 3e4923b..9cdc264 100644
--- a/ap/lib/libtinyalsa/tinyalsa_voice_ref.c
+++ b/ap/lib/libtinyalsa/tinyalsa_voice_ref.c
@@ -33,7 +33,7 @@
 	voice_mixer = mixer_open(0);

 	if(!voice_mixer)

 	{

-		printf("zte voice_mixer open failed!");

+		printf("voice_mixer open failed!");

 		goto err_ret;

 	}

 

@@ -60,26 +60,26 @@
 	voicePcmOut = pcm_open(0, 1, PCM_OUT, &config_voice);

 	if(!voicePcmOut || !pcm_is_ready(voicePcmOut))

 	{

-		printf( "zte voicePcmOut open failed!");	

+		printf( "voicePcmOut open failed!");	

 		goto err_ret;

 	}

 	

 	voicePcmIn = pcm_open(0, 1, PCM_IN, &config_voice);

 	if(!voicePcmIn || !pcm_is_ready(voicePcmIn))

 	{

-		printf( "zte voicePcmIn open failed!");

+		printf( "voicePcmIn open failed!");

 		goto err_ret;

 	}

 	

     if(0 != pcm_prepare(voicePcmOut)) 

 	{

-		printf("zte voicePcmOut pcm_prepare failed!");

+		printf("voicePcmOut pcm_prepare failed!");

 		goto err_ret;

 	}

 		

     if(0 != pcm_prepare(voicePcmIn)) 

 	{

-		printf("zte voicePcmIn pcm_prepare failed!");

+		printf("voicePcmIn pcm_prepare failed!");

 		goto err_ret;

 	}

 	return 0;

diff --git a/ap/lib/libupi_ab/libupi_ab.a b/ap/lib/libupi_ab/libupi_ab.a
index be2d42a..e7fac0f 100644
--- a/ap/lib/libupi_ab/libupi_ab.a
+++ b/ap/lib/libupi_ab/libupi_ab.a
Binary files differ
diff --git a/ap/lib/libupi_ab/libupi_ab.so b/ap/lib/libupi_ab/libupi_ab.so
index 5435c24..4047d48 100755
--- a/ap/lib/libupi_ab/libupi_ab.so
+++ b/ap/lib/libupi_ab/libupi_ab.so
Binary files differ
diff --git a/ap/lib/libvoice/Makefile b/ap/lib/libvoice/Makefile
index 31a4d66..a7f371a 100644
--- a/ap/lib/libvoice/Makefile
+++ b/ap/lib/libvoice/Makefile
@@ -54,7 +54,7 @@
 # objects

 #*******************************************************************************

 ifeq ($(USE_VOICE_ALSA),yes)

-voiceipc_OBJECTS += voice_api.o voiceipc.o

+voiceipc_OBJECTS += alsa_call.o voice_api.o voiceipc.o

 endif

 

 

@@ -69,6 +69,9 @@
 SHAREDFLAG := -shared -lc

 LDLIBS += -L$(LIB_DIR)/libtinyalsa

 LDLIBS += -ltinyalsa

+LDLIBS  += -lnvram_sc -L$(zte_lib_path)/libnvram

+LDLIBS  += -lsoftap -L$(zte_lib_path)/libsoftap

+LDLIBS  += -lsoft_timer_sc -L$(zte_lib_path)/libsoft_timer

 

 ifeq ($(USE_VOICE_ALSA),yes)

 all: $(LIB_STATIC) $(LIB_SHARED) $(EXEC_voiceipc)

diff --git a/ap/lib/libvoice/include/voice_ipc.h b/ap/lib/libvoice/include/voice_ipc.h
index abe83b2..3b58efb 100755
--- a/ap/lib/libvoice/include/voice_ipc.h
+++ b/ap/lib/libvoice/include/voice_ipc.h
@@ -1,4 +1,5 @@
 #ifdef USE_CAP_SUPPORT

+#include "message.h"

 

 #define VOICEIPC_OK 0

 #define VOICEIPC_ERROR -1

@@ -10,7 +11,7 @@
 #define VOICE_HEAD_LEN (2 * sizeof(int))

 #define VOICE_CONTROL_MAX_LEN 32

 

-enum  voice_ipc_func_type {

+enum  voice_ipc_func_type{

 	IPC_SET_VOICE_DEVICE_MODE = 0,

     IPC_GET_VOICE_DEVICE_MODE = 1,

     IPC_SET_RX_VOICE_VOL = 2,

@@ -23,30 +24,57 @@
     IPC_GET_RX_VOICE_MUTE_STATE = 9,

     IPC_SET_LOOPBACK_ENABLE_STATE = 10,

     IPC_GET_LOOPBACK_ENABLE_STATE = 11,

+    IPC_AP_ALSA_VOICE_OPEN = 12,

+    IPC_AP_ALSA_VOICE_CLOSE = 13,

+    IPC_CAP_ALSA_VOICE_OPEN = 14,

+    IPC_CAP_ALSA_VOICE_CLOSE = 15,

 

     IPC_VOICE_FUNC_MAX

 };

 

-typedef struct {

+enum  voice_msg_cmd{

+    MSG_CMD_CAP_VALSA_OPEN = MSG_CMD_VOICE_BASE + 0x0, //37070

+    MSG_CMD_CAP_VALSA_CLOSE

+};

+

+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);

+//msg

+int cap_alsa_voice_open(int vmode);

+int cap_alsa_voice_close(int vmode);

+int recv_msg_proc(MSG_BUF msg);

+void recv_cap_voice_alsa(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);

+//voice ipc interface

+int voice_ipc_init(void);

+int Voice_Ctrl_Rpmsg_Send(int func_id, int *msg);

+void Voice_Ctrl_Rpmsg_Recv(void);

+void voice_ipc_recv_proc(voice_ipc_control_msg msg);

+

+//send message to cap

+int ipc_cap_alsa_voice_open(int vmode);

+int ipc_cap_alsa_voice_close(int vmode);

+

+//receive message from cap

+void ipc_set_voice_device_mode_rcv(voice_ipc_control_msg msg);

+void ipc_get_voice_device_mode_rcv(voice_ipc_control_msg msg);

+void ipc_set_rx_voice_vol_rcv(voice_ipc_control_msg msg);

+void ipc_get_rx_voice_vol_rcv(voice_ipc_control_msg msg);

+void ipc_set_tx_voice_vol_rcv(voice_ipc_control_msg msg);

+void ipc_get_tx_voice_vol_rcv(voice_ipc_control_msg msg);

+void ipc_set_tx_voice_mute_state_rcv(voice_ipc_control_msg msg);

+void ipc_get_tx_voice_mute_state_rcv(voice_ipc_control_msg msg);

+void ipc_set_rx_voice_mute_state_rcv(voice_ipc_control_msg msg);

+void ipc_get_rx_voice_mute_state_rcv(voice_ipc_control_msg msg);

+void ipc_set_loopback_enable_state_rcv(voice_ipc_control_msg msg);

+void ipc_get_loopback_enable_state_rcv(voice_ipc_control_msg msg);

+#ifdef _USE_VOICE_ALSA

+void ipc_ap_alsa_voice_open_rcv(voice_ipc_control_msg msg);

+void ipc_ap_alsa_voice_close_rcv(voice_ipc_control_msg msg);

+#endif

 

 #endif

diff --git a/ap/lib/libvoice/include/voice_lib.h b/ap/lib/libvoice/include/voice_lib.h
index 6788b77..572592e 100644
--- a/ap/lib/libvoice/include/voice_lib.h
+++ b/ap/lib/libvoice/include/voice_lib.h
@@ -15,7 +15,7 @@
 #define AVOICE_4G_DEV_NUM 1
 #define AVOICE_5G_DEV_NUM 1
 
-#ifdef _USE_VOICE_ALSA
+
 
 
  typedef enum
@@ -29,6 +29,7 @@
 	 AVOICE_5G_WB,		 
 	 MAX_AVOICE_MODE			   
  }T_Alsa_Voice_Mode;
+#ifdef _USE_VOICE_ALSA	 
 int alsa_voice_open(int vmode);
 int alsa_voice_close(int vmode);
 
diff --git a/ap/lib/libvoice/voice.c b/ap/lib/libvoice/voice.c
index fbc8bf1..33b3bed 100644
--- a/ap/lib/libvoice/voice.c
+++ b/ap/lib/libvoice/voice.c
@@ -23,6 +23,8 @@
 #include <fcntl.h>

 #include <tinyalsa/audio_mixer_ctrl.h>

 #include "voice_lib.h"

+#include "voice_ipc.h"

+

 

 

 #define VOICE_DEV_NAME "/dev/voice_device"

@@ -197,12 +199,15 @@
 

 }

 

+static T_ZDrvVoice_Cfg s_cfgParam = {0};

+static int cur_vmode = MAX_AVOICE_MODE;

+

 int zDrvVolte_PreOpen(T_ZDrvVolte_Cfg *cfgParam)

 {

 

-

 	struct mixer *voice_mixer = NULL;

 	struct pcm_config config_voice = {0};

+	int ret = 0;

 	printf(" voice lib zDrvVolte_PreOpen!\n");

 

 	if (slic_flag_already == 1) {

@@ -218,17 +223,44 @@
 			return 0;

 		}

 	}

-#ifdef _ALSA_CODEC_IN_CAP

+#if defined(_ALSA_CODEC_IN_CAP) && defined(_USE_ALSA_AT_INTF)

 

-		printf("%s: i2s and codec not need config,return!\n",__func__);	

-		return 0;

+   

+	   printf("%s: i2s and codec not need config,return!\n",__func__); 

+	   return 0;

+

+#elif defined(_ALSA_CODEC_IN_CAP)

+

+

+	   if(cfgParam->clock_rate == 8000){

+

+		    ret = cap_alsa_voice_open(AVOICE_4G_NB);

+			printf("%s:cap_alsa_voice_open clock_rate(%d) ret=%d!\n",__func__,cfgParam->clock_rate,ret); 

+	        cur_vmode = AVOICE_4G_NB;

+

+	   }

+	   else if(cfgParam->clock_rate == 16000){

+

+		   ret = cap_alsa_voice_open(AVOICE_4G_WB);

+		   printf("%s:cap_alsa_voice_open clock_rate(%d) ret=%d!\n",__func__,cfgParam->clock_rate,ret);	

+	        cur_vmode = AVOICE_4G_WB;

+	   }

+	   else{

+

+		   printf("%s:cap_alsa_voice_open clock_rate(%d) not support!\n",__func__,cfgParam->clock_rate);	

+		   return -2;

+

+	   }

+	   s_cfgParam = *cfgParam;

+	   return ret;

+    

 #endif

 

 

 	//open mixer dev for codec control

 	voice_mixer = mixer_open(0);

 	if (!voice_mixer) {

-		printf("zte voice_mixer open failed!\n");

+		printf("voice_mixer open failed!\n");

 		return -1;

 	}

 

@@ -254,23 +286,23 @@
 	//23G card 0 dev 2

 	volte_pcm_voice_out = pcm_open(0, 1, PCM_OUT, &config_voice);

 	if (!pcm_is_ready(volte_pcm_voice_out)) {

-		printf("zte volte_pcm_voice_out open failed!\n");

+		printf("volte_pcm_voice_out open failed!\n");

 		goto err_ret;

 	}

 

 	volte_pcm_voice_in = pcm_open(0, 1, PCM_IN, &config_voice);

 	if (!pcm_is_ready(volte_pcm_voice_in)) {

-		printf("zte volte_pcm_voice_in open failed!\n");

+		printf("volte_pcm_voice_in open failed!\n");

 		goto err_ret;

 	}

 

 	if (0 != pcm_prepare(volte_pcm_voice_out)) {

-		printf("zte volte_pcm_voice_out pcm_prepare failed!\n");

+		printf("volte_pcm_voice_out pcm_prepare failed!\n");

 		goto err_ret;

 	}

 

 	if (0 != pcm_prepare(volte_pcm_voice_in)) {

-		printf("zte volte_pcm_voice_in pcm_prepare failed!\n");

+		printf("volte_pcm_voice_in pcm_prepare failed!\n");

 		goto err_ret;

 	}

 	return 0;

@@ -289,25 +321,49 @@
 

 void zDrvVolte_PreClose(void)

 {

+	int ret = 0;

 

 	printf(" voice lib zDrvVolte_PreClose!\n");

 

 	if (slic_flag_already == 1) {

 		printf(" voice  slic flag already get, slic_flag=%d!\n", slic_flag);

 		if (slic_flag == 1) {

-			return ;

+			return;

 		}

 

 	} else {

 		slic_flag = voice_GetSlicFlag();

 		printf(" voice  slic flag  get, slic_flag=%d!\n", slic_flag);

 		if (slic_flag == 1) {

-			return ;

+			return;

 		}

 	}

-#ifdef _ALSA_CODEC_IN_CAP

+#if defined(_ALSA_CODEC_IN_CAP) && defined(_USE_ALSA_AT_INTF)

+	

 		printf("%s: i2s and codec not need config,return!\n",__func__); 

 		return ;

+#elif defined(_ALSA_CODEC_IN_CAP)

+		if(s_cfgParam.clock_rate == 8000){

+		

+			 ret = cap_alsa_voice_close(AVOICE_4G_NB);

+			 printf("%s:cap_alsa_voice_close clock_rate(%d) ret=%d!\n",__func__,s_cfgParam.clock_rate,ret); 

+		

+		}

+		else if(s_cfgParam.clock_rate == 16000){

+		

+			ret = cap_alsa_voice_close(AVOICE_4G_WB);

+			printf("%s:cap_alsa_voice_close clock_rate(%d) ret=%d!\n",__func__,s_cfgParam.clock_rate,ret); 

+		

+		}

+		else{

+		

+			printf("%s:cap_alsa_voice_close clock_rate(%d) not support!\n",__func__,s_cfgParam.clock_rate);	 

+		

+		}

+		return;

+

+

+

 #endif

 

 

diff --git a/ap/lib/libvoice/voice_api.c b/ap/lib/libvoice/voice_api.c
index e6262fb..ba07e83 100755
--- a/ap/lib/libvoice/voice_api.c
+++ b/ap/lib/libvoice/voice_api.c
@@ -122,6 +122,7 @@
 

 int sc_audio_get_voice_device_mode(int *p_dev_mode)

 {

+    int ret = 0;

 	struct mixer *voice_mixer = NULL;

 	printf("%s: start!\n",__func__);

 

@@ -138,7 +139,7 @@
 	

 	if((*p_dev_mode < T_OUTPUT_HANDSET ) ||(*p_dev_mode >= T_OUTPUT_MAX)){

 		printf("%s: dev_mode not support, *p_dev_mode=%d!\n",__func__, *p_dev_mode);

-		//return -1;

+		ret = -1;

 	}

 	printf("%s: start *p_dev_mode=%d!\n",__func__, *p_dev_mode);

 

@@ -146,7 +147,7 @@
 	mixer_close(voice_mixer);

 	voice_mixer = NULL;

 

-	return 0;

+	return ret;

 	

 }

 

@@ -187,6 +188,7 @@
 

 int sc_audio_get_rx_voice_vol(int     * p_vol)

 {

+    int ret = 0;

 	struct mixer *voice_mixer = NULL;

 

 	printf("%s: start!\n",__func__);

@@ -204,7 +206,7 @@
 

 	if ((*p_vol < 0 ) ||(*p_vol > 11)){

 		printf("%s: vol not support, *p_vol=%d!\n",__func__, *p_vol);

-		//return -1;

+		ret = -1;

 	}

 	printf("%s:  *p_vol=%d!\n",__func__, *p_vol);

 

@@ -213,7 +215,7 @@
 	voice_mixer = NULL;

 

 

-	return 0;

+	return ret;

 

 	

 	

@@ -255,6 +257,7 @@
 

 int sc_audio_get_tx_voice_vol(int  *p_vol)

 {

+    int ret = 0;

 	struct mixer *voice_mixer = NULL;

 	printf("%s: start!\n",__func__);

 

@@ -272,14 +275,14 @@
 

 	if((*p_vol < 0 ) ||(*p_vol > 5)){

 		printf("%s: vol not support, *p_vol=%d!\n",__func__, *p_vol);

-		//return -1;

+		ret = -1;

 	}

 	printf("%s:  *p_vol=%d!\n",__func__, *p_vol);

 

 	//close mixer

 	mixer_close(voice_mixer);

 	voice_mixer = NULL;	

-    return 0;	

+    return ret;	

 }

 

 

@@ -313,6 +316,7 @@
 

 int sc_audio_get_tx_voice_mute_state(int *p_mute)

 {

+    int ret = 0;

 	struct mixer *voice_mixer = NULL;

 

 	printf("%s: start!\n",__func__);

@@ -330,10 +334,8 @@
 

 	if((*p_mute != 0 ) &&(*p_mute != 1)) {

 		printf("%s: *p_mute not support, *p_mute=%d!\n",__func__, *p_mute);

-		//close mixer

-	    mixer_close(voice_mixer);

-	    voice_mixer = NULL;	

-		return -1;

+			

+		ret = -1;

 	}

 	printf("%s:  *p_mute=%d!\n",__func__, *p_mute);

 

@@ -341,7 +343,7 @@
 	mixer_close(voice_mixer);

 	voice_mixer = NULL;	

 

-    return 0;

+    return ret;

 }

 

 

@@ -378,7 +380,9 @@
 }

 

 

-int sc_audio_get_rx_voice_mute_state(int *p_mute){

+int sc_audio_get_rx_voice_mute_state(int *p_mute)

+{

+    int ret = 0;

 	struct mixer *voice_mixer = NULL;

 

 	printf("%s: start!\n",__func__);

@@ -396,10 +400,7 @@
 	if((*p_mute != 0 ) &&(*p_mute != 1)) {

 

 		printf("%s: *p_mute not support, *p_mute=%d!\n",__func__, *p_mute);

-		//close mixer

-	    mixer_close(voice_mixer);

-	    voice_mixer = NULL;

-		return -1;

+		ret = -1;

 	}

 	printf("%s:  *p_mute=%d!\n",__func__, *p_mute);

 

@@ -407,7 +408,7 @@
 	mixer_close(voice_mixer);

 	voice_mixer = NULL;	

 

-    return 0;

+    return ret;

 

 }

 

diff --git a/ap/lib/libvoice/voiceipc.c b/ap/lib/libvoice/voiceipc.c
index 198fe19..998d7a5 100755
--- a/ap/lib/libvoice/voiceipc.c
+++ b/ap/lib/libvoice/voiceipc.c
@@ -7,7 +7,10 @@
 #include <sys/ioctl.h>

 #include <fcntl.h>

 #include "voice_ipc.h"

+#include "voice_lib.h"

 #include "linux/rpmsg_zx29.h"

+#include "softap_api.h"

+#include "pthread.h"

 

 extern int sc_audio_set_voice_device_mode(int dev_mode);

 extern int sc_audio_get_voice_device_mode(int *p_dev_mode);

@@ -22,10 +25,148 @@
 extern int sc_audio_set_loopback_enable_state(int enable);

 extern int sc_audio_get_loopback_enable_state(int *p_enable);

 

-int voice_ipc_fd = -1;

-voice_ipc_control_msg voice_ctrl_recvmsg[IPC_VOICE_FUNC_MAX] = {0};

+static int voice_ipc_fd = -1;

+static voice_ipc_control_msg voice_ctrl_recvmsg[IPC_VOICE_FUNC_MAX] = {0};

 

-void ipc_set_voice_device_mode(voice_ipc_control_msg msg)

+int cap_alsa_voice_open(int vmode)

+{

+    int ret = 0;

+    int msg_handle = 0;

+	MSG_BUF msg;

+	LONG msg_size =  sizeof(MSG_BUF)-sizeof(LONG);

+    int module_id = MODULE_ID_VOICE_CLIENT;

+    int dst_id = MODULE_ID_VOICE_SERVER;

+    int msg_cmd = MSG_CMD_CAP_VALSA_OPEN;

+

+    //´´½¨ÏûÏ¢¶ÓÁÐ

+	msg_handle = msgget(module_id, IPC_CREAT|0600);

+    

+    //·¢ËÍÏûÏ¢

+    ret = ipc_send_message(module_id, dst_id, msg_cmd, sizeof(int), (unsigned char *)(&vmode), 0);

+    if(0 != ret){

+        printf("%s: send msg error(%d)!\n", __func__, ret);

+        msgctl(msg_handle,IPC_RMID,0);

+        return ret;

+    }

+    printf("%s: send msg success(%d)!\n", __func__, ret);

+    

+    //½ÓÊÕÏûÏ¢

+    while(1)

+	{

+		memset(&msg, 0x00, sizeof(MSG_BUF));

+

+		//»ñÈ¡ÏûÏ¢¶ÓÁÐÏûÏ¢²¢´¦Àí

+		ret = msgrcv(msg_handle, &msg, msg_size, 0, 0);

+        if(0 > ret){

+            continue;

+        }

+

+        //Æ¥Åäµ½ÊÇMSG_CMD_CAP_VALSA_OPENʱ²Å´¦Àí

+        if(msg_cmd == msg.usMsgCmd){

+            ret = *((int *)msg.aucDataBuf);

+            msgctl(msg_handle,IPC_RMID,0);

+            printf("%s: receive msg success(%d)!\n", __func__, ret);

+            break;

+        }

+	}

+

+    return ret;

+}

+

+int cap_alsa_voice_close(int vmode)

+{

+    int ret = 0;

+    int msg_handle = 0;

+	MSG_BUF msg;

+	LONG msg_size =  sizeof(MSG_BUF)-sizeof(LONG);

+    int module_id = MODULE_ID_VOICE_CLIENT;

+    int dst_id = MODULE_ID_VOICE_SERVER;

+    int msg_cmd = MSG_CMD_CAP_VALSA_CLOSE;

+

+    //´´½¨ÏûÏ¢¶ÓÁÐ

+	msg_handle = msgget(module_id, IPC_CREAT|0600);

+    

+    //·¢ËÍÏûÏ¢

+    ret = ipc_send_message(module_id, dst_id, msg_cmd, sizeof(int), (unsigned char *)(&vmode), 0);

+    if(0 != ret){

+        printf("%s: send msg error(%d)!\n", __func__, ret);

+        msgctl(msg_handle,IPC_RMID,0);

+        return ret;

+    }

+    printf("%s: send msg success(%d)!\n", __func__, ret);

+

+    //½ÓÊÕÏûÏ¢

+    while(1)

+	{

+		memset(&msg, 0x00, sizeof(MSG_BUF));

+

+		//»ñÈ¡ÏûÏ¢¶ÓÁÐÏûÏ¢²¢´¦Àí

+		ret = msgrcv(msg_handle, &msg, msg_size, 0, 0);

+        if(0 > ret){

+            continue;

+        }

+

+        //Æ¥Åäµ½ÊÇMSG_CMD_CAP_VALSA_CLOSEʱ²Å´¦Àí

+        if(msg_cmd == msg.usMsgCmd){

+            ret = *((int *)msg.aucDataBuf);

+            msgctl(msg_handle,IPC_RMID,0);

+            printf("%s: receive msg success(%d)!\n", __func__, ret);

+            break;

+        }

+	}

+

+    return ret;

+}

+

+int ipc_cap_alsa_voice_open(int vmode)

+{

+    int ret = 0;

+    int func_id = IPC_CAP_ALSA_VOICE_OPEN;

+    voice_ctrl_recvmsg[func_id].func_id = VOICE_WAIT_MSG_FROM_CAP;

+

+    ret = Voice_Ctrl_Rpmsg_Send(func_id, &vmode);

+    

+    if (0 >= ret){

+		printf("%s: Voice_Ctrl_Rpmsg_Send error, return %d!\n", __func__, ret);

+		return VOICEIPC_ERROR;

+	}

+    printf("%s: Voice_Ctrl_Rpmsg_Send success, write_len=%d!\n", __func__, ret);

+    

+    while(func_id != voice_ctrl_recvmsg[func_id].func_id){

+        usleep(1);

+    }

+    

+    memcpy(&ret, voice_ctrl_recvmsg[func_id].param, voice_ctrl_recvmsg[func_id].param_len);

+    printf("%s: ipc receive success, ret=%d!\n", __func__, ret);

+

+    return ret;

+}

+

+int ipc_cap_alsa_voice_close(int vmode)

+{

+    int ret = 0;

+    int func_id = IPC_CAP_ALSA_VOICE_CLOSE;

+    voice_ctrl_recvmsg[func_id].func_id = VOICE_WAIT_MSG_FROM_CAP;

+    

+    ret = Voice_Ctrl_Rpmsg_Send(func_id, &vmode);

+    

+    if (0 >= ret){

+		printf("%s: Voice_Ctrl_Rpmsg_Send error, return %d!\n", __func__, ret);

+		return VOICEIPC_ERROR;

+	}

+    printf("%s: Voice_Ctrl_Rpmsg_Send success, write_len=%d!\n", __func__, ret);

+

+    while(func_id != voice_ctrl_recvmsg[func_id].func_id){

+        usleep(1);

+    }

+

+    memcpy(&ret, voice_ctrl_recvmsg[func_id].param, voice_ctrl_recvmsg[func_id].param_len);

+    printf("%s: ipc receive success, ret=%d!\n", __func__, ret);

+

+    return ret;

+}

+

+void ipc_set_voice_device_mode_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -47,7 +188,7 @@
 	}

 }

 

-void ipc_get_voice_device_mode(voice_ipc_control_msg msg)

+void ipc_get_voice_device_mode_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -58,7 +199,10 @@
 	

     //msg.func_id不变

     msg.param_len = sizeof(int);

-    memcpy(msg.param, &ret, msg.param_len);

+    if(0 == ret)

+        memcpy(msg.param, p_dev_mode, msg.param_len);

+    else

+        memcpy(msg.param, &ret, msg.param_len);

     msg_len = VOICE_HEAD_LEN + msg.param_len;

 

     ret = write(voice_ipc_fd, &msg, msg_len);

@@ -68,7 +212,7 @@
 	}

 }

 

-void ipc_set_rx_voice_vol(voice_ipc_control_msg msg)

+void ipc_set_rx_voice_vol_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -90,7 +234,7 @@
 	}

 }

 

-void ipc_get_rx_voice_vol(voice_ipc_control_msg msg)

+void ipc_get_rx_voice_vol_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -101,7 +245,10 @@
 	

     //msg.func_id不变

     msg.param_len = sizeof(int);

-    memcpy(msg.param, &ret, msg.param_len);

+    if(0 == ret)

+        memcpy(msg.param, p_vol, msg.param_len);

+    else

+        memcpy(msg.param, &ret, msg.param_len);

     msg_len = VOICE_HEAD_LEN + msg.param_len;

 

     ret = write(voice_ipc_fd, &msg, msg_len);

@@ -111,7 +258,7 @@
 	}

 }

 

-void ipc_set_tx_voice_vol(voice_ipc_control_msg msg)

+void ipc_set_tx_voice_vol_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -133,7 +280,7 @@
 	}

 }

 

-void ipc_get_tx_voice_vol(voice_ipc_control_msg msg)

+void ipc_get_tx_voice_vol_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -144,7 +291,10 @@
 	

     //msg.func_id不变

     msg.param_len = sizeof(int);

-    memcpy(msg.param, &ret, msg.param_len);

+    if(0 == ret)

+        memcpy(msg.param, p_vol, msg.param_len);

+    else

+        memcpy(msg.param, &ret, msg.param_len);

     msg_len = VOICE_HEAD_LEN + msg.param_len;

 

     ret = write(voice_ipc_fd, &msg, msg_len);

@@ -154,7 +304,7 @@
 	}

 }

 

-void ipc_set_tx_voice_mute_state(voice_ipc_control_msg msg)

+void ipc_set_tx_voice_mute_state_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -176,7 +326,7 @@
 	}

 }

 

-void ipc_get_tx_voice_mute_state(voice_ipc_control_msg msg)

+void ipc_get_tx_voice_mute_state_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -187,7 +337,10 @@
 	

     //msg.func_id不变

     msg.param_len = sizeof(int);

-    memcpy(msg.param, &ret, msg.param_len);

+    if(0 == ret)

+        memcpy(msg.param, p_mute, msg.param_len);

+    else

+        memcpy(msg.param, &ret, msg.param_len);

     msg_len = VOICE_HEAD_LEN + msg.param_len;

 

     ret = write(voice_ipc_fd, &msg, msg_len);

@@ -197,7 +350,7 @@
 	}

 }

 

-void ipc_set_rx_voice_mute_state(voice_ipc_control_msg msg)

+void ipc_set_rx_voice_mute_state_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -219,7 +372,7 @@
 	}

 }

 

-void ipc_get_rx_voice_mute_state(voice_ipc_control_msg msg)

+void ipc_get_rx_voice_mute_state_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -230,7 +383,10 @@
 	

     //msg.func_id不变

     msg.param_len = sizeof(int);

-    memcpy(msg.param, &ret, msg.param_len);

+    if(0 == ret)

+        memcpy(msg.param, p_mute, msg.param_len);

+    else

+        memcpy(msg.param, &ret, msg.param_len);

     msg_len = VOICE_HEAD_LEN + msg.param_len;

 

     ret = write(voice_ipc_fd, &msg, msg_len);

@@ -240,7 +396,7 @@
 	}

 }

 

-void ipc_set_loopback_enable_state(voice_ipc_control_msg msg)

+void ipc_set_loopback_enable_state_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -262,7 +418,7 @@
 	}

 }

 

-void ipc_get_loopback_enable_state(voice_ipc_control_msg msg)

+void ipc_get_loopback_enable_state_rcv(voice_ipc_control_msg msg)

 {

     int ret = VOICEIPC_OK;

     int msg_len = 0;

@@ -273,6 +429,31 @@
 	

     //msg.func_id不变

     msg.param_len = sizeof(int);

+    if(0 == ret)

+        memcpy(msg.param, p_enable, msg.param_len);

+    else

+        memcpy(msg.param, &ret, msg.param_len);

+    msg_len = VOICE_HEAD_LEN + msg.param_len;

+

+    ret = write(voice_ipc_fd, &msg, msg_len);

+    

+    if (0 >= ret){

+		printf("%s: write error(%d)!\n", __func__, ret);

+	}

+}

+

+#ifdef _USE_VOICE_ALSA

+void ipc_ap_alsa_voice_open_rcv(voice_ipc_control_msg msg)

+{

+    int ret = VOICEIPC_OK;

+    int msg_len = 0;

+    int vmode = 0;

+

+    vmode = *((int *)msg.param);

+    ret = alsa_voice_open(vmode);

+	

+    //msg.func_id不变

+    msg.param_len = sizeof(int);

     memcpy(msg.param, &ret, msg.param_len);

     msg_len = VOICE_HEAD_LEN + msg.param_len;

 

@@ -283,48 +464,77 @@
 	}

 }

 

-void voice_msg_proc(voice_ipc_control_msg msg)

+void ipc_ap_alsa_voice_close_rcv(voice_ipc_control_msg msg)

+{

+    int ret = VOICEIPC_OK;

+    int msg_len = 0;

+    int vmode = 0;

+

+    vmode = *((int *)msg.param);

+    ret = alsa_voice_close(vmode);

+	

+    //msg.func_id不变

+    msg.param_len = sizeof(int);

+    memcpy(msg.param, &ret, msg.param_len);

+    msg_len = VOICE_HEAD_LEN + msg.param_len;

+

+    ret = write(voice_ipc_fd, &msg, msg_len);

+    

+    if (0 >= ret){

+		printf("%s: write error(%d)!\n", __func__, ret);

+	}

+}

+#endif

+

+void voice_ipc_recv_proc(voice_ipc_control_msg msg)

 {

 	switch(msg.func_id){

 		case IPC_SET_VOICE_DEVICE_MODE:

-			ipc_set_voice_device_mode(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_set_voice_device_mode_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

 		case IPC_GET_VOICE_DEVICE_MODE:

-			ipc_get_voice_device_mode(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_get_voice_device_mode_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

         case IPC_SET_RX_VOICE_VOL:

-			ipc_set_rx_voice_vol(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_set_rx_voice_vol_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

         case IPC_GET_RX_VOICE_VOL:

-			ipc_get_rx_voice_vol(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_get_rx_voice_vol_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

         case IPC_SET_TX_VOICE_VOL:

-			ipc_set_tx_voice_vol(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_set_tx_voice_vol_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

         case IPC_GET_TX_VOICE_VOL:

-			ipc_get_tx_voice_vol(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_get_tx_voice_vol_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

         case IPC_SET_TX_VOICE_MUTE_STATE:

-			ipc_set_tx_voice_mute_state(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_set_tx_voice_mute_state_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

         case IPC_GET_TX_VOICE_MUTE_STATE:

-			ipc_get_tx_voice_mute_state(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_get_tx_voice_mute_state_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

         case IPC_SET_RX_VOICE_MUTE_STATE:

-			ipc_set_rx_voice_mute_state(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_set_rx_voice_mute_state_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

         case IPC_GET_RX_VOICE_MUTE_STATE:

-			ipc_get_rx_voice_mute_state(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_get_rx_voice_mute_state_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

         case IPC_SET_LOOPBACK_ENABLE_STATE:

-			ipc_set_loopback_enable_state(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_set_loopback_enable_state_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

         case IPC_GET_LOOPBACK_ENABLE_STATE:

-			ipc_get_loopback_enable_state(voice_ctrl_recvmsg[msg.func_id]);

+			ipc_get_loopback_enable_state_rcv(voice_ctrl_recvmsg[msg.func_id]);

 			break;

+#ifdef _USE_VOICE_ALSA        

+        case IPC_AP_ALSA_VOICE_OPEN:

+			ipc_ap_alsa_voice_open_rcv(voice_ctrl_recvmsg[msg.func_id]);

+			break;

+        case IPC_AP_ALSA_VOICE_CLOSE:

+			ipc_ap_alsa_voice_close_rcv(voice_ctrl_recvmsg[msg.func_id]);

+			break;

+#endif        

 		default:

-			printf("%s: msg func_id(%d) error\n", __func__, msg.func_id);

-			break;

+		    break;

 	}

 }

 

@@ -333,23 +543,52 @@
     int read_len = 0;

     voice_ipc_control_msg tmpbuf = {0};

     

-    for(;;){

+    while(1){

         read_len = 0;

 		read_len = read(voice_ipc_fd, &tmpbuf, (VOICE_HEAD_LEN + VOICE_CONTROL_MAX_LEN));

+        

         if (0 >= read_len){

+            sleep(1);

 			continue;

 		}

-

-        //最后再改变func_id,确保其他地方判断func_id改变后有数据可读

-        memcpy(voice_ctrl_recvmsg[tmpbuf.func_id].param, tmpbuf.param, tmpbuf.param_len);

+        printf("%s: voice_ipc_fd=%d, read_len=%d\n", __func__, voice_ipc_fd, read_len);

+        

+        //Êý¾Ý¶ÁÈ¡ÍêºóÔٸıäfuc_id

+        if(0 != tmpbuf.param_len){

+            memcpy(voice_ctrl_recvmsg[tmpbuf.func_id].param, tmpbuf.param, tmpbuf.param_len);

+        }

         voice_ctrl_recvmsg[tmpbuf.func_id].param_len = tmpbuf.param_len;

         voice_ctrl_recvmsg[tmpbuf.func_id].func_id = tmpbuf.func_id;

+        printf("%s: tmpbuf.param_len=%d, tmpbuf.func_id=%d\n", __func__, tmpbuf.param_len, tmpbuf.func_id);

         

-        voice_msg_proc(voice_ctrl_recvmsg[tmpbuf.func_id]);

+        voice_ipc_recv_proc(voice_ctrl_recvmsg[tmpbuf.func_id]);

     }

 }

 

-int voice_ipc_init(void) //通道初始化

+int Voice_Ctrl_Rpmsg_Send(int func_id, int *msg)

+{

+    voice_ipc_control_msg tmpbuf = {0};

+    int tmpbuf_len = 0;

+    int write_len = 0;

+    

+    tmpbuf.func_id = func_id;

+    

+    if(NULL == msg){

+        tmpbuf.param_len = 0;

+    }else{

+        tmpbuf.param_len = sizeof(int);

+        memcpy(tmpbuf.param, msg, tmpbuf.param_len);

+    }

+    

+    tmpbuf_len = VOICE_HEAD_LEN + tmpbuf.param_len;

+

+    //printf("Voice_Ctrl_Rpmsg_Send, voice_ipc_fd = %d\n", voice_ipc_fd);

+    write_len = write(voice_ipc_fd, &tmpbuf, tmpbuf_len);

+

+    return write_len;

+}

+

+int voice_ipc_init(void) //通道初始åŒ?

 {

     voice_ipc_fd = open(VOICE_IPC_CONTROL_CHANNEL, O_RDWR);

 

@@ -365,35 +604,104 @@
         return VOICEIPC_ERROR;

     }

     

-    if(0 > ioctl(voice_ipc_fd, RPMSG_SET_INT_FLAG, NULL)){ //写中断

+    if(0 > ioctl(voice_ipc_fd, RPMSG_SET_INT_FLAG, NULL)){ //写中æ–?

         printf("%s: ioctl RPMSG_SET_INT_FLAG fail!\n", __func__);

         close(voice_ipc_fd);

         voice_ipc_fd = -1;

         return VOICEIPC_ERROR;

     }

     

-    if(0 > ioctl(voice_ipc_fd, RPMSG_CLEAR_POLL_FLAG, NULL)){ //阻塞方式读数据

+    if(0 > ioctl(voice_ipc_fd, RPMSG_CLEAR_POLL_FLAG, NULL)){ //阻塞方式读数æ?

         printf("%s: ioctl RPMSG_CLEAR_POLL_FLAG fail!\n", __func__);

         close(voice_ipc_fd);

         voice_ipc_fd = -1;

         return VOICEIPC_ERROR;

     }

+

+    printf("voice_ipc_init %s create success! voice_ipc_fd = %d\n", VOICE_IPC_CONTROL_CHANNEL, voice_ipc_fd);

+    

     return VOICEIPC_OK;

 }

 

+int recv_msg_proc(MSG_BUF msg)

+{

+    int ret = 0;

+    int vmode = 0;

+    int module_id = MODULE_ID_VOICE_SERVER;

+    int dst_id = MODULE_ID_VOICE_CLIENT;

+    

+    switch(msg.usMsgCmd){

+		case MSG_CMD_CAP_VALSA_OPEN:

+            vmode = *((int *)msg.aucDataBuf);

+			ret = ipc_cap_alsa_voice_open(vmode);

+            //dst_id = MODULE_ID_CAP_VALSA_OPEN;

+            ret = ipc_send_message(module_id, dst_id, msg.usMsgCmd, sizeof(int), (unsigned char *)(&ret), 0);

+            if(0 != ret){

+                printf("%s: ipc_send_message error, return %d!\n", __func__, ret);

+            }

+			break;

+        case MSG_CMD_CAP_VALSA_CLOSE:

+            vmode = *((int *)msg.aucDataBuf);

+			ret = ipc_cap_alsa_voice_close(vmode);

+			//dst_id = MODULE_ID_CAP_VALSA_CLOSE;

+            ret = ipc_send_message(module_id, dst_id, msg.usMsgCmd, sizeof(int), (unsigned char *)(&ret), 0);

+            if(0 != ret){

+                printf("%s: ipc_send_message error, return %d!\n", __func__, ret);

+            }

+			break;

+        default:

+            printf("%s: msg.usMsgCmd=%d, not support!\n", __func__, msg.usMsgCmd);

+            break;

+    }

+    

+    return ret;

+}

+

+void recv_cap_voice_alsa(void)

+{

+    int ret = 0;

+    int msg_handle = 0;

+	MSG_BUF msg;

+	LONG msg_size =  sizeof(MSG_BUF)-sizeof(LONG);

+    int module_id = MODULE_ID_VOICE_SERVER;

+

+    //´´½¨ÏûÏ¢¶ÓÁÐ

+	msg_handle = msgget(module_id, IPC_CREAT|0600);

+

+    //½ÓÊÕÏûÏ¢

+    while(1)

+	{

+		memset(&msg, 0x00, sizeof(MSG_BUF));

+

+		//»ñÈ¡ÏûÏ¢¶ÓÁÐÏûÏ¢²¢´¦Àí

+		ret = msgrcv(msg_handle, &msg, msg_size, 0, 0);

+        

+        if(0 > ret){

+            continue;

+        }

+

+        recv_msg_proc(msg);

+    }

+}

+

 int main(int argc, char **argv)

 {

     int ret = 0;

     

+    //ipcͨµÀ³õʼ»¯

     ret = voice_ipc_init();

-    

-    if(ret < 0){

-        printf("voice_ipc_init error!\n");

+    if(0 > ret){

+        printf("voice_ipc_init %s error!\n", VOICE_IPC_CONTROL_CHANNEL);

         return -1;

     }

-

-    printf("voice_ipc_init %s create success!\n", VOICE_IPC_CONTROL_CHANNEL);

     

+    //ipc³õʼ»¯ºó£¬´´½¨msgÏûÏ¢½ÓÊÕÏß³Ì

+	pthread_t recv_thread_tid;

+	if(0 != pthread_create(&recv_thread_tid, NULL, (void *)recv_cap_voice_alsa, NULL)){

+		printf("recv_cap_voice_alsa create error!\n");

+	}

+

+    sleep(4);

     Voice_Ctrl_Rpmsg_Recv();

     

     return 0;

diff --git a/ap/lib/libvsim/ght_vsim_api.c b/ap/lib/libvsim/ght_vsim_api.c
index 12a5afa..11b7bd1 100755
--- a/ap/lib/libvsim/ght_vsim_api.c
+++ b/ap/lib/libvsim/ght_vsim_api.c
@@ -47,7 +47,7 @@
 

 extern int32_t zte_GetRegInfobySimid(RegInfo_t *reg_info, uint8_t nSimID);

 

-extern int32_t zte_GetCellInfobySimId(CellInfo_t *pcellinfo, uint8_t nSimID);

+extern int32_t zte_GetCellInfobySimId(uint8_t nSimID);

 

 extern int32_t zte_GetNetInfobySimId(NetInfo_t *pNetInfo, uint8_t nSimID);

 

@@ -340,9 +340,9 @@
 **

 ***********************************************************/

 

-int32_t fibo_get_CellInfo_by_simid(CellInfo_t *pcellinfo, uint8_t nSimID)

+int32_t fibo_get_CellInfo_by_simid(uint8_t nSimID)

 {

-    return zte_GetCellInfobySimId(pcellinfo, nSimID);

+    return zte_GetCellInfobySimId(nSimID);

 }

 

 

diff --git a/ap/lib/libvsim/ght_vsim_api.h b/ap/lib/libvsim/ght_vsim_api.h
index b381421..5fd8568 100755
--- a/ap/lib/libvsim/ght_vsim_api.h
+++ b/ap/lib/libvsim/ght_vsim_api.h
@@ -48,10 +48,8 @@
 

 typedef enum {

     E_NW_STATUS_SRV_NONE = 0,

-    E_NW_STATUS_CURRENT_SERVING = 1,

-    E_NW_STATUS_SRV_LIMITED = 2,

-    E_NW_STATUS_SRV_AVAILABLE = 3,

-    E_NW_STATUS_SRV_FORBIDDEN = 4,

+    E_NW_STATUS_SRV_LIMITED = 1,

+    E_NW_STATUS_SRV_AVAILABLE = 2,

 }e_nw_srv_status_t;

 

 

@@ -59,6 +57,7 @@
 {

 	uint32_t tac;

 	uint32_t cell_id;

+	uint32_t roamingFlag; ///< 1:roaming,0:non roaming

 }lte_scell_info_t;

 

 typedef struct

@@ -83,15 +82,14 @@
 	uint32_t tac;

 	uint32_t cell_id;

     uint16_t bandwidth;

-    int16_t  rxlev;

+    uint16_t pcid;//int16_t  rxlev;

     uint32_t arfcn;

-    uint16_t pcid;

 }base_cell_info_t;//Hex format

 

 

 typedef struct

 {

-    uint8_t  roamingFlag; ///< 1:roaming,0:non roaming

+    uint16_t  roamingFlag; ///< 1:roaming,0:non roaming

     int16_t  rsrp;

     int16_t  rsrq;

     uint16_t SINR;

@@ -227,6 +225,7 @@
   E_RF_RESOURCE_CALLBACK_EVENT = 0x00,   /**< É䯵×ÊÔ´Çл». */

   E_NW_ATTACH_COMMPLETE_EVENT  = 0x32,   /**< ×¢ÍøÍê³É. */

   E_DATA_PDN_ACT_SUCC_EVENT = 0x64,      /**< PDN¼¤»îÍê³É ,ind_dataÖÐЯ´øZGIPDNS:µØÖ·ÐÅÏ¢  */

+  E_GET_CELLINFO_BY_SIMID_EVENT  = 0x65,	 /**< É¨ÍøÍê³É. */

 }E_MODEM_EVENT_ID;

 

 typedef enum

@@ -470,7 +469,7 @@
 **

 ***********************************************************/

 

-extern int32_t fibo_get_CellInfo_by_simid(CellInfo_t *pcellinfo, uint8_t nSimID);

+extern int32_t fibo_get_CellInfo_by_simid(uint8_t nSimID);

 

 /**********************************************************

 ** Function Name: fibo_get_NetInfo_by_simid

diff --git a/ap/lib/libvsim/libvsim.c b/ap/lib/libvsim/libvsim.c
index e0f275b..210e3e6 100755
--- a/ap/lib/libvsim/libvsim.c
+++ b/ap/lib/libvsim/libvsim.c
@@ -9,6 +9,7 @@
 
 #define VSIM_MAX_MSG_LEN	1024
 #define vsim_debug_printf printf 
+uint8_t bWithVsimApp = 1; //  0 ²»´øÓ¦ÓÃ    1 ´øÓ¦ÓÃ
 
 enum{
 	MSG_CMD_VSIM_GET_SWITCH = 1,//ATÔÚÄÄÒ»´ý·¢
@@ -23,6 +24,8 @@
 	MSG_CMD_VSIM_APDU,
 	MSG_CMD_VSIM_GET_FLOW_STATISTIC,//»ñÈ¡µ±Ç°Á÷Á¿Í³¼Æ
 	MSG_CMD_VSIM_RESET_FLOW_STATISTIC,//ÖØÖõ±Ç°Á÷Á¿Í³¼Æ
+	MSG_CMD_VSIM_GET_SCANING,//Õýscan,´Ëʱ½ûÖ¹TAU
+	MSG_CMD_VSIM_SET_SCANING,
 	MSG_CMD_VSIM_MAX,
 };
 
@@ -32,6 +35,7 @@
     unsigned char aucDataBuf[VSIM_MAX_MSG_LEN];  /* ÏûÏ¢ÕýÎÄ */  
 } VSIM_MSG_BUF;
 
+pthread_mutex_t vsim_at_mutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_t read_thread_tid;
 pthread_t msg_thread_tid;
 int g_read_thread_state = -1;
@@ -40,9 +44,11 @@
 SoftSim_COMMAND g_softsim_apdu_process_cb;
 zte_mdm_event_ind_callback g_vsim_event_ind_cb;
 unsigned char g_vsim_slot[2];
+int g_sim_status[2] = {-1,-1};
 
 int32_t zte_mdm_event_ind_cb(E_MODEM_EVENT_ID event_id, void *ind_data, uint32_t  ind_data_len)
 {
+	printf("##vsim## [%s] event_id=%d len=%d \n", __FUNCTION__, event_id, ind_data_len);
 	return 0;
 }
 int zte_vsim_ind_cb(uint8_t *apdu_req, uint16_t apdu_req_len,uint8_t *apdu_rsp, uint16_t *apdu_rsp_len, uint8_t slot)
@@ -59,13 +65,23 @@
 	return 0;
 }
 
+
+static int vsim_send_at(char *req_at, char *info_fmt, void **pval)
+{
+	int ret;
+	pthread_mutex_lock(&vsim_at_mutex);
+	ret = get_modem_info(req_at,info_fmt,pval);
+	pthread_mutex_unlock(&vsim_at_mutex);
+	return ret;
+}
+
 static int vsim_card_switch_req(unsigned char sim)
 {
 	int ret = 0;
 	if(sim)
-		ret = get_modem_info("AT+ZCARDSWITCHREQ=0,1\r\n", NULL, NULL);
+		ret = vsim_send_at("AT+ZCARDSWITCHREQ=0,1\r\n", NULL, NULL);
 	else
-		ret = get_modem_info("AT+ZCARDSWITCHREQ=1,0\r\n", NULL, NULL);
+		ret = vsim_send_at("AT+ZCARDSWITCHREQ=1,0\r\n", NULL, NULL);
 	if(ret != 0){
 		printf("##vsim## [%s] sim=%d ret=%d err\n", __FUNCTION__, sim, ret);
 	}
@@ -82,7 +98,11 @@
 	msg_in.usMsgCmd = msg;
 	msg_in.aucDataBuf[0] = param;
 	vsim_debug_printf("##vsim## [%s] msg=%d param=%d start\n", __FUNCTION__, msg, param);
+	if(msg == MSG_CMD_VSIM_SET_SWITCH)
+		pthread_mutex_lock(&vsim_at_mutex);
 	ret = syscall(__NR_vsim_proc,(unsigned char *)&msg_in, (unsigned char *)&msg_out);
+	if(msg == MSG_CMD_VSIM_SET_SWITCH)
+		pthread_mutex_unlock(&vsim_at_mutex);
 	if(ret == 0){
 		printf("##vsim## [%s] msg=%d param=%d err\n", __FUNCTION__, msg, param);
 	}
@@ -133,6 +153,7 @@
 		VSIM_MSG_BUF msg_out = {0};
 		int ret = 0;
 		int is_auth = 0;
+		int is_slot1 = 0;
 		vsim_debug_printf("##vsim## [%s] start\n", __FUNCTION__);
 		ret = syscall(__NR_vsim_read,(unsigned char *)&msg_out);
 		if(ret == 0){
@@ -143,8 +164,9 @@
 			printf("##vsim## read msg=%d ret=%d err\n", msg_out.usMsgCmd, ret);
 		}
 		is_auth = msg_out.aucDataBuf[1];
+		is_slot1 = msg_out.aucDataBuf[0];
 		//ÇÐʵÌ忨
-		if(is_auth){
+		if(is_auth && g_vsim_slot[msg_out.aucDataBuf[0]] && is_slot1){
 			printf("##vsim## vsim_apdu_auth standby=%d\n", vsim_get(MSG_CMD_VSIM_GET_STANDBY));
 			vsim_set(MSG_CMD_VSIM_SET_AUTHING,1);
 			usleep(20000);//±£»¤´ëÊ©,ÑÓ³Ù20ºÁÃëÔÙÏ·¢Çп¨£¬±£Ö¤¼øÈ¨ÇëÇóµÄrlc ack»Ø¸´¸øÍø²à
@@ -162,7 +184,7 @@
 		}
 		vsim_debug_printf("##vsim## g_vsim_apdu_process_cb ret=0x%x len=%d\n", ret, msg_in.usDataLen);
 		//ÇÐÐéÄ⿨
-		if(is_auth){
+		if(is_auth && g_vsim_slot[msg_out.aucDataBuf[0]] && is_slot1){
 			vsim_set(MSG_CMD_VSIM_SET_STANDBY,1);//´ËÊ±ÔÆ¿¨Ó¦¸Ãδ½¨ÍøÂçÁ´½Ó£¬ÏÈÇÐÊý¾ÝÔÙÇÐÍø
 			vsim_card_switch_req(1);
 			vsim_set(MSG_CMD_VSIM_SET_AUTHING,0);
@@ -197,7 +219,7 @@
 			case MSG_CMD_ZCARDSWITCHIND_IND:
 				//callback todo
 				SwitchStat = stMsg.aucDataBuf[1];
-				if(vsim_get(MSG_CMD_VSIM_GET_AUTHING)){
+				if(vsim_get(MSG_CMD_VSIM_GET_AUTHING) || vsim_get(MSG_CMD_VSIM_GET_SCANING)){
 					printf("##vsim## ZCARDSWITCHIND AUTHING abort\n");
 					if(SwitchStat)
 						vsim_set(MSG_CMD_VSIM_SET_TAUING,0);
@@ -213,8 +235,64 @@
 				}
 				break;
 			case MSG_CMD_CREG_IND:
-				if(vsim_get(MSG_CMD_VSIM_GET_STANDBY) == 1){
-				//callback todo
+				{
+					uint8_t nSimID = vsim_get(MSG_CMD_VSIM_GET_STANDBY);
+					if(nSimID == vsim_get_cardstat_fromps())
+						g_vsim_event_ind_cb(E_NW_ATTACH_COMMPLETE_EVENT, nSimID, 1);
+				}
+				break;
+			case MSG_CMD_ZSCISCAN_IND:
+				{
+					uint8_t nSimID = vsim_get(MSG_CMD_VSIM_GET_SCANING);
+					RegInfo_t reg_info = {0};
+					lte_cellinfo_t cell_info = {0};
+					lte_Scell_t cell[20] = {0};
+					lte_Scell_t cell_order[20] = {0};
+					int reg_ret = 0;
+					int i = 0;
+					int j = 0;
+					memcpy(cell, stMsg.aucDataBuf, sizeof(lte_Scell_t)*20);
+					if(nSimID != 0){
+						nSimID--;
+						reg_ret = zte_GetRegInfobySimid(&reg_info, nSimID);
+						vsim_set(MSG_CMD_VSIM_SET_SCANING,0);
+						for(i = 0; i < 20; i++){
+							for(j = 0; j < 20; j++){
+								if((cell_order[j].base_Scell_info.mcc == 0 && cell_order[j].base_Scell_info.mnc == 0)
+								||(cell_order[j].base_Scell_info.mcc == cell[i].base_Scell_info.mcc 
+									&& cell_order[j].base_Scell_info.mnc == cell[i].base_Scell_info.mnc 
+									&& cell_order[j].netMode == cell[i].netMode)){
+									if(cell[i].rsrp > cell_order[j].rsrp)
+										memcpy(&cell_order[j], &cell[i], sizeof(lte_Scell_t));
+								}
+							}
+							if(reg_ret == 0 && cell[i].base_Scell_info.cell_id == reg_info.lte_scell_info.cell_id){
+								memcpy(&cell_info.lteScell, &cell[i], sizeof(lte_Scell_t));
+								cell_info.lteScell.roamingFlag = reg_info.lte_scell_info.roamingFlag;
+							}
+						}
+						for(i = 0; i < 20; i++){
+							for(j = 0; j < 6; j++){
+								if(cell_info.lteNcell[j].base_Ncell_info.mcc == 0 && cell_info.lteNcell[j].base_Ncell_info.mnc == 0 
+									&& (cell_order[i].base_Scell_info.mcc != 0 || cell_order[i].base_Scell_info.mnc != 0)){
+									memcpy(&cell_info.lteNcell[j].base_Ncell_info, &cell_order[i].base_Scell_info, sizeof(base_cell_info_t));
+									cell_info.lteNcell[j].rsrp = cell_order[i].rsrp;
+									cell_info.lteNcell[j].rsrq = cell_order[i].rsrq;
+									cell_info.lteNcell[j].netMode = cell_order[i].netMode;
+									cell_info.lteNcellNum++;
+								}
+								if(cell_info.lteNcellNum == 6){
+									if(cell_order[i].rsrp > cell_info.lteNcell[j].rsrp){
+										memcpy(&cell_info.lteNcell[j].base_Ncell_info, &cell_order[i].base_Scell_info, sizeof(base_cell_info_t));
+										cell_info.lteNcell[j].rsrp = cell_order[i].rsrp;
+										cell_info.lteNcell[j].rsrq = cell_order[i].rsrq;
+										cell_info.lteNcell[j].netMode = cell_order[i].netMode;
+									}
+								}
+							}
+						}
+						g_vsim_event_ind_cb(E_GET_CELLINFO_BY_SIMID_EVENT, &cell_info, sizeof(cell_info));
+					}
 				}
 				break;
 			case MSG_CMD_VSIMDEBUG_IND:
@@ -222,10 +300,10 @@
 					char imei[]="862769025435956";
 					fibo_set_IMEI_by_simid(imei,sizeof(imei),1);
 					fibo_mdm_event_regist(zte_mdm_event_ind_cb);
-					vsim_set(MSG_CMD_VSIM_SET_STANDBY,1);
+					vsim_set(MSG_CMD_VSIM_SET_STANDBY,1);//´ËÊ±ÔÆ¿¨Î´½¨ÍøÂçÁ´½Ó£¬ÏÈÇÐÊý¾ÝÔÙÇÐÍø
 					vsim_card_switch_req(1);
 					vsim_set(MSG_CMD_VSIM_SET_SWITCH,1);
-					get_modem_info("AT+CFUN=1\r\n", NULL, NULL);
+					vsim_send_at("AT+CFUN=1\r\n", NULL, NULL);
 					g_vsim_slot[1] = 1;
 				}
 				if(stMsg.aucDataBuf[0] == 2){
@@ -243,6 +321,26 @@
 				if(stMsg.aucDataBuf[0] == 21){
 					zte_SetGTDUALSIM(1);
 				}
+				if(stMsg.aucDataBuf[0] == 30){
+					bWithVsimApp = 0;
+				    fibo_SoftSim_init(zte_vsim_ind_cb,0);
+				}
+				if(stMsg.aucDataBuf[0] == 40){
+					fibo_SoftSim_close(zte_vsim_ind_cb,0);
+				}
+				if(stMsg.aucDataBuf[0] == 31){
+					bWithVsimApp = 0;
+					fibo_SoftSim_init(zte_vsim_ind_cb,1);
+				}
+				if(stMsg.aucDataBuf[0] == 41){
+					fibo_SoftSim_close(zte_vsim_ind_cb,1);
+				}
+				if(stMsg.aucDataBuf[0] == 50){
+					fibo_get_CellInfo_by_simid(0);
+				}
+				if(stMsg.aucDataBuf[0] == 51){
+					fibo_get_CellInfo_by_simid(1);
+				}
 				break;
 			default:
 				printf("##vsim## rcv_msg err msgid 0x%x\n",stMsg.usMsgCmd);
@@ -277,16 +375,17 @@
 		return -1;
 	}
 	g_vsim_slot[1] = 1;
+	g_sim_status[1] = -1;
 	sc_cfg_set("vsim_stat","1");
 	vsim_set(MSG_CMD_VSIM_SET_STANDBY,1);//´ËÊ±ÔÆ¿¨Î´½¨ÍøÂçÁ´½Ó£¬ÏÈÇÐÊý¾ÝÔÙÇÐÍø
 	vsim_card_switch_req(1);
 	vsim_set(MSG_CMD_VSIM_SET_SWITCH,1);
-	get_modem_info("AT+ZCARDSWITCH=1,1\r\n", NULL, NULL);
-	get_modem_info("AT+CFUN=1\r\n", NULL, NULL);
+	vsim_send_at("AT+ZCARDSWITCH=1,1\r\n", NULL, NULL);
+	vsim_send_at("AT+CFUN=1\r\n", NULL, NULL);
 	return 0;
 }
 
-int32_t zte_atSoftSimInit(SoftSim_COMMAND softssim_apdu_process_fn, uint8_t nSimID)
+int32_t zte_atSoftSimInit(SoftSim_COMMAND softssim_apdu_process_fn,  uint8_t nSimID)
 {
 	char stat[4] = {0};
 	
@@ -298,14 +397,22 @@
 		return -1;
 	}
 	g_vsim_slot[nSimID] = 2;
+	g_sim_status[nSimID] = -1;
 	sc_cfg_set("softsim_stat","1");
 	g_softsim_apdu_process_cb = softssim_apdu_process_fn;
 	if(nSimID){
 		vsim_set(MSG_CMD_VSIM_SET_STANDBY,1);//´ËÊ±ÔÆ¿¨Î´½¨ÍøÂçÁ´½Ó£¬ÏÈÇÐÊý¾ÝÔÙÇÐÍø
 		vsim_card_switch_req(1);
 		vsim_set(MSG_CMD_VSIM_SET_SWITCH,1);
-		get_modem_info("AT+ZCARDSWITCH=2,1\r\n", NULL, NULL);
-		get_modem_info("AT+CFUN=1\r\n", NULL, NULL);
+		if(bWithVsimApp == 1)
+		{
+			vsim_send_at("AT+ZCARDSWITCH=2,1\r\n", NULL, NULL);
+		}
+		else
+		{
+			vsim_send_at("AT+ZCARDSWITCH=3,1\r\n", NULL, NULL);
+		}
+		vsim_send_at("AT+CFUN=1\r\n", NULL, NULL);
 	}else{
 		uint8_t sim = 0;
 		uint8_t ret = 0;
@@ -315,10 +422,17 @@
 		ret = vsim_get_cardstat_fromps();
 		if(ret >= 0 && nSimID != ret)
 			vsim_card_switch_req(nSimID);
-		get_modem_info("AT+CFUN=0\r\n", NULL, NULL);
-		get_modem_info("AT+CFUN=5\r\n", NULL, NULL);
-		get_modem_info("AT+ZCARDSWITCH=2,0\r\n", NULL, NULL);
-		get_modem_info("AT+CFUN=1\r\n", NULL, NULL);
+		if(bWithVsimApp == 1)
+		{
+			vsim_send_at("AT+ZCARDSWITCH=2,0\r\n", NULL, NULL);
+		}
+		else
+		{
+			vsim_send_at("AT+ZCARDSWITCH=3,0\r\n", NULL, NULL);
+		}
+		vsim_send_at("AT+CFUN=0\r\n", NULL, NULL);
+//		vsim_send_at("AT+CFUN=5\r\n", NULL, NULL);		
+		vsim_send_at("AT+CFUN=1\r\n", NULL, NULL);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 		if(ret >= 0 && nSimID != ret)
@@ -334,9 +448,12 @@
 		printf("##vsim## soft close param err sim=%d\n", nSimID);
 		return -1;
 	}
+	g_vsim_slot[nSimID] = 0;
+	g_sim_status[nSimID] = -1;
 	if(nSimID){
+		vsim_card_switch_req(1);
 		zte_SetGTDATASIM(1);
-		get_modem_info("AT+CFUN=0\r\n", NULL, NULL);
+		vsim_send_at("AT+CFUN=0\r\n", NULL, NULL);
 		vsim_card_switch_req(0);
 		zte_SetGTDUALSIM(0);
 		vsim_set(MSG_CMD_VSIM_RESET_FLOW_STATISTIC,1);
@@ -349,17 +466,16 @@
 		ret = vsim_get_cardstat_fromps();
 		if(ret >= 0 && nSimID != ret)
 			vsim_card_switch_req(nSimID);
-		get_modem_info("AT+CFUN=0\r\n", NULL, NULL);
-		get_modem_info("AT+CFUN=5\r\n", NULL, NULL);
-		get_modem_info("AT+ZCARDSWITCH=0,0\r\n", NULL, NULL);
-		get_modem_info("AT+CFUN=1\r\n", NULL, NULL);
+	//	vsim_send_at("AT+CFUN=5\r\n", NULL, NULL);
+		vsim_send_at("AT+ZCARDSWITCH=0,0\r\n", NULL, NULL);
+		vsim_send_at("AT+CFUN=0\r\n", NULL, NULL);
+		vsim_send_at("AT+CFUN=1\r\n", NULL, NULL);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 		if(ret >= 0 && nSimID != ret)
 			vsim_card_switch_req(ret);
 	}
 	g_vsim_apdu_process_cb = NULL;
-	g_vsim_slot[nSimID] = 0;
 	sc_cfg_set("softsim_stat","0");
 	return 0;
 }
@@ -371,13 +487,15 @@
 		printf("##vsim## close param err sim=%d\n", nSimID);
 		return -1;
 	}
+	g_vsim_slot[1] = 0;
+	g_sim_status[1] = -1;
+	vsim_card_switch_req(1);
 	zte_SetGTDATASIM(1);
-	get_modem_info("AT+CFUN=0\r\n", NULL, NULL);
+	vsim_send_at("AT+CFUN=0\r\n", NULL, NULL);
 	vsim_card_switch_req(0);
 	zte_SetGTDUALSIM(0);
 	vsim_set(MSG_CMD_VSIM_RESET_FLOW_STATISTIC,1);
 	g_vsim_apdu_process_cb = NULL;
-	g_vsim_slot[1] = 0;
 	sc_cfg_set("vsim_stat","0");
 	return 0;
 }
@@ -387,7 +505,7 @@
 {
 	int ret = 0;
 	vsim_debug_printf("##vsim## [%s] start\n", __FUNCTION__);
-	if(vsim_get(MSG_CMD_VSIM_GET_AUTHING)){
+	if(vsim_get(MSG_CMD_VSIM_GET_AUTHING) || vsim_get(MSG_CMD_VSIM_GET_SCANING)){
 		printf("##vsim## [%s]->%d fail AUTHING\n", __FUNCTION__, nSimID);
 		return -1;
 	}
@@ -474,14 +592,14 @@
 	char at_cmd[64] = {0};
 	vsim_debug_printf("##vsim## [%s] start\n", __FUNCTION__);
 	snprintf(at_cmd,sizeof(at_cmd),"AT+CFUN=%d\r\n", mode);
-	return get_modem_info(at_cmd, NULL, NULL);
+	return vsim_send_at(at_cmd, NULL, NULL);
 }
 
 int32_t zte_GetCfunMode(uint8_t *mode)
 {
 	vsim_debug_printf("##vsim## [%s] start\n", __FUNCTION__);
 	if(mode)
-		return get_modem_info("AT+CFUN?\r\n", "%1d", (void**)&mode);
+		return vsim_send_at("AT+CFUN?\r\n", "%1d", (void**)&mode);
 	return -1;
 }
 
@@ -496,7 +614,7 @@
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
 		snprintf(at_cmd,sizeof(at_cmd),"AT+CGSN=%s\r\n",imei);
-		ret = get_modem_info(at_cmd, NULL, NULL);
+		ret = vsim_send_at(at_cmd, NULL, NULL);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 	}
@@ -512,7 +630,7 @@
 		zte_GetGTDUALSIM(&sim);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
-		ret = get_modem_info("AT+CGSN\r\n", "%s", (void**)&imei);
+		ret = vsim_send_at("AT+CGSN\r\n", "%s", (void**)&imei);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 	}
@@ -529,7 +647,7 @@
 		zte_GetGTDUALSIM(&sim);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
-		ret = get_modem_info("AT+ZICCID?\r\n", "%s", (void**)&ccid);
+		ret = vsim_send_at("AT+ZICCID?\r\n", "%s", (void**)&ccid);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 	}
@@ -550,13 +668,13 @@
 		zte_GetGTDUALSIM(&sim);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
-		get_modem_info("AT+CRSM=176,28589,0,0,4\r\n", "%d,%d,%s", (void**)p);
+		vsim_send_at("AT+CRSM=176,28589,0,0,4\r\n", "%d,%d,%s", (void**)p);
 		if(sw1 == 144 && sw2 == 0){
 			char imsi[64] = {0};
 			char strPlmnLast[10] = {0};
 			void *p1[] = {imsi};
 		
-			get_modem_info("AT+CIMI\r\n", "%s", (void**)p1);
+			vsim_send_at("AT+CIMI\r\n", "%s", (void**)p1);
 			strncpy(strPlmnLast, &response[strlen(response)-2], 2);
 			memset(mcc, 0, 4);
 			memset(mnc, 0, 4);
@@ -577,7 +695,7 @@
 		zte_GetGTDUALSIM(&sim);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
-		ret = get_modem_info("AT+ZEMSCIQ=1\r\n", "%d,%d,%d,%d,%d,%s", (void**)p);
+		ret = vsim_send_at("AT+ZEMSCIQ=1\r\n", "%d,%d,%d,%d,%d,%s", (void**)p);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 		memset(mcc, 0, 4);
@@ -605,7 +723,7 @@
 		zte_GetGTDUALSIM(&sim);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
-		ret = get_modem_info("AT+CSQ\r\n", "%d,%d", (void**)p);
+		ret = vsim_send_at("AT+CSQ\r\n", "%d,%d", (void**)p);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 	}
@@ -617,19 +735,19 @@
 	int ret = -1;
 	vsim_debug_printf("##vsim## [%s] start\n", __FUNCTION__);
 	if(reg_info){
-		int i,act,rac;
+		int i,act,rac,srv_domain;
 		void *p[] = {&i,&act,&reg_info->lte_scell_info.cell_id,&rac,&reg_info->lte_scell_info.tac};
-		void *p1[] = {&reg_info->nStatus};
+		void *p1[] = {&reg_info->nStatus,&srv_domain,&reg_info->lte_scell_info.roamingFlag};
 		uint8_t sim = 0;
 		zte_GetGTDUALSIM(&sim);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
 		reg_info->nStatus = 0;
-		get_modem_info("AT^SYSINFO\r\n", "%d", (void**)p1);
-		ret = get_modem_info("AT+ZEMSCIQ=1\r\n", "%d,%d,%d,%d,%d", (void**)p);
+		vsim_send_at("AT^SYSINFO\r\n", "%d,%d,%d", (void**)p1);
+		ret = vsim_send_at("AT+ZEMSCIQ=1\r\n", "%d,%d,%d,%d,%d", (void**)p);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
-		if(ret || reg_info->nStatus != 2)
+		if(ret || reg_info->nStatus != E_NW_STATUS_SRV_AVAILABLE)
 			return -1;
 		if(act == 16){
 			reg_info->curr_rat = E_NW_RADIO_IF_LTE;
@@ -647,9 +765,11 @@
 	return ret;
 }
 
-int32_t zte_GetCellInfobySimId(CellInfo_t *pcellinfo, uint8_t nSimID)
+int32_t zte_GetCellInfobySimId(uint8_t nSimID)
 {
 	vsim_debug_printf("##vsim## [%s] start\n", __FUNCTION__);
+	vsim_set(MSG_CMD_VSIM_SET_SCANING, 1+nSimID);
+	ipc_send_message(MODULE_ID_VSIM, MODULE_ID_AT_CTL, MSG_CMD_ZSCISCAN_REQ, 0, NULL, 0);
 	return 0;
 }
 
@@ -702,7 +822,7 @@
 				cid_reserved = atoi(reservecid);
 			cid_reserved_vsim = cid_reserved|15;
 			snprintf(at_cmd,sizeof(at_cmd),"AT+CIDRESERVED=%d\r\n", cid_reserved_vsim);
-			get_modem_info(at_cmd, NULL, NULL);
+			vsim_send_at(at_cmd, NULL, NULL);
 		}
 		if(data_call->ip_family == E_DATA_IP_FAMILY_IPV4)
 			snprintf(at_cmd,sizeof(at_cmd),"AT+ZPDPACT=0,\"IP\",\"%s\",,,,%d,\"%s\",\"%s\"\r\n", data_call->apn_name, data_call->auth_pref, data_call->user_name, data_call->password);
@@ -717,13 +837,13 @@
 		zte_GetGTDUALSIM(&sim);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
-		ret = get_modem_info(at_cmd, "%d", (void**)p);
+		ret = vsim_send_at(at_cmd, "%d", (void**)p);
 		vsim_debug_printf("##vsim## [%s] ret=%d cid=%d\n", __FUNCTION__, ret, data_call->profile_id);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 		if(nSimID){
 			snprintf(at_cmd,sizeof(at_cmd),"AT+CIDRESERVED=%d\r\n", cid_reserved);
-			get_modem_info(at_cmd, NULL, NULL);
+			vsim_send_at(at_cmd, NULL, NULL);
 		}
 	}
 	return ret;
@@ -741,7 +861,7 @@
 		zte_GetGTDUALSIM(&sim);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
-		ret = get_modem_info(at_cmd, NULL, NULL);
+		ret = vsim_send_at(at_cmd, NULL, NULL);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 	}
@@ -762,7 +882,7 @@
 		zte_GetGTDUALSIM(&sim);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
-		ret = get_modem_info(at_cmd, "%d,%17s", (void**)p);
+		ret = vsim_send_at(at_cmd, "%d,%17s", (void**)p);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 	}
@@ -777,10 +897,16 @@
 		uint8_t sim = 0;
 		char at_paras[64] = {0};
 		void *p[] = {at_paras};
+
+		vsim_debug_printf("##vsim## [%s] simid=%d sim_stat=%d\n", __FUNCTION__, nSimID, g_sim_status[nSimID]);
+		if(g_vsim_slot[nSimID] && g_sim_status[nSimID] == E_SIM_STAT_READY){
+			*sim_status = E_SIM_STAT_READY;
+			return 0;
+		}
 		zte_GetGTDUALSIM(&sim);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(nSimID);
-		ret = get_modem_info("AT+CPIN?\r\n", "%s", (void**)p);
+		ret = vsim_send_at("AT+CPIN?\r\n", "%s", (void**)p);
 		if(sim != nSimID)
 			zte_SetGTDUALSIM(sim);
 		if(ret == 0){
@@ -805,6 +931,9 @@
 		} else {
 			*sim_status = E_SIM_STAT_UNKNOWN;
 		}
+		if(g_vsim_slot[nSimID]){
+			g_sim_status[nSimID] = *sim_status;
+		}
 		return 0;
 	}
 	return -1;
@@ -819,7 +948,7 @@
 	if(sim != nSimID)
 		zte_SetGTDUALSIM(nSimID);
 	printf("##vsim## [%s] nSimID=%d sw=%d at=%s\n", __FUNCTION__, nSimID, sim, req_at);
-	ret = get_modem_info(req_at, info_fmt, pval);
+	ret = vsim_send_at(req_at, info_fmt, pval);
 	if(sim != nSimID)
 		zte_SetGTDUALSIM(sim);
 	return ret;
diff --git a/ap/lib/libvsim/zte_vsim_api.h b/ap/lib/libvsim/zte_vsim_api.h
index c3821dd..a549035 100755
--- a/ap/lib/libvsim/zte_vsim_api.h
+++ b/ap/lib/libvsim/zte_vsim_api.h
@@ -36,10 +36,8 @@
 

 typedef enum {

     E_NW_STATUS_SRV_NONE = 0,

-    E_NW_STATUS_CURRENT_SERVING = 1,

-    E_NW_STATUS_SRV_LIMITED = 2,

-    E_NW_STATUS_SRV_AVAILABLE = 3,

-    E_NW_STATUS_SRV_FORBIDDEN = 4,

+    E_NW_STATUS_SRV_LIMITED = 1,

+    E_NW_STATUS_SRV_AVAILABLE = 2,

 }e_nw_srv_status_t;

 

 

@@ -47,6 +45,7 @@
 {

 	uint32_t tac;

 	uint32_t cell_id;

+	uint32_t roamingFlag; ///< 1:roaming,0:non roaming

 }lte_scell_info_t;

 

 typedef struct

@@ -71,15 +70,14 @@
 	uint32_t tac;

 	uint32_t cell_id;

     uint16_t bandwidth;

-    int16_t  rxlev;

+    uint16_t pcid;//int16_t  rxlev;

     uint32_t arfcn;

-    uint16_t pcid;

 }base_cell_info_t;//Hex format

 

 

 typedef struct

 {

-    uint8_t  roamingFlag; ///< 1:roaming,0:non roaming

+    uint16_t  roamingFlag; ///< 1:roaming,0:non roaming

     int16_t  rsrp;

     int16_t  rsrq;

     uint16_t SINR;

@@ -215,6 +213,7 @@
   E_RF_RESOURCE_CALLBACK_EVENT = 0x00,   /**< É䯵×ÊÔ´Çл». */

   E_NW_ATTACH_COMMPLETE_EVENT  = 0x32,   /**< ×¢ÍøÍê³É. */

   E_DATA_PDN_ACT_SUCC_EVENT = 0x64,      /**< PDN¼¤»îÍê³É ,ind_dataÖÐЯ´øZGIPDNS:µØÖ·ÐÅÏ¢  */

+  E_GET_CELLINFO_BY_SIMID_EVENT  = 0x65,	 /**< É¨ÍøÍê³É. */

 }E_MODEM_EVENT_ID;

 

 typedef enum

@@ -294,7 +293,7 @@
 

 extern int32_t zte_GetRegInfobySimid(RegInfo_t *reg_info, uint8_t nSimID);

 

-extern int32_t zte_GetCellInfobySimId(CellInfo_t *pcellinfo, uint8_t nSimID);

+extern int32_t zte_GetCellInfobySimId(uint8_t nSimID);

 

 extern int32_t zte_GetNetInfobySimId(NetInfo_t *pNetInfo, uint8_t nSimID);

 

diff --git a/ap/lib/libzcore/min/libbitmap_font.a b/ap/lib/libzcore/min/libbitmap_font.a
index 701b74e..93aefbb 100644
--- a/ap/lib/libzcore/min/libbitmap_font.a
+++ b/ap/lib/libzcore/min/libbitmap_font.a
Binary files differ
diff --git a/ap/lib/libzcore/min/libttf_font.a b/ap/lib/libzcore/min/libttf_font.a
index ccab732..6fe90a5 100644
--- a/ap/lib/libzcore/min/libttf_font.a
+++ b/ap/lib/libzcore/min/libttf_font.a
Binary files differ
diff --git a/ap/lib/libzcore/min/libzcore.a b/ap/lib/libzcore/min/libzcore.a
index 4200899..85f35e1 100644
--- a/ap/lib/libzcore/min/libzcore.a
+++ b/ap/lib/libzcore/min/libzcore.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/fwp/app_fw.a b/ap/lib/libzcore/std/lib/lib/fwp/app_fw.a
index ffadb10..b499735 100644
--- a/ap/lib/libzcore/std/lib/lib/fwp/app_fw.a
+++ b/ap/lib/libzcore/std/lib/lib/fwp/app_fw.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/fwp/bl_psa.a b/ap/lib/libzcore/std/lib/lib/fwp/bl_psa.a
index 6d8cdc4..a774524 100644
--- a/ap/lib/libzcore/std/lib/lib/fwp/bl_psa.a
+++ b/ap/lib/libzcore/std/lib/lib/fwp/bl_psa.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/fwp/bl_svr.a b/ap/lib/libzcore/std/lib/lib/fwp/bl_svr.a
index 72cccbe..5fd8f96 100644
--- a/ap/lib/libzcore/std/lib/lib/fwp/bl_svr.a
+++ b/ap/lib/libzcore/std/lib/lib/fwp/bl_svr.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/fwp/font/libbitmap_font.a b/ap/lib/libzcore/std/lib/lib/fwp/font/libbitmap_font.a
index 79dc0ad..f10ea41 100644
--- a/ap/lib/libzcore/std/lib/lib/fwp/font/libbitmap_font.a
+++ b/ap/lib/libzcore/std/lib/lib/fwp/font/libbitmap_font.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/fwp/font/libttf_font.a b/ap/lib/libzcore/std/lib/lib/fwp/font/libttf_font.a
index 0f0fc0a..1b8e099 100644
--- a/ap/lib/libzcore/std/lib/lib/fwp/font/libttf_font.a
+++ b/ap/lib/libzcore/std/lib/lib/fwp/font/libttf_font.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/fwp/framework.a b/ap/lib/libzcore/std/lib/lib/fwp/framework.a
index 4f9fc26..3b42df5 100644
--- a/ap/lib/libzcore/std/lib/lib/fwp/framework.a
+++ b/ap/lib/libzcore/std/lib/lib/fwp/framework.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/fwp/fwkernel.a b/ap/lib/libzcore/std/lib/lib/fwp/fwkernel.a
index 858babd..bcc4402 100644
--- a/ap/lib/libzcore/std/lib/lib/fwp/fwkernel.a
+++ b/ap/lib/libzcore/std/lib/lib/fwp/fwkernel.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/fwp/gui.a b/ap/lib/libzcore/std/lib/lib/fwp/gui.a
index 5ad389a..a8540d0 100644
--- a/ap/lib/libzcore/std/lib/lib/fwp/gui.a
+++ b/ap/lib/libzcore/std/lib/lib/fwp/gui.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/fwp/msm.a b/ap/lib/libzcore/std/lib/lib/fwp/msm.a
index 8c116ab..d83bdef 100644
--- a/ap/lib/libzcore/std/lib/lib/fwp/msm.a
+++ b/ap/lib/libzcore/std/lib/lib/fwp/msm.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/fwp/ui_fw.a b/ap/lib/libzcore/std/lib/lib/fwp/ui_fw.a
index 65deb1c..3a6357a 100644
--- a/ap/lib/libzcore/std/lib/lib/fwp/ui_fw.a
+++ b/ap/lib/libzcore/std/lib/lib/fwp/ui_fw.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/libplatadapt_com.a b/ap/lib/libzcore/std/lib/lib/libplatadapt_com.a
index 0fe615e..31c3a73 100644
--- a/ap/lib/libzcore/std/lib/lib/libplatadapt_com.a
+++ b/ap/lib/libzcore/std/lib/lib/libplatadapt_com.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/libplatadapt_fwp.a b/ap/lib/libzcore/std/lib/lib/libplatadapt_fwp.a
index 945343b..914933d 100644
--- a/ap/lib/libzcore/std/lib/lib/libplatadapt_fwp.a
+++ b/ap/lib/libzcore/std/lib/lib/libplatadapt_fwp.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/libplatadapt_phone.a b/ap/lib/libzcore/std/lib/lib/libplatadapt_phone.a
index 36179b2..fb7558e 100644
--- a/ap/lib/libzcore/std/lib/lib/libplatadapt_phone.a
+++ b/ap/lib/libzcore/std/lib/lib/libplatadapt_phone.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/libplatadapt_poc.a b/ap/lib/libzcore/std/lib/lib/libplatadapt_poc.a
index 6380718..5b7d93c 100644
--- a/ap/lib/libzcore/std/lib/lib/libplatadapt_poc.a
+++ b/ap/lib/libzcore/std/lib/lib/libplatadapt_poc.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/libplatadapt_watch.a b/ap/lib/libzcore/std/lib/lib/libplatadapt_watch.a
index 51de530..02dc896 100644
--- a/ap/lib/libzcore/std/lib/lib/libplatadapt_watch.a
+++ b/ap/lib/libzcore/std/lib/lib/libplatadapt_watch.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/libzcore_fwp.a b/ap/lib/libzcore/std/lib/lib/libzcore_fwp.a
index 31c9521..e45413e 100644
--- a/ap/lib/libzcore/std/lib/lib/libzcore_fwp.a
+++ b/ap/lib/libzcore/std/lib/lib/libzcore_fwp.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/libzcore_phone.a b/ap/lib/libzcore/std/lib/lib/libzcore_phone.a
index 8b4a923..9b67c87 100644
--- a/ap/lib/libzcore/std/lib/lib/libzcore_phone.a
+++ b/ap/lib/libzcore/std/lib/lib/libzcore_phone.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/libzcore_poc.a b/ap/lib/libzcore/std/lib/lib/libzcore_poc.a
index 40d7777..9a08731 100644
--- a/ap/lib/libzcore/std/lib/lib/libzcore_poc.a
+++ b/ap/lib/libzcore/std/lib/lib/libzcore_poc.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/libzcore_watch.a b/ap/lib/libzcore/std/lib/lib/libzcore_watch.a
index ed9eb6d..5a6c24b 100644
--- a/ap/lib/libzcore/std/lib/lib/libzcore_watch.a
+++ b/ap/lib/libzcore/std/lib/lib/libzcore_watch.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/phone/app_fw.a b/ap/lib/libzcore/std/lib/lib/phone/app_fw.a
index 48161cc..a2151d1 100644
--- a/ap/lib/libzcore/std/lib/lib/phone/app_fw.a
+++ b/ap/lib/libzcore/std/lib/lib/phone/app_fw.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/phone/bl_psa.a b/ap/lib/libzcore/std/lib/lib/phone/bl_psa.a
index a179613..9cb4e6f 100644
--- a/ap/lib/libzcore/std/lib/lib/phone/bl_psa.a
+++ b/ap/lib/libzcore/std/lib/lib/phone/bl_psa.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/phone/bl_svr.a b/ap/lib/libzcore/std/lib/lib/phone/bl_svr.a
index ab95280..6a0d8d3 100644
--- a/ap/lib/libzcore/std/lib/lib/phone/bl_svr.a
+++ b/ap/lib/libzcore/std/lib/lib/phone/bl_svr.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/phone/font/libbitmap_font.a b/ap/lib/libzcore/std/lib/lib/phone/font/libbitmap_font.a
index 31538e0..77e48c3 100644
--- a/ap/lib/libzcore/std/lib/lib/phone/font/libbitmap_font.a
+++ b/ap/lib/libzcore/std/lib/lib/phone/font/libbitmap_font.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/phone/font/libttf_font.a b/ap/lib/libzcore/std/lib/lib/phone/font/libttf_font.a
index 92de131..0217fff 100644
--- a/ap/lib/libzcore/std/lib/lib/phone/font/libttf_font.a
+++ b/ap/lib/libzcore/std/lib/lib/phone/font/libttf_font.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/phone/framework.a b/ap/lib/libzcore/std/lib/lib/phone/framework.a
index 4e06272..f77cda0 100644
--- a/ap/lib/libzcore/std/lib/lib/phone/framework.a
+++ b/ap/lib/libzcore/std/lib/lib/phone/framework.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/phone/fwkernel.a b/ap/lib/libzcore/std/lib/lib/phone/fwkernel.a
index e8d75d7..9b92754 100644
--- a/ap/lib/libzcore/std/lib/lib/phone/fwkernel.a
+++ b/ap/lib/libzcore/std/lib/lib/phone/fwkernel.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/phone/gui.a b/ap/lib/libzcore/std/lib/lib/phone/gui.a
index 8e46064..fb8abb2 100644
--- a/ap/lib/libzcore/std/lib/lib/phone/gui.a
+++ b/ap/lib/libzcore/std/lib/lib/phone/gui.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/phone/msm.a b/ap/lib/libzcore/std/lib/lib/phone/msm.a
index 3aed03b..2a8313a 100644
--- a/ap/lib/libzcore/std/lib/lib/phone/msm.a
+++ b/ap/lib/libzcore/std/lib/lib/phone/msm.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/phone/ui_fw.a b/ap/lib/libzcore/std/lib/lib/phone/ui_fw.a
index ab9aa17..97876aa 100644
--- a/ap/lib/libzcore/std/lib/lib/phone/ui_fw.a
+++ b/ap/lib/libzcore/std/lib/lib/phone/ui_fw.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/poc/app_fw.a b/ap/lib/libzcore/std/lib/lib/poc/app_fw.a
index cac553f..6889113 100644
--- a/ap/lib/libzcore/std/lib/lib/poc/app_fw.a
+++ b/ap/lib/libzcore/std/lib/lib/poc/app_fw.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/poc/bl_psa.a b/ap/lib/libzcore/std/lib/lib/poc/bl_psa.a
index 724918e..ad58019 100644
--- a/ap/lib/libzcore/std/lib/lib/poc/bl_psa.a
+++ b/ap/lib/libzcore/std/lib/lib/poc/bl_psa.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/poc/bl_svr.a b/ap/lib/libzcore/std/lib/lib/poc/bl_svr.a
index 98cb1fd..49a5584 100644
--- a/ap/lib/libzcore/std/lib/lib/poc/bl_svr.a
+++ b/ap/lib/libzcore/std/lib/lib/poc/bl_svr.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/poc/font/libbitmap_font.a b/ap/lib/libzcore/std/lib/lib/poc/font/libbitmap_font.a
index 59978ae..60b9258 100644
--- a/ap/lib/libzcore/std/lib/lib/poc/font/libbitmap_font.a
+++ b/ap/lib/libzcore/std/lib/lib/poc/font/libbitmap_font.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/poc/font/libttf_font.a b/ap/lib/libzcore/std/lib/lib/poc/font/libttf_font.a
index 9acd588..7695dc9 100644
--- a/ap/lib/libzcore/std/lib/lib/poc/font/libttf_font.a
+++ b/ap/lib/libzcore/std/lib/lib/poc/font/libttf_font.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/poc/framework.a b/ap/lib/libzcore/std/lib/lib/poc/framework.a
index e39f3dd..761e7b5 100644
--- a/ap/lib/libzcore/std/lib/lib/poc/framework.a
+++ b/ap/lib/libzcore/std/lib/lib/poc/framework.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/poc/fwkernel.a b/ap/lib/libzcore/std/lib/lib/poc/fwkernel.a
index 4e70a22..ce18345 100644
--- a/ap/lib/libzcore/std/lib/lib/poc/fwkernel.a
+++ b/ap/lib/libzcore/std/lib/lib/poc/fwkernel.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/poc/gui.a b/ap/lib/libzcore/std/lib/lib/poc/gui.a
index 27eb0f4..214f2b1 100644
--- a/ap/lib/libzcore/std/lib/lib/poc/gui.a
+++ b/ap/lib/libzcore/std/lib/lib/poc/gui.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/poc/msm.a b/ap/lib/libzcore/std/lib/lib/poc/msm.a
index 5c2f48f..d49bb5a 100644
--- a/ap/lib/libzcore/std/lib/lib/poc/msm.a
+++ b/ap/lib/libzcore/std/lib/lib/poc/msm.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/poc/ui_fw.a b/ap/lib/libzcore/std/lib/lib/poc/ui_fw.a
index f09416d..e3c709b 100644
--- a/ap/lib/libzcore/std/lib/lib/poc/ui_fw.a
+++ b/ap/lib/libzcore/std/lib/lib/poc/ui_fw.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/watch/app_fw.a b/ap/lib/libzcore/std/lib/lib/watch/app_fw.a
index 08d3447..c3f3eb5 100644
--- a/ap/lib/libzcore/std/lib/lib/watch/app_fw.a
+++ b/ap/lib/libzcore/std/lib/lib/watch/app_fw.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/watch/bl_psa.a b/ap/lib/libzcore/std/lib/lib/watch/bl_psa.a
index 285b005..52b9930 100644
--- a/ap/lib/libzcore/std/lib/lib/watch/bl_psa.a
+++ b/ap/lib/libzcore/std/lib/lib/watch/bl_psa.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/watch/bl_svr.a b/ap/lib/libzcore/std/lib/lib/watch/bl_svr.a
index bd11b74..f66e03f 100644
--- a/ap/lib/libzcore/std/lib/lib/watch/bl_svr.a
+++ b/ap/lib/libzcore/std/lib/lib/watch/bl_svr.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/watch/font/libbitmap_font.a b/ap/lib/libzcore/std/lib/lib/watch/font/libbitmap_font.a
index d68cbcd..eac90f3 100644
--- a/ap/lib/libzcore/std/lib/lib/watch/font/libbitmap_font.a
+++ b/ap/lib/libzcore/std/lib/lib/watch/font/libbitmap_font.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/watch/font/libttf_font.a b/ap/lib/libzcore/std/lib/lib/watch/font/libttf_font.a
index 39f4fd9..4cde1f3 100644
--- a/ap/lib/libzcore/std/lib/lib/watch/font/libttf_font.a
+++ b/ap/lib/libzcore/std/lib/lib/watch/font/libttf_font.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/watch/framework.a b/ap/lib/libzcore/std/lib/lib/watch/framework.a
index 9ccbccf..7b0c661 100644
--- a/ap/lib/libzcore/std/lib/lib/watch/framework.a
+++ b/ap/lib/libzcore/std/lib/lib/watch/framework.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/watch/fwkernel.a b/ap/lib/libzcore/std/lib/lib/watch/fwkernel.a
index d12402e..16ff5d4 100644
--- a/ap/lib/libzcore/std/lib/lib/watch/fwkernel.a
+++ b/ap/lib/libzcore/std/lib/lib/watch/fwkernel.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/watch/gui.a b/ap/lib/libzcore/std/lib/lib/watch/gui.a
index 5901d56..f455d79 100644
--- a/ap/lib/libzcore/std/lib/lib/watch/gui.a
+++ b/ap/lib/libzcore/std/lib/lib/watch/gui.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/watch/msm.a b/ap/lib/libzcore/std/lib/lib/watch/msm.a
index e99e773..6a77cbf 100644
--- a/ap/lib/libzcore/std/lib/lib/watch/msm.a
+++ b/ap/lib/libzcore/std/lib/lib/watch/msm.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/lib/watch/ui_fw.a b/ap/lib/libzcore/std/lib/lib/watch/ui_fw.a
index e6c3e68..bc5326e 100644
--- a/ap/lib/libzcore/std/lib/lib/watch/ui_fw.a
+++ b/ap/lib/libzcore/std/lib/lib/watch/ui_fw.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/libplatadapt_com.a b/ap/lib/libzcore/std/lib/libplatadapt_com.a
index 9e4e0fe..36e6b36 100644
--- a/ap/lib/libzcore/std/lib/libplatadapt_com.a
+++ b/ap/lib/libzcore/std/lib/libplatadapt_com.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/libplatadapt_fwp.a b/ap/lib/libzcore/std/lib/libplatadapt_fwp.a
index 17016a2..c08b975 100644
--- a/ap/lib/libzcore/std/lib/libplatadapt_fwp.a
+++ b/ap/lib/libzcore/std/lib/libplatadapt_fwp.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/libplatadapt_phone.a b/ap/lib/libzcore/std/lib/libplatadapt_phone.a
index d714eee..3ec7506 100644
--- a/ap/lib/libzcore/std/lib/libplatadapt_phone.a
+++ b/ap/lib/libzcore/std/lib/libplatadapt_phone.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/libplatadapt_poc.a b/ap/lib/libzcore/std/lib/libplatadapt_poc.a
index e8d7f2e..e06ae73 100644
--- a/ap/lib/libzcore/std/lib/libplatadapt_poc.a
+++ b/ap/lib/libzcore/std/lib/libplatadapt_poc.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/libplatadapt_watch.a b/ap/lib/libzcore/std/lib/libplatadapt_watch.a
index e133a8c..208e864 100644
--- a/ap/lib/libzcore/std/lib/libplatadapt_watch.a
+++ b/ap/lib/libzcore/std/lib/libplatadapt_watch.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/libzcore_fwp.a b/ap/lib/libzcore/std/lib/libzcore_fwp.a
index 057fe6f..72a3a6a 100644
--- a/ap/lib/libzcore/std/lib/libzcore_fwp.a
+++ b/ap/lib/libzcore/std/lib/libzcore_fwp.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/libzcore_phone.a b/ap/lib/libzcore/std/lib/libzcore_phone.a
index 86ce0e3..86fff8d 100644
--- a/ap/lib/libzcore/std/lib/libzcore_phone.a
+++ b/ap/lib/libzcore/std/lib/libzcore_phone.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/libzcore_poc.a b/ap/lib/libzcore/std/lib/libzcore_poc.a
index d9b33c9..c64e1d1 100644
--- a/ap/lib/libzcore/std/lib/libzcore_poc.a
+++ b/ap/lib/libzcore/std/lib/libzcore_poc.a
Binary files differ
diff --git a/ap/lib/libzcore/std/lib/libzcore_watch.a b/ap/lib/libzcore/std/lib/libzcore_watch.a
index 7d0b057..965e787 100644
--- a/ap/lib/libzcore/std/lib/libzcore_watch.a
+++ b/ap/lib/libzcore/std/lib/libzcore_watch.a
Binary files differ
diff --git a/ap/lib/libzte_vsim/libzte_vsim.a b/ap/lib/libzte_vsim/libzte_vsim.a
index 50a8a92..e2ebc45 100644
--- a/ap/lib/libzte_vsim/libzte_vsim.a
+++ b/ap/lib/libzte_vsim/libzte_vsim.a
Binary files differ