Merge "[Feature][T106]version update to T106-W-V2.01.01.02P56U06.AP.15.10_CAP.15.10"
diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c b/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c
index d2479c9..24ec133 100755
--- a/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c
+++ b/ap/app/zte_comm/at_ctl/src/atconfig/ps_normal.c
@@ -5445,7 +5445,7 @@
{
snprintf(convertDataStr + strlen(convertDataStr), AT_USSD_DATA_TO_WEB_LEN, "%04x", dataStr[iDataLen]);
}
- printf("%s\n", convertDataStr);
+ at_print(AT_DEBUG,"%s\n",convertDataStr);
}
VOID atBase_Convert8BitToUCS2(const CHAR *dataStr, CHAR *convertDataStr, UINT16 dataLen)
@@ -5467,7 +5467,7 @@
snprintf(convertDataStr + strlen(convertDataStr), AT_USSD_DATA_TO_WEB_LEN, "%c", dataStr[iDataLen]);
}
}
- printf("%s\n", convertDataStr);
+ at_print(AT_DEBUG,"%s\n",convertDataStr);
}
@@ -5497,7 +5497,7 @@
}
else
{
- printf("DCS Reported can't be processed!!!!\n");
+ at_print(AT_DEBUG,"DCS Reported can't be processed!!!!\n");
return FALSE;
}
}
diff --git a/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c b/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c
index 078e8d0..9c6122b 100755
--- a/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c
+++ b/ap/app/zte_comm/at_ctl/src/atconfig/ps_pdp.c
@@ -3402,7 +3402,7 @@
at_print(AT_DEBUG,"@@@@@@@@@@@@@start_pdp_auto_dial g_pdp_set_info=0x%p, auto_connect is %s!\n",g_defcid_mng.set_info, auto_reconnect);
if((0 == check_is_fd(g_defcid_mng.modid)) && 0 == strcmp(auto_reconnect,"1"))
{
- at_print(AT_DEBUG,"@@@@@@@@@@@@@start_pdp_auto_dial: apn is %s, modid is %x!\n", g_defcid_mng.set_info->comm_info.apn, g_defcid_mng.modid);
+ //at_print(AT_DEBUG,"@@@@@@@@@@@@@start_pdp_auto_dial: apn is %s, modid is %x!\n", g_defcid_mng.set_info->comm_info.apn, g_defcid_mng.modid);
//ÊÕµ½×¤Íø³É¹¦ºó£¬ÉèÖÃÒ»¸ö5s¶¨Ê±Æ÷£¬³¬Ê±ºó½øÐÐpdp²¦ºÅÇëÇó
if(0 == strcmp(reconnect_type,"simple"))
{
diff --git a/ap/app/zte_comm/at_ctl/src/atctrl/at_context.c b/ap/app/zte_comm/at_ctl/src/atctrl/at_context.c
index 12f4dad..8fc69b2 100755
--- a/ap/app/zte_comm/at_ctl/src/atctrl/at_context.c
+++ b/ap/app/zte_comm/at_ctl/src/atctrl/at_context.c
@@ -1559,7 +1559,7 @@
{
MSG_BUF stMsg = {0};
- at_print(AT_ERR,"Enter resend_rcv_atstr, fd:%d str:%s!!!\n", at_fd, at_str);
+ at_print(AT_DEBUG,"Enter resend_rcv_atstr, fd:%d str:%s!!!\n", at_fd, at_str);
if(at_fd >= MODULE_ID_ATCTL_TO_VOLTE && at_fd < MODULE_ID_ATCTL_TO_VOLTE+VOLTE_PTY1_MAX)
{
@@ -1629,7 +1629,7 @@
MSG_BUF stMsg = {0};
at_msg.at_fd = at_fd;
- at_print(AT_ERR,"Enter delay_resend_atstr, at_str:%s!!!\n", at_str);
+ at_print(AT_DEBUG,"Enter delay_resend_atstr, at_str:%s!!!\n", at_str);
//zdm ÕâÀïÊÇÓÉÓÚatÃüÁî½âÎöÍê³Éºó£¬ÒѾ½«\r\nÈ¥³ý£¬Èç¹ûatͨµÀ²»×ãʱ£¬ÐèÒª½«atÃüÁî
//ÖØÐµ±×ö´ÓatͨµÀ¶ÁÈ¡µ½µÄatÃüÁî·¢¸øÖ÷Ï̴߳¦Àí£¬Òò´ËÐèÒª½«\r\nÖØÐÂÌí¼ÓÉÏ
diff --git a/ap/app/zte_comm/at_ctl/src/atctrl/at_portmng.c b/ap/app/zte_comm/at_ctl/src/atctrl/at_portmng.c
index 9049199..6074897 100755
--- a/ap/app/zte_comm/at_ctl/src/atctrl/at_portmng.c
+++ b/ap/app/zte_comm/at_ctl/src/atctrl/at_portmng.c
@@ -118,6 +118,12 @@
if(FD_FAR_PS[ilde_idx] >= 0)
{
node = add_new_channel(FD_FAR_PS[ilde_idx],FAR_PS);
+ if(0 == at_strncmp(name, "/dev/rpmsg35", strlen(name)) ||
+ 0 == at_strncmp(name, "/dev/rpmsg37", strlen(name)) ||
+ 0 == at_strncmp(name, "/dev/rpmsg38", strlen(name)) ||
+ 0 == at_strncmp(name, "/dev/rpmsg39", strlen(name))) {
+ node->attribution |= 1<<CH_AUTOIND;
+ }
//if(node != NULL &&(strstr(name, "/dev/ttyGS0") != NULL || strstr(name, "/dev/ttyGS1") != NULL))
node->reserved = 0;//×÷ΪԤÁôͨµÀ£¬ÔÚÇëÇóÃüÁîÑ¡Ôñfarpsʱºò£¬»áÑ¡Ôñ·¢ËÍ
memcpy(g_farps_port_info[ilde_idx].name,name,strlen(name));
diff --git a/ap/app/zte_comm/at_ctl/src/atctrl/at_rcvmsg.c b/ap/app/zte_comm/at_ctl/src/atctrl/at_rcvmsg.c
index c5b86ed..48f1f32 100755
--- a/ap/app/zte_comm/at_ctl/src/atctrl/at_rcvmsg.c
+++ b/ap/app/zte_comm/at_ctl/src/atctrl/at_rcvmsg.c
@@ -726,7 +726,7 @@
int msgtype = get_msgtype(at_str);
int ret = AT_END;
- at_print(AT_ERR, "rcvmsg_rsp_at_fwd_down context->prefix = %s \n" ,context->at_cmd_prefix);
+ at_print(AT_DEBUG, "rcvmsg_rsp_at_fwd_down context->prefix = %s \n" ,context->at_cmd_prefix);
/* ¶ÔÓÚת·¢ÏÂÓÎÊÕµ½µÄÓ¦´ð´¦Àí,Ö»ÓÐPDP¼¤»îµÄת·¢ÐèÒª¼à¿Ø£¬Ò»°ãµÄATÃüÁîת·¢ÎÞÐè¼à¿Ø,Ö±½Óת·¢Í¸´«¸øÉÏÓÎλÖÃ*/
if(context->at_proc != NULL)
{
@@ -769,7 +769,7 @@
int res_msglen = 0;
struct app_clt_ops_t *clt_nod = NULL;
- at_print(AT_ERR, "rcvmsg_rsp_at_client context->prefix = %s \n" ,context->at_cmd_prefix);
+ at_print(AT_DEBUG, "rcvmsg_rsp_at_client context->prefix = %s \n" ,context->at_cmd_prefix);
//оƬÈÏÖ¤ÅжϷÖÖ§
if(atcmd_stream_rep_proc(context, at_str))
@@ -917,10 +917,10 @@
}
if(ismatch){
set_fwd_fd(BROADCAST_FWD);
- at_print(AT_ERR,"[XXX]set_fwd_fd 111\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd 111\n");
}else{
set_fwd_fd(BROADCAST_VOLTE);
- at_print(AT_ERR,"[XXX]set_fwd_fd 222\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd 222\n");
}
}
else if(strlen(FwIndAtCmdPrefix) != 0)
@@ -928,18 +928,18 @@
if(at_strstr(FwIndAtCmdPrefix, temp_prefix))
{
set_fwd_fd(BROADCAST_FWD);
- at_print(AT_ERR,"[XXX]set_fwd_fd 333\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd 333\n");
}
else
{
set_fwd_fd(BROADCAST_VOLTE);
- at_print(AT_ERR,"[XXX]set_fwd_fd 444\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd 444\n");
}
}
else
{
set_fwd_fd(BROADCAST_FWD);
- at_print(AT_ERR,"[XXX]set_fwd_fd 555\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd 555\n");
}
}
/* ½«VOLTEµÄÖ÷¶¯Éϱ¨·¢Ë͸øFAR_PS*/
@@ -970,10 +970,10 @@
}
if(ismatch){
set_fwd_fd(BROADCAST_FARPS);
- at_print(AT_ERR,"[XXX]set_fwd_fd 666\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd 666\n");
}else{
set_fwd_fd(0);
- at_print(AT_ERR,"[XXX]set_fwd_fd 777\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd 777\n");
}
}
else if(strlen(FwIndAtCmdPrefix) != 0)
@@ -981,25 +981,25 @@
if(at_strstr(FwIndAtCmdPrefix, temp_prefix))
{
set_fwd_fd(BROADCAST_FARPS);
- at_print(AT_ERR,"[XXX]set_fwd_fd 888\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd 888\n");
}
else
{
set_fwd_fd(0);
- at_print(AT_ERR,"[XXX]set_fwd_fd 999\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd 999\n");
}
}
else
{
set_fwd_fd(BROADCAST_FARPS);
- at_print(AT_ERR,"[XXX]set_fwd_fd AAA\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd AAA\n");
}
}
//fd²»ÊÇÕæÊµµÄͨµÀ£¨½«ÏûÏ¢Ô´×÷Ϊfd£©ÉÏÊÕµ½µÄÖ÷¶¯Éϱ¨²»²ÎÓë¹ýÂË
else if(check_is_fd(at_fd) == 0 && position == NEAR_PS)
{
set_fwd_fd(BROADCAST_FARPS);
- at_print(AT_ERR,"[XXX]set_fwd_fd BBB\n");
+ at_print(AT_DEBUG,"[XXX]set_fwd_fd BBB\n");
}
}
@@ -1020,7 +1020,7 @@
if( (prefix_len >0 && at_cmd_prefix != NULL && 0 == at_strncmp(context->at_cmd_prefix,(char*)at_cmd_prefix, prefix_len))
|| (prefix_len >0 && at_cmd_prefix != NULL && 0==strncmp("> ",at_cmd_prefix, prefix_len)))
{
- at_print(AT_ERR,"receive client inform str = %s, fd = %d\n", at_str, at_fd);
+ at_print(AT_ERR,"receive client inform str = %s, fd = %d\n", get_small_str(at_str), at_fd);
//оƬÈÏÖ¤ÅжϷÖÖ§
if(atcmd_stream_inform_proc(context, at_str))
return 0;
@@ -1052,7 +1052,7 @@
if( (prefix_len >0 && at_cmd_prefix != NULL && 0 == at_strncmp(fwd_context->at_cmd_prefix, (char*)at_cmd_prefix, prefix_len))
||(prefix_len >0 && at_cmd_prefix != NULL && 0==strncmp("> ",at_cmd_prefix, prefix_len)) )
{
- at_print(AT_ERR,"receive fwd_down inform str = %s, fd = %d\n", at_str, at_fd);
+ at_print(AT_ERR,"receive fwd_down inform str = %s, fd = %d\n", get_small_str(at_str), at_fd);
set_fwd_fd(fwd_context->fwd_context->at_channel->at_fd);
if(strstr(at_str,"> ") != NULL)
{
@@ -1066,7 +1066,7 @@
/* Ò»°ãÖ÷¶¯Éϱ¨£¬½ö´¦Àíg_auto_fdͨµÀµÄÖ÷¶¯Éϱ¨ºÍVOLTEµÄÖ÷¶¯Éϱ¨£¬g_auto_fdĬÈÏÑ¡ÔñµÚÒ»¸ö´ò¿ªµÄNEAR_PSλÖõÄatͨµÀ*/
if(g_auto_fd == at_fd || position == POSITION_VOLTE || position == FAR_PS)
{
- at_print(AT_ERR,"receive auto report str = %s, fd = %d, g_auto_fd = %d, position = %d\n", at_str, at_fd, g_auto_fd, position);
+ at_print(AT_DEBUG,"receive auto report str = %s, fd = %d, g_auto_fd = %d, position = %d\n", get_small_str(at_str), at_fd, g_auto_fd, position);
list_for_each_entry(entry,&g_inform_list,list)
{
@@ -1097,7 +1097,7 @@
//ÏûÏ¢·¢ËÍʧ°Ü£¬Ö±½Ó·µ»ØERROR²¢ÊÍ·ÅͨµÀÉÏÏÂÎÄ
if(at_cmd_paras && 0 != ipc_send_message2(MODULE_ID_AT_CTL, entry0->module_id, entry0->req_msg_id, strlen(at_cmd_paras)+1, at_cmd_paras,0))
{
- at_print(AT_ERR,"inform_act at_cmd_prefix0 ipc err\n");
+ at_print(AT_DEBUG,"inform_act at_cmd_prefix0 ipc err\n");
}
}
}
@@ -1216,7 +1216,7 @@
if(fwd_fd != 0 && whole_at_type != at_str_type)
return 0;
- at_print(AT_ERR,"at_rcvmsg_handle AT_TYPE_REQUEST str=%s, at_fd = %d, at_cmd_paras: %s, prefix_len: %d, paras_len: %d\n",at_str, at_fd,(char *)at_cmd_paras, prefix_len, paras_len);
+ at_print(AT_DEBUG,"at_rcvmsg_handle AT_TYPE_REQUEST str=%s, at_fd = %d, at_cmd_paras: %s, prefix_len: %d, paras_len: %d\n",at_str, at_fd,(char *)at_cmd_paras, prefix_len, paras_len);
//µ±Ç°×º³¤¶È´óÓÚǰ׺×î´ó±£´æ³¤¶Èʱ£¬±¨´í add by zpr 210115
if(prefix_len >= AT_CMD_PREFIX)
{
@@ -1230,14 +1230,14 @@
}
else if(at_str_type == AT_TYPE_RESPONSE)//ÏìÓ¦ÀàÃüÁî´¦Àí
{
- at_print(AT_ERR,"at_rcvmsg_handle AT_TYPE_RESPONSE str=%s, at_fd = %d, at_cmd_paras: %s, prefix_len: %d, paras_len: %d\n",at_str, at_fd,(char *)at_cmd_paras, prefix_len, paras_len);
+ at_print(AT_DEBUG,"at_rcvmsg_handle AT_TYPE_RESPONSE str=%s, at_fd = %d, at_cmd_paras: %s, prefix_len: %d, paras_len: %d\n",at_str, at_fd,(char *)at_cmd_paras, prefix_len, paras_len);
return rcv_at_rsp_handle(at_fd, at_str, at_cmd_prefix, prefix_len, at_cmd_paras, paras_len);
}
else if(at_str_type == AT_TYPE_INFORM)//Öмä½á¹ûÃüÁîºÍÖ÷¶¯Éϱ¨´¦Àí
return rcv_at_inform_handle(at_fd, at_str, at_cmd_prefix, prefix_len, at_cmd_paras, paras_len);
else if(at_str_type == AT_TYPE_PDU)//PDU´¦Àí
{
- at_print(AT_ERR,"at_rcvmsg_handle AT_TYPE_PDU at_fd = %d, prefix_len: %d, paras_len: %d\n", at_fd, prefix_len, paras_len);
+ at_print(AT_DEBUG,"at_rcvmsg_handle AT_TYPE_PDU at_fd = %d, prefix_len: %d, paras_len: %d\n", at_fd, prefix_len, paras_len);
if(at_cmd_paras)
return rcv_sms_pdu_handle(at_fd, at_str, at_cmd_prefix, prefix_len, at_cmd_paras, paras_len);
}
diff --git a/ap/lib/libsoftap/softap_log.c b/ap/lib/libsoftap/softap_log.c
index 442770b..590b9e4 100755
--- a/ap/lib/libsoftap/softap_log.c
+++ b/ap/lib/libsoftap/softap_log.c
@@ -115,7 +115,7 @@
}
#define put_to_console(mod, fmt, arg) do {\
- char buf[1024] = {0}; \
+ char buf[1024]; \
if(SLOG_SOCTIME_ON == soctime_sw) \
snprintf(buf, 1023, "%s[%d][%lld.%llds]: ", mod, syscall(SYS_gettid), time_us/1000000, time_us%1000000); \
else \
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
index 0bea4fc..c15e093 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
+++ b/cap/zx297520v3/sources/meta-zxic-custom/conf/distro/vehicle_dc_ref.conf
@@ -153,6 +153,7 @@
CONFIG_TEL_API_SUPPORT = "RIL"
CUSTOM_MACRO += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'BL', '-D_USE_BL', '', d)}"
+CUSTOM_MACRO += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'RIL', '-DZXIC_ATCHN_RPMSG_MODE', '', d)}"
CUSTOM_MACRO += "${@bb.utils.contains('CONFIG_TEL_API_SUPPORT', 'RIL', '-DUSE_CUSTOM_YK', '', d)}"
DISTRO_FEATURES += " vehicle_dc_ref "
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
index bc7d265..71bce71 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
@@ -4183,41 +4183,31 @@
if(e == 0)
{
RLOGD("[DATA]: deactive datacall success\n");
- for(int j = 0; j < LYNQ_APN_CHANNEL_MAX; j++)
- {
- RLOGD("lynq_apn_cid_table[j].uToken =%d, pRI->uToken = %d", lynq_apn_cid_table[j].deactive_utoken, pRI->uToken);
- if(lynq_apn_cid_table[j].used == 1 && lynq_apn_cid_table[j].deactive_utoken == pRI->uToken)
- {
- RLOGD("[DATA]delete cid is %d", lynq_apn_cid_table[j].cid);
- //delete
- bzero(lynq_apn_cid_table[j].apn,LYNQ_APN_LEN_MAX);
- bzero(lynq_apn_cid_table[j].apntype,LYNQ_APNTPYE_LEN_MAX);
- bzero(lynq_apn_cid_table[j].ifaceName,LYNQ_IFNAME_LEN_MAX);
- bzero(lynq_apn_cid_table[j].address,LYNQ_ADDRESS_LEN_MAX);
- lynq_apn_cid_table[j].cid = -1;
- lynq_apn_cid_table[j].used = -1;
- lynq_apn_cid_table[j].status = -1;
- lynq_apn_cid_table[j].dialing = -1;
- lynq_apn_cid_table[j].uToken = -1;
- lynq_apn_cid_table[j].deactive_utoken = -1;
- break;
- }
- }
}
else
{
RLOGD("[DATA]: deactive datacall fail\n");
- for(int j = 0; j < LYNQ_APN_CHANNEL_MAX; j++)
+ }
+ for(int j = 0; j < LYNQ_APN_CHANNEL_MAX; j++)
+ {
+ RLOGD("lynq_apn_cid_table[j].uToken =%d, pRI->uToken = %d", lynq_apn_cid_table[j].deactive_utoken, pRI->uToken);
+ if(lynq_apn_cid_table[j].used == 1 && lynq_apn_cid_table[j].deactive_utoken == pRI->uToken)
{
- RLOGD("lynq_apn_cid_table[j].uToken =%d, pRI->uToken = %d", lynq_apn_cid_table[j].deactive_utoken, pRI->uToken);
- if(lynq_apn_cid_table[j].used == 1 && lynq_apn_cid_table[j].deactive_utoken == pRI->uToken)
- {
- lynq_apn_cid_table[j].deactive_utoken = -1;
- break;
- }
+ RLOGD("[DATA]delete cid is %d", lynq_apn_cid_table[j].cid);
+ //delete
+ bzero(lynq_apn_cid_table[j].apn,LYNQ_APN_LEN_MAX);
+ bzero(lynq_apn_cid_table[j].apntype,LYNQ_APNTPYE_LEN_MAX);
+ bzero(lynq_apn_cid_table[j].ifaceName,LYNQ_IFNAME_LEN_MAX);
+ bzero(lynq_apn_cid_table[j].address,LYNQ_ADDRESS_LEN_MAX);
+ lynq_apn_cid_table[j].cid = -1;
+ lynq_apn_cid_table[j].used = -1;
+ lynq_apn_cid_table[j].status = -1;
+ lynq_apn_cid_table[j].dialing = -1;
+ lynq_apn_cid_table[j].uToken = -1;
+ lynq_apn_cid_table[j].deactive_utoken = -1;
+ break;
}
}
-
}
//xf.li@20231102 add for t106 data start
if(pRI->pCI->requestNumber == RIL_REQUEST_SETUP_DATA_CALL)
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
index 421383b..78fc8b2 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
@@ -1596,7 +1596,7 @@
}
return LYNQ_E_NO_INIT;
}
- lynq_data_call_response_v11_t data_call_info;
+ lynq_data_call_response_v11_t data_call_info = {0};
data_call_handle_get(profile_idx,&handle);
ret = lynq_get_data_call_list(&handle,&data_call_info);
if (ret == 0)
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/spi/spi-zx29.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/spi/spi-zx29.c
index 3d371ea..fd49fd6 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/spi/spi-zx29.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/drivers/spi/spi-zx29.c
@@ -2341,7 +2341,7 @@
.iface = SPI_INTERFACE_MOTOROLA_SPI,
.hierarchy = SPI_MASTER,
.slave_tx_disable = DO_NOT_DRIVE_TX,
- .rx_lev_trig = SPI_RX_4_OR_MORE_ELEM,
+ .rx_lev_trig = SPI_RX_8_OR_MORE_ELEM,
.tx_lev_trig = SPI_TX_4_OR_MORE_EMPTY_LOC,
// .ctrl_len = SSP_BITS_8,
// .wait_state = SSP_MWIRE_WAIT_ZERO,
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/codecs/es8311.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/codecs/es8311.c
index 0e9dab6..fef445f 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/codecs/es8311.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/codecs/es8311.c
@@ -894,6 +894,12 @@
snd_soc_component_write(component, ES8311_ADC_REG1B, 0x0A);
snd_soc_component_write(component, ES8311_ADC_REG1C, 0x6A);
snd_soc_component_write(component, ES8311_DAC_REG37, 0x48);
+/* yu.dong@20240718[ZXW-277]Optimizing Recording in CODEC 8311 TDM Mode start*/
+#if defined(CONFIG_USE_TOP_TDM)
+ snd_soc_component_write(component, ES8311_CLK_MANAGER_REG01, 0x9f);
+ snd_soc_component_write(component, ES8311_ADC_REG15, 0x00);
+#endif
+/* yu.dong@20240718[ZXW-277]Optimizing Recording in CODEC 8311 TDM Mode end*/
//snd_soc_component_write(component, ES8311_ADC_REG17, 0xBF);
//snd_soc_component_write(component, ES8311_DAC_REG32, 0xBF);
break;
@@ -1425,13 +1431,10 @@
}
}
/* yu.dong@20240508[ZXW-277]Modified Platform CODEC ES8311 Compatible with I2S and TDM Modes start */
-#ifdef CONFIG_USE_TOP_TDM
-#else
ret = zx29_i2s_config_default_pin();
if(ret < 0) {
pr_err("%s select state failure %d !! \n", __func__, ret);
}
-#endif
es8311_reinit(component, info);
/* yu.dong@20240508[ZXW-277]Modified Platform CODEC ES8311 Compatible with I2S and TDM Modes end */
pr_info("%s:clk en end!\n",__func__);
@@ -1457,13 +1460,10 @@
}
pr_info("%s:clk dis end!\n",__func__);
/* yu.dong@20240508[ZXW-277]Modified Platform CODEC ES8311 Compatible with I2S and TDM Modes start */
-#ifdef CONFIG_USE_TOP_TDM
-#else
ret = zx29_i2s_config_sleep_pin();
if(ret < 0) {
pr_err("%s select state failure %d !! \n", __func__, ret);
}
-#endif
/* yu.dong@20240508[ZXW-277]Modified Platform CODEC ES8311 Compatible with I2S and TDM Modes end */
return ret;
}
diff --git a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/sanechips/zx29_es83xx.c b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/sanechips/zx29_es83xx.c
index 3c755a6..1204542 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/sanechips/zx29_es83xx.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/linux-5.10/sound/soc/sanechips/zx29_es83xx.c
@@ -1119,14 +1119,8 @@
info->s = s;
info->s_sleep = s_sleep;
}
-/* yu.dong@20240508[ZXW-277]Modified Platform CODEC ES8311 Compatible with I2S and TDM Modes start */
-#ifdef CONFIG_USE_TOP_TDM
- ret = pinctrl_select_state(p, s);
-#else
//yu.dong@20240416[ZXW-268]Added codec re-initialization for power down and I2S default configuration adjustment start
ret = pinctrl_select_state(p, s_sleep);
-#endif
-/* yu.dong@20240508[ZXW-277]Modified Platform CODEC ES8311 Compatible with I2S and TDM Modes end */
if (ret < 0) {
devm_pinctrl_put(p);
dev_err(dev, " select state failure!!\n");
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/inc/at_context.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/inc/at_context.h
index d92676b..6ce18ba 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/inc/at_context.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/inc/at_context.h
@@ -51,7 +51,11 @@
//ÿ¸ö²Ù×÷ϵͳƽ̨£¬´ò¿ªµÄ¸öÊý²»Ò»ÖÂ
#if (APP_OS_TYPE == APP_OS_LINUX)
//¿¿½üPS²àµÄ¿ÉÓÃÎïÀíͨµÀ¸öÊý
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+#define NEAR_PS_FD_MAX 2
+#else
#define NEAR_PS_FD_MAX 4
+#endif
//Ô¶ÀëPS²àµÄ¿ÉÓÃÎïÀíͨµÀ¸öÊý
#define FAR_PS_FD_MAX 20
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atctrl/at_context.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atctrl/at_context.c
index c87c8d2..67a6d3c 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atctrl/at_context.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/at_ctl/src/atctrl/at_context.c
@@ -211,7 +211,11 @@
#if (APP_OS_TYPE == APP_OS_LINUX)
int i;
/*¿¿½üPS²àµÄÎïÀíͨµÀ¾ä±úÊý×é,¸ÃÎïÀíͨµÀÓëps²à´ò¿ªµÄͨµÀÒ»Ò»¶ÔÓ¦£¬¶ÔÓÚ¸ÃÊý×飬²»ÔÊÐíɾ³ý¡¢¸Ä±ä˳Ðò*/
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ int CH_NEAR_PS[NEAR_PS_FD_MAX] = {36,37};
+#else
int CH_NEAR_PS[NEAR_PS_FD_MAX] = {36,37,38,39};
+#endif
char ch_name[AT_PORT_NAME_LEN] = {0};
struct at_channel_info* node;
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libatchn/atchn/zxic_atchn_rpmsg_api.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libatchn/atchn/zxic_atchn_rpmsg_api.c
new file mode 100755
index 0000000..2fcba0e
--- /dev/null
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libatchn/atchn/zxic_atchn_rpmsg_api.c
@@ -0,0 +1,315 @@
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <assert.h>
+#include <syslog.h>
+#include <sys/klog.h>
+#include <sys/msg.h>
+#include <sys/socket.h>
+#include <linux/sockios.h>
+#include <sys/un.h>
+#include <errno.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <pthread.h>
+#include <sys/prctl.h>
+#include <semaphore.h>
+
+#include "softap_api.h"
+#include "zxic_atchn_api.h"
+
+#include <linux/rpmsg/rpmsg_zx29.h>
+
+#define ATCHN_SIZE (8192)
+
+#define ATCHN_STOP_INTERVAL_NS 200000000
+
+#define ATCHN_TEST_AT "AT\r\n"
+
+struct at_chn_context_t {
+ /*ͨµÀÃû*/
+ char name[ZXIC_ATCHN_NAME_SIZE_MAX];
+ /*ͨµÀ±êÖ¾,ZXIC_ATCHN_FLAGS_NONE/ZXIC_ATCHN_FLAGS_AUTO*/
+ int flags;
+ int fd;
+ pthread_t threadid;
+ int bstop;
+ sem_t semid;
+
+ struct at_chn_calls_t *callbacks;
+ void *priv;
+};
+
+
+/* Started by AICoder, pid:i2c43ef4a4c3d2814b5809d2a0dd9432abe9385a */
+int atchn_write(int fd, char *buf, int len)
+{
+ int resendcnt = 0;
+ int written_bytes = 0;
+ int left_len = len;
+ char *pstr = buf;
+
+ if(0 > fd) {
+ return -EINVAL;
+ }
+
+ while(left_len > 0) {
+ resendcnt++;
+ written_bytes = write(fd, pstr, left_len);
+ if(written_bytes <= 0) {
+ if(errno == EINTR || errno == EAGAIN) {
+ written_bytes = 0;
+ if(resendcnt > 10){
+ slog(EAP_PRINT, SLOG_ERR, "atchn_write fail!\n");
+ return -errno; // ·µ»Ø´íÎ󣬱ÜÃâÎÞÏÞÑ»·
+ }
+ else {
+ usleep(100 * 1000 * resendcnt);
+ }
+ continue;
+ }
+ return -errno;
+ }
+ left_len -= written_bytes;
+ pstr += written_bytes;
+
+ if(left_len > 0) {
+ usleep(100 * 1000);
+ }
+ }
+
+ return len;
+}
+/* Ended by AICoder, pid:i2c43ef4a4c3d2814b5809d2a0dd9432abe9385a */
+
+/* Started by AICoder, pid:c1d8bt5c90540d01433f080740ab661442d7556f */
+int atchn_read(int fd, char *buf, int len)
+{
+ int datalen = 0;
+
+ if(0 > fd) {
+ return -1;
+ }
+ while((datalen = read(fd, buf, len)) <= 0) {
+ if(errno == EINTR || errno == EAGAIN) {
+ sleep(1);
+ continue;
+ }
+ slog(EAP_PRINT, SLOG_ERR, "Err:atchn_read failed, errno: %d\n", errno);
+ return -1;
+ }
+
+ return datalen;
+}
+/* Ended by AICoder, pid:c1d8bt5c90540d01433f080740ab661442d7556f */
+
+static void channel_config(int fd)
+{
+ if(ioctl(fd, RPMSG_CREATE_CHANNEL, ATCHN_SIZE) < 0) {
+ slog(EAP_PRINT, SLOG_ERR, "Err:ioctl RPMSG_CREATE_CHANNEL fail!\n");
+ }
+ /* ·¢ËÍÏûϢʱ£¬´¥·¢ÖжÏ*/
+ if(ioctl(fd, RPMSG_SET_INT_FLAG, NULL) < 0) {
+ slog(EAP_PRINT, SLOG_ERR, "Err:ioctl RPMSG_SET_INT_FLAG fail!\n");
+ }
+
+ /* ×èÈûµÄ·½Ê½¶Á*/
+ if(ioctl(fd, RPMSG_CLEAR_POLL_FLAG, NULL) < 0) {
+ slog(EAP_PRINT, SLOG_ERR, "Err:ioctl RPMSG_CLEAR_POLL_FLAG fail!\n");
+ }
+}
+
+static int atchn_init(char *name)
+{
+ int fd = -1;
+
+ fd = open(name,O_RDWR);
+ if(0 > fd) {
+ slog(EAP_PRINT, SLOG_ERR, "Err:atchn_init open %s fail!\n",name);
+ return -1;
+ }
+ channel_config(fd);
+
+ return fd;
+}
+
+/* Started by AICoder, pid:f925721391i90f11476e0b29e05b3257ff234a04 */
+static void atchn_thread_entry(void *arg)
+{
+ struct at_chn_context_t *patcc = (struct at_chn_context_t *)arg;
+ char *thname = NULL;
+ char *buf = NULL;
+ unsigned int bufsize = ATCHN_SIZE;
+ unsigned int rlen = 0;
+ int len = 0;
+
+ if(NULL == patcc ||
+ NULL == patcc->callbacks ||
+ NULL == patcc->callbacks->atchn_read_callback) {
+ slog(EAP_PRINT, SLOG_ERR, "Err: atchn_thread_entry Arg Invalid.\n");
+ return;
+ }
+
+ thname = strstr(patcc->name, "armps_rpms");
+ if(NULL == thname) {
+ prctl(PR_SET_NAME, patcc->name, 0, 0, 0);
+ }
+ else {
+ prctl(PR_SET_NAME, thname, 0, 0, 0);
+ }
+
+ slog(EAP_PRINT, SLOG_DEBUG, "atchn_thread_entry(%s) enter!\n", patcc->name);
+
+ buf = malloc(bufsize);
+ rlen = bufsize - 1;
+ while(!patcc->bstop) {
+ buf[0] = 0;
+ len = atchn_read(patcc->fd, buf, rlen);
+ if(len > 0) {
+ buf[len] = 0;
+ //slog(EAP_PRINT, SLOG_NORMAL, "%s %d atchn buf<< %s!\n",patcc->name, len, buf);
+ if(NULL != patcc->callbacks->atchn_read_callback) {
+ patcc->callbacks->atchn_read_callback(buf, len, patcc->priv);
+ }
+ }
+ else {
+ // Handle error or end of input
+ slog(EAP_PRINT, SLOG_ERR, "atchn_thread_entry(%s) atchn_read fail!\n", patcc->name);
+ }
+ }
+
+ if(NULL != buf) {
+ free(buf);
+ }
+ if(NULL != patcc->callbacks->atchn_destroy_callback) {
+ patcc->callbacks->atchn_destroy_callback((long)patcc, patcc->priv);
+ }
+ slog(EAP_PRINT, SLOG_DEBUG, "atchn_thread_entry(%s) end!\n",patcc->name);
+ sem_post(&patcc->semid);
+}
+/* Ended by AICoder, pid:f925721391i90f11476e0b29e05b3257ff234a04 */
+
+static int atchn_create_recv_thread(struct at_chn_context_t *patcc)
+{
+ pthread_attr_t attr;
+
+ pthread_attr_init (&attr);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+ pthread_attr_setstacksize(&attr, 128*1024);
+ /*create at receive thread*/
+ if(0 != pthread_create(&(patcc->threadid), &attr, (void *)atchn_thread_entry, (void *)patcc)) {
+ slog(EAP_PRINT, SLOG_ERR, "pthread_create fail!errnno %d.\n",errno);
+ return -1;
+ }
+
+ return 0;
+}
+
+/* Started by AICoder, pid:cdd58de757if58a144ea09a2505d6540c89693d0 */
+long zxic_register_atchn_rpmsg(char *name, struct at_chn_calls_t *callbacks, void *priv, unsigned int flag)
+{
+ struct at_chn_context_t *patcc = NULL;
+ long handle = ZXIC_ATCHN_HANDLE_BAD;
+
+ if(NULL == callbacks || NULL == name || 0 > strlen(name)) {
+ slog(EAP_PRINT, SLOG_ERR, "Err:Argument Invalid.\n");
+ return ZXIC_ATCHN_HANDLE_BAD;
+ }
+ patcc = (struct at_chn_context_t *)malloc(sizeof(struct at_chn_context_t));
+ if(NULL == patcc) {
+ slog(EAP_PRINT, SLOG_ERR, "Err:Malloc memory fail.\n");
+ return ZXIC_ATCHN_HANDLE_BAD;
+ }
+ memset(patcc, 0, sizeof(struct at_chn_context_t));
+ patcc->flags = flag;
+
+ patcc->fd = atchn_init(name);
+ if(0 > patcc->fd) {
+ slog(EAP_PRINT, SLOG_ERR, "atchn_init fail!\n");
+ goto cleanup;
+ }
+ patcc->bstop = 0;
+ patcc->callbacks = callbacks;
+ patcc->priv = priv;
+ strncpy(patcc->name, name, ZXIC_ATCHN_NAME_SIZE_MAX-1);
+
+ sem_init(&patcc->semid,0,0);
+
+ if(0 != atchn_create_recv_thread(patcc)) {
+ slog(EAP_PRINT, SLOG_ERR, "atchn_create_recv_thread fail!\n");
+ goto cleanup;
+ }
+
+ slog(EAP_PRINT, SLOG_DEBUG, "The at channel(%s) register succuss.\n",patcc->name);
+
+ handle = (long)patcc;
+ return handle;
+
+cleanup:
+ if(NULL != patcc) {
+ free(patcc);
+ }
+
+ return ZXIC_ATCHN_HANDLE_BAD;
+}
+/* Ended by AICoder, pid:cdd58de757if58a144ea09a2505d6540c89693d0 */
+
+/* Started by AICoder, pid:t872fo66a655004146a00919a0d84e32b937efa8 */
+int zxic_unregister_atchn_rpmsg(long handle)
+{
+ struct at_chn_context_t *patcc = NULL;
+ struct timespec ts;
+ int ret = 0;
+
+ if(ZXIC_ATCHN_HANDLE_BAD == handle) {
+ slog(EAP_PRINT, SLOG_ERR, "Err:The handle is bad!\n");
+ return -1;
+ }
+ patcc = (struct at_chn_context_t *)handle;
+ if(0 > patcc->fd) {
+ free(patcc);
+ return 0;
+ }
+ patcc->bstop = 1;
+ zxic_write_atchn_rpmsg(handle, ATCHN_TEST_AT, strlen(ATCHN_TEST_AT));
+
+ if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
+ slog(EAP_PRINT, SLOG_NORMAL, "clock_gettime fail.\n");
+ ret = -1;
+ goto cleanup;
+ }
+ ts.tv_sec += 0;
+ ts.tv_nsec += ATCHN_STOP_INTERVAL_NS;
+ while ((sem_timedwait(&patcc->semid, &ts)) == -1) {
+ slog(EAP_PRINT, SLOG_ERR, "sem_timedwait timeout!\n");
+ continue;
+ }
+
+ slog(EAP_PRINT, SLOG_NORMAL, "The at channel(%s) unregister succuss.\n",patcc->name);
+cleanup:
+ sem_destroy(&patcc->semid);
+ close(patcc->fd);
+ free(patcc);
+ return ret;
+}
+/* Ended by AICoder, pid:t872fo66a655004146a00919a0d84e32b937efa8 */
+
+int zxic_write_atchn_rpmsg(long handle, char *buf,unsigned int len)
+{
+ struct at_chn_context_t *patcc = NULL;
+
+ if(ZXIC_ATCHN_HANDLE_BAD == handle) {
+ slog(EAP_PRINT, SLOG_ERR, "Err:The handle is bad!\n");
+ return -1;
+ }
+ patcc = (struct at_chn_context_t *)handle;
+ if(0 > patcc->fd) {
+ slog(EAP_PRINT, SLOG_ERR, "Err:atchn %s isn't open!\n", patcc->name);
+ return -1;
+ }
+
+ //slog(EAP_PRINT, SLOG_NORMAL, "%s atchn buf>> %s!\n",patcc->name, buf);
+
+ return atchn_write(patcc->fd, buf, len);
+}
+
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libatchn/inc/zxic_atchn_api.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libatchn/inc/zxic_atchn_api.h
index 9d07330..dd56305 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libatchn/inc/zxic_atchn_api.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libatchn/inc/zxic_atchn_api.h
@@ -75,4 +75,30 @@
*/
int zxic_write_atchn(long handle, char *buf,unsigned int len);
+/**
+ * @brief ×¢²áRPMSGеÄATͨµÀ¡£
+ * @param name RPMSGͨµÀÃû(Èç"/dev/armps_rpmsgch%d")¡£²»ÄÜΪ¿Õ¡£
+ * @param callbacks ͨµÀ»Øµ÷ÐÅÏ¢at_chn_calls_t¡£
+ * @param priv ˽ÓÐÊý¾Ý£¬µ÷ÓÃat_chn_calls_tÖлص÷ʱ´øÈë¡£
+ * @param flag ͨµÀ±êÖ¾¡£Ö§³ÖZXIC_ATCHN_FLAGS_NONE¡¢ZXIC_ATCHN_FLAGS_AUTOµÈ
+ * @return ATͨµÀ¾ä±ú¡£·µ»Ø-1±íʾͨµÀ×¢²áʧ°Ü¡£
+ * @note
+ */long zxic_register_atchn_rpmsg(char *name, struct at_chn_calls_t *callbacks, void *priv, unsigned int flag);
+/**
+ * @brief ×¢ÏúRPMSGÖ¸¶¨ATͨµÀ¡£
+ * @param handle ͨµÀ¾ä±ú£¬zxic_register_atchn_rpmsg·µ»ØÖµ¡£
+ * @return 0±íʾ³É¹¦£»-1±íʾʧ°Ü¡£
+ * @note
+ */
+int zxic_unregister_atchn_rpmsg(long handle);
+/**
+ * @brief ·¢ËÍATÃüÁî¡£
+ * @param handle ͨµÀ¾ä±ú£¬zxic_register_atchn_rpmsg·µ»ØÖµ¡£
+ * @param buf ATÃüÁ´æ¡£
+ * @param len ATÃüÁ¶È¡£
+ * @return 0±íʾ³É¹¦£»-1±íʾʧ°Ü¡£
+ * @note ÍêÕûµÄATÃüÁî±ØÐë´ø"/r/n"¡£
+ */
+int zxic_write_atchn_rpmsg(long handle, char *buf,unsigned int len);
+
#endif
\ No newline at end of file
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libsoftap/softap_log.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libsoftap/softap_log.c
index 3f040bb..13bfa1f 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libsoftap/softap_log.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/libsoftap/softap_log.c
@@ -128,7 +128,7 @@
}
#define put_to_console(mod, fmt, arg) do {\
- char buf[1024] = {0}; \
+ char buf[1024]; \
if(SLOG_SOCTIME_ON == soctime_sw) \
snprintf(buf, 1023, "%s[%d][%lld.%llds]: ", mod, syscall(SYS_gettid), time_us/1000000, time_us%1000000); \
else \
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/nv-rpc-daemon/main.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/nv-rpc-daemon/main.c
index b047701..6199ad5 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/nv-rpc-daemon/main.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/platform/nv-rpc-daemon/main.c
@@ -172,7 +172,7 @@
msgSnd.pid = g_pid;
//printf("apnv_cap msgsnd to nvserver pid:%d\n", msgSnd.pid);
if (strcmp(msgSnd.key, "zcat_mode"))
- print_nv_info(&msgSnd);
+ //print_nv_info(&msgSnd);
retry1:
if (-1 == msgsnd(msgId, &msgSnd, sizeof(T_NV_MSG_INFO) - sizeof(long), 0))
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/libril/Makefile b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/libril/Makefile
index d7ae518..25997bd 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/libril/Makefile
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/libril/Makefile
@@ -13,13 +13,13 @@
-I$(zte_lib_path)/binder/include
LOCAL_CFLAGS += -Werror=implicit-function-declaration -std=c++11
-LOCAL_CFLAGS += -fPIC -g -O0 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+LOCAL_CFLAGS += -fPIC -g -O2 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
ifeq ($(SIM_COUNT), 2)
LOCAL_CFLAGS += -DANDROID_SIM_COUNT_2
endif
-LOCAL_CPPFLAGS += -fPIC -g -O0 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+LOCAL_CPPFLAGS += -fPIC -g -O2 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
LOCAL_CPPFLAGS += -Werror=implicit-function-declaration -std=c++11
LOCAL_LDLIBS = -lutils -lcutils -lrilutils -lbinder -llog -llibprotobuf-c-nano-enable_malloc
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/Makefile b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/Makefile
index da61d9d..6e472e3 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/Makefile
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/Makefile
@@ -21,12 +21,12 @@
-I../include \
-I$(APP_DIR)/include
-LOCAL_CFLAGS += -fPIC -g -O0 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+LOCAL_CFLAGS += -fPIC -g -O2 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
LOCAL_CFLAGS += -Werror=implicit-function-declaration
LOCAL_CFLAGS += -D_GNU_SOURCE -DRIL_SHLIB
-LOCAL_CPPFLAGS += -fPIC -g -O0 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+LOCAL_CPPFLAGS += -fPIC -g -O2 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
LOCAL_CPPFLAGS += -Werror=implicit-function-declaration -std=c++11
LOCAL_LDLIBS += -lsoftap -L$(zte_lib_path)/libsoftap \
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/atchannel.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/atchannel.c
index ba8261f..162db6d 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/atchannel.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/atchannel.c
@@ -34,6 +34,7 @@
#include <semaphore.h>
//#include <time.h>
+#include "zxic_log.h"
#ifdef HAVE_PTHREAD_COND_TIMEDWAIT_RELATIVE
@@ -76,9 +77,9 @@
#if AT_DEBUG
void AT_DUMP(const char* prefix, const char* buff, int len)
{
- if (len < 0)
+ /*if (len < 0)
len = strlen(buff);
- RLOGD("%.*s", len, buff);
+ RLOGD("%.*s", len, buff);*/
}
#endif
@@ -250,30 +251,30 @@
//RLOGD("processLine line:%s", line);
if (sp_response == NULL) {
- RLOGD("processLine (sp_response == NULL)");
+ //RLOGD("processLine (sp_response == NULL)");
/* no command pending */
handleUnsolicited(line);
} else if (isFinalResponseSuccess(line)) {
- RLOGD("processLine (isFinalResponseSuccess(line))");
+ //RLOGD("processLine (isFinalResponseSuccess(line))");
sp_response->success = 1;
handleFinalResponse(line, chn);
} else if (isFinalResponseError(line)) {
- RLOGD("processLine (isFinalResponseError(line))");
+ RLOGI("processLine res err:%s", line);
sp_response->success = 0;
handleFinalResponse(line, chn);
} else if (chn->s_smsPDU != NULL && 0 == strcmp(line, "> ")) {
- RLOGD("processLine s_smsPDU != NULL");
+ //RLOGD("processLine s_smsPDU != NULL");
// See eg. TS 27.005 4.3
// Commands like AT+CMGS have a "> " prompt
writeCtrlZ(chn->s_smsPDU, chn->handle);
chn->s_smsPDU = NULL;
} else switch (chn->s_type) {
case NO_RESULT:
- RLOGD("processLine s_type:NO_RESULT");
+ //RLOGD("processLine s_type:NO_RESULT");
handleUnsolicited(line);
break;
case NUMERIC:
- RLOGD("processLine s_type:NUMERIC");
+ //RLOGD("processLine s_type:NUMERIC");
if (sp_response->p_intermediates == NULL
&& isdigit(line[0])
) {
@@ -285,20 +286,20 @@
}
break;
case SINGLELINE:
- RLOGD("processLine s_type:SINGLELINE");
+ //RLOGD("processLine s_type:SINGLELINE");
if (sp_response->p_intermediates == NULL
&& strStartsWith(line, chn->s_responsePrefix)
) {
- RLOGD("processLine s_type:SINGLELINE line=%d", __LINE__);
+ //RLOGD("processLine s_type:SINGLELINE line=%d", __LINE__);
addIntermediate(line, chn);
} else {
- RLOGD("processLine s_type:SINGLELINE line=%d", __LINE__);
+ //RLOGD("processLine s_type:SINGLELINE line=%d", __LINE__);
/* we already have an intermediate response */
handleUnsolicited(line);
}
break;
case MULTILINE:
- RLOGD("processLine s_type:MULTILINE");
+ //RLOGD("processLine s_type:MULTILINE");
if (strStartsWith(line, chn->s_responsePrefix)) {
addIntermediate(line, chn);
} else {
@@ -372,7 +373,7 @@
strncpy(p_read, node->data, MAX_AT_RESPONSE);
count = node->size;
p_read[count] = '\0';
- AT_DUMP("<< ", p_read, count);
+ //AT_DUMP("<< ", p_read, count);
channel = at_get_channel_by_name(node->name);
#if 0
@@ -484,11 +485,15 @@
RLOGD("RILAT> %s\n", s);
- AT_DUMP(">> ", s, strlen(s));
+ //AT_DUMP(">> ", s, strlen(s));
snprintf(atstr, sizeof(atstr) - 1, "%s\r\n", s);
-
- if (-1 == zxic_write_atchn(handle, atstr, strlen(atstr))) {
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ if (-1 == zxic_write_atchn_rpmsg(handle, atstr, strlen(atstr)))
+#else
+ if (-1 == zxic_write_atchn(handle, atstr, strlen(atstr)))
+#endif
+ {
RLOGE("writeline:write fail!\n");
return AT_ERROR_GENERIC;
}
@@ -512,11 +517,16 @@
RLOGD("RILAT> %s^Z\n", s);
- AT_DUMP(">* ", s, strlen(s));
+ //AT_DUMP(">* ", s, strlen(s));
/*append the ^Z*/
snprintf(atstr, sizeof(atstr) - 1, "%s\032", s);
- if (-1 == zxic_write_atchn(handle, atstr, len + 1)) {
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ if (-1 == zxic_write_atchn_rpmsg(handle, atstr, len + 1))
+#else
+ if (-1 == zxic_write_atchn(handle, atstr, len + 1))
+#endif
+ {
RLOGE("writeCtrlZ:write fail!\n");
return AT_ERROR_GENERIC;
}
@@ -715,7 +725,9 @@
err = 0;
error:
clearPendingCommand(channel);
- //RLOGD("at_send_command_full_nolock %d", __LINE__);
+ if(0 != err) {
+ RLOGE("at_send_command_full_nolock %d", err);
+ }
return err;
}
@@ -804,6 +816,9 @@
/* successful command must have an intermediate response */
at_response_free(*pp_outResponse);
*pp_outResponse = NULL;
+ if(command) {
+ RLOGE("at_send_command_singleline(%s): AT_ERROR_INVALID_RESPONSE.", command);
+ }
return AT_ERROR_INVALID_RESPONSE;
}
@@ -826,6 +841,9 @@
/* successful command must have an intermediate response */
at_response_free(*pp_outResponse);
*pp_outResponse = NULL;
+ if(command) {
+ RLOGE("at_send_command_numeric(%s): AT_ERROR_INVALID_RESPONSE.", command);
+ }
return AT_ERROR_INVALID_RESPONSE;
}
@@ -850,6 +868,9 @@
/* successful command must have an intermediate response */
at_response_free(*pp_outResponse);
*pp_outResponse = NULL;
+ if(command) {
+ RLOGE("at_send_command_sms:AT_ERROR_INVALID_RESPONSE.");
+ }
return AT_ERROR_INVALID_RESPONSE;
}
@@ -886,6 +907,9 @@
/* Successful command must have an intermediate response. */
at_response_free(*pp_outResponse);
*pp_outResponse = NULL;
+ if(command) {
+ RLOGE("at_send_command_singleline_timeout(%s): AT_ERROR_INVALID_RESPONSE.", command);
+ }
err = AT_ERROR_INVALID_RESPONSE;
}
@@ -906,6 +930,9 @@
/* Successful command must have an intermediate response. */
at_response_free(*pp_outResponse);
*pp_outResponse = NULL;
+ if(command) {
+ RLOGE("at_send_command_numeric_timeout(%s): AT_ERROR_INVALID_RESPONSE.", command);
+ }
err = AT_ERROR_INVALID_RESPONSE;
}
@@ -940,6 +967,9 @@
/* Successful command must have an intermediate response. */
at_response_free(*pp_outResponse);
*pp_outResponse = NULL;
+ if(command) {
+ RLOGE("at_send_command_sms_timeout: AT_ERROR_INVALID_RESPONSE.");
+ }
err = AT_ERROR_INVALID_RESPONSE;
}
@@ -983,10 +1013,10 @@
for (i = 0 ; i < HANDSHAKE_RETRY_COUNT ; i++) {
/* some stacks start with verbose off */
- //modemû³õʼ»¯Íê³Éǰ£¬·¢ËÍatÃüÁîͨµÀ»á±»×èÈû
+ //modemû\B3\F5ʼ\BB\AF\CD\EA\B3\C9ǰ\A3\AC\B7\A2\CB\CDat\C3\FC\C1\EEͨ\B5\C0\BBᱻ\D7\E8\C8\FB
sc_cfg_get("modem_available", modemAvailable, sizeof(modemAvailable));
- RLOGD("modemAvailable = %s", modemAvailable);
- if (0 != strcmp(modemAvailable, "1")) { //modemδ׼±¸¾ÍÐ÷Ôò¼ÌÐøµÈ´ý
+ RLOGI("modemAvailable = %s", modemAvailable);
+ if (0 != strcmp(modemAvailable, "1")) { //modemδ\B1\B8\BE\CD\D0\F7\D4\F2\BC\CC\D0\F8\B5ȴ\FD
sleepMsec(HANDSHAKE_TIMEOUT_MSEC);
} else {
return 0;
@@ -1170,7 +1200,7 @@
strncpy(node->name, channel->name, sizeof(node->name));
//RLOGD("read_cb curlen:%d node->data: %s", curlen, node->data);
pthread_mutex_lock(&atchnctx.at_recv_lock);
- list_add_tail(&node->list, &atchnctx.at_recv_list);
+ list_add_tail(&node->list, &(atchnctx.at_recv_list));
pthread_mutex_unlock(&atchnctx.at_recv_lock);
pthread_cond_signal(&atchnctx.at_recv_cond);
@@ -1194,7 +1224,7 @@
static int destroy_cb(long handle, void *priv)
{
- RLOGD("destroy_cb:destroy finish!");
+ RLOGI("destroy_cb:destroy finish!");
}
int at_channel_init(void)
@@ -1203,14 +1233,24 @@
struct atchn_info *channel = NULL;
struct atchn_context *ctx = &atchnctx;
pthread_condattr_t attr;
-
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ int at_chn_num[ZXIC_ATCHN_SUM] = {34,35,38,39};
+#endif
memset(ctx, 0, sizeof(struct atchn_context));
+ INIT_LIST_HEAD(&ctx->at_recv_list);
+ pthread_mutex_init(&ctx->at_recv_lock, NULL);
+ pthread_cond_init(&ctx->at_recv_cond, NULL);
+
for (i = 0; i < ZXIC_ATCHN_SUM; i++) {
channel = (struct atchn_info *)malloc(sizeof(struct atchn_info));
assert(channel != NULL);
memset(channel, 0, sizeof(struct atchn_info));
- snprintf(channel->name, ZXIC_ATCHN_NAME_SIZE_MAX - 1, "rilat%d", i);
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ snprintf(channel->name, ZXIC_ATCHN_NAME_SIZE_MAX - 1, "/dev/armps_rpmsgch%d", at_chn_num[i]);
+#else
+ snprintf(channel->name, ZXIC_ATCHN_NAME_SIZE_MAX - 1, "rilat%d", i);
+#endif
channel->cbs.atchn_read_callback = read_cb;
channel->cbs.atchn_destroy_callback = destroy_cb;
if (i == 0) {
@@ -1218,8 +1258,11 @@
} else {
channel->flags = ZXIC_ATCHN_FLAGS_NONE;
}
-
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ channel->handle = zxic_register_atchn_rpmsg(channel->name, &channel->cbs, (void *)channel, channel->flags);
+#else
channel->handle = zxic_register_atchn(channel->name, &channel->cbs, (void *)channel, channel->flags);
+#endif
if (ZXIC_ATCHN_HANDLE_BAD == channel->handle) {
RLOGE("at_channel_init:zxic_register_atchn fail %d!", i);
assert(0);
@@ -1235,10 +1278,7 @@
ctx->atchninfo[i] = channel;
}
-
- INIT_LIST_HEAD(&ctx->at_recv_list);
- pthread_mutex_init(&ctx->at_recv_lock, NULL);
- pthread_cond_init(&ctx->at_recv_cond, NULL);
+
return 0;
}
@@ -1254,8 +1294,11 @@
pthread_mutex_lock(&channel->s_atchnmutex);
pthread_cond_signal(&channel->s_atchncond);
pthread_mutex_unlock(&channel->s_atchnmutex);
-
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ zxic_unregister_atchn_rpmsg(channel->handle);
+#else
zxic_unregister_atchn(channel->handle);
+#endif
free(channel);
ctx->atchninfo[i] = NULL;
}
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
index 42920a6..1c8934a 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
@@ -276,7 +276,7 @@
if (NULL != pindinfoExt) {
pindinfo = pindinfoExt->rri_info;
if (NULL != pindinfo && NULL != pindinfo->handler) {
- RLOGD("request info: --prefix %s --servicetype %d", pindinfo->prefix, pindinfo->servicetype);
+ //RLOGD("request info: --prefix %s --servicetype %d", pindinfo->prefix, pindinfo->servicetype);
pindinfo->handler(pindinfoExt->s, pindinfoExt->sms_pdu);
} else {
RLOGE("ril_ref_dequeue_dispatch: drop the req");
@@ -804,7 +804,7 @@
}
if (SERVICE_TYPE_INVALID == stype) {
- RLOGI("ril_ref_req_packet request(%d) REQUEST_NOT_SUPPORTED", request);
+ RLOGE("ril_ref_req_packet request(%d) REQUEST_NOT_SUPPORTED", request);
return NULL;
}
@@ -1079,7 +1079,7 @@
{
RilRefReq *node;
- RLOGD("onRequest: %s", requestToString(request));
+ RLOGI("onRequest: %s", requestToString(request));
switch (request) {
case RIL_REQUEST_GET_SIM_STATUS:
@@ -1287,7 +1287,7 @@
ril_ref_enqueue(node);
break;
default:
- RLOGD("onRequest Request not supported.");
+ RLOGE("onRequest Request not supported.");
RIL_onRequestComplete(t, RIL_E_REQUEST_NOT_SUPPORTED, NULL, 0);
break;
}
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_cc.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_cc.c
index 8a3565c..9fd6aa9 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_cc.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_cc.c
@@ -515,7 +515,7 @@
err = at_send_command_multiline("AT+CLCC", "+CLCC:", &response);
if (err < 0) {
- RLOGD("ril_request_get_current_calls err= %d", err);
+ RLOGE("ril_request_get_current_calls err= %d", err);
RIL_onRequestComplete(t, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0);
at_response_free(response);
return;
@@ -812,8 +812,7 @@
// FORMAT_3GPP(1) vs FORMAT_3GPP2(2);
reply[1] = s_ims_format;
- RLOGD("IMS_REGISTRATION=%d, format=%d ",
- reply[0], reply[1]);
+ RLOGI("IMS_REGISTRATION=%d, format=%d ", reply[0], reply[1]);
if (reply[1] != -1) {
RIL_onRequestComplete(t, RIL_E_SUCCESS, reply, sizeof(reply));
} else {
@@ -1745,21 +1744,23 @@
assert(0);
}
+ /* Started by AICoder, pid:216c9t75b8w2a28142f00b8160b3f214bea5ace1 */
if (at_tok_hasmore(&line)) {
/*<clear_down>*/
- err = at_tok_nextint(&line, &clear_down);
+ err = at_tok_nextint(&line, &clear_down);
if (err < 0) {
- assert(0);
- }
-
- if (at_tok_hasmore(&line)) {
- /*<eCallMode>*/
- err = at_tok_nextint(&line, &eCallMode);
- if (err < 0) {
- assert(0);
- }
+ clear_down = -1;
+ }
+ }
+
+ if (at_tok_hasmore(&line)) {
+ /*<eCallMode>*/
+ err = at_tok_nextint(&line, &eCallMode);
+ if (err < 0) {
+ eCallMode = -1;
}
}
+ /* Ended by AICoder, pid:216c9t75b8w2a28142f00b8160b3f214bea5ace1 */
ecall_state_indicate.call_id = id;
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_mm.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_mm.c
index 3549d02..34d4d1b 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_mm.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_mm.c
@@ -207,7 +207,7 @@
/* change realCsq to level */
static int changeCSQdbmToLevel(int Csq, int act)
{
- RLOGD("changeCSQdbmToLevel Csq=%d", Csq);
+ //RLOGD("changeCSQdbmToLevel Csq=%d", Csq);
if (Csq <= -113) {
return 0;
} else if ((Csq > -113) && (Csq <= -111)) {
@@ -446,7 +446,7 @@
}*/
if ((sOperInfo.operLongStr[0] != '\0') && (sOperInfo.operShortStr[0] != '\0') && (sOperInfo.operNumStr[0] != '\0')) {
responseOperator(token, &(sOperInfo.operLongStr[0]), &(sOperInfo.operShortStr[0]), &(sOperInfo.operNumStr[0]));
- RLOGD("%s: Return local saved operator info", __FUNCTION__);
+ //RLOGD("%s: Return local saved operator info", __FUNCTION__);
return 1;
}
return 0;
@@ -466,7 +466,7 @@
pZeminfo = alloca(strlen(at_paras) / 2);
hexStr2ByteArr(at_paras, pZeminfo);
pEmInfo_Ind = (T_zEM_EmInfo_Ind*)pZeminfo;
- RLOGD("requestGetCellInfoList bVersion=%d,bRatType=0x%x\n", pEmInfo_Ind->bVersion,pEmInfo_Ind->bRatType);
+ //RLOGD("requestGetCellInfoList bVersion=%d,bRatType=0x%x\n", pEmInfo_Ind->bVersion,pEmInfo_Ind->bRatType);
//RLOGD("requestGetCellInfoList bRatType=0x%x\n", pEmInfo_Ind->bRatType);
//RLOGD("requestGetCellInfoList bSrcIndex=%d\n", pEmInfo_Ind->bSrcIndex);
//RLOGD("requestGetCellInfoList bDesIndex=%d\n", pEmInfo_Ind->bDesIndex);
@@ -574,9 +574,9 @@
pwcdma->cellIdentityWcdma.lac = pNasInfo->wLac;
pwcdma->cellIdentityWcdma.cid = pwcamppara->dwCellId; //Ð¡ÇøID
- RLOGD("parseCellInfo wcdma mcc: %d, mnc:%d, lac:%d, cid:%d", pwcdma->cellIdentityWcdma.mcc, pwcdma->cellIdentityWcdma.mnc, pwcdma->cellIdentityWcdma.lac,
+ //RLOGD("parseCellInfo wcdma mcc: %d, mnc:%d, lac:%d, cid:%d", pwcdma->cellIdentityWcdma.mcc, pwcdma->cellIdentityWcdma.mnc, pwcdma->cellIdentityWcdma.lac,
- pwcdma->cellIdentityWcdma.cid);
+ //pwcdma->cellIdentityWcdma.cid);
if (twcdmaEmInfo->bStateInd == 0) { //dch
pwcdma->cellIdentityWcdma.psc = twcdmaEmInfo->uWcellMeasInfo.tDchInfo.tFreqAsVasInfo.tUsedFreqAsInfo.atAsVasCell[0].wPsc;
@@ -756,6 +756,7 @@
ATResponse *response = NULL;
int err = 0, networkType = ((int *)data)[0];
+ RLOGI("ril_request_set_preferred_network_type networkType %d", networkType);
switch (networkType) {
case PREF_NET_TYPE_GSM_ONLY: {
err = at_send_command("AT^SYSCONFIG=13,0,1,2", &response);
@@ -1062,7 +1063,7 @@
int err, status;
ATResponse *response = NULL;
- RLOGD("ril_request_radio_reset()");
+ //RLOGD("ril_request_radio_reset()");
//RLOGD("ril_request_radio_reset: send AT+CFUN=0");
err = at_send_command_timeout("AT+CFUN=0", &response, TIMEOUT_CFUN);
DO_MM_RESPONSE_ERROR_JDUGE;
@@ -1763,7 +1764,7 @@
DO_ERROR_JDUGE;
changed |= updateValue(&p->stat, value);
sprintf(char_creg, "%d", value);
- RLOGD("handle_creg creg = %s", char_creg);
+ //RLOGD("handle_creg creg = %s", char_creg);
if (at_tok_hasmore(&line)) {
err = at_tok_nexthexint(&line, &value);
@@ -1954,7 +1955,7 @@
ATResponse *response = NULL;
RIL_RadioState currentState = getRadioState();
- RLOGD("ril_request_radio_power(): onOff=%d, currentState=%d", onOff, currentState);
+ RLOGI("ril_request_radio_power: onOff=%d, currentState=%d", onOff, currentState);
if (onOff == 4) {
//RLOGD("onOff=%d, currentState=%d --> AT+CFUN=4", onOff, currentState);
err = at_send_command_timeout("AT+CFUN=4", &response, TIMEOUT_CFUN);
@@ -1980,6 +1981,7 @@
RIL_onRequestComplete(token, RIL_E_SUCCESS, NULL, 0);
goto exit;
error:
+ RLOGE("ril_request_radio_power:must not return error,err=%d.",err);
RIL_onRequestComplete(token, RIL_E_GENERIC_FAILURE, NULL, 0);
updateRadioState();//if at error, we must update radio state
exit:
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c
index f8c23b0..0cd2921 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c
@@ -46,8 +46,14 @@
#define PDP_NORMAL_CID_INVALID (-1)
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+static int ril_default_cid = -1;
+#endif
static int requestDefaultCid(void)
{
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ return ril_default_cid;
+#else
char default_cid[30] = {0};
int cid = -1;
@@ -59,6 +65,7 @@
}
return cid;
+#endif
}
static void requestOrSendDataCallList(RIL_Token *t)
@@ -461,13 +468,11 @@
at_response_free(p_response);
}
-static int parseSetupDataCall(char *line, RIL_Token t, int act_type)
+static int parseSetupDataCall(int cid, RIL_Token t, int act_type)
{
ATResponse *p_response;
int err;
int n = 0;
- char *out;
- int i_out = -1;
#define NV_NAME_LEN 30
#define NV_IP_LEN 128
@@ -486,7 +491,7 @@
responses->status = -1;
responses->suggestedRetryTime = -1;
- responses->cid = -1;
+ responses->cid = cid;
responses->active = -1;
responses->type = "";
responses->ifname = "";
@@ -496,25 +501,6 @@
responses->pcscf = "";
responses->mtu = 0;
- err = at_tok_start(&line);
- if (err < 0) {
- free(responses);
- return -1;
- }
-
- err = at_tok_nextint(&line, &i_out);
- if (err < 0) {
- free(responses);
- return -1;
- }
- responses->cid = i_out;
-
- err = at_tok_nextstr(&line, &out);
- if (err < 0) {
- free(responses);
- return -1;
- }
-
/*set pdp active type*/
memset(nv_buf, 0, sizeof(nv_buf));
sprintf(nv_buf, "pdp_act_type%d", responses->cid);
@@ -760,7 +746,7 @@
int out_state;
ATResponse *p_response = NULL;
- RLOGD("requestDeactiveDataCall cid:%s", deactData[0]);
+ RLOGI("requestDeactiveDataCall cid:%s", deactData[0]);
/*get cid*/
cid = atoi(deactData[0]);
@@ -813,7 +799,11 @@
}
at_response_free(p_response);
RIL_onRequestComplete(t, RIL_E_SUCCESS, NULL, 0);
-
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ if(cid == ril_default_cid) {
+ ril_default_cid = -1;
+ }
+#endif
return;
error:
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
@@ -857,6 +847,14 @@
char pdptype[32] = {0};
int act_type = 1;
+ int c_id = -1;
+ char *line = NULL;
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ char str[MAX_AT_LENGTH + 1] = {0};
+ void *p[] = {str};
+ void *p2[] = {&c_id};
+#endif
+
if (NULL != data) {
radio_technology = ((const char **) data)[0];
profile_type = ((const char **) data)[1];
@@ -878,7 +876,7 @@
sc_cfg_get("pdp_type", pdptype, sizeof(pdptype));
pdp_type = pdptype;
} else {
- RLOGD("requesting data connection to pdp_type '%s'", pdp_type);
+ //RLOGD("requesting data connection to pdp_type '%s'", pdp_type);
if (0 == strncmp(pdp_type, "IP", strlen("IP")) ||
0 == strncmp(pdp_type, "IPV6", strlen("IPV6")) ||
@@ -902,7 +900,7 @@
act_type = atoi(active_type);
}
}
- RLOGD("requestSetupDataCall: profile=%d,apn=%s,user=%s,passwd=%s,auth_type=%d,pdp_type=%s,act_type=%d", \
+ RLOGI("requestSetupDataCall: profile=%d,apn=%s,user=%s,passwd=%s,auth_type=%d,pdp_type=%s,act_type=%d", \
profile, apn, username ? username : "NULL", password ? password : "NULL", auth_type, pdp_type, act_type);
memset(atstr, 0, sizeof(atstr));
@@ -918,7 +916,7 @@
if (requestDefaultApn(def_pdp_type, def_apn, def_auth_type)) {
goto error;
}
- RLOGD("requestSetupDataCall: def_pdp_type=%s,def_apn=%s,def_auth_type=%s", def_pdp_type, def_apn, def_auth_type);
+ //RLOGD("requestSetupDataCall: def_pdp_type=%s,def_apn=%s,def_auth_type=%s", def_pdp_type, def_apn, def_auth_type);
auth_type = atoi(def_auth_type);
snprintf(cmd, sizeof(atstr) - 1, "AT+ZPDPACT=0,\"%s\",\"%s\",,,,%d", def_pdp_type, def_apn, auth_type);
} else {
@@ -950,6 +948,25 @@
}
cmd = atstr + strlen(atstr);
+#ifdef ZXIC_ATCHN_RPMSG_MODE
+ /*act_typeΪ¼¤»î×éÍøÀàÐÍ£¬0ΪAPºË±¾µØ²¦ºÅ,1ΪCAPºË±¾µØ²¦ºÅ,2ΪĬÈϲ¦ºÅ,Æô¶¯Ä¬ÈÏ·ÓÉ,É豸ËùÓÐÓ¦Óö¼¿ÉÒÔÖ±½ÓÉÏÍø,Ö»Äܲ¥Ò»Â·;*/
+ snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, ",,,%d\r\n", act_type);
+
+ memset(str, 0, sizeof(str));
+ if(0 != get_modem_info(atstr, "%s", (void **)p)) {
+ goto error;
+ }
+
+ if(0 != parse_param("%d", str, (void **)p2)) {
+ goto error;
+ }
+ if(2 == act_type) {
+ ril_default_cid = c_id;
+ }
+ if (0 > parseSetupDataCall(c_id, t, act_type)) {
+ goto error;
+ }
+#else
/*act_typeΪ\BC\A4\BB\EE\D7\E9\CD\F8\C0\E0\D0ͣ\AC0ΪAP\BA˱\BE\B5ز\A6\BA\C5,1ΪCAP\BA˱\BE\B5ز\A6\BA\C5,2ΪĬ\C8ϲ\A6\BA\C5,\C6\F4\B6\AFĬ\C8\CF·\D3\C9,\C9豸\CB\F9\D3\D0Ӧ\D3ö\BC\BF\C9\D2\D4ֱ\BD\D3\C9\CF\CD\F8,ֻ\C4ܲ\A5һ·;*/
//xf.li@20240111 modify for T106BUG-480 start
snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, ",,1,%d", act_type);
@@ -959,19 +976,33 @@
RLOGE("requestSetupDataCall err:%d", err);
goto error;
}
+ line = p_response->p_intermediates->line;
+
+ err = at_tok_start(&line);
+ if (err < 0) {
+ at_response_free(p_response);
+ goto error;
+ }
+
+ err = at_tok_nextint(&line, &c_id);
+ if (err < 0) {
+ at_response_free(p_response);
+ goto error;
+ }
/*+ZPDPACT:<cid>,<pdp_type>[,<v4_addr>,<v4_gw>,<v4_dns1>,<v4_dns2>][,<v6_addr>,<v6_gw>,<v6_dns1>,<v6_dns2>]*/
- if (0 > parseSetupDataCall(p_response->p_intermediates->line, t, act_type)) {
+ if (0 > parseSetupDataCall(c_id, t, act_type)) {
+ at_response_free(p_response);
goto error;
}
at_response_free(p_response);
+#endif
//requestOrSendDataCallList(&t);
return;
error:
RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);
- at_response_free(p_response);
}
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.c
index 4c5efea..7b03916 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.c
@@ -220,7 +220,6 @@
void setRadioState(RIL_RadioState newState)
{
- RLOGD("setRadioState(%d)", newState);
RIL_RadioState oldState;
pthread_mutex_lock(&s_radiostate_mutex);
@@ -415,7 +414,7 @@
pthread_mutex_lock(&s_radiostate_mutex);
radioState = sState;
pthread_mutex_unlock(&s_radiostate_mutex);
- RLOGD("requestProc: %s", requestToString(request));
+ //RLOGD("requestProc: %s", requestToString(request));
//RLOGD("requestProc: sState=%d", getRadioState());
/* Ignore all requests except RIL_REQUEST_GET_SIM_STATUS
* when RADIO_STATE_UNAVAILABLE.
@@ -424,6 +423,7 @@
&& request != RIL_REQUEST_GET_SIM_STATUS
) {
RIL_onRequestComplete(t, RIL_E_RADIO_NOT_AVAILABLE, NULL, 0);
+ RLOGI("requestProc: radioState RADIO_STATE_UNAVAILABLE.");
return;
}
@@ -698,7 +698,7 @@
requestSetEcallConfig(data, datalen, t);
break;
default:
- RLOGD("requestProc Request not supported.");
+ RLOGE("requestProc Request not supported.");
RIL_onRequestComplete(t, RIL_E_REQUEST_NOT_SUPPORTED, NULL, 0);
break;
}
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_sim.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_sim.c
index 4d11dc0..aacfdf9 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_sim.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_sim.c
@@ -479,7 +479,7 @@
at_response_free(p_response);
//keepAppType(sAppType);
}
- RLOGD("%s: UICC type: %d\n", __FUNCTION__, sAppType);
+ //RLOGD("%s: UICC type: %d\n", __FUNCTION__, sAppType);
return sAppType;
}
@@ -636,7 +636,7 @@
} else if (request == RIL_REQUEST_ENTER_NETWORK_DEPERSONALIZATION) {
asprintf(&cmdString, "AT+CLCK=\"PN\",0,\"%s\"", code);
}
- RLOGD("%s:%s", __FUNCTION__, cmdString);
+ RLOGI("%s:%s", __FUNCTION__, cmdString);
return cmdString;
}
@@ -654,7 +654,7 @@
property_set(ZTERILD_MODEM_NEED_PIN_PROPERTY, "0");
RLOGD("sendPinpukSuccResponse puk ZTERILD_MODEM_NEED_PIN_PROPERTY set 0");
property_set(ZTERILD_SIM_STATE, "1"); */
- RLOGI("set sim state 1");
+ //RLOGI("set sim state 1");
return 0;
}
if ((request == RIL_REQUEST_ENTER_SIM_PIN2) || (request == RIL_REQUEST_CHANGE_SIM_PIN2)) {
@@ -675,7 +675,7 @@
RLOGD("sendPinpukSuccResponse pin ZTERILD_MODEM_NEED_PIN_PROPERTY set 0");
property_set(ZTERILD_SIM_STATE, "1"); */
- RLOGI("set sim state 1");
+ //RLOGI("set sim state 1");
}
return 1;
}
@@ -921,7 +921,7 @@
sCardStatus = card_state;
- RLOGD("%s: sim_status:%d - %d card_state:%d - %d\n", __FUNCTION__, sim_status, oldStatus, card_state, oldCardStatus);
+ RLOGI("%s: sim_status:%d - %d card_state:%d - %d\n", __FUNCTION__, sim_status, oldStatus, card_state, oldCardStatus);
free(p_card_status);
goto exit;
@@ -955,6 +955,7 @@
free(cmdString);
DO_ERROR_JDUGE;
getNumOfRetries(&pinRetries);
+ RLOGI("ril_handle_sim_pin_puk %d-%d-%d-%d.", pinRetries.pin1Retries,pinRetries.pin2Retries,pinRetries.puk1Retries,pinRetries.puk2Retries);
if (response->success != 0) {
keepPinCode(request, data);
err = sendPinpukSuccResponse(request, token, pinRetries, is_code_fd);
@@ -1178,7 +1179,7 @@
int result;
char *cmd;
- RLOGD("ril_request_simcard_reset()");
+ //RLOGD("ril_request_simcard_reset()");
err = at_send_command_singleline("AT+CFUN?", "+CFUN:", &response);
@@ -1265,7 +1266,7 @@
}
error:
- RLOGD("ril_request_simcard_reset: failed!");
+ RLOGE("ril_request_simcard_reset: failed,result=%d!", result);
//RIL_onRequestComplete(token, RIL_E_GENERIC_FAILURE, NULL, 0);
updateRadioState();//if at error, we must update radio state
@@ -1307,7 +1308,7 @@
} else { // ZUFCH:len, XXXX9000
cmdLen = strlen(data) - 4;
data[cmdLen] = '\0';
- RLOGD("handle_stk cmdLen=%d\n", cmdLen);
+ //RLOGD("handle_stk cmdLen=%d\n", cmdLen);
}
RIL_onUnsolicitedResponse(RIL_UNSOL_STK_PROACTIVE_COMMAND, data, cmdLen);
/* Free allocated memory and return */
@@ -1320,7 +1321,7 @@
if (linesave != NULL) {
free(linesave);
}
- RLOGD("%s: Error parameter in ind msg: %s", __FUNCTION__, s);
+ RLOGE("%s: Error parameter in ind msg: %s", __FUNCTION__, s);
return;
}
@@ -1408,7 +1409,7 @@
simStatus = parseUsimInitResult(linesave);
RLOGD("handle_zurdy simStatus= %d\n", simStatus);
if (simStatus != oldStatus) {
- RLOGD("handle_zurdy: %d - %d \n", simStatus, oldStatus);
+ //RLOGD("handle_zurdy: %d - %d \n", simStatus, oldStatus);
ril_request_get_sim_status(0, NULL, 0, NULL);
RIL_onUnsolicitedResponse(RIL_UNSOL_RESPONSE_SIM_STATUS_CHANGED, NULL, 0);
}
@@ -1527,7 +1528,7 @@
} else if (simStatus == SIM_NOT_READY) {
setRadioState(RADIO_STATE_SIM_NOT_READY);
} else {
- RLOGD("Unexpected branch in %s", __FUNCTION__);
+ RLOGE("Unexpected branch in %s", __FUNCTION__);
}
}
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_sms.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_sms.c
index fad1dd8..caeec4c 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_sms.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_sms.c
@@ -79,9 +79,11 @@
cms_error:
if (at_get_cms_error(response) == CMS_NW_TIMEOUT) {
RIL_onRequestComplete(token, RIL_E_SMS_SEND_FAIL_RETRY, NULL, 0);
+ RLOGE("ril_handle_cmd_send_sms_timeout:CMS_NW_TIMEOUT");
goto exit;
}
error:
+ RLOGE("ril_handle_cmd_send_sms_timeout:err=%d", err);
RIL_onRequestComplete(token, RIL_E_GENERIC_FAILURE, NULL, 0);
exit:
at_response_free(response);
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ss.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ss.c
index 9c4e043..3bfc206 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ss.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ss.c
Binary files differ
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_atchn_api.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_atchn_api.c
deleted file mode 100755
index 04998f9..0000000
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_atchn_api.c
+++ /dev/null
@@ -1,223 +0,0 @@
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <assert.h>
-#include <syslog.h>
-#include <sys/klog.h>
-#include <sys/msg.h>
-#include <sys/socket.h>
-#include <linux/sockios.h>
-#include <sys/un.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <pthread.h>
-#include <sys/prctl.h>
-#include <semaphore.h>
-
-#include "zxic_atchn_api.h"
-
-#define ATCHN_STOP_INTERVAL_NS 2000000
-
-#define EAP_PRINT "[ATCHN]"
-
-struct at_chn_context_t {
- /*ͨµÀÃû*/
- char name[ZXIC_ATCHN_NAME_SIZE_MAX];
- /*ͨµÀ±êÖ¾*/
- int flags;
- int modid;
- int msgq;
- pthread_t threadid;
- int bstop;
- sem_t semid;
-
- struct at_chn_calls_t *callbacks;
- void *priv;
-};
-
-static void atchn_thread_entry(void *arg)
-{
- struct at_chn_context_t *patcc = (struct at_chn_context_t *)arg;
- int iret = 0;
- MSG_BUF msgbuf;
- LONG msgsize = sizeof(MSG_BUF) - sizeof(LONG);
- char name[32] = {0};
- char *buf = NULL;
- unsigned short len;
-
- if (NULL == patcc) {
- slog(EAP_PRINT, SLOG_ERR, "Err: atchn_thread_entry Arg Invalid.\n");
- return;
- }
-
- snprintf(name, 31, "zxicatchn%d", patcc->modid);
- prctl(PR_SET_NAME, name, 0, 0, 0);
- slog(EAP_PRINT, SLOG_DEBUG, "atchn_thread_entry(%s) enter!\n", name);
-
- while (!patcc->bstop) {
- memset(&msgbuf, 0, sizeof(msgbuf));
- iret = msgrcv(patcc->msgq, &msgbuf, msgsize, 0, 0);
- if (-1 == iret) {
- slog(EAP_PRINT, SLOG_ERR, "Err: msgrcv errno=%s\n", errno);
- continue;
- }
- if (MODULE_ID_AT_CTL != msgbuf.src_id &&
- patcc->modid != msgbuf.src_id) {
- slog(EAP_PRINT, SLOG_DEBUG, "Drop unknow src_id(%d) msg!\n", msgbuf.src_id);
- continue;
- }
- buf = (char *)msgbuf.aucDataBuf;
- len = msgbuf.usDataLen;
-
- if (MSG_CMD_ATCHN_STOP == msgbuf.usMsgCmd) {
- if (NULL != patcc->callbacks->atchn_destroy_callback) {
- patcc->callbacks->atchn_destroy_callback((long)patcc, patcc->priv);
- }
- slog(EAP_PRINT, SLOG_NORMAL, "Stop %s thread.\n", name);
- patcc->bstop = 1;
- break;
- } else if (MSG_CMD_SEND_ATRSP_BY_MSG == msgbuf.usMsgCmd) {
- /*message forward*/
- if (NULL != patcc->callbacks->atchn_read_callback) {
- patcc->callbacks->atchn_read_callback(buf, len, patcc->priv);
- }
- } else {
- slog(EAP_PRINT, SLOG_ERR, "Err:%s Unknow msg(0x%x)!\n", patcc->name, msgbuf.usMsgCmd);
- if (NULL != buf) {
- slog(EAP_PRINT, SLOG_ERR, "Err:%s %s\n", patcc->name, buf);
- }
- }
- }
-
- if (msgctl(patcc->msgq, IPC_RMID, 0) < 0) {
- slog(EAP_PRINT, SLOG_ERR, "%d:%s\n", errno, strerror(errno));
- }
-
- patcc->msgq = 0;
- slog(EAP_PRINT, SLOG_DEBUG, "atchn_thread_entry(%s) end!\n", name);
- sem_post(&patcc->semid);
-}
-
-long zxic_register_atchn(char *name, struct at_chn_calls_t *callbacks, void *priv, unsigned int flag)
-{
- struct at_chn_context_t *patcc = NULL;
- int module_id = MODULE_ID_ATDYNAMIC_BASE;
- int my_handle = 0;
- long handle = ZXIC_ATCHN_HANDLE_BAD;
- int attribution;
-
- if (NULL == callbacks) {
- slog(EAP_PRINT, SLOG_ERR, "Err:Argument Invalid.\n");
- return ZXIC_ATCHN_HANDLE_BAD;
- }
- patcc = (struct at_chn_context_t *)malloc(sizeof(struct at_chn_context_t));
- if (NULL == patcc) {
- slog(EAP_PRINT, SLOG_ERR, "Err:Malloc memory fail.\n");
- return ZXIC_ATCHN_HANDLE_BAD;
- }
- memset(patcc, 0, sizeof(struct at_chn_context_t));
- patcc->flags = flag;
- while ((my_handle = msgget(module_id, IPC_CREAT | IPC_EXCL | 0600)) == -1) {
- module_id++;
- if (module_id > MODULE_ID_ATDYNAMIC_END) {
- slog(EAP_PRINT, SLOG_ERR, "At dynamic msg is not free timely!!!!!!!!!!!\n");
- goto exit;
- }
- }
- patcc->msgq = my_handle;
- patcc->modid = module_id;
- patcc->bstop = 0;
- patcc->callbacks = callbacks;
- patcc->priv = priv;
- if (NULL != name && 0 < strlen(name)) {
- strncpy(patcc->name, name, ZXIC_ATCHN_NAME_SIZE_MAX - 1);
- } else {
- snprintf(patcc->name, ZXIC_ATCHN_NAME_SIZE_MAX - 1, "atchn%d", module_id);
- }
-
- sem_init(&patcc->semid, 0, 0);
-
- /*create at receive thread*/
- if (0 != pthread_create(&(patcc->threadid), NULL, (void *)atchn_thread_entry, (void *)patcc)) {
- slog(EAP_PRINT, SLOG_ERR, "pthread_create fail!errnno %d.\n", errno);
- goto exit;
- }
-
- /*¶©ÔÄÖ÷¶¯Éϱ¨*/
- if ((patcc->flags & ZXIC_ATCHN_FLAGS_AUTO) > 0) {
- attribution = 0;
- } else {
- attribution = 1;
- }
- /*´´½¨Í¨µÀ*/
- if (0 != ipc_send_message(patcc->modid, MODULE_ID_AT_CTL, MSG_CMD_SET_MSG_IS_FD, sizeof(attribution), &attribution, 0)) {
- slog(EAP_PRINT, SLOG_ERR, "The at channel(%s) register fail.\n", patcc->name);
- goto exit;
- }
- slog(EAP_PRINT, SLOG_DEBUG, "The at channel(%s) register succuss.\n", patcc->name);
-
- handle = (long)patcc;
- return handle;
-
-exit:
- if (NULL != patcc) {
- free(patcc);
- }
-
- return ZXIC_ATCHN_HANDLE_BAD;
-}
-
-int zxic_unregister_atchn(long handle)
-{
- struct at_chn_context_t *patcc = NULL;
- struct timespec ts;
-
- if (ZXIC_ATCHN_HANDLE_BAD == handle) {
- slog(EAP_PRINT, SLOG_ERR, "Err:The handle is bad!\n");
- return -1;
- }
- patcc = (struct at_chn_context_t *)handle;
- if (MODULE_ID_ATDYNAMIC_BASE > patcc->modid || patcc->modid > MODULE_ID_ATDYNAMIC_END) {
- slog(EAP_PRINT, SLOG_ERR, "Err:The modid is error!\n");
- return -1;
- }
-
- /*ɾ³ýͨµÀ*/
- ipc_send_message(patcc->modid, MODULE_ID_AT_CTL, MSG_CMD_DEL_MSG_IS_FD, 0, NULL, 0);
- /*Í£Ö¹½ÓÊÕÏß³Ì*/
- ipc_send_message(patcc->modid, patcc->modid, MSG_CMD_ATCHN_STOP, 0, NULL, 0);
-
- if (clock_gettime(CLOCK_REALTIME, &ts) == -1) {
- slog(EAP_PRINT, SLOG_NORMAL, "clock_gettime fail.\n");
- }
- ts.tv_sec += 0;
- ts.tv_nsec += ATCHN_STOP_INTERVAL_NS;
- while ((sem_timedwait(&patcc->semid, &ts)) == -1 && errno == EINTR) {
- slog(EAP_PRINT, SLOG_ERR, "sem_timedwait timeout!\n");
- continue;
- }
-
- slog(EAP_PRINT, SLOG_DEBUG, "The at channel(%s) unregister succuss.\n", patcc->name);
- sem_destroy(&patcc->semid);
- free(patcc);
- return 0;
-}
-
-int zxic_write_atchn(long handle, char *buf, unsigned int len)
-{
- struct at_chn_context_t *patcc = NULL;
-
- if (ZXIC_ATCHN_HANDLE_BAD == handle) {
- slog(EAP_PRINT, SLOG_ERR, "Err:The handle is bad!\n");
- return -1;
- }
- patcc = (struct at_chn_context_t *)handle;
- if (MODULE_ID_ATDYNAMIC_BASE > patcc->modid || patcc->modid > MODULE_ID_ATDYNAMIC_END) {
- slog(EAP_PRINT, SLOG_ERR, "Err:The modid is error!\n");
- return -1;
- }
-
- return ipc_send_message(patcc->modid, MODULE_ID_AT_CTL, MSG_CMD_SEND_ATREQ_BY_MSG, len, (void *)buf, 0);
-}
-
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_atchn_api.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_atchn_api.h
deleted file mode 100755
index b6fcda4..0000000
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_atchn_api.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/**
- * @file zxic_atchn_api.h
- * @brief at channel¹«¹²½Ó¿Ú
- *
- * Copyright (C) 2022 Sanechips Technology Co., Ltd.
- * @author
- * @ingroup
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- */
-
-#ifndef ZXIC_ATCHN_API_H
-#define ZXIC_ATCHN_API_H
-
-/*******************************************************************************
- * Include header files *
- ******************************************************************************/
-#include "zxic_log.h"
-//#include "eap_api.h"
-/*******************************************************************************
- * Macro definitions *
- ******************************************************************************/
-/*ÎÞЧͨµÀ¾ä±ú*/
-#define ZXIC_ATCHN_HANDLE_BAD (-1)
-/*ͨµÀÃû×Ö·û×î´ó³¤¶È*/
-#define ZXIC_ATCHN_NAME_SIZE_MAX (64)
-
-/*ÎÞÖ÷¶¯Éϱ¨*/
-#define ZXIC_ATCHN_FLAGS_NONE 0
-/*½ÓÊÕÖ÷¶¯Éϱ¨*/
-#define ZXIC_ATCHN_FLAGS_AUTO 1 >> 0
-/*******************************************************************************
- * Type definitions *
- ******************************************************************************/
-/*ͨµÀ»Øµ÷ÐÅÏ¢*/
-struct at_chn_calls_t {
- /*ͨµÀ¶Á»Øµ÷¡£Ö÷ÒªÓÃÀ´½ÓÊÕATÇëÇóÏìÓ¦ºÍÖ÷¶¯Éϱ¨*/
- int (*atchn_read_callback)(char *data, unsigned int len, void *priv);
- /*ͨµÀÏú»Ù»Øµ÷*/
- int (*atchn_destroy_callback)(long handle, void *priv);
-};
-/*******************************************************************************
- * Global variable declarations *
- ******************************************************************************/
-
-/*******************************************************************************
- * Global function declarations *
- ******************************************************************************/
-/**
- * @brief ×¢²áеÄATͨµÀ¡£
- * @param name ͨµÀÃû¡£Èç¹ûÉèÖÿգ¬Ôò²ÉÓÃĬÈÏÖµatchn#¡£
- * @param callbacks ͨµÀ»Øµ÷ÐÅÏ¢at_chn_calls_t¡£
- * @param priv ˽ÓÐÊý¾Ý£¬µ÷ÓÃat_chn_calls_tÖлص÷ʱ´øÈë¡£
- * @param flag ͨµÀ±êÖ¾¡£Ö§³ÖZXIC_ATCHN_FLAGS_NONE¡¢ZXIC_ATCHN_FLAGS_AUTOµÈ
- * @return ATͨµÀ¾ä±ú¡£·µ»Ø-1±íʾͨµÀ×¢²áʧ°Ü¡£
- * @note
- */
-long zxic_register_atchn(char *name, struct at_chn_calls_t *callbacks, void *priv, unsigned int flag);
-/**
- * @brief ×¢ÏúÖ¸¶¨ATͨµÀ¡£
- * @param handle ͨµÀ¾ä±ú£¬zxic_register_atchn·µ»ØÖµ¡£
- * @return 0±íʾ³É¹¦£»-1±íʾʧ°Ü¡£
- * @note
- */
-int zxic_unregister_atchn(long handle);
-/**
- * @brief ·¢ËÍATÃüÁî¡£
- * @param handle ͨµÀ¾ä±ú£¬zxic_register_atchn·µ»ØÖµ¡£
- * @param buf ATÃüÁ´æ¡£
- * @param len ATÃüÁ¶È¡£
- * @return 0±íʾ³É¹¦£»-1±íʾʧ°Ü¡£
- * @note ÍêÕûµÄATÃüÁî±ØÐë´ø"/r/n"¡£
- */
-int zxic_write_atchn(long handle, char *buf,unsigned int len);
-
-#endif
\ No newline at end of file
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_log.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_log.h
index a7cfac7..7ea0513 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_log.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_log.h
@@ -15,7 +15,7 @@
} while(0)
#define RLOGD(...) do {ril_log_slog(RIL_PRINT,SLOG_DEBUG,__VA_ARGS__);}while(0)
-#define RLOGI(...) do {ril_log_slog(RIL_PRINT,SLOG_DEBUG,__VA_ARGS__);}while(0)
+#define RLOGI(...) do {ril_log_slog(RIL_PRINT,SLOG_NORMAL,__VA_ARGS__);}while(0)
#define RLOGE(...) do {ril_log_slog(RIL_PRINT,SLOG_ERR,__VA_ARGS__);}while(0)
#endif
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/rild/Makefile b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/rild/Makefile
index f245196..764946a 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/rild/Makefile
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/rild/Makefile
@@ -16,7 +16,7 @@
CFLAGS += -I.
CFLAGS += -Werror=implicit-function-declaration
-CFLAGS += -fPIC -g -O0 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
+CFLAGS += -fPIC -g -O2 -DBINDER_IPC_32BIT=1 -DHAVE_ENDIAN_H -DHAVE_PTHREADS -DHAVE_SYS_UIO_H -DHAVE_POSIX_FILEMAP -DHAVE_STRLCPY -DHAVE_PRCTL -DHAVE_MEMSET16 -DHAVE_MEMSET32 -DANDROID_SMP=0
CFLAGS += -DRIL_SHLIB
#CFLAGS += -DANDROID_MULTI_SIM