Merge "[Feature][T108][task-view-1466][codec] Add codec ES8389"
diff --git a/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyGgeAmtUser_nvrwo_0x00043C00.bin b/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyGgeAmtUser_nvrwo_0x00043C00.bin
index 4c6dd9f..7a59262 100755
--- a/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyGgeAmtUser_nvrwo_0x00043C00.bin
+++ b/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyGgeAmtUser_nvrwo_0x00043C00.bin
Binary files differ
diff --git a/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyLteaAmtUser_nvrwo_0x00048000.bin b/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyLteaAmtUser_nvrwo_0x00048000.bin
index f73808b..ed4ce58 100755
--- a/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyLteaAmtUser_nvrwo_0x00048000.bin
+++ b/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyLteaAmtUser_nvrwo_0x00048000.bin
Binary files differ
diff --git a/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyWcdmaAmtUser_nvrwo_0x00045800.bin b/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyWcdmaAmtUser_nvrwo_0x00045800.bin
index 2ee682c..8470f83 100755
--- a/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyWcdmaAmtUser_nvrwo_0x00045800.bin
+++ b/allbins/zx297520v3/prj_vehicle/nv_dc_ref/phyWcdmaAmtUser_nvrwo_0x00045800.bin
Binary files differ
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys
index a42a25c..17c589c 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-core/images/files/zx297520v3/vehicle_dc_ref/fs/normal/rootfs/etc_ro/default/default_parameter_sys
@@ -421,7 +421,9 @@
 UDP_THRESH=1300
 IPSEC_DISABLE=0
 PRECONDTION_NOT_SUPPORT=0
-WAIT_RPT_TIME=1000
+#l.yang change for T108bug-1308 start
+WAIT_RPT_TIME=3000
+#l.yang change for T108bug-1308 end
 OCT_ALGN_AMR=0
 SMS_OVER_IP=1
 IMS_USER_AGENT=
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/liblynq-at-factory.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/liblynq-at-factory.cpp
index fbd5a5c..bb3fd64 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/liblynq-at-factory.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-at-factory/liblynq-at-factory.cpp
@@ -192,7 +192,7 @@
     //write data

     if (write(fd, write_buf, data_size) != data_size) {

         ALOGE("Write failed");

-        handle_output("Write failed", strlen("Write failed"), Response);

+        handle_output("+emmc: Write failed", strlen("+emmc: Write failed"), Response);

         close(fd);

         free(write_buf);

         return -1;

@@ -223,7 +223,7 @@
     if(read(fd, read_buf, data_size) != data_size)

     {

        ALOGE("Read failed");

-       handle_output("Read failed", strlen("Read failed"), Response);

+       handle_output("+emmc: Read failed", strlen("+emmc: Read failed"), Response);

        free(write_buf);

        free(read_buf);

        close(fd);

@@ -233,14 +233,14 @@
     //check data

     if (memcmp(write_buf, read_buf, data_size) == 0) {

         ALOGE("Data verification success!,");

-        handle_output("emmc write/read success", strlen("emmc write/read success"), Response);

+        handle_output("+emmc: emmc write/read success", strlen("+emmc: emmc write/read success"), Response);

         close(fd);

         free(write_buf);

         free(read_buf);

         return 0;

     } else {

         ALOGE("Data verification failed!");

-        handle_output("Data verification failed!", strlen("Data verification failed!"), Response);

+        handle_output("+emmc: Data verification failed!", strlen("+emmc: Data verification failed!"), Response);

         close(fd);

         free(write_buf);

         free(read_buf);

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
index d42142e..c45f5f8 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call.cpp
@@ -46,18 +46,6 @@
  */

 int g_module_init_flag = 0;

 

- typedef enum {

-     LYNQ_CALL_ACTIVE = 0,

-     LYNQ_CALL_HOLDING = 1,

-     LYNQ_CALL_DIALING = 2,    /* MO call only */

-     LYNQ_CALL_ALERTING = 3,   /* MO call only */

-     LYNQ_CALL_INCOMING = 4,   /* MT call only */

-     LYNQ_CALL_WAITING = 5,    /* MT call only */

-     /*warren add for T800 platform 2022/04/26 start*/

-     LYNQ_CALL_END = 6,         /*CALL END*/

-     /*warren add for T800 platform 2022/04/26 end*/

-}lynq_call_state_t;

-

 typedef struct

 {

     int used;

@@ -325,14 +313,15 @@
     }

     return INVALID_ID;

 }

-int addAddr(char addr[], int call_id)

+int addAddr(char addr[], int call_id, int call_state)

 {

     int ret = 0;

     ret = getUnusedElement();

     memcpy(s_call_lists[ret].addr,addr,strlen(addr)+1);

     s_call_lists[ret].call_id=call_id;

     s_call_lists[ret].used = 1;

-    LYINFLOG("add local idx is %d addr is %s",ret,addr);

+    s_call_lists[ret].call_state = call_state;

+    LYINFLOG("add local idx is %d addr is %s state is %d",ret,addr,call_state);

     return ret;

 }

 void updateCallList(lynq_call_list_e_t *callList,    int call_id,int call_state,int toa,int direction)

@@ -521,7 +510,7 @@
                 n = find_call_id_with_addr(call_list[i].addr);

                 if(n ==INVALID_ID)

                 {

-                    n = addAddr(call_list[i].addr,call_list[i].call_id);

+                    n = addAddr(call_list[i].addr,call_list[i].call_id,call_list[i].call_state);

                     updateCallList(&s_call_lists[n],call_list[i].call_id,call_list[i].call_state,call_list[i].toa,call_list[i].direction);

                     send_call_state_change(call_list[i].call_id);

                 }

@@ -969,7 +958,7 @@
     }

 #endif   

     Parcel* p=NULL;

-    lynq_call_id = addAddr(addr,0);

+    lynq_call_id = addAddr(addr,0,LYNQ_CALL_END);

     int ret=lynq_send_common_request(p,g_wait_time,RIL_REQUEST_DIAL,2,"%s %d",addr, 0);

     if(ret!=0)

     {

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call_common.h b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call_common.h
index e65f243..355725a 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call_common.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call_common.h
@@ -4,7 +4,20 @@
 #define INVALID_ID (-1)

 

 int find_call_id_with_call_id(int call_id);

-int addAddr(char addr[], int call_id);

+

+ typedef enum {

+     LYNQ_CALL_ACTIVE = 0,

+     LYNQ_CALL_HOLDING = 1,

+     LYNQ_CALL_DIALING = 2,    /* MO call only */

+     LYNQ_CALL_ALERTING = 3,   /* MO call only */

+     LYNQ_CALL_INCOMING = 4,   /* MT call only */

+     LYNQ_CALL_WAITING = 5,    /* MT call only */

+     /*warren add for T800 platform 2022/04/26 start*/

+     LYNQ_CALL_END = 6,         /*CALL END*/

+     /*warren add for T800 platform 2022/04/26 end*/

+}lynq_call_state_t;

+

+int addAddr(char addr[], int call_id,int call_state);

 int waitCallstateChange(int mtime);

 void sendSignalToWaitCallStateChange();

 void lynqNoticeGetModuleCallList();

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call_ecall.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call_ecall.cpp
index 15dc6dc..b90b4bc 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call_ecall.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-call/lynq_call_ecall.cpp
@@ -613,7 +613,7 @@
                    if(find_call_id_with_call_id(ecallId)==INVALID_ID)

                    {

                         LYINFLOG("add ecall in loacl list");                             	 

-                        addAddr("ecall",ecallId);               

+                        addAddr("ecall",ecallId,LYNQ_CALL_ACTIVE);               

                    }	

                    s_ecallId = ecallId; //API-871 ecall id maybe exists in local list as noraml call to be replaced

                }     	       	   

diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-adc.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-adc.c
index f79c485..282f484 100644
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-adc.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/mfd/zx234290-adc.c
@@ -291,7 +291,7 @@
 			soft_spin_unlock(ADC_SFLOCK);

 			return nRet;

 		}

-		udelay(500);

+		usleep_range(400,600); //yu.dong @ 250620 Reduced ADC cpu usage

 		/*read status_A*/

 		nRet = zx234290_i2c_read_simple(ZX234290_REG_ADDR_STSA, &status_a);

 		if (nRet != 0)

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c
index 8483024..ae81844 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/binder/liblog/logd_write.c
@@ -451,12 +451,12 @@
     char buffer[32];
     char cmd[128];
     int *level = NULL;
-    sprintf(cmd, "nv show | grep %s",level_name);
+
+    sprintf(cmd, "nv get %s", level_name); 
     FILE *output = popen(cmd, "r");
-    while (fgets(buffer, sizeof(buffer), output) != NULL)
-    {
-        char *equal_sign = strchr(buffer, '=');
-        strncpy(nv_level,equal_sign + 1,1);
+    if(fgets(buffer, sizeof(buffer), output) != NULL)
+    { 
+        strncpy(nv_level, buffer, sizeof(nv_level) - 1);
     }
     pclose(output);
     nv_level[sizeof(nv_level)-1] = '\0';
diff --git a/update_version.sh b/update_version.sh
index 2861b1d..df944cc 100755
--- a/update_version.sh
+++ b/update_version.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 #export LYNQ_VERSION="T106_lynq_version_ap_build_sh"
-LYNQ_AP_VERSION="T106-MXX-PLXXXX-P56U11.AP.19.04"
-LYNQ_CAP_INSIDE_VERSION="CAP.19.04"
-LYNQ_CAP_VERSION="CAP.19.04"
+LYNQ_AP_VERSION="T106-MXX-PLXXXX-P56U11.AP.19.06"
+LYNQ_CAP_INSIDE_VERSION="CAP.19.06"
+LYNQ_CAP_VERSION="CAP.19.06"
 COMMIT_ID="$(git rev-parse HEAD)"
 
 LYNQ_SW_INSIDE_VERSION="LYNQ_CONFIG_VERSION = \"${LYNQ_AP_VERSION}_${LYNQ_CAP_INSIDE_VERSION}\""